/* AI Signal prototype — the reel composition and the immersive Watch player.
   Part 1 (.reel…) is the composition itself: everything a HyperFrames template would render into the shared MP4,
   including burned-in captions. It is sized in container units so it looks the same at any size.
   Part 2 (.watch…) is the player chrome around it, which is never part of the video. */

/* ── Part 1 · composition ─────────────────────────────────────────── */
.reel { position: absolute; inset: 0; container-type: size; overflow: hidden; color: #fff; background: linear-gradient(165deg, var(--rb1), var(--rb2)); --rb1: #1a2260; --rb2: #0a0c1c; --ra: #aab6ff; }
.reel.t-cloud    { --rb1: #0b4152; --rb2: #06151b; --ra: #8fe0f0; }
.reel.t-oss      { --rb1: #0f3f2b; --rb2: #06160e; --ra: #9ee6bd; }
.reel.t-startups { --rb1: #4d2c0a; --rb2: #160c04; --ra: #ffcf8a; }
.reel.t-research { --rb1: #301b5e; --rb2: #0f0a1f; --ra: #cdb6ff; }
.reel-bg, .reel-bg::before, .reel-bg::after { position: absolute; content: ""; }
.reel-bg { inset: 0; }
.reel-bg::before { width: 130cqw; height: 130cqw; top: -42cqw; right: -52cqw; border-radius: 50%; background: radial-gradient(circle, var(--ra) 0, transparent 62%); opacity: .3; animation: drift 12s ease-in-out infinite alternate; }
.reel-bg::after { inset: 0; -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 75%); mask-image: linear-gradient(200deg, #000 10%, transparent 75%); }
@keyframes drift { to { transform: translate(-16cqw, 22cqw) scale(1.15); } }
/* One motif per visual template. */
.tpl-model-announcement .reel-bg::after { background: repeating-radial-gradient(circle at 84% 16%, transparent 0 9cqw, rgba(255, 255, 255, .1) 9cqw 9.4cqw); }
.tpl-oss-release .reel-bg::after { background: radial-gradient(rgba(255, 255, 255, .22) .5cqw, transparent .6cqw) 0 0 / 6cqw 6cqw; }
.tpl-business-move .reel-bg::after { background: repeating-linear-gradient(115deg, transparent 0 11cqw, rgba(255, 255, 255, .07) 11cqw 17cqw); }
.tpl-infrastructure .reel-bg::after { background: repeating-linear-gradient(0deg, transparent 0 7cqw, rgba(255, 255, 255, .1) 7cqw 7.4cqw); }
.tpl-research-finding .reel-bg::after { background: radial-gradient(rgba(255, 255, 255, .2) .7cqw, transparent .8cqw) 0 0 / 13cqw 9cqw, radial-gradient(rgba(255, 255, 255, .12) .5cqw, transparent .6cqw) 5cqw 4cqw / 9cqw 13cqw; }

.scene { position: absolute; inset: 0; padding: 24cqh 9cqw 32cqh; display: flex; flex-direction: column; justify-content: center; gap: 3.2cqw; opacity: 0; visibility: hidden; transition: opacity .45s, visibility 0s .45s; }
.scene.on { opacity: 1; visibility: visible; transition: opacity .45s; }
.scene.on [data-i] { animation: rise .75s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms + 120ms); }
.reel.paused .scene [data-i], .reel.paused .reel-bg::before { animation-play-state: paused; }
.still .reel.paused .scene [data-i] { animation-play-state: running; } /* a still frame shows the scene fully arrived */
@keyframes rise { from { opacity: 0; transform: translateY(5cqw); filter: blur(1.4cqw); } }
.s-kicker { font: 600 3.4cqw/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ra); }
.s-title { font-family: var(--serif); font-weight: 500; font-size: calc(var(--fs, 20) * 1cqw); line-height: .92; letter-spacing: -.04em; }
.s-title .ln { display: block; }
.s-title .w { display: inline-block; }
.s-sub { font: 500 4.4cqw/1.3 var(--sans); opacity: .75; }
.s-stat { font-family: var(--serif); font-weight: 500; font-size: calc(var(--fs, 36) * 1cqw); line-height: .9; letter-spacing: -.05em; color: var(--ra); }
.s-label { font: 500 5.2cqw/1.3 var(--serif); max-width: 16em; }
.s-list { display: grid; }
.s-list li { display: grid; grid-template-columns: 7cqw 1fr; align-items: baseline; padding: 3.4cqw 0; border-top: .25cqw solid rgba(255, 255, 255, .18); font: 500 6.6cqw/1.15 var(--serif); letter-spacing: -.02em; }
.s-list li small { font: 600 3cqw var(--sans); color: var(--ra); }
.s-merge { display: grid; gap: 3cqw; justify-items: start; }
.s-merge span { font: 500 4.4cqw var(--mono); padding: 2cqw 3.4cqw; border-radius: 2cqw; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 .25cqw rgba(255, 255, 255, .2); }
.s-merge span.gone { text-decoration: line-through; text-decoration-color: var(--ra); opacity: .7; }
.s-merge i { width: .5cqw; height: 9cqw; margin-left: 6cqw; background: linear-gradient(var(--ra), transparent); }
.s-merge b { font: 500 11cqw/1 var(--serif); letter-spacing: -.03em; }
.s-outro { font: italic 500 10cqw/1.04 var(--serif); letter-spacing: -.03em; }
.s-outro .w { display: inline-block; }
.s-src { font: 500 3.2cqw/1.4 var(--sans); opacity: .65; }
.tpl-oss-release .s-kicker, .tpl-oss-release .s-sub { font-family: var(--mono); letter-spacing: 0; text-transform: none; }
.tpl-oss-release .s-title { font-family: var(--mono); font-weight: 600; letter-spacing: -.06em; }
.tpl-business-move .s-stat { font-style: italic; }
.tpl-infrastructure .s-title { font-weight: 600; font-family: var(--sans); letter-spacing: -.055em; }
.reel-cap { position: absolute; left: 7cqw; right: 7cqw; bottom: 22cqh; text-align: center; font: 600 4.5cqw/1.5 var(--sans); min-height: 2lh; display: flex; align-items: flex-end; justify-content: center; }
.reel-cap span { background: rgba(0, 0, 0, .58); padding: 1cqw 2.4cqw; border-radius: 1.6cqw; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.reel-cap span:empty { display: none; }
/* Rendered video: shown whole (it is exactly 9:16); a blurred copy of its poster fills any taller screen. */
.reel.has-video { background: #000; }
.reel-fill { position: absolute; inset: -8%; background: center / cover no-repeat; filter: blur(40px) brightness(.7); }
.reel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.reel-demo { position: absolute; left: 9cqw; top: 17cqh; font: 600 2.8cqw var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .55; }

/* ── Part 2 · player ──────────────────────────────────────────────── */
.watch { position: fixed; inset: 0; z-index: 60; background: #07080b; color: #fff; display: grid; }
.w-stage { position: relative; overflow: hidden; background: #000; min-height: 0; }
.reels { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain; }
.reels::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; cursor: pointer; }
.slide-end { cursor: default; display: grid; align-content: center; justify-items: start; gap: 16px; padding: 0 9%; background: linear-gradient(165deg, #17191f, #07080b); }
.slide-end h2 { font-size: clamp(40px, 11vw, 60px); line-height: .98; color: #fff; }
.slide-end p { color: rgba(255, 255, 255, .72); max-width: 26ch; }
.slide-end .end-mark { background: #6fd3a2; color: #0f2a1d; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; }
.slide-end .state-actions { justify-content: flex-start; }
.w-layer { position: absolute; left: 0; right: 0; z-index: 3; padding: 0 16px; pointer-events: none; }
.w-layer > *, .w-layer button, .w-layer a { pointer-events: auto; }
.w-top, .w-bottom { grid-template-columns: minmax(0, 1fr); }
.w-top { top: 0; padding-top: max(12px, env(safe-area-inset-top)); display: grid; gap: 12px; background: linear-gradient(rgba(0, 0, 0, .5), transparent); padding-bottom: 28px; }
.w-segs { display: flex; gap: 4px; pointer-events: none; }
.w-segs i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .26); overflow: hidden; }
.w-segs i::after { content: ""; display: block; height: 100%; background: #fff; width: calc(var(--p, 0) * 100%); }
.w-row { display: flex; align-items: center; gap: 10px; pointer-events: none; }
.w-row .grow { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-row .grow span { opacity: .7; font-weight: 500; }
.w-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; transition: background .2s, transform .2s var(--ease); }
.w-btn:hover { background: rgba(255, 255, 255, .26); }
.w-btn:active { transform: scale(.92); }
.w-btn[aria-pressed="true"] { background: #fff; color: #111; }
.w-btn:focus-visible, .w-more:focus-visible { outline-color: #fff; }
.w-demo { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.w-bottom { bottom: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); padding-top: 40px; display: grid; gap: 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); }
.w-src { font-size: 12.5px; color: rgba(255, 255, 255, .8); }
.w-src a { text-decoration: underline; text-underline-offset: 3px; }
.w-ctl { display: flex; align-items: center; gap: 8px; }
.w-ctl .gap { flex: 1; }
.w-more { height: 44px; padding: 0 16px; border-radius: 999px; background: #fff; color: #111; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.w-more .ic { width: 16px; height: 16px; }
.w-arrow { display: none; }
.w-side { display: none; }
.w-pause { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .25s; }
.w-pause span { width: 76px; height: 76px; border-radius: 50%; background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: grid; place-items: center; }
.w-pause .ic { width: 30px; height: 30px; }
.watch.is-paused .w-pause { opacity: 1; }
.watch.at-end .w-top .w-row .grow, .watch.at-end .w-bottom, .watch.at-end .w-pause, .watch.at-end #wSave, .watch.at-end #wShare { visibility: hidden; }

@media (min-width: 900px) {
  /* Desktop: the 9:16 frame sits beside an editorial column instead of filling a wide screen. */
  .watch { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0 40px; padding: 24px 40px; }
  .w-stage { grid-column: 2; height: min(100dvh - 48px, 880px); aspect-ratio: 9 / 16; border-radius: 30px; box-shadow: 0 40px 90px -30px #000, 0 0 0 1px rgba(255, 255, 255, .1); }
  .w-arrow { display: grid; position: absolute; z-index: 4; top: 50%; margin-top: -24px; width: 48px; height: 48px; }
  .w-arrow.prev { right: calc(50% + (min(100dvh - 48px, 880px) * 9 / 32) + 16px); }
  .w-arrow.next { left: calc(50% + (min(100dvh - 48px, 880px) * 9 / 32) + 16px); }
  .w-arrow[disabled] { opacity: .25; cursor: default; }
}
@media (min-width: 1180px) {
  .watch { grid-template-columns: minmax(260px, 1fr) auto minmax(300px, 1fr); gap: 0 88px; }
  .w-side { display: grid; gap: 16px; align-content: center; max-width: 400px; }
  .w-side.left { justify-self: end; text-align: left; }
  .w-side h2 { color: #fff; font-size: clamp(28px, 2.6vw, 40px); }
  .w-side p { color: rgba(255, 255, 255, .72); font-size: 15.5px; }
  .w-side .kicker { color: rgba(255, 255, 255, .55); }
  .w-side .lab { justify-self: start; }
  .w-side .lab-you { background: #fff; color: #111; } .w-side .lab-trend { box-shadow: inset 0 0 0 1.5px #fff; }
  .w-queue { display: grid; border-top: 1px solid rgba(255, 255, 255, .14); }
  .w-queue button { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: baseline; width: 100%; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-size: 14.5px; color: rgba(255, 255, 255, .62); transition: color .2s; }
  .w-queue button:hover, .w-queue button[aria-current="true"] { color: #fff; }
  .w-queue button[aria-current="true"] b { background: var(--signal); }
  .w-queue b { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); align-self: center; }
  .w-queue button.seen b { background: #6fd3a2; box-shadow: none; }
  .w-queue span { font-size: 12.5px; font-variant-numeric: tabular-nums; }
  .w-keys { font-size: 12.5px; color: rgba(255, 255, 255, .45); }
  .w-keys kbd { font: 600 11px var(--mono); padding: 2px 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); margin-right: 2px; }
}
