/* Yopla site, round 2: the launch race. */
:root { --ink: #f5f5f7; --grey: #86868b; --grey-2: #6e6e73; --live: #f2483c; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: #000; }
/* iOS Safari enlarges small text on its own: the app's drawn screens keep their sizes */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { color: var(--ink); font-family: system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
img { display: block; }

.race { text-align: center; padding: 140px 22px 140px; }
.race h2 { font-size: 64px; line-height: 1.0625; font-weight: 600; letter-spacing: -.009em; }
.race h2 span { display: block; }
.race h2 .g { color: var(--grey); }
.race .sub { margin: 26px auto 0; max-width: 640px; font-size: 24px; line-height: 1.33; font-weight: 500; color: var(--grey); }
.phones { display: flex; justify-content: center; gap: 72px; margin-top: 72px; }
.unit figcaption { margin-top: 26px; }
.unit figcaption b { display: block; font-size: 21px; font-weight: 600; }
/* grey while it runs, white once its app is ready (launch.js draws the colour from the race's time) */
.unit .timer { display: block; margin-top: 6px; font-size: 40px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--grey-2); }
/* The race's player under the phones (../film.css, ../scrub.js) */
.race .film { display: block; padding: 0; }
.race .ctl { display: flex; justify-content: center; margin-top: 44px; }
.fine { margin: 18px auto 0; max-width: 560px; font-size: 12px; line-height: 1.5; color: var(--grey-2); min-height: 18px; }

/* The drawn iPhone (the site's own devices) */
.iphone { --w: var(--pw, 300px); position: relative; width: var(--w); padding: calc(var(--w) * .013); border-radius: calc(var(--w) * .19);
  background: linear-gradient(145deg, #c9c9ce 0%, #5d5d62 9%, #26262a 26%, #18181b 50%, #2d2d31 72%, #6c6c71 90%, #cfcfd4 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 0 0 1px rgba(0, 0, 0, .85); filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .6)); }
.iphone .bezel { border-radius: calc(var(--w) * .177); background: #000; padding: calc(var(--w) * .027); }
.iphone .screen { position: relative; overflow: hidden; aspect-ratio: 1206 / 2622; border-radius: calc(var(--w) * .15); background: #000; container-type: inline-size; }
.iphone .island { position: absolute; z-index: 20; top: calc(var(--w) * .023); left: 50%; transform: translateX(-50%); width: calc(var(--w) * .262); height: calc(var(--w) * .077); border-radius: 999px; background: #000; }

/* Layers inside a screen; sizes in cqw so both phones scale as one (402 pt wide). How each
   arrives (the app growing out of its icon, a capture's fade) launch.js draws from the race's time. */
.layer { position: absolute; inset: 0; opacity: 0; }
.layer.on { opacity: 1; }
.layer > img.shot { width: 100%; height: 100%; object-fit: cover; }
.u { font-size: calc(100cqw / 402); } /* 1em = 1 pt of a 402 pt wide iPhone */

.homescreen { background: radial-gradient(120% 80% at 30% 20%, #2a2a33 0%, #121216 55%, #0a0a0c 100%); }
/* iOS's grid: four columns, 64 pt icons; the others dimmed, the app in colour */
.homescreen .grid { position: absolute; left: 27em; right: 27em; top: 72em; display: grid; grid-template-columns: repeat(4, 64em); justify-content: space-between; row-gap: 22em; }
.homescreen .ghost, .homescreen .app { display: flex; flex-direction: column; align-items: center; gap: 6em; height: 82em; }
.homescreen .ghost i { width: 64em; height: 64em; border-radius: 14.5em; background: rgba(255, 255, 255, .07); }
.homescreen .ghost b { width: 38em; height: 6em; margin-top: 3em; border-radius: 3em; background: rgba(255, 255, 255, .08); }
.homescreen .dock { position: absolute; left: 14em; right: 14em; bottom: 14em; height: 92em; border-radius: 34em; background: rgba(255, 255, 255, .06); display: flex; justify-content: space-around; align-items: center; padding: 0 12em; }
.homescreen .dock i { width: 64em; height: 64em; border-radius: 14.5em; background: rgba(255, 255, 255, .07); }
.homescreen .icon { width: 64em; height: 64em; border-radius: 14.5em; overflow: hidden; }
.homescreen .icon img { width: 100%; height: 100%; }
.homescreen .icon.generic { background: linear-gradient(160deg, #3a3a3e, #1f1f22); display: grid; place-items: center; }
.homescreen .icon.generic i { width: 33em; height: 26.5em; background: rgba(255,255,255,.85); -webkit-mask: url(media/tv-44.png) center / contain no-repeat; mask: url(media/tv-44.png) center / contain no-repeat; }
.homescreen .name { font-size: 12em; line-height: 1.2; color: #fff; letter-spacing: 0; }

/* the system's own opening: the app grows out of its icon */
.opening { transform-origin: 38.2% 47.6%; }

/* The other app: plain screens, the stages its own launch showed */
.plain { background: #141416; color: #fff; }
.status { position: absolute; left: 0; right: 0; top: 0; height: 54em; display: flex; align-items: center; justify-content: space-between; padding: 0 30em 0 52em; font-size: calc(100cqw / 402); }
.status .clock { font-size: 17em; font-weight: 600; letter-spacing: -.01em; }
.status .icons { display: flex; gap: 7em; align-items: center; }
.status .icons i { display: block; background: #fff; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.plain .step { position: absolute; left: 0; right: 0; top: 86em; text-align: center; font-size: calc(100cqw / 402); }
.plain .step b { font-size: 15em; font-weight: 600; letter-spacing: -.01em; }
.plain .mid { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 12em; font-size: calc(100cqw / 402); }
/* its wheel turns in 0.8 s (launch.js) */
.plain .spin { width: 28em; height: 28em; border-radius: 50%; border: 3em solid rgba(255,255,255,.18); border-top-color: #fff; }
/* The guide line's wheel over Yopla's capture: the app's Spinner.mini (DesignSystem.swift), 13 pt with a
   1.8 pt line, a faint ring and an arc at 55 % white that turns in 0.9 s and grows from 14 % to 62 % of
   the ring and back in 1.1 s (launch.js); a black disc covers the capture's frozen one. Its left and
   width: the ring's box in the 603 px capture (x 23.75 to 43.25 px). */
.guide-spin { position: absolute; left: 3.94%; width: 3.234%; height: auto; overflow: visible; }
.guide-spin circle { fill: none; stroke-width: 1.8; }
.guide-spin .hide { fill: #000; stroke: none; }
.guide-spin .track { stroke: rgba(255, 255, 255, .088); }
.guide-spin .arc { stroke: rgba(255, 255, 255, .55); stroke-linecap: round; stroke-dasharray: 14 86; }
.plain .pct { font-size: 13em; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.plain .bar { width: 300em; height: 3em; border-radius: 2em; background: rgba(255,255,255,.14); overflow: hidden; }
.plain .bar b { display: block; height: 100%; width: 0; background: rgba(255,255,255,.85); }
.plain .launchicon { width: 80em; height: 80em; border-radius: 18em; background: linear-gradient(160deg, #3a3a3e, #1f1f22); display: grid; place-items: center; }
.plain .launchicon i { width: 42em; height: 34em; background: rgba(255,255,255,.85); -webkit-mask: url(media/tv-44.png) center / contain no-repeat; mask: url(media/tv-44.png) center / contain no-repeat; }
.ghome { font-size: calc(100cqw / 402); text-align: left; }
.ghome .tabs { position: absolute; top: 62em; left: 20em; right: 20em; display: flex; gap: 18em; color: rgba(255,255,255,.55); }
.ghome .tabs > * { font-size: 14em; }
.ghome .tabs b { color: #fff; font-weight: 600; }
.ghome .shelf { position: absolute; left: 20em; right: 0; }
.ghome .shelf p { font-size: 16em; font-weight: 600; margin-bottom: .625em; }
.ghome .cards { display: flex; gap: 10em; }
.ghome .cards span { flex: none; width: 112em; height: 166em; border-radius: 8em; background: #1f1f22; }
.ghome .cards.wide span { width: 220em; height: 124em; }

@media (max-width: 734px) {
  .race { padding: 96px 16px 96px; }
  .race h2 { font-size: 40px; line-height: 1.1; }
  .race .sub { font-size: 19px; margin-top: 16px; }
  .phones { gap: 14px; margin-top: 44px; }
  .iphone { --w: 166px; }
  .unit figcaption { margin-top: 16px; }
  .unit figcaption b { font-size: 15px; }
  .unit .timer { font-size: 28px; }
  .race .ctl { margin-top: 28px; }
}
/* With reduced motion (launch.js): no growing out of the icon, the wheels a turn in 2 s, Yopla's arc held */

/* Inside the home page's frame: the page has the headline */
.embed .race { padding: 8px 16px 0; }
.embed .race > h2, .embed .race > .sub { display: none; }
.embed .phones { margin-top: 0; }

/* Before the race (gate.js): both screens dimmed under the one button */
.phones { position: relative; }
.unit .screen .dim { position: absolute; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .35s; pointer-events: none; }
.gated .unit .screen .dim { opacity: 1; }
