/* Homepage, wide screens (≥ 901px): the S1-style scroll scenes. Paired with /assets/js/pages/home.js.
   1. Assistants orbit "Your brand", then settle into one answer   (#assistants)
   2. The pinned "how it works" story: Check · Fix · Named · Prove  (#how .hw)
   3. The AI team as a live machine                                (#team .mach)
   4. The orange thread from the hero to the closing form           (.hthread, built by home.js)
   5. Depth: S1 logos fly in and tilt, magnetic buttons
   Phones (≤ 900px) keep direction B exactly: every new block here is .dt-only or inside a wide-screen query. */
.home main { position: relative; }

/* ---------- the orange thread ---------- */
.hthread { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; overflow: visible; }
.hthread .t-bg { fill: none; stroke: rgba(245,80,43,.16); stroke-width: 1.5; stroke-dasharray: 2 7; stroke-linecap: round; }
.hthread .t-fg { fill: none; stroke: var(--or); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hthread .t-halo { fill: var(--or); opacity: .18; transform-box: fill-box; transform-origin: center; animation: t-breathe 2.4s ease-in-out infinite; }
.hthread .t-dot { fill: #fff; stroke: var(--or); stroke-width: 3; filter: drop-shadow(0 0 6px rgba(245,80,43,.7)); }
.hthread .t-head { transition: opacity .3s; }
.hthread .t-stop { fill: var(--bg); stroke: #d3c9bc; stroke-width: 1.5; transition: fill .4s, stroke .4s; }
.hthread .t-stop.on { fill: var(--or); stroke: var(--or); }
@keyframes t-breathe { 50% { transform: scale(1.7); opacity: .05; } }
.home .wl.t-land { transition: box-shadow .8s cubic-bezier(.2,.8,.2,1); }
.home .wl.t-landed { box-shadow: 0 0 0 6px rgba(245,80,43,.12), 0 18px 50px rgba(245,80,43,.16); }
.home .eyebrow { transition: color .6s; }
.home .eyebrow.t-lit { color: var(--or-text); }

@media (min-width: 901px) {
  /* the old click-through demo is replaced by the pinned story on wide screens */
  .home .how { display: none; }
  .home .split-line { padding-bottom: .04em; }

  /* ---------- 1. assistants orbit your brand ---------- */
  .orb-s { position: relative; height: 230vh; padding: 0 var(--g); }
  .orb-pin { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 72px); align-items: center; padding-top: 64px; }
  .orb-copy h2 { max-width: 13ch; }
  .orb-stage { position: relative; height: min(620px, 78vh); }
  .orb-stage::before { content: ""; position: absolute; left: 50%; top: 50%; width: 76%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(245,80,43,.13), rgba(245,80,43,0)); animation: orb-breathe 7s ease-in-out infinite; pointer-events: none; }
  @keyframes orb-breathe { 50% { transform: scale(1.15); opacity: .7; } }
  .orb-rings { position: absolute; left: 50%; top: 50%; width: min(100%, 700px); translate: -50% -50%; overflow: visible; pointer-events: none; }
  .orb-rings ellipse { fill: none; stroke: rgba(60,40,20,.18); stroke-width: 1; stroke-dasharray: 2 6; vector-effect: non-scaling-stroke; }
  .orb-core { position: absolute; left: 50%; top: 50%; width: 128px; height: 128px; margin: -64px 0 0 -64px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: 0 0 0 14px rgba(245,80,43,.06), 0 0 0 32px rgba(245,80,43,.035), 0 24px 60px rgba(60,40,20,.14); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; z-index: 6; will-change: transform, opacity; }
  .orb-core i { width: 12px; height: 12px; border-radius: 50%; background: var(--or); box-shadow: 0 0 0 6px rgba(245,80,43,.16); }
  .orb-core span { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
  .orb-card { position: absolute; left: 50%; top: 50%; width: min(480px, 94%); translate: -50% -50%; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
  .oc-bg { position: absolute; inset: 0; border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(60,40,20,.14); opacity: var(--cb, 1); transform: scale(calc(.94 + var(--cb, 1) * .06)); }
  .orb-card > :not(.oc-bg) { position: relative; }
  .oc-hd { display: flex; justify-content: space-between; font-size: 10.5px; }
  .oc-q { margin: 0; align-self: flex-end; background: #f3eee6; border-radius: 16px 16px 4px 16px; padding: 10px 14px; font-size: 15px; }
  .oc-hd, .oc-q { opacity: var(--cb, 1); }
  .oc-asked { display: flex; flex-wrap: wrap; gap: 7px; }
  .chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font: 500 13px var(--sans); color: var(--ink); white-space: nowrap; box-shadow: 0 8px 22px rgba(60,40,20,.08); will-change: transform; }
  .chip img { width: 18px; height: 18px; }
  .oc-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
  .oc-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 15px; color: var(--body); will-change: transform, opacity; }
  .oc-list .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #f1ece4; font: 500 12px var(--mono); color: var(--mute); flex: none; }
  .oc-list li.you { border-color: rgba(245,80,43,.45); background: var(--or-soft); color: var(--ink); box-shadow: 0 12px 30px rgba(245,80,43,.12); }
  .oc-list li.you .n { background: var(--or); color: #fff; }
  .oc-list li.you b { font-weight: 600; }
  .oc-list .nb { margin-left: auto; font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--or-ink); padding: 4px 9px; border-radius: 999px; }

  /* ---------- 2. how it works: the pinned story ---------- */
  .hw { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); margin-top: clamp(8px, 2vw, 24px); }
  .hw-beats { list-style: none; margin: 0; padding: 0 0 8vh; }
  .hw-beats li { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; max-width: 30rem; }
  .hw.live .hw-beats li { opacity: .22; transition: opacity .5s; }
  .hw.live .hw-beats li.on { opacity: 1; }
  .hw-beats .mono { color: var(--or-text); }
  .hw-beats h3 { margin: 14px 0 0; font-weight: 500; font-size: clamp(34px, 3.6vw, 56px); line-height: 1; letter-spacing: -.045em; }
  .hw-beats p { margin: 18px 0 0; font-size: 18px; line-height: 1.55; color: var(--body); max-width: 40ch; }
  .hw-stv { position: sticky; top: 0; height: 100vh; min-width: 0; padding: 100px 0 26px; display: flex; flex-direction: column; }
  .hw-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 6px; font-size: 11px; }
  .hw-steps li { position: relative; flex: 1; padding-top: 12px; color: var(--mute); transition: color .4s; }
  .hw-steps li::before, .hw-steps li i { content: ""; position: absolute; left: 0; top: 0; height: 2px; border-radius: 2px; }
  .hw-steps li::before { right: 0; background: var(--line); }
  .hw-steps li i { width: calc(var(--f, 0) * 100%); background: var(--or); }
  .hw-steps li.on { color: var(--ink); }
  .hw-stage { position: relative; flex: 1; min-height: 0; border-radius: 28px; display: grid; place-items: center; padding: 28px; overflow: hidden; perspective: 1400px;
    background: radial-gradient(circle at 50% 44%, rgba(255,255,255,.95), rgba(255,255,255,0) 62%), radial-gradient(rgba(60,40,20,.09) 1px, transparent 1.2px) 0 0 / 18px 18px; }
  .hw-stage::before { content: ""; position: absolute; left: 50%; top: 44%; width: 70%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(245,80,43,.14), rgba(245,80,43,0)); pointer-events: none; }
  .hw-note { margin: 10px 0 0; text-align: right; font-size: 11px; }
  .hw-card { position: relative; width: min(100%, 500px); background: var(--card); border-radius: 20px; box-shadow: 0 30px 80px rgba(60,40,20,.14); padding: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .6s; will-change: transform; }
  .hw-card .hd, .hw-monday .hd { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 13px; }
  .hw-card .hd .mono, .hw-monday .hd span + span { margin-left: auto; font-size: 10.5px; }
  .hw-monday .hd { font-size: 10.5px; }
  .hw-card .q { margin: 0; align-self: flex-end; background: #f3eee6; border-radius: 16px 16px 4px 16px; padding: 10px 14px; max-width: 85%; min-height: 1.55em; }
  .hw-card .q.typing span::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--ink); animation: blink .8s steps(2) infinite; }
  .hw-ans { position: relative; display: grid; }
  .hw-ans .a { grid-area: 1 / 1; margin: 0; line-height: 1.6; color: var(--body); transition: opacity .55s, transform .55s cubic-bezier(.2,.8,.2,1), filter .55s; }
  .hw-ans .a b { color: var(--ink); font-weight: 600; }
  .hw-ans .a2 { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  .hw-ans mark { background: var(--or-soft); color: var(--or-text); font-weight: 600; padding: 1px 7px; border-radius: 7px; box-shadow: inset 0 0 0 1px rgba(245,80,43,.3); white-space: nowrap; }
  .fx { white-space: nowrap; }
  .fx s { position: relative; text-decoration: none; font-weight: 600; color: var(--ink); background: var(--or-soft); padding: 0 4px; border-radius: 5px; transition: color .4s, background .4s; }
  .fx s::after { content: ""; position: absolute; left: 2px; right: 2px; top: 52%; height: 2px; background: var(--or-ink); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.6,0,.3,1); }
  .fx ins { display: inline-block; vertical-align: bottom; max-width: 0; opacity: 0; overflow: hidden; text-decoration: none; font-weight: 600; color: #1d7a4a; transition: max-width .6s .35s cubic-bezier(.2,.8,.2,1), opacity .4s .35s, margin .6s .35s; }
  .named { position: absolute; left: 20px; top: -14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--or-ink); color: #fff; font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 10px 26px rgba(214,63,28,.3); transform: scale(0) rotate(-10deg); transition: transform .5s cubic-bezier(.3,1.6,.5,1); }
  .named { transform-origin: 0 50%; }
  .named i { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
  .hw-mid { display: grid; }
  .hw-mid > * { grid-area: 1 / 1; transition: opacity .5s, transform .5s cubic-bezier(.2,.8,.2,1); }
  .hw-card .flag { display: flex; gap: 10px; align-items: flex-start; background: var(--or-soft); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; color: #6b2a17; align-self: start; }
  .hw-card .flag i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--or); margin-top: 6px; }
  .srcs { position: relative; display: grid; gap: 8px; padding-bottom: 30px; opacity: 0; transform: translateY(10px); }
  .srow { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; transition: border-color .4s; }
  .srow .mono { font-size: 10.5px; letter-spacing: .04em; }
  .tick { position: relative; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #d3c9bc; transition: background .35s, border-color .35s; }
  .tick::after { content: ""; position: absolute; left: 6px; top: 3px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
  .srow:nth-child(2) .tick, .srow:nth-child(2) .tick::after { transition-delay: .35s; }
  .stamp { position: absolute; right: 10px; bottom: -2px; padding: 4px 10px; border: 2px solid #1d7a4a; border-radius: 8px; background: rgba(255,255,255,.9); color: #1d7a4a; font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; opacity: 0; transform: rotate(-9deg) scale(1.8); transition: opacity .3s .8s, transform .45s .8s cubic-bezier(.3,1.5,.5,1); }
  .hw-monday { position: absolute; left: 50%; bottom: 28px; width: min(92%, 470px); background: var(--card); border-radius: 18px; box-shadow: 0 30px 80px rgba(60,40,20,.18); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; opacity: 0; transform: translate(-50%, 70%); transition: opacity .6s, transform .8s cubic-bezier(.2,.8,.2,1); }
  .hw-monday h4 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
  .hw-monday .bars b { color: var(--ink); font-variant-numeric: tabular-nums; }
  .hw-monday .orders b { font-variant-numeric: tabular-nums; }

  /* the beats, as states of the one card */
  [data-st="1"] .fx s, [data-st="2"] .fx s, [data-st="3"] .fx s { color: var(--mute); background: transparent; }
  [data-st="1"] .fx s::after, [data-st="2"] .fx s::after, [data-st="3"] .fx s::after { transform: scaleX(1); }
  [data-st="1"] .fx ins, [data-st="2"] .fx ins, [data-st="3"] .fx ins { max-width: 7em; opacity: 1; margin-left: .3em; }
  [data-st="1"] .flag, [data-st="2"] .flag, [data-st="3"] .flag { opacity: 0; transform: translateY(-8px); }
  [data-st="1"] .srcs, [data-st="2"] .srcs, [data-st="3"] .srcs { opacity: 1; transform: none; }
  [data-st="1"] .tick, [data-st="2"] .tick, [data-st="3"] .tick { background: #1d7a4a; border-color: #1d7a4a; }
  [data-st="1"] .tick::after, [data-st="2"] .tick::after, [data-st="3"] .tick::after { transform: rotate(45deg) scale(1); }
  [data-st="1"] .srow, [data-st="2"] .srow, [data-st="3"] .srow { border-color: rgba(29,122,74,.35); }
  [data-st="1"] .stamp, [data-st="2"] .stamp, [data-st="3"] .stamp { opacity: 1; transform: rotate(-9deg) scale(1); }
  [data-st="2"] .a1, [data-st="3"] .a1 { opacity: 0; transform: translateY(-10px); filter: blur(4px); }
  [data-st="2"] .a2, [data-st="3"] .a2 { opacity: 1; transform: none; filter: none; }
  [data-st="2"] .named, [data-st="3"] .named { transform: none; }
  [data-st="3"] .hw-card { transform: translateY(-34%) scale(.9); }
  [data-st="3"] .hw-monday { opacity: 1; transform: translate(-50%, 0); }
  .hw-monday .bars span.track i { width: 0; }
  [data-st="3"] .hw-monday .bars span.track i { width: var(--w); }

  /* ---------- 3. the AI team as a machine ---------- */
  .mach { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(176px, 214px); column-gap: 22px; margin-top: clamp(40px, 5vw, 72px); padding-top: 60px; }
  .mach .team { grid-column: 1; grid-row: 1; margin-top: 0; }
  .mach .swipe-dots { display: none; }
  .mach-rail { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
  .mach-rail .r-bg { fill: none; stroke: #d6cdc0; stroke-width: 1.5; stroke-dasharray: 2 7; stroke-linecap: round; }
  .mach-rail .r-fg { fill: none; stroke: var(--or); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
  .mach-rail .r-node { fill: var(--paper); stroke: #cfc6ba; stroke-width: 1.5; transition: fill .4s, stroke .4s; }
  .mach-rail .r-node.on { fill: var(--or); stroke: var(--or); }
  .mach-rail .r-tick { stroke: #d6cdc0; stroke-width: 1.5; transition: stroke .4s; }
  .mach-rail .r-tick.on { stroke: var(--or); }
  .mach-rail .r-tok { opacity: 0; fill: var(--or); filter: drop-shadow(0 0 5px rgba(245,80,43,.6)); }
  .mach-end { grid-column: 2; grid-row: 1; margin-top: -60px; display: flex; flex-direction: column; gap: 0; position: relative; z-index: 3; }
  .gate, .biz { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px 10px 10px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(60,40,20,.04); transition: border-color .5s, box-shadow .5s, background .5s, color .5s; }
  .gate b, .biz b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
  .gate small, .biz small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--mute); transition: color .5s; }
  .g-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); color: var(--mute); transition: background .5s, color .5s, transform .5s cubic-bezier(.3,1.6,.5,1); }
  .g-ico svg { width: 18px; height: 18px; }
  .biz { margin-top: 150px; }
  .gate.on { border-color: rgba(29,122,74,.45); box-shadow: 0 16px 40px rgba(29,122,74,.12); }
  .gate.on .g-ico { background: #1d7a4a; color: #fff; transform: scale(1.06); }
  .biz.on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 0 0 6px rgba(245,80,43,.12), 0 24px 60px rgba(245,80,43,.18); }
  .biz.on small { color: #c9c1b6; }
  .biz.on .g-ico { background: var(--or); color: #fff; }
  .mach-note { margin: auto 0 4px; font-size: 10.5px; line-height: 1.6; }
  .mach.live .agent { transition: border-color .5s, box-shadow .5s, translate .6s cubic-bezier(.2,.8,.2,1); }
  .mach.live .agent > svg { opacity: .42; filter: grayscale(.6); transition: opacity .6s, filter .6s; }
  .mach.live .agent.lit { border-color: rgba(245,80,43,.42); box-shadow: 0 24px 60px rgba(245,80,43,.10); translate: 0 -6px; }
  .mach.live .agent.lit > svg { opacity: 1; filter: none; }
  .mach.live .agent.lit > .mono { color: var(--or-text); }
  .mach.live .agent:not(.lit) > svg .flow { visibility: hidden; }

  /* ---------- 5. depth: S1 logos fly in and tilt towards the cursor ---------- */
  .home .logos { gap: 12px; background: none; border: 0; border-radius: 0; overflow: visible; perspective: 1200px; }
  .home .logos li { position: relative; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transform-style: preserve-3d; transition: box-shadow .4s; will-change: transform; }
  .home .logos li::after { content: ""; position: absolute; inset: 0; background: radial-gradient(220px circle at var(--gx, 50%) var(--gy, 50%), rgba(245,80,43,.10), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
  .home .logos li:hover { box-shadow: 0 26px 60px rgba(60,40,20,.12); }
  .home .logos li:hover::after { opacity: 1; }
  .home .logos img { transition: filter .4s, opacity .4s; }
  .home .mag { will-change: transform; }
}

/* narrower wide screens: the yes gate and your business get a slimmer column */
@media (min-width: 901px) and (max-width: 1180px) {
  .mach { grid-template-columns: minmax(0, 1fr) 150px; column-gap: 16px; }
  .gate small, .biz small { display: none; }
  .gate, .biz { padding: 8px 10px 8px 8px; gap: 9px; }
  .g-ico { width: 32px; height: 32px; }
}

@media (max-width: 900px) { .hthread { display: none !important; } }

/* reduced motion: no pinning, no orbit, no tokens. Each scene shows its finished picture, still. */
@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  .orb-s { height: auto; padding: clamp(80px, 11vw, 160px) var(--g); }
  .orb-pin { position: static; height: auto; padding-top: 0; }
  .orb-stage::before { animation: none; }
  .orb-core, .orb-rings { display: none; }
  .hw-card, .hw-ans .a, .hw-mid > *, .fx s, .fx s::after, .fx ins, .named, .tick, .tick::after, .stamp, .hw-monday, .hw-monday .bars span.track i, .gate, .biz, .g-ico, .mach.live .agent, .mach.live .agent > svg { transition: none !important; }
  .hw.live .hw-beats li { transition: none; }
  .hthread .t-head { display: none; }
  .hthread .t-halo { animation: none; }
}
