/* Motion layer, kept deliberately quiet: motion only where it explains the product (the typed search, the problem
   cards, message -> listing), short fade-ins as sections arrive, and plain lifts on hover. No looping decoration.
   Anything that hides content first is scoped to html.motion, which the inline head script adds only when
   IntersectionObserver exists and the visitor hasn't asked for reduced motion. Reveals use `translate` and
   animations, so they never fight the hover transforms and transitions in styles.css. */

:root { interpolate-size: allow-keywords; }

@keyframes rv { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes sweep { to { transform: scaleX(1); } }
@keyframes typew { to { width: 9ch; } }
@keyframes tick { from { background-color: #FFFFFF; border-color: #C9C9C2; background-size: 0 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes strike { to { transform: scaleX(1); } }
@keyframes mark-in { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }

/* ---------------- Scroll reveal: a short fade and rise ---------------- */
html.motion :is(.head > *, .card, .step, .feature-list li, .promises li, .agenda li, .host, .faq-list details, .feature-shot, .feature-caption, .extract > *, .closing .label, .closing h2, .closing .btn, .problem-close, .book-intro > *, .cal-box, .feature-grid > div > .label, .feature-grid > div > h2, .prep li, .thanks-actions, .video-frame):not(.is-in) { opacity: 0; }
html.motion :is(.head > *, .card, .step, .feature-list li, .promises li, .agenda li, .host, .faq-list details, .feature-shot, .feature-caption, .extract > *, .closing .label, .closing h2, .closing .btn, .problem-close, .book-intro > *, .cal-box, .feature-grid > div > .label, .feature-grid > div > h2, .prep li, .thanks-actions, .video-frame).is-in { animation: rv .6s cubic-bezier(.2,.7,.2,1) var(--rd, 0ms) both; }

/* ---------------- Hero entrance: copy, then the dashboard ---------------- */
html.motion .hero-copy > * { animation: rv .7s cubic-bezier(.2,.7,.2,1) both; }
html.motion .hero-copy > :nth-child(2) { animation-delay: .08s; }
html.motion .hero-copy > :nth-child(3) { animation-delay: .18s; }
html.motion .hero-copy > :nth-child(4) { animation-delay: .26s; }
html.motion .hero-copy > :nth-child(5) { animation-delay: .32s; }
html.motion .hero .stage { animation: rv .9s cubic-bezier(.2,.7,.2,1) .4s both; }

/* a soft highlighter under "in seconds", drawn once */
.hero h1 em { position: relative; z-index: 0; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: -.04em; right: -.04em; bottom: .07em; height: .26em; border-radius: .06em; background: #FFE0CC; z-index: -1; transform-origin: left center; }
html.motion .hero h1 em::after { transform: scaleX(0); animation: sweep .7s cubic-bezier(.6,0,.2,1) .7s forwards; }

/* the demo dashboard: solid, and old results dim while the next search is typed */
.app { position: relative; background: #FFFFFF; }
.app.is-searching .listing { opacity: .3; transform: none; }
.listing { transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), border-color .25s ease, box-shadow .3s ease; }
.listing:hover { border-color: #FFCFAD; box-shadow: 0 16px 30px -24px rgba(255,103,0,.5); }

/* ---------------- Problem cards: a small picture of each pain, played once ---------------- */
.cv { position: relative; height: 108px; margin-bottom: 8px; padding: 12px 14px; border-radius: 10px; background: var(--tint); overflow: hidden; }
.cv-groups { list-style: none; display: grid; gap: 7px; }
.cv-groups li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; letter-spacing: -.1px; white-space: nowrap; }
.cv-groups li span { overflow: hidden; text-overflow: ellipsis; }
.cv-groups b { min-width: 40px; padding: 3px 7px; border-radius: 999px; background: var(--wa); color: #FFFFFF; text-align: center; font: 600 11px/1.2 'Geist Mono', monospace; font-variant-numeric: tabular-nums; }
.cv-search { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.cv-box { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 8px; background: #FFFFFF; border: 1.5px solid #3D5AFE33; font: 500 13px/1 'Geist Mono', monospace; }
.cv-box svg { width: 14px; height: 14px; flex-shrink: 0; stroke: var(--muted); }
.cv-q { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; border-right: 1.5px solid var(--ink); padding-right: 1px; }
.cv-none { font-size: 12.5px; color: var(--muted); }
.cv-none b { font-weight: 500; color: #C23B22; }
html.motion .cv-q { width: 0; }
html.motion .card.is-in .cv-q { animation: typew .8s steps(9) .5s forwards; }
html.motion .card:not(.is-in) .cv-none { opacity: 0; }
html.motion .card.is-in .cv-none { animation: rv .4s ease 1.45s both; }
.cv-dupes .chip { position: absolute; left: 14px; right: 76px; top: 10px; z-index: calc(3 - var(--n)); padding: 6px 10px 7px; border-radius: 4px 10px 10px 10px; background: #FFFFFF; box-shadow: 0 10px 20px -14px rgba(20,20,20,.45); font-size: 12px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transform: translate(calc(var(--n) * 10px), calc(var(--n) * 23px)); transition: transform .6s cubic-bezier(.2,.8,.2,1) calc(var(--n) * 80ms + 200ms); }
.cv-dupes .chip i { display: block; font-size: 10.5px; color: var(--muted); }
.cv-dupes::after { content: "seen 5×"; position: absolute; right: 10px; top: 12px; z-index: 4; padding: 3px 7px; border-radius: 999px; background: var(--ink); color: #FFFFFF; font: 600 10.5px/1.2 'Geist Mono', monospace; }
html.motion .card:not(.is-in) .cv-dupes .chip { transform: none; }
html.motion .card:not(.is-in) .cv-dupes::after { opacity: 0; }
html.motion .card.is-in .cv-dupes::after { animation: rv .4s ease .9s both; }

/* ---------------- How it works ---------------- */
.step { transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s ease, box-shadow .35s ease; }
.step:hover { transform: translateY(-3px); border-color: #FFCFAD; box-shadow: 0 24px 46px -32px rgba(255,103,0,.45); }
html.motion .step.is-in .groups li.on::before { animation: tick .3s ease both; }
html.motion .step.is-in .groups li.on:nth-child(1)::before { animation-delay: .5s; }
html.motion .step.is-in .groups li.on:nth-child(2)::before { animation-delay: .8s; }

/* message -> listing: the highlights light up in turn, then the fields they become fill in */
html.motion .extract .bubble mark { background: transparent; transition: background .4s ease calc(var(--i) * 160ms + 200ms); }
html.motion .extract.is-lit .bubble mark { background: #FFE6D4; }
html.motion .extract:not(.is-lit) .fields :is(dt, dd) { opacity: 0; translate: 8px 0; }
html.motion .extract .fields :is(dt, dd) { transition: opacity .4s ease calc(var(--i) * 160ms + 450ms), translate .45s cubic-bezier(.2,.8,.2,1) calc(var(--i) * 160ms + 450ms); }

/* ---------------- Features + privacy ---------------- */
.feature-list li::before { transition: background .25s ease; }
.promises li { transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s ease; }
.promises li:hover { transform: translateY(-3px); border-color: rgba(255,154,87,.35); }
html.motion .promises svg :is(path, rect) { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.motion .promises li.is-in svg :is(path, rect) { animation: draw 1s cubic-bezier(.6,0,.2,1) calc(var(--rd, 0ms) + 250ms) forwards; }

/* ---------------- FAQ opens smoothly where the browser supports it ---------------- */
.faq-list details::details-content { block-size: 0; overflow: hidden; transition: block-size .35s cubic-bezier(.2,.7,.2,1), content-visibility .35s allow-discrete; }
.faq-list details[open]::details-content { block-size: auto; }
.faq-list summary { transition: color .2s ease; }
.faq-list summary:hover { color: var(--orange-text); }

/* ---------------- Closing: "scrolling" is struck out once ---------------- */
.closing h2 em { font-style: normal; color: var(--orange); }
.strike { position: relative; display: inline-block; color: #9A9A94; }
.strike::after { content: ""; position: absolute; left: -3%; right: -3%; top: 55%; height: .075em; border-radius: .04em; background: var(--orange); }
html.motion .strike { color: inherit; transition: color .4s ease .9s; }
html.motion .closing h2.is-in .strike { color: #9A9A94; }
html.motion .strike::after { transform: scaleX(0); transform-origin: left center; }
html.motion .closing h2.is-in .strike::after { animation: strike .5s cubic-bezier(.6,0,.2,1) .5s forwards; }

/* ---------------- Thank-you page: the check settles in and draws ---------------- */
html.motion .thanks-mark { animation: mark-in .5s cubic-bezier(.2,.7,.2,1) both; }
html.motion .thanks-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .45s cubic-bezier(.6,0,.2,1) .35s forwards; }
html.motion .thanks h1 { animation: rv .7s cubic-bezier(.2,.7,.2,1) .15s both; }
html.motion .thanks .lead { animation: rv .7s cubic-bezier(.2,.7,.2,1) .25s both; }
