/*
 * The first screen is a playground (Theran, Nov 8 — "something where you can play
 * with it… you change something on one, and it changes it on the rest… a dead
 * space cutter"; blueprints are the star, so they lead). Five videos from one
 * sitting: pick a blueprint and all five re-lay, drag one caption and the rest
 * follow, slide the dead air and every one re-cuts.
 */

.play { position: relative; padding: 116px 0 40px; overflow: hidden; }
.play .cloud { left: 0; top: -60px; }
.play .fade { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, var(--bg) 92%); }
.play .copy { position: relative; z-index: 2; text-align: center; padding: 0 var(--inset); }
.play .title { margin-top: 12px; }
.play .under { margin: 10px auto 0; max-width: 420px; }

.chips { position: relative; z-index: 2; display: flex; justify-content: center; gap: 8px; margin-top: 20px; padding: 0 var(--inset); }
.chip { height: 36px; padding: 0 14px; border-radius: var(--r-pill); font: inherit; font-size: var(--t-footnote); font-weight: 600; color: var(--dim); background: rgba(255,255,255,.06); border: 1px solid var(--hair); cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.chip[aria-pressed='true'] { color: var(--bg); background: var(--text); border-color: var(--text); }

/* The five: a fan on a phone (tap one to bring it forward), a row on a computer. */
.stage { position: relative; z-index: 1; height: calc(50vw * 16 / 9); max-height: 400px; margin-top: 20px; }
.tile { position: absolute; left: 50%; top: 0; width: 50vw; max-width: 225px; transform: translateX(-50%) translateX(var(--x, 0)) scale(var(--s, 1)); transform-origin: 50% 50%; z-index: var(--z, 1); opacity: var(--o, 1); transition: transform .55s var(--spring), opacity .3s ease; cursor: pointer; touch-action: pan-y; }
.tile.on { cursor: default; }
.frame { position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-panel); overflow: hidden; background: #0d0d0e; container-type: inline-size; box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 24px 50px rgba(0,0,0,.6); }
.tile.on .frame { box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 30px 70px rgba(0,0,0,.7), 0 0 80px var(--lime-glow); }

/* Every part sits where the blueprint puts it, and glides there when it changes. */
.frame > * { position: absolute; transition: top .6s var(--spring), left .6s var(--spring), width .6s var(--spring), height .6s var(--spring), opacity .35s ease, border-radius .6s ease; transition-delay: var(--lag, 0s); }
.face { z-index: 1; left: 0; top: 0; width: 100%; height: 100%; background: #000 center 30% / cover no-repeat; }
.board { z-index: 0; left: 0; top: 0; width: 100%; height: 0; opacity: 0; background: var(--text); color: var(--ink); padding: 0 8cqw; display: flex; flex-direction: column; justify-content: center; gap: 3cqw; overflow: hidden; }
.board b { font-family: 'TikTok Sans', sans-serif; font-weight: 600; font-size: 7cqw; line-height: 1.15; }
.board i { display: block; height: 4.4cqw; border-radius: 2cqw; background: rgba(20,18,23,.14); }
.board i:nth-child(3) { width: 80%; }
.board i:nth-child(4) { width: 62%; }
.hook { left: 6%; width: 88%; top: 13%; text-align: center; z-index: 2; }
.hook span { display: inline; padding: .14em .4em; border-radius: 1.4cqw; background: #fff; color: #000; font-family: 'TikTok Sans', sans-serif; font-weight: 600; font-size: 6.4cqw; line-height: 1.5; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.cap { left: 4%; width: 92%; top: var(--cy, 76%); translate: 0 -50%; text-align: center; z-index: 3; font-family: 'TikTok Sans', sans-serif; font-weight: 600; color: #fff; font-size: 7.6cqw; line-height: 1.15; -webkit-text-stroke: 1.1cqw #000; paint-order: stroke fill; transition: top .45s var(--spring); transition-delay: var(--lag, 0s); user-select: none; -webkit-user-select: none; }
.tile.on .cap { cursor: grab; touch-action: none; }
.tile.on .cap::after { content: ''; position: absolute; inset: -2.4cqw -1cqw; border-radius: 3cqw; box-shadow: 0 0 0 1.5px var(--lime-edge); opacity: .9; }
.dragging .tile.on .cap { transition: none; cursor: grabbing; }
.dragging .tile.on .cap::after { box-shadow: 0 0 0 2px var(--lime), 0 0 24px var(--lime-light); }

/* Talking head: her, full. Split: the board on top, her under. Reaction: the board full, her in a bubble. */
.split .face { top: 50%; height: 50%; background-position: center 26%; }
.split .board { height: 50%; opacity: 1; }
.split .hook { top: 52%; }
.react .board { height: 100%; opacity: 1; padding-bottom: 40cqw; }
.react .face { left: 54%; top: 56%; width: 40%; height: 22.5%; border-radius: 50%; background-position: center 24%; box-shadow: 0 0 0 1cqw #fff; }
.react .hook { top: 7%; }

.len { position: absolute; z-index: 4; right: 4cqw; top: 4cqw; height: 9cqw; padding: 0 3cqw; display: flex; align-items: center; border-radius: var(--r-pill); background: rgba(20,18,23,.6); border: 1px solid var(--hair); font-size: 4.4cqw; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; transition: none; }
/* Her takes along the foot: what she said, and the quiet the slider closes up. */
.takes { left: 4cqw; right: 4cqw; width: auto; bottom: 4cqw; top: auto; height: 2.6cqw; display: flex; gap: .6cqw; z-index: 4; transition: none; }
.takes i { height: 100%; border-radius: 1cqw; flex-shrink: 0; flex-basis: 0; transition: flex-grow .7s cubic-bezier(.2,.7,.2,1); }
.takes .said { background: rgba(240,236,228,.9); }
.takes .quiet { background: rgba(240,236,228,.18); }
.render::before { content: ''; position: absolute; z-index: 5; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(208,254,23,.28) 50%, transparent 70%); background-size: 300% 100%; animation: sweep .8s ease-out both; animation-delay: var(--lag, 0s); pointer-events: none; }
@keyframes sweep { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* The hint, until she's dragged once. */
.nudge { position: absolute; z-index: 6; left: 50%; top: var(--cy, 76%); width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255,255,255,.22); box-shadow: 0 0 0 1px rgba(255,255,255,.5); pointer-events: none; animation: nudge 2.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-38px); opacity: .6; } }
.moved .nudge { display: none; }

/* The dead-air cutter. */
.cutter { position: relative; z-index: 2; width: min(340px, calc(100% - 2 * var(--inset))); margin: 22px auto 0; }
.cutter .row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--t-footnote); color: var(--faint); }
.cutter .row b { color: var(--text); font-weight: 600; }
.cutter .row .num { color: var(--lime-words); font-weight: 600; }
.cutter input { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin: 4px 0 0; background: transparent; cursor: pointer; }
.cutter input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--lime) var(--fill, 0%), rgba(240,236,228,.1) var(--fill, 0%)); }
.cutter input::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(240,236,228,.1); }
.cutter input::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--lime); }
.cutter input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -11px; border-radius: 50%; background: var(--lime); box-shadow: inset 0 1px 0 var(--rim), 0 4px 16px var(--lime-light); }
.cutter input::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--lime); box-shadow: 0 4px 16px var(--lime-light); }
.cutter .ends { display: flex; justify-content: space-between; font-size: var(--t-caption); color: var(--faint); }
.said-what { position: relative; z-index: 2; text-align: center; margin-top: 12px; font-size: var(--t-footnote); color: var(--dim); min-height: 18px; }

@media (min-width: 900px) {
  /* On a computer the action sits under the heading, and the blueprints and the cutter share one row under the five. */
  .play { display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: 'copy copy' 'dock dock' 'stage stage' 'chips cutter' 'said said'; column-gap: 40px; padding: 104px 0 70px; }
  .play .copy { grid-area: copy; }
  .play .dock { grid-area: dock; margin-top: 24px; }
  .stage { grid-area: stage; }
  .chips { grid-area: chips; justify-self: end; align-self: center; padding: 0; margin-top: 30px; }
  .cutter { grid-area: cutter; justify-self: start; margin: 30px 0 0; width: 380px; }
  .said-what { grid-area: said; }
  .play .cloud { left: 50%; top: -260px; transform: scale(2.4) translateX(-50%); }
  .play .title { font-size: var(--t-hero); letter-spacing: -1.6px; }
  .play .under { max-width: none; }
  .stage { height: 330px; max-height: none; margin-top: 34px; }
  .tile { width: 186px; max-width: none; cursor: default; }
  .tile .cap { cursor: grab; touch-action: none; }
  .tile .cap::after { opacity: 0; transition: opacity .2s; }
  .tile:hover .cap::after, .tile.on .cap::after { opacity: .9; }
}

@media (prefers-reduced-motion: reduce) {
  .tile, .frame > *, .cap, .takes i { transition: none; }
  .nudge, .render::before { animation: none; }
}
