/*
 * The public page. `TODO.md` §48, redone 2026-10-01 to wow rather than argue.
 *
 * Standalone on purpose: no React, no bundler, no session. Everything it needs sits beside it
 * in this folder under relative paths, so the directory can be copied to the VPS and served as
 * plain files on the days the house's machine is asleep.
 *
 * Pictures do the talking: people from Pexels (`photos/`, `videos/`), the real app inside a
 * TV, a phone and a browser window (`screens/`). The frames are CSS, so a screenshot can be
 * swapped without touching an image editor. One colour that is not a neutral: the brand yellow.
 *
 * Motion lives in `page.js`, which writes transforms and a few custom properties. Two rules
 * keep it from fighting itself: `.reveal` rises with the `translate` property, and everything
 * the script moves uses `transform`, so one never overwrites the other.
 */

@font-face {
  font-family: 'Archivo Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo.woff2) format('woff2-variations');
}

:root {
  --h: 258;
  --brand: #fdba08;
  --void: oklch(0.11 0.006 var(--h));
  --base: oklch(0.15 0.01 var(--h));
  --raised: oklch(0.19 0.01 var(--h));
  --text-1: oklch(0.97 0.004 var(--h));
  --text-2: oklch(0.8 0.006 var(--h));
  --text-3: oklch(0.64 0.008 var(--h));
  --hairline: oklch(1 0 0 / 0.08);
  --glass: oklch(0.2 0.01 var(--h) / 0.55);

  --font: 'Archivo Variable', Archivo, system-ui, 'Segoe UI', Roboto, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1240px;
  --shadow: 0 40px 90px -30px oklch(0 0 0 / 0.9), 0 8px 20px -6px oklch(0 0 0 / 0.6);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* The pointer, -1..1 from the centre of the window, eased by page.js. */
  --mx: 0;
  --my: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background: var(--void);
  color: var(--text-1);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}
/* Film grain over everything, very faint. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.locked {
  overflow: hidden;
}
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── type ─────────────────────────────────────────────────────────────── */

h1,
h2 {
  font-stretch: 72%;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-wrap: balance;
}
h1 {
  font-size: clamp(52px, 9vw, 124px);
}
h2 {
  font-size: clamp(40px, 6vw, 84px);
}
h1 em,
h2 em {
  font-style: normal;
  color: var(--brand);
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.lede {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-2);
  max-width: 34ch;
  margin-top: 22px;
  text-wrap: pretty;
}

/* Headings are split into words by page.js; each word rises out of its own slot. */
.words .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.04em 0.02em 0.1em;
  margin: -0.04em -0.02em -0.1em;
}
.words .w > span {
  display: inline-block;
  translate: 0 110%;
  opacity: 0;
  filter: blur(10px);
  transition:
    translate 1s var(--ease),
    opacity 1s ease,
    filter 1s ease;
  transition-delay: calc(var(--i) * 70ms);
}
.words.in .w > span {
  translate: none;
  opacity: 1;
  filter: none;
}
/* The yellow words carry a slow sheen. */
.words em .w > span {
  background: linear-gradient(100deg, var(--brand) 30%, #fff3c4 50%, var(--brand) 70%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: sheen 5s linear infinite;
}
@keyframes sheen {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -150% 0;
  }
}

/* ── buttons ──────────────────────────────────────────────────────────── */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--brand);
  color: #111;
  font-weight: 700;
  font-size: 17px;
  transform: translate(var(--tx, 0), var(--ty, 0));
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.25s,
    background 0.25s;
}
.cta:hover {
  box-shadow: 0 14px 40px -8px oklch(0.83 0.17 85 / 0.6);
}
.cta.ghost {
  background: oklch(1 0 0 / 0.08);
  color: var(--text-1);
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.18);
  backdrop-filter: blur(8px);
}
.cta.ghost:hover {
  background: oklch(1 0 0 / 0.18);
}
.cta.small {
  height: 40px;
  padding: 0 18px;
  font-size: 15px;
}
.cta.shine::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, oklch(1 0 0 / 0.6) 50%, transparent 70%);
  translate: -120% 0;
  animation: shine 4s ease-in-out infinite;
}
@keyframes shine {
  0% {
    translate: -120% 0;
  }
  45%,
  100% {
    translate: 120% 0;
  }
}

/* Chips are buttons: each one opens a window about that feature. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.05);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--text-2);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s,
    scale 0.2s var(--ease);
}
button.chip::after {
  content: '+';
  margin-left: 2px;
  font-weight: 800;
  color: var(--brand);
  transition: color 0.2s;
}
button.chip:hover,
button.chip:focus-visible {
  background: var(--brand);
  color: #111;
  box-shadow: 0 8px 24px -8px oklch(0.83 0.17 85 / 0.6);
  outline: none;
}
button.chip:hover::after,
button.chip:focus-visible::after,
button.chip:hover b {
  color: #111;
}
button.chip:active {
  scale: 0.95;
}
.chip b {
  color: var(--brand);
  transition: color 0.2s;
}

/* ── chrome: header, progress, dots, pointer glow ─────────────────────── */

.top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  transition:
    background 0.3s,
    backdrop-filter 0.3s;
}
.top.solid {
  background: oklch(0.11 0.006 var(--h) / 0.7);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 1px 0 var(--hairline);
}
.top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: none;
}
.top img {
  height: 34px;
  width: auto;
}
.top nav {
  display: flex;
  gap: 10px;
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 40;
  background: linear-gradient(90deg, var(--brand), #ffe07a);
  box-shadow: 0 0 12px var(--brand);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.dots {
  position: fixed;
  right: 22px;
  top: 50%;
  z-index: 30;
  translate: 0 -50%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dots a {
  position: relative;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.25);
  transition:
    background 0.3s,
    scale 0.3s;
}
.dots a.on {
  background: var(--brand);
  scale: 1.4;
  box-shadow: 0 0 10px var(--brand);
}
.dots a span {
  position: absolute;
  right: 22px;
  top: 50%;
  translate: 6px -50%;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    translate 0.2s;
}
.dots a:hover span {
  opacity: 1;
  translate: 0 -50%;
}

.glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1;
  width: 640px;
  height: 640px;
  margin: -320px 0 0 -320px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(closest-side, oklch(0.83 0.17 85 / 0.09), transparent);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.4s;
}
.glow.on {
  opacity: 1;
}

/* ── panels ───────────────────────────────────────────────────────────── */

/* Every section is a screen of its own. page.js sinks and dims a panel's children as the
   next one slides over it; the panel box itself never moves, so snapping stays exact. */
.panel {
  position: relative;
  overflow: hidden;
  background: var(--void);
  padding: 120px 0 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.panel > * {
  transform-origin: 50% 0;
}

/* ── hero ─────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100svh;
  padding: 0;
  isolation: isolate;
}
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  scale: 1.08;
  animation: drift 24s ease-out both;
}
@keyframes drift {
  from {
    scale: 1.22;
  }
  to {
    scale: 1.08;
  }
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--void) 0%, oklch(0.11 0.006 var(--h) / 0.78) 38%, transparent 75%),
    linear-gradient(0deg, var(--void) 0%, transparent 35%);
}
.hero .wrap {
  max-width: none;
  padding-top: 110px;
  padding-bottom: 110px;
}
.hero .lede {
  color: var(--text-1);
}
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 2px oklch(1 0 0 / 0.4);
}
.scroll-hint span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--brand);
  animation: wheel 1.8s ease-in-out infinite;
}
@keyframes wheel {
  0% {
    opacity: 0;
    translate: 0 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    translate: 0 14px;
  }
}

/* ── the devices on stage ─────────────────────────────────────────────── */

.screens {
  padding-top: 100px;
}
.stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
/* Two slow coloured lights behind the devices. */
.stage::before {
  content: '';
  position: absolute;
  inset: -12% 0;
  z-index: -1;
  background:
    radial-gradient(38% 48% at 30% 42%, oklch(0.83 0.17 85 / 0.2), transparent 70%),
    radial-gradient(34% 44% at 72% 58%, oklch(0.6 0.2 290 / 0.2), transparent 70%);
  filter: blur(30px);
  animation: aurora 12s ease-in-out infinite alternate;
}
@keyframes aurora {
  from {
    transform: translateX(-4%) scale(1);
  }
  to {
    transform: translateX(4%) scale(1.12) rotate(4deg);
  }
}
.stage-inner {
  perspective: 1600px;
}
.stage-3d {
  position: relative;
  padding-bottom: 6%;
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
}
.stage .tv {
  width: 76%;
  margin-left: 12%;
}
.stage .browser {
  position: absolute;
  width: 38%;
  left: 0;
  bottom: 0;
}
.stage .phone {
  position: absolute;
  width: 17%;
  right: 2%;
  bottom: -2%;
}
/* Depth: the nearer a device, the further it drifts with the pointer. */
.depth-1 {
  translate: calc(var(--mx) * -8px) calc(var(--my) * -6px);
}
.depth-2 {
  translate: calc(var(--mx) * -18px) calc(var(--my) * -12px);
}
.depth-3 {
  translate: calc(var(--mx) * -28px) calc(var(--my) * -18px);
}
.depth-4 {
  translate: calc(var(--mx) * -40px) calc(var(--my) * -26px);
}
.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  margin-top: 56px;
}

/* ── glass badges ─────────────────────────────────────────────────────── */

.badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px 10px 12px;
  border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  box-shadow:
    inset 0 0 0 1px oklch(1 0 0 / 0.14),
    0 20px 40px -12px oklch(0 0 0 / 0.7);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  animation: bob 6s ease-in-out infinite;
}
.badge svg {
  width: 20px;
  height: 20px;
  padding: 3px;
  border-radius: 50%;
  background: var(--brand);
  stroke: #111;
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes bob {
  50% {
    margin-top: -10px;
  }
}
.live {
  width: 9px;
  height: 9px;
  margin: 0 3px;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 0 0 0 #ff4d4d;
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
.b-resume {
  top: 4%;
  left: 5%;
}
.b-sync {
  top: 16%;
  right: 16%;
  animation-delay: -3s;
}
.b-fixed {
  top: -22px;
  right: 5%;
}
.b-invite {
  right: -8%;
  bottom: 10%;
  animation-delay: -2s;
}
.b-invite svg {
  stroke-width: 2.4;
}
.b-party {
  position: relative;
  display: flex;
  width: max-content;
  margin-bottom: 26px;
}
.faces {
  display: flex;
}
.faces i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: -8px;
  border-radius: 50%;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: #111;
  box-shadow: 0 0 0 2px oklch(0.2 0.01 var(--h));
}
.faces i:nth-child(1) {
  background: var(--brand);
}
.faces i:nth-child(2) {
  background: #8fd3ff;
}
.faces i:nth-child(3) {
  background: #ff9fb0;
  margin-right: 6px;
}

/* ── frames ───────────────────────────────────────────────────────────── */

/* A television: a thin bezel, a glow from the screen onto the wall, a stand. */
.tv {
  position: relative;
}
.tv .screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  padding: 0.9%;
  background: linear-gradient(160deg, #2a2a2e, #0b0b0c 40%);
  box-shadow:
    var(--shadow),
    0 0 120px -20px oklch(0.8 0.12 80 / 0.22);
}
.tv .screen > div {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}
/* A sheen across the glass that follows the pointer. */
.tv .screen > div::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, oklch(1 0 0 / 0.08) 48%, transparent 60%);
  translate: calc(var(--mx) * 12%) 0;
}
.tv .screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tv::after {
  content: '';
  display: block;
  width: 28%;
  height: 14px;
  margin: 0 auto;
  background: linear-gradient(#1a1a1c, #0c0c0d);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
}
/* The TV switches on, like an old set: a line of light, then the picture. */
.js main .tv .screen > div {
  clip-path: inset(50% 50% 50% 50%);
}
.js main .tv .screen.power > div {
  animation: power-on 1.1s var(--ease) forwards;
}
@keyframes power-on {
  0% {
    clip-path: inset(49.6% 50% 49.6% 50%);
    filter: brightness(4);
  }
  35% {
    clip-path: inset(49.6% 0 49.6% 0);
    filter: brightness(4);
  }
  100% {
    clip-path: inset(0 0 0 0);
    filter: brightness(1);
  }
}

/* A phone: rounded glass, a punch-hole camera. */
.phone {
  position: relative;
  border-radius: 15% / 7%;
  padding: 2.6%;
  background: linear-gradient(150deg, #3a3a3f, #111113 30%, #0a0a0b);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px oklch(1 0 0 / 0.14);
}
.phone img {
  width: 100%;
  border-radius: 12.5% / 5.8%;
}
.phone::before {
  content: '';
  position: absolute;
  top: 2.5%;
  left: 50%;
  width: 3.6%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 2px #151517;
  z-index: 1;
}

/* A browser window. */
.browser {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #1b1b1f;
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px oklch(1 0 0 / 0.1);
}
.browser .bar {
  display: flex;
  gap: 6px;
  align-items: center;
  height: 26px;
  padding: 0 12px;
}
.browser .bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.16);
}
.browser .bar span {
  flex: 1;
  height: 12px;
  margin: 0 12% 0 8%;
  border-radius: 6px;
  background: oklch(1 0 0 / 0.07);
}

/* ── numbers ──────────────────────────────────────────────────────────── */

.numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-top: clamp(56px, 8vw, 96px);
  text-align: center;
}
.numbers b {
  display: block;
  font-size: clamp(44px, 6vw, 76px);
  font-stretch: 72%;
  font-weight: 800;
  line-height: 1;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 40px oklch(0.83 0.17 85 / 0.35);
}
.numbers dd {
  margin: 0;
}
.numbers span {
  display: block;
  margin-top: 8px;
  color: var(--text-2);
  font-size: 15px;
}

/* ── marquee ──────────────────────────────────────────────────────────── */

.marquee {
  overflow: hidden;
  margin: 0 0 clamp(48px, 7vw, 88px);
  rotate: -2deg;
  scale: 1.04;
}
.marquee-track {
  display: flex;
  width: max-content;
  font-size: clamp(44px, 8vw, 116px);
  font-stretch: 70%;
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
  will-change: transform;
}
.marquee-track span {
  padding-right: 0.3em;
}
.marquee-track.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px oklch(1 0 0 / 0.3);
}

/* ── sections ─────────────────────────────────────────────────────────── */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.split.flip > :first-child {
  order: 2;
}
.photo {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tall {
  aspect-ratio: 4 / 5;
}
.photo-wrap {
  position: relative;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

/* TV section: the photo, with the TV standing in front of it. */
.tv-panel {
  padding-top: 72px;
}
.tv-scene {
  position: relative;
  padding-bottom: 30%;
}
.tv-scene .photo {
  width: 64%;
}
.tv-scene .tv {
  position: absolute;
  width: 100%;
  right: -10%;
  bottom: 0;
}
.slides img {
  opacity: 0;
  scale: 1.06;
  transition:
    opacity 1.2s ease,
    scale 4s ease;
}
.slides img.on {
  opacity: 1;
  scale: 1;
}

/* Phone section: three phones that fan out as the section arrives, over the train. */
.pocket {
  isolation: isolate;
}
.pocket-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.pocket-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
  opacity: 0.55;
}
.pocket-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--void) 0%, transparent 35%, transparent 65%, var(--void) 100%),
    linear-gradient(90deg, var(--void) 10%, oklch(0.11 0.006 var(--h) / 0.55) 50%, transparent);
}
.fan {
  --fan: 1;
  --spread: 78%;
  position: relative;
  height: clamp(420px, 52vw, 640px);
}
.fan .phone {
  position: absolute;
  width: 38%;
  max-width: 260px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
}
.fan .phone:nth-child(1) {
  transform: translate(calc(-50% - var(--spread) * var(--fan)), calc(-54% + 8% * var(--fan)))
    rotate(calc(-9deg * var(--fan)));
}
.fan .phone:nth-child(2) {
  z-index: 2;
  transform: translate(-50%, calc(-54% - 3% * var(--fan)));
}
.fan .phone:nth-child(3) {
  transform: translate(calc(-50% + var(--spread) * var(--fan)), calc(-54% + 8% * var(--fan)))
    rotate(calc(9deg * var(--fan)));
}

/* Subtitles: one big browser window that tips up to face you. */
.center {
  text-align: center;
}
.center .lede {
  margin-left: auto;
  margin-right: auto;
  max-width: 40ch;
}
.center .tags {
  justify-content: center;
}
.shot-3d {
  position: relative;
  max-width: 1040px;
  margin: clamp(40px, 6vw, 64px) auto 0;
  perspective: 1400px;
}
.wide-shot {
  transform-origin: 50% 100%;
}
/* A waveform along the bottom of the film: the thing Simplex listens to. */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 11%;
  opacity: 0.8;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 0 3%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.wave i {
  flex: 1;
  height: 100%;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(0deg, oklch(0.83 0.17 85 / 0.7), oklch(0.83 0.17 85 / 0.1));
  transform-origin: 50% 100%;
  animation: bar 1.4s ease-in-out infinite alternate;
}
@keyframes bar {
  from {
    transform: scaleY(0.12);
  }
  to {
    transform: scaleY(var(--h, 0.6));
  }
}

/* Full-bleed photo or film with the words on it. The photo stays as the video's poster. */
.bleed {
  min-height: min(100svh, 980px);
  justify-content: flex-end;
  isolation: isolate;
  padding: 0;
}
.bleed > img,
.bleed > video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bleed::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, var(--void) 0%, oklch(0.11 0.006 var(--h) / 0.7) 32%, transparent 62%),
    linear-gradient(180deg, var(--void) 0%, transparent 32%);
}
.bleed .wrap {
  padding-bottom: clamp(56px, 9vw, 110px);
}

/* ── everything else ──────────────────────────────────────────────────── */

.more-head {
  text-align: center;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tile {
  position: relative;
  overflow: hidden;
  padding: 26px 22px 24px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--raised), var(--base));
  box-shadow: inset 0 0 0 1px var(--hairline);
  transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
/* A light that follows the pointer across the tile. */
.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    320px circle at var(--x, 50%) var(--y, 50%),
    oklch(0.83 0.17 85 / 0.16),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
}
.tile:hover::before {
  opacity: 1;
}
.tile:hover {
  box-shadow: inset 0 0 0 1px oklch(0.83 0.17 85 / 0.4);
}
.tile svg {
  width: 30px;
  height: 30px;
  color: var(--brand);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: scale 0.3s var(--ease);
}
.tile:hover svg {
  scale: 1.18;
}
.tile h3 {
  margin-top: 18px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}
.tile p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-3);
}

/* ── close ────────────────────────────────────────────────────────────── */

.close {
  text-align: center;
}
.close .wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.close .cta-row {
  justify-content: center;
}

footer {
  position: relative;
  padding: 56px 0 44px;
  border-top: 1px solid var(--hairline);
  color: var(--text-3);
  font-size: 14px;
  background: var(--void);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  align-items: center;
  justify-content: space-between;
}
footer img {
  height: 28px;
  width: auto;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
footer nav a:hover {
  color: var(--text-1);
}
footer small {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--text-3);
  opacity: 0.8;
}

/* ── the feature window ───────────────────────────────────────────────── */

.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(1040px, calc(100% - 32px));
  max-width: none;
  max-height: min(88vh, 860px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--text-1);
  background: linear-gradient(170deg, oklch(0.2 0.012 var(--h) / 0.92), oklch(0.13 0.008 var(--h) / 0.96));
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow:
    inset 0 0 0 1px oklch(1 0 0 / 0.12),
    0 60px 120px -30px oklch(0 0 0 / 0.95);
  overflow: hidden;
}
.modal[open] {
  display: flex;
  flex-direction: column;
  animation: modal-in 0.5s var(--ease);
}
.modal::backdrop {
  background: oklch(0.05 0.005 var(--h) / 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.4s ease;
}
.modal.closing {
  animation: modal-out 0.3s ease forwards;
}
.modal.closing::backdrop {
  animation: fade-out 0.3s ease forwards;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.94);
  }
}
@keyframes modal-out {
  to {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
.modal-head {
  position: relative;
  padding: 34px 40px 8px;
}
.modal-head h3 {
  font-size: clamp(32px, 4.4vw, 52px);
  font-stretch: 72%;
  font-weight: 800;
  line-height: 1;
  padding-right: 48px;
}
.modal-head p {
  margin-top: 12px;
  max-width: 60ch;
  color: var(--text-2);
  font-size: 17px;
}
.modal-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}
.modal-points li {
  padding: 6px 12px;
  border-radius: 999px;
  background: oklch(0.83 0.17 85 / 0.12);
  color: #ffe08a;
  font-size: 14px;
  font-weight: 600;
}
.modal-x {
  position: absolute;
  top: 22px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: oklch(1 0 0 / 0.08);
  transition:
    background 0.2s,
    rotate 0.3s var(--ease);
}
.modal-x:hover {
  background: var(--brand);
  color: #111;
  rotate: 90deg;
}
.modal-x svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}
/* The screenshots: a row that scrolls sideways, one frame per stop. */
.modal-shots {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 40px 36px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: oklch(1 0 0 / 0.2) transparent;
}
.modal-shots > * {
  flex: none;
  scroll-snap-align: center;
  animation: shot-in 0.7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 90ms + 0.1s);
}
@keyframes shot-in {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
}
.modal-shots .tv {
  width: min(640px, 78vw);
}
.modal-shots .browser {
  width: min(640px, 78vw);
}
.modal-shots .phone {
  width: min(210px, 46vw);
}
.modal-shots figure {
  margin: 0;
}
.modal-shots figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
}

/* ── reveal ───────────────────────────────────────────────────────────── */

.js .reveal {
  opacity: 0;
  translate: 0 40px;
  transition:
    opacity 0.9s ease,
    translate 0.9s var(--ease);
}
.js .reveal.in {
  opacity: 1;
  translate: none;
}
.grid .reveal:nth-child(4n + 2) {
  transition-delay: 0.08s;
}
.grid .reveal:nth-child(4n + 3) {
  transition-delay: 0.16s;
}
.grid .reveal:nth-child(4n + 4) {
  transition-delay: 0.24s;
}
.js .tile.reveal {
  transition:
    opacity 0.9s ease,
    translate 0.9s var(--ease),
    transform 0.25s ease,
    box-shadow 0.25s;
}

/* ── desktop: one scroll, one panel ───────────────────────────────────── */

@media (min-width: 900px) and (min-height: 620px) and (hover: hover) {
  html {
    scroll-snap-type: y mandatory;
  }
  .panel {
    min-height: 100vh;
    scroll-snap-align: start;
  }
  footer {
    scroll-snap-align: end;
  }
  /* Sized so each panel fits one screen, down to a 1280x720 laptop. */
  .stage {
    max-width: min(1180px, calc((100vh - 330px) * 1.75));
  }
  .numbers {
    padding-top: clamp(28px, 4vh, 72px);
  }
  .platforms {
    margin-top: clamp(28px, 4vh, 56px);
  }
  .marquee-track {
    font-size: clamp(36px, 7vh, 88px);
  }
  .marquee {
    margin-bottom: clamp(24px, 4vh, 64px);
  }
  .tv-panel {
    padding-top: 104px;
  }
  .tv-scene {
    max-width: calc((100vh - 300px) * 1.3);
  }
  .shot-3d {
    max-width: min(1040px, calc((100vh - 470px) * 1.8));
  }
  .fan {
    height: min(640px, calc(100vh - 220px));
  }
  .split .photo.tall {
    max-height: calc(100vh - 220px);
    aspect-ratio: auto;
    height: min(calc(100vh - 220px), 620px);
  }
  .more {
    padding: 96px 0 56px;
  }
  .more-head {
    margin-bottom: clamp(24px, 4vh, 56px);
  }
  .tile {
    padding: clamp(14px, 2.2vh, 26px) 20px;
  }
  .tile svg {
    width: 26px;
    height: 26px;
  }
  .tile h3 {
    margin-top: clamp(8px, 1.4vh, 18px);
    font-size: 18px;
  }
  .tile p {
    font-size: 14px;
  }
  /* Each panel arrives like a card laid on the one before. */
  .panel + .panel {
    margin-top: -36px;
    border-radius: 36px 36px 0 0;
    box-shadow: 0 -30px 60px -20px oklch(0 0 0 / 0.9);
  }
}

/* ── narrow ───────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .dots {
    display: none;
  }
}
@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .numbers {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 40px;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .panel {
    padding: 88px 0 72px;
  }
  .hero {
    padding: 0;
    justify-content: flex-end;
  }
  .top nav .ghost {
    display: none;
  }
  .hero::after {
    background: linear-gradient(
      0deg,
      var(--void) 8%,
      oklch(0.11 0.006 var(--h) / 0.75) 55%,
      oklch(0.11 0.006 var(--h) / 0.2)
    );
  }
  .hero .wrap {
    padding-bottom: 96px;
  }
  .scroll-hint {
    bottom: 22px;
  }
  .cta {
    height: 50px;
    padding: 0 22px;
  }
  .screens {
    padding-top: 64px;
  }
  .stage .tv {
    width: 100%;
    margin-left: 0;
  }
  .stage .browser {
    display: none;
  }
  .stage .phone {
    width: 26%;
    right: -1%;
    bottom: -6%;
  }
  .badge {
    font-size: 12px;
    padding: 7px 11px 7px 9px;
    gap: 7px;
    border-radius: 11px;
  }
  .badge svg {
    width: 16px;
    height: 16px;
  }
  .b-resume {
    top: -9%;
    left: 0;
  }
  .b-sync {
    top: auto;
    bottom: 2%;
    right: auto;
    left: 2%;
  }
  .b-fixed {
    top: -16px;
    right: 3%;
  }
  .b-invite {
    right: 4%;
  }
  .faces i {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .split.flip > :first-child {
    order: 0;
  }
  .tv-panel {
    padding-top: 48px;
  }
  .tv-scene .photo {
    width: 70%;
  }
  .tv-scene .tv {
    width: 94%;
    right: 0;
  }
  .fan {
    --spread: 62%;
    height: clamp(360px, 110vw, 520px);
  }
  .fan .phone {
    width: 36%;
  }
  .pocket-bg img {
    opacity: 0.35;
  }
  .bleed {
    min-height: 88svh;
  }
  .tile {
    padding: 20px 16px;
  }
  .tile h3 {
    font-size: 17px;
  }
  .tile p {
    font-size: 14px;
  }
  /* The feature window becomes a sheet from the bottom. */
  .modal {
    inset: auto 0 0;
    width: 100%;
    max-height: 90svh;
    margin: 0;
    border-radius: 26px 26px 0 0;
  }
  .modal[open] {
    animation-name: sheet-in;
  }
  .modal.closing {
    animation-name: sheet-out;
  }
  @keyframes sheet-in {
    from {
      transform: translateY(100%);
    }
  }
  @keyframes sheet-out {
    to {
      transform: translateY(100%);
    }
  }
  .modal-head {
    padding: 26px 20px 4px;
  }
  .modal-head p {
    font-size: 16px;
  }
  .modal-x {
    top: 16px;
    right: 16px;
  }
  .modal-shots {
    gap: 16px;
    padding: 20px 20px 28px;
  }
}
@media (max-width: 400px) {
  .grid {
    gap: 10px;
  }
  .chip {
    font-size: 14px;
    padding: 7px 13px;
  }
}

/* ── the loader: a film leader counting 5 to 1 ───────────────────────────
 * Shown only with the script on. page.js adds `.done` once the page has loaded (and at least
 * a second has gone by, so it never just flashes); an iris then opens on the page. If the
 * script never runs, `loader-bail` takes it away at 10 s on its own. */

@property --iris {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
@property --sweep {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.loader {
  display: none;
}
.js .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  background: radial-gradient(circle at 50% 42%, oklch(0.2 0.012 var(--h)), var(--void) 70%);
  animation: loader-bail 0.6s 10s forwards;
}
html.loading {
  overflow: hidden;
}
/* Grain, and a scratch that wanders down the film. */
.loader::before,
.loader::after {
  content: '';
  position: absolute;
  pointer-events: none;
}
.loader::before {
  inset: -50%;
  opacity: 0.09;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.5s steps(4) infinite;
}
.loader::after {
  top: 0;
  bottom: 0;
  left: 30%;
  width: 1px;
  background: oklch(1 0 0 / 0.14);
  animation: scratch 2.3s steps(9) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-6%, 4%); }
  50% { transform: translate(5%, -7%); }
  75% { transform: translate(-3%, -4%); }
}
@keyframes scratch {
  0% { left: 22%; opacity: 1; }
  20% { left: 71%; opacity: 0; }
  40% { left: 64%; opacity: 1; }
  60% { left: 18%; opacity: 0.4; }
  80% { left: 83%; opacity: 0; }
  100% { left: 40%; opacity: 1; }
}

.leader {
  position: relative;
  display: grid;
  place-items: center;
  width: min(64vw, 340px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid oklch(1 0 0 / 0.16);
  border-radius: 14px;
  background:
    linear-gradient(oklch(1 0 0 / 0.16), oklch(1 0 0 / 0.16)) center / 100% 1px no-repeat,
    linear-gradient(oklch(1 0 0 / 0.16), oklch(1 0 0 / 0.16)) center / 1px 100% no-repeat,
    oklch(0.17 0.01 var(--h));
  box-shadow:
    0 0 0 6px oklch(0.13 0.008 var(--h)),
    0 0 0 7px oklch(1 0 0 / 0.08),
    0 30px 120px -20px color-mix(in oklch, var(--brand) 35%, transparent);
  animation: flicker 0.16s steps(2) infinite;
}
@keyframes flicker {
  50% { filter: brightness(1.12); }
}
.leader .sweep,
.leader .ring {
  position: absolute;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
}
/* The shade fills behind the hand, one turn a second, one number a turn. */
.leader .sweep {
  background: conic-gradient(
    color-mix(in oklch, var(--brand) 28%, transparent) var(--sweep),
    transparent 0
  );
  animation: sweep 1s linear infinite;
}
.leader .sweep::after {
  content: '';
  position: absolute;
  left: calc(50% - 1px);
  bottom: 50%;
  width: 2px;
  height: 50%;
  background: var(--brand);
  box-shadow: 0 0 14px var(--brand);
  transform-origin: 50% 100%;
  animation: hand 1s linear infinite;
}
@keyframes sweep {
  to { --sweep: 360deg; }
}
@keyframes hand {
  to { transform: rotate(360deg); }
}
.leader .ring {
  border: 2px solid oklch(1 0 0 / 0.7);
  box-shadow:
    inset 0 0 0 9px oklch(0.17 0.01 var(--h) / 0.6),
    inset 0 0 0 11px oklch(1 0 0 / 0.45);
}
.leader b {
  position: relative;
  width: 1ch;
  height: 1.1em;
  font-size: min(22vw, 128px);
  font-weight: 800;
  font-stretch: 112%;
  line-height: 1;
  color: var(--text-1);
  text-shadow: 0 0 30px oklch(0 0 0 / 0.8);
}
.leader i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: normal;
  opacity: 0;
  animation: count 5s infinite;
}
.leader i:nth-child(2) { animation-delay: 1s; }
.leader i:nth-child(3) { animation-delay: 2s; }
.leader i:nth-child(4) { animation-delay: 3s; }
.leader i:nth-child(5) { animation-delay: 4s; }
@keyframes count {
  0% { opacity: 1; transform: scale(1.18); }
  6% { transform: scale(1); }
  19.9% { opacity: 1; }
  20%,
  100% { opacity: 0; }
}

/* Film running past: sprocket holes above and below, frames in between. */
.strip {
  width: min(78vw, 420px);
  height: 46px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, transparent 0 7px, oklch(0.8 0.01 var(--h) / 0.55) 7px 15px, transparent 15px 20px) 0 5px / 100% 6px repeat-x,
    repeating-linear-gradient(90deg, transparent 0 7px, oklch(0.8 0.01 var(--h) / 0.55) 7px 15px, transparent 15px 20px) 0 calc(100% - 5px) / 100% 6px repeat-x,
    repeating-linear-gradient(90deg, oklch(0.34 0.07 75) 0 54px, transparent 54px 60px) 0 50% / 100% 22px repeat-x,
    oklch(0.1 0.006 var(--h));
  mask: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
  animation: film 0.6s linear infinite;
}
@keyframes film {
  to {
    background-position-x: -60px, -60px, -60px, 0;
  }
}
.loader p {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-3);
}
.loader p::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  vertical-align: 1px;
  background: var(--brand);
  animation: pulse 1s ease-in-out infinite;
}

/* The way out: an iris opening from the middle, the leader rushing at you. */
.js .loader.done {
  pointer-events: none;
  mask: radial-gradient(circle at 50% 42%, transparent var(--iris), #000 calc(var(--iris) + 1px));
  animation: iris 0.95s var(--ease) forwards;
}
.loader.done .leader,
.loader.done .strip,
.loader.done p {
  transition:
    transform 0.8s var(--ease),
    opacity 0.5s ease;
  transform: scale(1.6);
  opacity: 0;
}
@keyframes iris {
  to { --iris: 150vmax; }
}
@keyframes loader-bail {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ── reduced motion: everything still, everything shown ───────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none;
  }
  .js .reveal,
  .words .w > span {
    opacity: 1;
    translate: none;
    filter: none;
    transition: none;
  }
  .js main .tv .screen > div {
    clip-path: none;
    animation: none;
  }
  .hero-photo img,
  .stage::before,
  .badge,
  .live,
  .wave i,
  .cta.shine::after,
  .scroll-hint span,
  .words em .w > span,
  .modal[open],
  .modal-shots > *,
  .loader *,
  .loader::before,
  .loader::after,
  .loader p::before {
    animation: none;
  }
  .leader i:last-child {
    opacity: 1;
  }
  .js .loader.done {
    mask: none;
    animation: loader-bail 0.4s forwards;
  }
  .cta.shine::after {
    display: none;
  }
}

/* A phone on its side, for the screens that open sideways. */
.phone.land {
  border-radius: 7% / 15%;
  padding: 1.2%;
}
.phone.land img {
  border-radius: 5.8% / 12.5%;
}
.phone.land::before {
  top: 50%;
  left: 1.2%;
  width: auto;
  height: 3.6%;
  transform: translateY(-50%);
  aspect-ratio: 1;
}
.modal-shots .phone.land {
  width: min(560px, 80vw);
}
