/* AI captions: copy on the left, a film still on the right whose caption re-types itself in the language you pick
   (js/features/captions-demo.js), then the language reel — two rows of glass pills drifting in opposite directions. */
@layer sections {
    .captions__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 72px; }
    .captions__copy { display: grid; gap: 22px; justify-items: start; }
    .captions__points { margin-top: 6px; }

    .captions__stage { display: grid; gap: 16px; min-width: 0; }
    .cstage { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-stage); background: var(--surface-film); box-shadow: var(--shadow-stage); container-type: inline-size;
        --edge: linear-gradient(-150deg, var(--white-a30), var(--white-a4) 50%, var(--cyan-a30)); }
    .cstage__media { position: absolute; inset: 0; }
    .cstage__shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(0 0 0 / .75)); }
    .cstage__lang { position: absolute; left: 4cqi; top: 4cqi; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--black-a60); color: var(--white); font-size: 12.5px; font-weight: 700; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
    .cstage__lang::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan-400); box-shadow: 0 0 10px var(--cyan-400); }
    .cstage__line {
        position: absolute; left: 7cqi; right: 7cqi; bottom: 7cqi; z-index: 2; min-height: 2.6em; margin: 0;
        text-align: center; color: var(--white); font-family: var(--font-caption); font-size: max(16px, 3.6cqi); font-weight: 900; line-height: 1.25;
        text-shadow: 0 2px 0 rgb(0 0 0 / .55), 0 0 24px rgb(0 0 0 / .6);
        display: grid; align-content: end;
    }
    .cstage__line span { animation: word-in .25s var(--ease) both; }
    .cstage__line span.is-now { color: var(--cyan-300); }
    @keyframes word-in { from { opacity: 0; } to { opacity: 1; } }

    .langpick { display: flex; flex-wrap: wrap; gap: 8px; }
    .langpick__btn { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white-a4); color: var(--text-2); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s; }
    .langpick__btn:hover { border-color: var(--line-3); color: var(--text); }
    .langpick__btn[aria-pressed="true"] { background: var(--grad-cyan); border-color: var(--cyan-200); color: var(--cyan-ink); }
    .langpick__btn:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

    /* the language reel */
    .reel { display: grid; gap: 14px; margin-top: 88px; overflow: hidden; mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
    .reel__row { display: flex; width: max-content; animation: reel 60s linear infinite; }
    .reel__row--back { animation-direction: reverse; animation-duration: 70s; }
    .reel__set { display: flex; gap: 14px; padding-right: 14px; }
    .reel__pill { display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px 11px 14px; border-radius: 999px; color: var(--text); font-size: 16px; font-weight: 700; white-space: nowrap; }
    .reel__pill .i { width: 18px; height: 18px; color: var(--cyan-300); }
    @keyframes reel { to { transform: translateX(-50%); } }
    .is-offscreen .reel__row { animation-play-state: paused; }
    @media (prefers-reduced-motion: reduce) { .reel__row { animation: none; } .cstage__line span { animation: none; } }

    @media (max-width: 1000px) { .captions__grid { grid-template-columns: 1fr; gap: 44px; } }
    @media (max-width: 560px) { .reel { margin-top: 56px; } .reel__pill { font-size: 14px; padding: 9px 16px 9px 12px; } .cstage { border-radius: var(--r-film); } }
}
