/* Teaser autoplay, demonstrated: a landing page in a browser frame whose embed loops a muted preview, a cursor clicks
   "Click to unmute" and the full film plays (js/features/teaser-demo.js sets data-phase loop → click → film). */
@layer sections {
    .teaser__grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; gap: 72px; }
    .teaser__copy { display: grid; gap: 22px; justify-items: start; }
    .teaser__copy .cta-row { margin-top: 12px; }

    .browser { padding: 0 0 22px; overflow: hidden; }
    .browser__bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
    .browser__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--white-a12); }
    .browser__bar span { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; padding: 5px 14px; border-radius: 999px; background: var(--white-a4); color: var(--text-3); font-size: 12.5px; font-weight: 600; }
    .browser__bar .i { width: 12px; height: 12px; }
    .browser__page { display: grid; gap: 18px; padding: 24px 28px 0; }
    .browser__copy { display: grid; gap: 8px; }
    .browser__copy b, .browser__copy span { display: block; height: 12px; border-radius: 9px; background: var(--white-a8); }
    .browser__copy b { width: 62%; height: 18px; background: var(--white-a16); }
    .browser__copy b + b { width: 44%; }
    .browser__copy span { width: 88%; }
    .browser__copy span + span { width: 70%; }
    .browser__copy--after span:first-child { width: 80%; }

    .mini { border-radius: var(--r-panel); box-shadow: 0 30px 70px -30px var(--black-a80); }
    .mini__screen { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-panel); background: var(--surface-film); container-type: inline-size; }
    .mini__media { position: absolute; inset: 0; transition: filter .5s; }
    [data-phase="loop"] .mini__media, [data-phase="click"] .mini__media { filter: saturate(.8) brightness(.78); }
    .mini__badge { position: absolute; left: 3.5cqi; top: 3.5cqi; z-index: 3; padding: 4px 10px; border-radius: 999px; background: var(--black-a60); color: var(--white); font-size: 11.5px; font-weight: 800; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
    [data-phase="film"] .mini__badge { background: var(--cyan-400); color: var(--cyan-ink); }
    .teaser__demo .unmute { transition: opacity .35s, scale .35s var(--ease); }
    .teaser__demo[data-phase="click"] .unmute { scale: .92; }
    .teaser__demo[data-phase="film"] .unmute { opacity: 0; scale: .7; pointer-events: none; }
    .mini__sound { position: absolute; right: 3.5cqi; top: 3.5cqi; z-index: 3; display: flex; align-items: flex-end; gap: 3px; height: 16px; opacity: 0; transition: opacity .3s; }
    .mini__sound i { width: 3px; height: 100%; border-radius: 2px; background: var(--cyan-300); transform-origin: bottom; animation: eq 0.9s ease-in-out infinite alternate; }
    .mini__sound i:nth-child(2) { animation-delay: -.3s; }
    .mini__sound i:nth-child(3) { animation-delay: -.6s; }
    .mini__sound i:nth-child(4) { animation-delay: -.15s; }
    .mini__sound i:nth-child(5) { animation-delay: -.45s; }
    .teaser__demo[data-phase="film"] .mini__sound { opacity: 1; }
    @keyframes eq { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
    .mini__bar { position: absolute; left: 3.5cqi; right: 3.5cqi; bottom: 3cqi; z-index: 3; }
    .mini__bar .playbar__played { width: calc(var(--t, 0) * 100%); }

    /* the cursor: rests bottom-right, glides onto the pill during "click" */
    .tcursor { position: absolute; left: 76%; top: 86%; z-index: 6; width: 26px; height: 26px; filter: drop-shadow(0 4px 8px rgb(0 0 0 / .6)); transition: left .7s var(--ease), top .7s var(--ease), opacity .3s, scale .15s; }
    .tcursor svg { width: 100%; height: 100%; }
    .teaser__demo[data-phase="click"] .tcursor { left: 47%; top: 56%; }
    .teaser__demo[data-phase="film"] .tcursor { left: 47%; top: 56%; opacity: 0; }
    @media (prefers-reduced-motion: reduce) { .tcursor { display: none; } .mini__sound i { animation: none; } }

    /* the steps: numbered timeline, lit with the demo */
    .steps { display: grid; gap: 4px; width: 100%; }
    .steps__item { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 14px 16px 14px 0; border-radius: var(--r-tile); transition: background-color .4s; }
    .steps__item:not(:last-child)::after { content: ''; position: absolute; left: 21px; top: 54px; bottom: -6px; width: 2px; border-radius: 2px; background: var(--line-2); }
    .steps__num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-raised); border: 1px solid var(--line-2); color: var(--text-3); font-family: var(--font-display); font-weight: 900; transition: background-color .4s, color .4s, box-shadow .4s; }
    .steps__item b { display: block; margin-top: 10px; color: var(--text); font-size: 17px; }
    .steps__item p { margin-top: 4px; color: var(--text-3); font-size: 15px; line-height: 1.5; }
    .steps__item.is-lit .steps__num { background: var(--grad-cyan); border-color: var(--cyan-200); color: var(--cyan-ink); box-shadow: var(--glow-cyan); }
    .steps__item.is-lit p { color: var(--text-2); }
    .teaser__note { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-tile); background: var(--white-a3); border: 1px solid var(--line); color: var(--text-2); font-size: 14.5px; }
    .teaser__note .i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--cyan-300); }

    @media (max-width: 1000px) {
        .teaser__grid { grid-template-columns: 1fr; gap: 48px; }
        .teaser__demo { order: 2; }
    }
    @media (max-width: 560px) {
        .browser__page { padding: 16px 14px 0; gap: 12px; }
        .browser { padding-bottom: 14px; }
        .browser__copy--after { display: none; }
    }
}
