/* Round 15 (29 Oct): landing page motion and polish. Justin's copy is unchanged.
   Hidden start states apply only under html.fx, which the head script sets when motion is allowed.
   Classes are prefixed lx- so they can't clash with the product-page CSS. */

/* Polish: nav items stay on one line (they wrapped at 1440) */
nav .navlink, nav .button { white-space: nowrap }

/* Hero: soft glow, line-by-line headline, image settles as you scroll */
.hero { position: relative }
.hero:before { content: ''; position: absolute; right: 0; top: -60px; width: min(620px, 100%); height: 420px; background: radial-gradient(closest-side, #1ab5c21c, transparent); pointer-events: none }
h1 .lx-l { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; color: #fff }
h1 .lx-l > span { display: block; color: inherit }
h1 .lx-l > span.lx-o { color: var(--orange) }
.workflowvisual > img { transform-origin: 60% 40%; will-change: transform }
.workflow { backdrop-filter: blur(6px) }
.workflow p { margin: 12px 0 }
.lx-g { display: inline-block; width: 1em; text-align: center; font-weight: 700 }

/* Friction (R16#4, #5; R17 photos removed): text cards with the icon badge on top */
.frictiongrid { gap: 28px }
.frictiongrid article.lx-fric { display: block; background: #fff; border: 1px solid #e2e5e4; border-radius: 10px; padding: 34px; box-shadow: 0 14px 34px #0a203810 }
.frictiongrid article.lx-fric + article.lx-fric { border-left: 1px solid #e2e5e4; padding-left: 34px }
.lx-fric > .symbol { width: 54px; height: 54px; margin: 0; background: #eef3f4; color: #1c5a6b }
.lx-fric:last-child > .symbol { background: #fff3dc; color: #b7781a }
.lx-fric > div { padding: 22px 0 0 }
.friction .lx-fric h3 { font-size: 23px; line-height: 1.25; letter-spacing: -.4px; margin: 0 0 12px }
.friction .lx-fric p { font-size: 17px; line-height: 1.65 }
.symbol svg, .principles article > span svg, .person svg { width: 22px; height: 22px }
.lx-fric > .symbol svg { width: 25px; height: 25px }
details > p { overflow: hidden }

/* Product cards (R16#6): the Explore links are solid buttons */
.card .cardcopy > a { align-self: flex-start; margin-top: auto; padding: 13px 14px 13px 22px; border: 0; border-radius: 6px; background: var(--orange); color: #0a1d2e; font-size: 14px; font-weight: 600; justify-content: flex-start; align-items: center; gap: 18px; box-shadow: 0 10px 24px #ffab1824; transition: background .2s, transform .2s }
.card .cardcopy > a:hover { color: #0a1d2e; background: #ffc15c }
.card .cardcopy > a > span, .card:hover .cardcopy > a > span { margin: 0; width: 28px; height: 28px; background: #0a1d2e; color: #fff; border: 0; transition: transform .2s }
.card .cardcopy > a:hover > span { transform: translate(2px, -2px) }

/* Control (R16#2, #8): copy and principles on the left, hub-and-spoke on the right */
.lx-ctl { display: grid; grid-template-columns: 1fr 1.1fr; gap: 70px; align-items: center }
.lx-ctl .principles { grid-template-columns: 1fr; gap: 0; margin: 0 }
.lx-ctl .principles article { align-items: center; padding: 20px 0 }
.lx-ctl .principles article + article { border-left: 0; padding-left: 0; border-top: 1px solid #2d4d61 }
.lx-ctl .principles p { max-width: none; font-size: 13px }
.lx-ctl .principles h3 { font-size: 16px; margin-bottom: 6px }
.principles article > span { color: #cfe3ea }
.lx-hub { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto auto auto; gap: 46px 34px; align-items: center; justify-items: center; text-align: center }
.lx-hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none }
.lx-hub-lines line { stroke: #3bb2bd; stroke-opacity: .55; stroke-width: 1.5 }
.lx-hub-lines circle { fill: #ffab18 }
.lx-node, .lx-core { position: relative; z-index: 1; width: 100%; max-width: 158px; background: #0c354c; border: 1px solid #2d6a80; border-radius: 10px; padding: 18px 12px 16px; transition: border-color .3s, box-shadow .3s }
.lx-node, .lx-core { min-height: 166px; display: flex; flex-direction: column; align-items: center; justify-content: center }
.lx-node.hit { border-color: #ffab18; box-shadow: 0 0 0 4px #ffab1822 }
.n1 { grid-area: 1 / 2 } .n2 { grid-area: 2 / 3 } .n3 { grid-area: 3 / 2 } .n4 { grid-area: 2 / 1 }
.lx-core { grid-area: 2 / 2; background: #0f4258; border-color: #3bb2bd; box-shadow: 0 0 0 6px #3bb2bd14, 0 18px 40px #00101f55 }
.lx-hub .person { width: 50px; height: 50px; font-size: 16px; box-shadow: none }
.lx-core .person { width: 58px; height: 58px; border-color: #3bb2bd; background: #134e66 }
.lx-hub .person svg { width: 26px; height: 26px; color: #9fe0e6 }
.lx-hub h3 { font-size: 14px; font-weight: 500; line-height: 1.3; margin: 12px 0 9px }
.lx-core h3 { margin-bottom: 0 }
.lx-hub small { display: inline-block; font-size: 10px; border: 1px solid #2d7c91; border-radius: 4px; padding: 5px 7px; color: #91ced5 }
.lx-hub .gold small { border-color: #987b30; color: #e1b965 }

/* Enquiry (R16#1): team photo as the section background, navy overlay keeps the copy readable */
.enquiry { position: relative; overflow: hidden }
.lx-ebg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0% 50% }
.enquiry:before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #072a40b8 0%, #072a40a6 38%, #072a40c4 62%, #072a40e0 100%) }
.enquirygrid { position: relative; z-index: 2 }

@media (max-width: 900px) {
  .lx-ctl { grid-template-columns: 1fr; gap: 40px }
}
@media (max-width: 750px) {
  .frictiongrid article.lx-fric, .frictiongrid article.lx-fric + article.lx-fric { border-top: 1px solid #e2e5e4; padding: 26px 24px 28px }
  .lx-fric > div { padding: 18px 0 0 }
  .friction .lx-fric h3 { font-size: 21px }
  .friction .lx-fric p { font-size: 16px }
  /* phones: two teams above the hub, two below, spokes run diagonally (clockwise: M, S, F, SA) */
  .lx-hub { grid-template-columns: 1fr 1fr; gap: 44px 22px }
  .lx-core { grid-area: 2 / 1 / 3 / 3; max-width: 190px }
  .n1 { grid-area: 1 / 1 } .n2 { grid-area: 1 / 2 } .n3 { grid-area: 3 / 2 } .n4 { grid-area: 3 / 1 }
  .lx-node { max-width: none; height: 100% }
  .enquiry:before { background: linear-gradient(#072a40d9, #072a40f0) }
  .lx-ebg { object-position: 28% 50% }
}

/* ---------- Motion (only when html.fx) ---------- */
.fx .lx-r { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); transition-delay: var(--d, 0s) }
.fx .lx-r.lx-in { opacity: 1; transform: none }
.fx .lx-blur { opacity: 0; filter: blur(10px); transform: scale(.98); transition: opacity 1s, filter 1s, transform 1s cubic-bezier(.22,1,.36,1) }
.fx .lx-blur.lx-in { opacity: 1; filter: none; transform: none }
.fx .lx-wipe { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.65,0,.35,1) }
.fx .lx-wipe.lx-in { clip-path: inset(0 0 0 0) }

/* Hero entrance */
.fx h1 .lx-l > span { transform: translateY(105%); transition: transform 1s cubic-bezier(.22,1,.36,1); transition-delay: var(--d, 0s) }
.fx .hero.lx-in h1 .lx-l > span { transform: none }
/* R16#3: each workflow box pops in whole */
.fx .workflow { opacity: 0; transform: translateY(14px) scale(.86); transition: opacity .35s, transform .6s cubic-bezier(.34,1.56,.64,1); transition-delay: var(--d, 0s) }
.fx .hero.lx-in .workflow { opacity: 1; transform: none }

/* Profit Protection diagram: items, then the connector, then the exception */
.fx .packageitems > span { opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .4s, transform .5s cubic-bezier(.34,1.56,.64,1); transition-delay: var(--d, 0s) }
.fx .packagevisual.lx-in .packageitems > span { opacity: 1; transform: none }
.fx .diagramconnector { transform: scaleX(0); transform-origin: left; transition: transform .4s ease-out .95s }
.fx .packagevisual.lx-in .diagramconnector { transform: none }
.fx .exception { opacity: 0; transform: scale(.7); transition: opacity .35s 1.3s, transform .55s cubic-bezier(.34,1.56,.64,1) 1.3s }
.fx .packagevisual.lx-in .exception { opacity: 1; transform: none; animation: lx-ring 1s ease-out 1.85s 2 }
@keyframes lx-ring { 0% { box-shadow: 0 0 0 0 #f2b84166 } 100% { box-shadow: 0 0 0 14px #f2b84100 } }

/* Lead Management diagram: stage, arrow, stage, arrow, stage; bars fill after each stage */
.fx .leadstage { opacity: 0; transform: translateY(14px) scale(.95); transition: opacity .45s, transform .55s cubic-bezier(.34,1.56,.64,1); transition-delay: var(--d, 0s) }
.fx .leadvisual.lx-in .leadstage { opacity: 1; transform: none }
.fx .stagearrow { opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s; transition-delay: var(--d, 0s) }
.fx .leadvisual.lx-in .stagearrow { opacity: 1; transform: none }
.fx .leadstage i { transform: scaleX(0); transform-origin: left; transition: transform .5s ease-out; transition-delay: calc(var(--d, 0s) + .35s) }
.fx .leadvisual.lx-in .leadstage i { transform: none }

/* Hub: the core pops, each spoke draws out to its team, the team pops as the spoke arrives */
.fx .lx-core, .fx .lx-node { opacity: 0; transform: scale(.82); transition: opacity .35s, transform .55s cubic-bezier(.34,1.56,.64,1), border-color .3s, box-shadow .3s; transition-delay: var(--d, 0s) }
.fx .lx-hub.lx-in .lx-core, .fx .lx-hub.lx-in .lx-node { opacity: 1; transform: none }
.fx .lx-hub-lines line { transition: stroke-dashoffset .5s ease-out; transition-delay: var(--d, 0s) }
.fx .lx-hub:not(.lx-in) .lx-hub-lines line { visibility: hidden }

@media (prefers-reduced-motion: reduce) {
  .workflowvisual > img { transform: none !important }
}

/* Round 23 (Ann, slides 23/54): problem-card icons bigger, beside the copy */
.frictiongrid article.lx-fric { display: flex; gap: 26px; align-items: flex-start }
.lx-fric > .symbol { width: 76px; height: 76px; border-radius: 18px }
.lx-fric > .symbol svg { width: 38px; height: 38px }
.lx-fric > div { padding: 4px 0 0 }
/* Round 23 (Ann, slides 25/56): purpose-built icon where the 50+ figure was */
.lx-pb { display: flex; align-items: center; gap: 18px; margin-top: 38px }
.lx-pb-ic { width: 84px; height: 84px; border-radius: 20px; background: #fff3dc; color: #b7781a; display: flex; align-items: center; justify-content: center; flex-shrink: 0 }
.lx-pb-ic svg { width: 44px; height: 44px }
.lx-pb b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.4px; color: var(--ink) }
.lx-pb small { font-size: 15px; color: var(--gray) }
/* Round 23 (Ann, slides 22/29): burger menu at the top right on phone and tablet */
.lx-burger { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff38; border-radius: 10px; background: transparent; color: #fff; align-items: center; justify-content: center; cursor: pointer }
.lx-burger svg { width: 22px; height: 22px }
.lx-menu[hidden] { display: none }
.lx-menu { border-top: 1px solid #ffffff14; padding: 6px 0 14px }
.lx-menu a, .lx-menu button { display: block; width: 100%; text-align: left; padding: 15px 24px; font-family: inherit; font-size: 17px; font-weight: 500; color: #fff; background: none; border: 0; border-bottom: 1px solid #ffffff10; cursor: pointer; text-decoration: none }
@media (max-width: 900px) { .lx-burger { display: inline-flex } }
@media (min-width: 901px) { .lx-menu { display: none !important } }
@media (max-width: 600px) {
  .frictiongrid article.lx-fric { gap: 18px }
  .lx-fric > .symbol { width: 60px; height: 60px; border-radius: 14px }
  .lx-fric > .symbol svg { width: 30px; height: 30px }
  .lx-fric > div { padding: 0 }
  .lx-pb-ic { width: 68px; height: 68px }
  .lx-pb-ic svg { width: 36px; height: 36px }
  .lx-pb b { font-size: 20px }
}

/* Round 23b (Wilson 1A): stock-photo people in the team diagram (Ann, slides 26/57) */
.lx-hub .person.photo { padding: 0; overflow: hidden; width: 60px; height: 60px; border-width: 2px }
.lx-hub .person.photo img { width: 100%; height: 100%; object-fit: cover; display: block }

/* Round 24 (Wilson): problem-card icon centred on the copy */
.frictiongrid article.lx-fric { align-items: center }
.lx-fric > div { padding: 0 }
/* Round 24: purpose-built icon sits beside the heading and draws in when the section arrives */
.lx-h2row { display: flex; align-items: center; gap: 26px; margin: 0 0 26px }
.lx-h2row h2 { margin: 0 }
.lx-pb { margin-top: 30px; padding-left: 16px; border-left: 3px solid #ffab18 }
.fx .lx-h2row .lx-pb-ic { opacity: 0; transform: scale(.6) rotate(-8deg); transition: opacity .35s .15s, transform .6s .15s cubic-bezier(.34,1.56,.64,1) }
.fx .lx-h2row .lx-pb-ic path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s .45s ease-out }
.fx .lx-h2row .lx-pb-ic path + path { transition-delay: 1.1s }
.fx .lx-h2row.lx-in .lx-pb-ic { opacity: 1; transform: none }
.fx .lx-h2row.lx-in .lx-pb-ic path { stroke-dashoffset: 0 }
/* Round 24: team photos lead the cards, text is secondary */
.lx-node { max-width: 190px; min-height: 0; padding: 16px 10px 14px }
.lx-hub .person.photo { width: 116px; height: 116px; border-width: 3px }
.lx-node h3 { font-size: 13px; margin: 10px 0 6px }
.lx-node small { font-size: 9.5px; padding: 4px 6px }
@media (max-width: 900px) {
  .lx-h2row { gap: 18px }
  .lx-pb { margin-top: 24px }
}
@media (max-width: 750px) {
  .lx-node { max-width: none }
  .lx-hub .person.photo { width: 96px; height: 96px }
}

/* Round 24c (Wilson): icon as tall as the two-line heading, so the pair reads as one block */
.lx-h2row .lx-pb-ic { width: 122px; height: 122px; border-radius: 26px }
@media (max-width: 900px) { .lx-h2row .lx-pb-ic { width: 100px; height: 100px; border-radius: 22px } }
@media (max-width: 750px) { .lx-h2row .lx-pb-ic { width: 97px; height: 97px } }
.lx-h2row .lx-pb-ic svg { width: 54%; height: 54% }

/* Round 26 (Ann): the icon sits below "Connected teams. Coordinated AI." and carries an AI sparkle */
.lx-h2row.lx-icrow { margin: 32px 0 0 }
.lx-h2row.lx-icrow .lx-pb-ic { width: 96px; height: 96px; border-radius: 22px }
@media (max-width: 900px) { .lx-h2row.lx-icrow { margin-top: 26px } .lx-h2row.lx-icrow .lx-pb-ic { width: 84px; height: 84px; border-radius: 20px } }
.lx-pb-ic .lx-ai { fill: #ffab18; stroke: #b7781a }
.fx .lx-h2row .lx-pb-ic path.lx-ai { fill-opacity: 0; transition: stroke-dashoffset .6s 1.7s ease-out, fill-opacity .4s 2.2s }
.fx .lx-h2row.lx-in .lx-pb-ic path.lx-ai { fill-opacity: 1 }

/* Round 28: light only. Stops phone browsers' "dark theme for sites" from repainting the page */
:root { color-scheme: only light; }

/* Round 28 backup: bars drawn as an SVG image so a forced dark mode cannot repaint them away */
.leadvisual .leadstage i { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' preserveAspectRatio='none'%3E%3Crect width='10' height='10' fill='%23e5e9ec'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
