/* ==========================================================================
   Zips landing page (v4)
   White page. Colour lives only inside media and cards.
   ========================================================================== */

:root {
  --page: #ffffff;
  --soft: #f4f5f7;
  --soft-2: #e8eaee;
  --line: rgba(16, 24, 40, 0.08);
  --ink: #15181e;
  --muted: #6b7280;
  --grey-word: #b9bdc6;
  --blue: #4f7bf0;
  --sky: #8db4f7;
  --lilac: #a9a2f2;
  --shade: rgba(18, 28, 58, 0.24);
  --error: #b42318;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: 30px;
  --header-h: 78px;
  --container: 1240px;
  --radius-media: 28px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-soft: 0 10px 30px -14px rgba(16, 24, 40, 0.22), 0 0 0 1px rgba(16, 24, 40, 0.04);
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --radius-media: 22px; }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
em { font-style: italic; }
::selection { background: rgba(79, 123, 240, 0.2); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: calc(980px + var(--gutter) * 2); }
.center { text-align: center; }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
.h1, .h2, .step-title, .why-text, .closing-line, .note-title, .wordmark, .brand-word, .word {
  font-family: var(--serif);
  font-optical-sizing: auto;
}
.h1 {
  font-weight: 400;
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h2 {
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.mono-label, .mono-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}
.muted { color: var(--muted); }

/* Masked line reveal. JS wraps each line in .line > .line-inner. */
.line {
  display: block;
  overflow: hidden;
  padding-block: 0.06em 0.16em;
  margin-block: -0.06em -0.16em;
}
.line-inner { display: block; }
.js-motion [data-lines] { visibility: hidden; }
.js-motion [data-lines].is-split { visibility: visible; }
.js-motion [data-fade], .js-motion [data-reveal] { opacity: 0; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.pill-btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.85);
  color: #fff;
}
.pill-btn-outline:hover { background: #fff; color: var(--ink); }
.pill-btn-blue {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
.pill-btn-blue:hover { background: #4370e6; }
.pill-btn-blue:active { transform: scale(0.98); }
.pill-btn-line {
  border: 1px solid var(--ink);
  color: var(--ink);
}
.pill-btn-line:hover { background: var(--ink); color: #fff; }
.pill-btn[disabled] { opacity: 0.6; cursor: progress; }

/* --------------------------------------------------------------------------
   Header: fixed, same size on scroll, only a soft shadow appears
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 20px;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}
.nav-pill, .header-cta { pointer-events: auto; }

.nav-pill {
  display: flex;
  align-items: center;
  height: 58px;
  padding: 4px 26px 4px 5px;
  border-radius: 80px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0);
  transition: box-shadow 0.5s var(--ease);
}
.header-cta {
  height: 44px;
  margin-top: 7px;
  padding: 0 22px;
  background: #fff;
  color: var(--ink);
  font-size: 0.875rem;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0);
  transition: box-shadow 0.5s var(--ease), background-color 0.3s;
}
.header-cta:hover { background: var(--soft); }
.site-header.is-scrolled .nav-pill,
.site-header.is-scrolled .header-cta { box-shadow: var(--shadow-soft); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  flex: none;
  border-radius: 50%;
  background: var(--blue);
}
.brand-mark img { width: auto; height: 27px; }
.brand-word {
  font-weight: 500;
  font-size: 1.625rem;
  line-height: 1;
  letter-spacing: -0.02em;
  padding-bottom: 3px;
}
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 32px;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--blue); }

.menu-toggle {
  position: relative;
  display: none;
  width: 40px; height: 40px;
  margin-left: 12px;
  border-radius: 50%;
  background: var(--soft);
}
.menu-toggle span {
  position: absolute;
  left: 50%; top: 50%;
  width: 16px; height: 1.5px;
  margin: -0.75px 0 0 -8px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.45s var(--ease);
}
.menu-toggle span:first-child { transform: translateY(-3.5px); }
.menu-toggle span:last-child { transform: translateY(3.5px); }
.menu-toggle[aria-expanded='true'] span:first-child { transform: rotate(45deg); }
.menu-toggle[aria-expanded='true'] span:last-child { transform: rotate(-45deg); }

.menu-sheet {
  position: fixed;
  top: 88px;
  left: var(--gutter);
  right: var(--gutter);
  z-index: 49;
  padding: 10px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.menu-sheet nav { display: grid; }
.menu-sheet a {
  padding: 14px 16px;
  border-radius: 14px;
  font-family: var(--serif);
  font-size: 1.625rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.menu-sheet a:active { background: var(--soft); }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .nav-pill { padding-right: 9px; height: 54px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand-mark img { height: 25px; }
  .brand-word { font-size: 1.5rem; }
  .header-cta { margin-top: 5px; }
}
@media (min-width: 821px) {
  .menu-sheet { display: none !important; }
}
@media (max-width: 360px) {
  .header-cta { padding: 0 16px; }
}

/* --------------------------------------------------------------------------
   Shared media
   -------------------------------------------------------------------------- */
.bg-video, .hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-shade {
  position: absolute;
  inset: 0;
  background: var(--shade);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   1. Hero
   -------------------------------------------------------------------------- */
/* The video fills the whole first screen, edge to edge. */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  color: #fff;
}
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* Fallback light if the video can't load: soft blobs on pearl white. */
  background:
    radial-gradient(40% 50% at 25% 35%, rgba(141, 180, 247, 0.9), transparent 70%),
    radial-gradient(35% 45% at 75% 40%, rgba(169, 162, 242, 0.8), transparent 70%),
    radial-gradient(40% 40% at 50% 85%, rgba(255, 214, 196, 0.85), transparent 70%),
    #f3f5fb;
}
/* Text sits in the middle: a little more shade there keeps white text readable. */
.hero-shade {
  background:
    radial-gradient(60% 46% at 50% 50%, rgba(18, 28, 58, 0.2), transparent 75%),
    rgba(18, 28, 58, 0.22);
}
.hero-veil {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.js-motion .hero-veil { opacity: 1; }

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  /* Centre in the space below the fixed header (20px offset + 58px pill). */
  padding: var(--header-h) var(--gutter) 0;
  text-align: center;
}
.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 15px 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.glass-pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}
.hero .h1 {
  margin-top: 26px;
  max-width: 12ch;
  text-shadow: 0 1px 24px rgba(18, 28, 58, 0.18);
}
.hero-sub {
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 16px rgba(18, 28, 58, 0.2);
}
.hero .pill-btn { margin-top: 32px; }

/* --------------------------------------------------------------------------
   2. Works with: logo tiles on a slowly turning ring around the statement
   -------------------------------------------------------------------------- */
.logo-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.works {
  position: relative;
  height: 860px;
  overflow: hidden;
  --R: 312px;        /* ring radius (x) */
  --Ry: 312px;       /* ring radius (y): equal on desktop, so a true circle */
  --rot: 0deg;       /* turned slowly by script.js */
}
.works-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
  text-align: center;
  pointer-events: none;
}
.works .h2 { max-width: 13ch; position: relative; z-index: 1; }

.ring-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
}
.ring { position: absolute; inset: 0; }

.tile {
  /* Evenly spaced: 12 tiles, 30deg apart. --b is the base angle, --rot the turn. */
  --b: calc(var(--i) * 30deg);
  --a: calc(var(--b) + var(--rot, 0deg));
  position: absolute;
  left: 0;
  top: 0;
  width: 118px;
  aspect-ratio: 4 / 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border-radius: 22px;
  background: var(--soft);
  /* Tiles stay upright with a gentle tilt; only their position moves round the ring. */
  transform:
    translate(-50%, -50%)
    translate(calc(sin(var(--a)) * var(--R)), calc(cos(var(--a)) * var(--Ry) * -1))
    rotate(var(--tilt, 0deg));
}
.tile-logo {
  width: 32px;
  height: 32px;
  fill: var(--ink);
  opacity: 0.72; /* one monochrome ink for every logo */
}
.tile b {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(21, 24, 30, 0.72);
  letter-spacing: -0.005em;
}
.tile-name-only b { font-size: 1.0625rem; letter-spacing: -0.01em; }

/* Mobile: two arcs, above and below the text, that sway gently. */
@media (max-width: 720px) {
  .works { height: 600px; --R: 150px; --Ry: 228px; }
  .works .h2 { max-width: 20ch; }
  .tile { width: 84px; border-radius: 16px; gap: 4px; }
  .tile-logo { width: 24px; height: 24px; }
  .tile b { font-size: 0.6875rem; }
  .tile-name-only b { font-size: 0.8125rem; }
  /* Each logo once: three above the text, three below. */
  .tile:nth-child(1) { --b: -40deg; }
  .tile:nth-child(2) { --b: 0deg; }
  .tile:nth-child(3) { --b: 40deg; }
  .tile:nth-child(4) { --b: 140deg; }
  .tile:nth-child(5) { --b: 180deg; }
  .tile:nth-child(6) { --b: 220deg; }
  .tile:nth-child(n + 7) { display: none; }
}

/* --------------------------------------------------------------------------
   3. Three steps: one pinned, scroll-scrubbed story
   -------------------------------------------------------------------------- */
.steps { padding-top: clamp(40px, 6vw, 80px); }
.steps-title { max-width: 18ch; margin: 0 auto clamp(40px, 6vw, 72px); }

/* Default (no JS): one card in its final state, with the three steps listed below. */
.story {
  display: grid;
  gap: 28px;
  max-width: calc(640px + var(--gutter) * 2);
}
.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 1 / 1.05;
  padding: clamp(24px, 3.4vw, 40px) 20px 16px;
  border-radius: 24px;
  background: var(--lilac);
  color: #fff;
  overflow: hidden;
}
.story-titles { display: grid; width: 100%; text-align: center; }
.story-title {
  grid-area: 1 / 1;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  opacity: 0;
}
.story-title:last-child { opacity: 1; }
.story-half { display: flex; flex-direction: column; flex: 1; width: 100%; min-height: 0; }
.stage-fit { position: relative; flex: 1; width: 100%; min-height: 200px; }

/* Everything in the story is laid out on a fixed 560 x 520 stage, scaled to fit. */
.stage {
  --s: 0.7;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 560px;
  height: 520px;
  transform: translate(-50%, -50%) scale(var(--s));
}

/* Send happens on its own layer across the whole card. */
.story-send { position: absolute; inset: 0; pointer-events: none; }

.story-text { min-width: 0; }
.step-words { display: none; }
.story-lines { display: grid; gap: 22px; }
.story-step-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.step-line {
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  max-width: 32ch;
}

.word {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 4.6vw, 4.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--grey-word);
  transition: color 0.6s var(--ease);
}
.word-dot {
  width: 0; height: 8px;
  margin-right: 0;
  border-radius: 50%;
  background: var(--ink);
  transition: width 0.5s var(--ease), margin 0.5s var(--ease);
}
.word.is-active { color: var(--ink); font-style: italic; }
.word.is-active .word-dot { width: 8px; margin-right: 14px; }

/* Live: pinned while one scrubbed timeline plays. */
.steps.is-live .steps-title { margin-bottom: 8px; }
.steps.is-live .steps-pin { height: 100vh; height: 100svh; }
.steps.is-live .story-step-title {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.steps.is-live .step-words {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(18px, 2.4vw, 36px);
}
.steps.is-live .story-lines { display: grid; gap: 0; margin-top: 18px; }
/* Clean switch: the old line is gone before the new one fades in. */
.steps.is-live .story-step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.steps.is-live .story-step.is-active {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease 0.2s, transform 0.45s var(--ease) 0.2s;
}
.steps.is-live .step-line { margin-top: 0; }

/* The stage of the live story: one full-size card, revealed with a rounded clip. */
.steps.is-live .story {
  position: relative;
  display: block;
  width: calc(100% - var(--gutter) * 2);
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 0;
}
.steps.is-live .story-card {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  aspect-ratio: auto;
  padding: 0;
  will-change: clip-path;
}
.steps.is-live .story-titles { position: absolute; left: 0; right: 0; top: 0; display: block; height: var(--title-h); }
.steps.is-live .story-title { position: absolute; top: var(--title-top); padding: 0 20px; text-align: center; }
.steps.is-live .story-half { position: absolute; display: block; }
.steps.is-live .story-half .stage-fit { position: absolute; inset: 0; min-height: 0; }
.steps.is-live .story-text { position: absolute; z-index: 1; display: flex; flex-direction: column; }

/* Desktop: the card travels left -> full width -> right. */
@media (min-width: 768px) {
  .steps.is-live .steps-pin { padding-top: max(100px, calc((100vh - 640px) / 2)); }
  .steps.is-live .story {
    --gap: clamp(40px, 6vw, 96px);
    --half: calc((100% - var(--gap)) / 2);
    --title-h: clamp(92px, 12vh, 118px);
    --title-top: clamp(30px, 4.5vh, 42px);
    height: min(calc(100vh - 128px), 640px);
  }
  .steps.is-live .story-card { clip-path: inset(0 calc(var(--half) + var(--gap)) 0 0 round 24px); }
  .steps.is-live .t-zip { left: 0; width: var(--half); }
  .steps.is-live .t-send { left: 0; width: 100%; }
  .steps.is-live .t-open { right: 0; width: var(--half); }
  .steps.is-live .story-half { left: 0; top: var(--title-h); bottom: 16px; width: var(--half); padding: 0 20px; }
  .steps.is-live .story-half .stage-fit { inset: 0 20px; }
  .steps.is-live .story-send { top: var(--title-h); bottom: 16px; }
  .steps.is-live .story-text { top: 0; bottom: 0; right: 0; width: var(--half); justify-content: center; }
}

/* Mobile: the same idea, vertically. The card grows down over the text and back. */
@media (max-width: 767px) {
  .steps.is-live .steps-pin { padding: calc(var(--header-h) + 14px) 0 18px; }
  .steps.is-live .story {
    --text-h: 136px;
    --gap: 16px;
    --title-h: 64px;
    --title-top: 20px;
    height: 100%;
  }
  .steps.is-live .story-card { clip-path: inset(0 0 calc(var(--text-h) + var(--gap)) 0 round 24px); }
  .steps.is-live .story-title { left: 0; width: 100%; }
  .steps.is-live .story-half { left: 0; right: 0; top: var(--title-h); bottom: calc(var(--text-h) + var(--gap) + 12px); }
  .steps.is-live .story-half .stage-fit { inset: 0 12px; }
  .steps.is-live .story-send { inset: 0; }
  .steps.is-live .story-text { left: 0; right: 0; bottom: 0; height: var(--text-h); justify-content: flex-start; }
  .steps.is-live .word { font-size: 2.125rem; }
  .steps.is-live .word.is-active .word-dot { width: 6px; margin-right: 9px; }
  .steps.is-live .story-lines { margin-top: 8px; }
}

/* Reduced motion: three static end-state panels. */
.story-static { display: grid; gap: 40px; max-width: calc(var(--container) + var(--gutter) * 2); }
.story-static[hidden] { display: none; }
.static-panel .story-step-title { margin-top: 20px; }
@media (min-width: 900px) {
  .story-static { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
}

/* ---- Stage pieces ---- */
/* Send: a straight zipper. script.js places the teeth and moves the link along it as the slider. */
.s-zip {
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  opacity: 0;
}
.s-zip i {
  position: absolute;
  left: 0; top: 0;
  width: 6px; height: 10px;
  margin: -5px 0 0 -3px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 30, 90, 0.16);
}
.story-send.is-vertical .s-zip i { width: 10px; height: 6px; margin: -3px 0 0 -5px; }
.s-done {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(20, 30, 90, 0.22);
  transform: translateX(-50%);
  opacity: 0;
}
.s-done svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.tablet {
  position: absolute;
  left: 50%; top: 50%;
  width: 280px; height: 372px;
  margin: -186px 0 0 -140px;
  padding: 12px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6), 0 40px 70px -34px rgba(20, 30, 90, 0.55);
}
.tablet-cam {
  position: absolute;
  left: 50%; top: 5px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: #dfe5f2;
}
.tablet-screen {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #f2f6ff;
}

.file-card, .screen-file {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 108px;
  height: 134px;
  padding: 14px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 30px -16px rgba(20, 30, 90, 0.45), 0 0 0 1px rgba(16, 24, 40, 0.04);
}
.file-card { position: absolute; left: 0; top: 0; opacity: 0; }
.screen-file {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
}
.file-icon {
  position: relative;
  width: 28px; height: 34px;
  border-radius: 5px;
  background: #dce6fd;
  clip-path: polygon(0 0, 68% 0, 100% 26%, 100% 100%, 0 100%);
}
.file-icon i {
  position: absolute;
  right: 0; top: 0;
  width: 9px; height: 9px;
  background: #b9cdf9;
  border-bottom-left-radius: 3px;
}
.file-name { font-family: var(--mono); font-size: 10.5px; color: var(--ink); letter-spacing: -0.01em; }
.file-lines { display: grid; gap: 6px; margin-top: auto; }
.file-lines i { display: block; height: 5px; border-radius: 3px; background: #e6ecfa; }
.file-lines i:nth-child(2) { width: 72%; }
.file-lines i:nth-child(3) { width: 48%; }

.screen-ripple {
  position: absolute;
  left: 50%; top: 50%;
  width: 150px; height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  border: 2px solid #8db4f7;
  opacity: 0;
}

.s-cursor {
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  fill: #fff;
  stroke: rgba(14, 21, 48, 0.55);
  stroke-width: 1.1;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 6px rgba(20, 30, 90, 0.3));
  opacity: 0;
}

.s-link {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 30px -14px rgba(20, 30, 90, 0.5), 0 0 26px rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  opacity: 0;
}
.s-link svg { width: 17px; height: 17px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s-link span { font-family: var(--mono); font-size: 13px; color: var(--ink); }

.screen-content { position: absolute; inset: 0; background: #f2f6ff; } /* the light screen */

/* ---- Open: small apps that just work (flat, white, light blue, lilac) ---- */
.apps {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 9px;
  padding: 14px;
  --lb: #dce6fd;
  --lb2: #b9cdf9;
  --sk: #8db4f7;
  --li: #dcd8fc;
  --lil: #a9a2f2;
  --deep: #6e8eea;
}
.apps:not(.is-live) * { animation-play-state: paused !important; }
.app {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 14px -10px rgba(40, 60, 160, 0.45);
}

/* Scoreboard ticking */
.app-score { display: grid; align-content: center; justify-items: center; gap: 6px; }
.app-tag {
  position: absolute; left: 9px; top: 7px;
  font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lil);
}
.app-tag::before {
  content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%;
  background: var(--lil); vertical-align: 1px; animation: blink 1.6s ease-in-out infinite;
}
.score { display: flex; align-items: center; gap: 5px; margin-top: 8px; }
.score-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sk); }
.score-dot.dot-lilac { background: var(--lil); }
.score-num {
  display: block; height: 1.15em; overflow: hidden;
  padding: 0 3px; border-radius: 5px; background: var(--lb);
  font-family: var(--mono); font-size: 20px; line-height: 1.15em; color: var(--deep);
}
.score-colon { font-family: var(--mono); font-size: 16px; color: var(--lb2); }
.roll { display: flex; flex-direction: column; animation: roll4 6s cubic-bezier(.6, 0, .3, 1) infinite; }
.roll b { display: block; height: 1.15em; font-weight: 500; }
.roll-slow { animation: roll3 9s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes roll4 {
  0%, 26% { transform: translateY(0); }
  33%, 59% { transform: translateY(-1.15em); }
  66%, 92% { transform: translateY(-2.3em); }
  100% { transform: translateY(-3.45em); }
}
@keyframes roll3 {
  0%, 42% { transform: translateY(0); }
  50%, 92% { transform: translateY(-1.15em); }
  100% { transform: translateY(-2.3em); }
}
@keyframes blink { 50% { opacity: 0.25; } }

/* Bar chart growing */
.app-bars { display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding: 14px 12px 12px; }
.bar {
  width: 10px; border-radius: 3px 3px 2px 2px; background: var(--sk);
  transform-origin: 50% 100%; animation: grow 2.6s ease-in-out infinite alternate;
}
.bar:nth-child(1) { height: 34%; animation-delay: -0.2s; }
.bar:nth-child(2) { height: 58%; background: var(--lil); animation-delay: -0.9s; }
.bar:nth-child(3) { height: 44%; animation-delay: -1.5s; }
.bar:nth-child(4) { height: 78%; background: var(--lil); animation-delay: -0.5s; }
.bar:nth-child(5) { height: 62%; animation-delay: -2.1s; }
@keyframes grow { from { transform: scaleY(0.3); } to { transform: scaleY(1); } }

/* Laptop with code typing */
.app-code { display: grid; place-items: center; }
.laptop { display: grid; justify-items: center; }
.laptop-screen {
  display: grid; align-content: start; gap: 5px;
  width: 64px; height: 42px; padding: 6px;
  border: 2.5px solid var(--lb2); border-radius: 5px; background: #f6f8ff;
}
.laptop-screen i { display: block; height: 3.5px; border-radius: 2px; background: var(--sk); width: 0; animation: type 4.8s steps(8, end) infinite; }
.laptop-screen i:nth-child(1) { --w: 70%; }
.laptop-screen i:nth-child(2) { --w: 46%; background: var(--lil); animation-delay: 0.6s; }
.laptop-screen i:nth-child(3) { --w: 82%; animation-delay: 1.2s; }
.laptop-screen i:nth-child(4) { --w: 38%; background: var(--lil); animation-delay: 1.8s; }
.laptop-base { width: 82px; height: 5px; margin-top: -1px; border-radius: 0 0 5px 5px; background: var(--lb2); }
@keyframes type {
  0% { width: 0; }
  22%, 82% { width: var(--w); }
  100% { width: var(--w); opacity: 0; }
}

/* Calendar flipping */
.app-cal { display: grid; place-items: center; }
.cal {
  position: relative;
  width: 58px; height: 58px;
  overflow: hidden;
  border-radius: 9px;
  border: 1.5px solid var(--li);
  background: #fff;
  perspective: 200px;
}
.cal-head { display: flex; justify-content: center; gap: 16px; align-items: center; height: 15px; background: var(--lil); }
.cal-head i { width: 4px; height: 4px; border-radius: 50%; background: #fff; }
.cal-day {
  height: 1.15em; overflow: hidden; margin: 6px auto 0; width: max-content;
  font-family: var(--serif); font-size: 26px; line-height: 1.15em; color: var(--deep);
}
.roll-cal { animation: roll4 7.2s cubic-bezier(.6, 0, .3, 1) infinite; }
.cal-flip {
  position: absolute; left: 0; right: 0; top: 15px; height: 22px;
  background: rgba(220, 216, 252, 0.7);
  transform-origin: 50% 0;
  animation: flip 2.4s ease-in infinite;
}
@keyframes flip {
  0%, 62% { transform: rotateX(-90deg); opacity: 0; }
  70% { transform: rotateX(-90deg); opacity: 1; }
  100% { transform: rotateX(0deg); opacity: 0; }
}

/* Map pin dropping */
.app-map { background: #e9f0fe; }
.road { position: absolute; background: #fff; border-radius: 3px; }
.road-a { left: -10%; right: -10%; top: 58%; height: 7px; transform: rotate(-10deg); }
.road-b { top: -10%; bottom: -10%; left: 30%; width: 6px; transform: rotate(14deg); }
.pin {
  position: absolute; left: 50%; top: 22%;
  width: 22px; height: 28px; margin-left: -11px;
  animation: drop 3.2s cubic-bezier(.3, 0, .2, 1) infinite;
}
.pin path { fill: var(--lil); }
.pin circle { fill: #fff; }
.pin-shadow {
  position: absolute; left: 50%; top: calc(22% + 26px);
  width: 16px; height: 5px; margin-left: -8px;
  border-radius: 50%; background: rgba(110, 142, 234, 0.35);
  animation: shadow 3.2s cubic-bezier(.3, 0, .2, 1) infinite;
}
@keyframes drop {
  0% { transform: translateY(-46px); opacity: 0; }
  12% { opacity: 1; }
  30% { transform: translateY(0); }
  38% { transform: translateY(-6px); }
  46%, 88% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}
@keyframes shadow {
  0% { transform: scale(0.3); opacity: 0; }
  30%, 88% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* Music player */
.app-music { display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; align-items: center; gap: 6px 8px; padding: 12px; }
.disc {
  width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--lil), var(--sk), var(--li), var(--lil));
  animation: spin 6s linear infinite;
  box-shadow: inset 0 0 0 9px rgba(255, 255, 255, 0.0);
}
.disc::after { content: ''; display: block; width: 8px; height: 8px; margin: 11px auto 0; border-radius: 50%; background: #fff; }
.play { display: none; }
.eq { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.eq i { display: block; width: 4px; height: 100%; border-radius: 2px; background: var(--sk); transform-origin: 50% 100%; animation: eq 1.1s ease-in-out infinite alternate; }
.eq i:nth-child(2) { background: var(--lil); animation-delay: -0.4s; }
.eq i:nth-child(3) { animation-delay: -0.8s; }
.eq i:nth-child(4) { background: var(--lil); animation-delay: -0.2s; }
.progress { grid-column: 1 / -1; height: 4px; border-radius: 3px; background: var(--lb); overflow: hidden; }
.progress i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--deep); transform-origin: 0 50%; animation: prog 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }
@keyframes prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- Static end states (reduced motion panels) ---- */
.story-card.is-static .story-title { opacity: 0; }
.story-card.state-zip { background: var(--blue); }
.story-card.state-send { background: var(--sky); }
.story-card.state-open { background: var(--lilac); }
.state-zip .story-title:nth-child(1),
.state-send .story-title:nth-child(2),
.state-open .story-title:nth-child(3) { opacity: 1; }
.state-zip .screen-file { opacity: 1; }
.state-zip .apps { opacity: 0; }
.state-send .tablet { opacity: 0; }
.state-send .s-zip { opacity: 1; left: 8%; right: 8%; top: 50%; width: auto; }
.state-send .s-link { opacity: 1; left: auto; right: 8%; top: 50%; transform: translateY(-50%); }
.state-send .s-done { opacity: 1; }

/* --------------------------------------------------------------------------
   4. Why now
   -------------------------------------------------------------------------- */
.why { padding-block: clamp(120px, 16vw, 220px); }
.why-text {
  font-weight: 400;
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}
.why-text .w { display: inline; }

/* --------------------------------------------------------------------------
   5. Private beta: white card over a full-bleed video
   -------------------------------------------------------------------------- */
.beta {
  position: relative;
  padding-block: clamp(120px, 14vw, 200px);
  overflow: hidden;
  scroll-margin-top: 0;
}
.beta-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #cfe0fb, #e9e6fb 55%, #fbe8de);
}
.beta .container { position: relative; }
.beta-card {
  max-width: 800px;
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) clamp(22px, 5vw, 64px);
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 40px 80px -40px rgba(18, 28, 58, 0.35);
}
.beta-card .h2 { margin-top: 18px; }
.beta-text {
  max-width: 34em;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
}

.access-form { margin-top: 34px; text-align: left; }
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.field { display: block; }
.field-full { grid-column: 1 / -1; }
.field input {
  width: 100%;
  height: 52px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}
.field input::placeholder { color: #80869a; }
.field input:focus { border-color: rgba(79, 123, 240, 0.6); background: #fff; box-shadow: 0 0 0 4px rgba(79, 123, 240, 0.14); }
.access-form .pill-btn { grid-column: 1 / -1; justify-self: center; margin-top: 10px; min-width: 200px; height: 52px; }
.form-msg { min-height: 1.6em; margin-top: 14px; text-align: center; font-size: 0.9375rem; color: var(--muted); }
.has-error .form-msg { color: var(--error); }
.has-error input[aria-invalid='true'] { border-color: rgba(180, 35, 24, 0.55); }
.is-done .fields { display: none; }
.access-form.is-done { display: grid; place-items: center; }
.access-form.is-done .form-msg { margin: 0; }
.is-done .form-msg { color: var(--ink); font-size: 1.0625rem; }

@media (max-width: 600px) {
  .fields { grid-template-columns: 1fr; }
  .beta-card { padding-inline: 18px; }
  .field input { padding: 0 16px; }
}

/* --------------------------------------------------------------------------
   6. Field notes
   -------------------------------------------------------------------------- */
.notes { padding-block: clamp(110px, 13vw, 180px) clamp(60px, 8vw, 110px); }
.notes .h2 { margin-bottom: clamp(36px, 5vw, 56px); }
.notes-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.note-media {
  position: relative;
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  border-radius: 18px;
  background: var(--soft);
}
.note-media picture img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.note-soft picture img { filter: blur(5px); transform: scale(1.06); }
.note-card:hover .note-media picture img { transform: scale(1.03); }
.note-card:hover .note-soft picture img { transform: scale(1.09); }
.mono-tag.on-media {
  position: absolute;
  left: 16px; top: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font-size: 0.6875rem;
}
.note-mark {
  position: absolute;
  right: 16px; top: 14px;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(79, 123, 240, 0.9);
}
.note-mark img { height: 17px; width: auto; }
.note-card .mono-label { margin-top: 18px; }
.note-title {
  margin-top: 8px;
  font-weight: 400;
  font-size: clamp(1.375rem, 1.1rem + 0.7vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 22ch;
}

/* Mobile: horizontal slider */
@media (max-width: 899px) {
  .notes-rail { padding-inline: 0; }
  .notes-list {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 var(--gutter) 8px;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .notes-list::-webkit-scrollbar { display: none; }
  .note-card { flex: 0 0 min(82vw, 380px); scroll-snap-align: start; }
}

/* --------------------------------------------------------------------------
   7. FAQ
   -------------------------------------------------------------------------- */
.faq { padding-block: clamp(80px, 10vw, 140px) clamp(110px, 13vw, 180px); }
.faq-wrap { max-width: calc(800px + var(--gutter) * 2); }
.faq .h2 { margin-bottom: clamp(32px, 5vw, 52px); }
.faq-list { display: grid; gap: 10px; }
.faq-item {
  border-radius: 18px;
  background: var(--soft);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 16px 16px 26px;
  border-radius: 18px;
  cursor: pointer;
  list-style: none;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  font-weight: 500;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  position: relative;
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  background: var(--soft-2);
  transition: transform 0.5s var(--ease), background-color 0.3s;
}
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 13px; height: 1.5px;
  margin: -0.75px 0 0 -6.5px;
  border-radius: 2px;
  background: var(--ink);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item summary:hover .faq-icon { background: #dde0e6; }
.faq-item[open]:not(.is-closing) .faq-icon { transform: rotate(45deg); }
.faq-body { overflow: hidden; }
.faq-body p { padding: 0 26px 24px; color: var(--muted); max-width: 40em; }

/* --------------------------------------------------------------------------
   8. Closing band + footer card
   -------------------------------------------------------------------------- */
.ending { position: relative; }
.closing {
  position: sticky;
  top: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  height: 100vh;
  height: 100svh;
  padding: 0 var(--gutter);
  overflow: hidden;
  background: linear-gradient(180deg, #cfe0fb, #f6e7ef);
  color: #fff;
}
.closing .media-shade {
  background:
    radial-gradient(55% 40% at 50% 50%, rgba(18, 28, 58, 0.16), transparent 75%),
    rgba(18, 28, 58, 0.2);
}
.closing-line {
  position: relative;
  z-index: 1;
  max-width: 15ch;
  font-weight: 400;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 1px 24px rgba(18, 28, 58, 0.18);
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: -6vh;
}
.footer-card {
  border-radius: var(--radius-media) var(--radius-media) 0 0;
  background: #fff;
  /* Enough room that the fixed header never sits on the footer logo. */
  padding: max(64px, calc(var(--header-h) - 8px)) var(--gutter) 0;
  box-shadow: 0 -20px 40px -30px rgba(18, 28, 58, 0.25);
}
.footer-grid,
.footer-bar,
.wordmark {
  max-width: var(--container);
  margin-inline: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.brand-footer .brand-word { font-size: 1.75rem; }
.footer-line {
  margin-top: 16px;
  max-width: 18ch;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.footer-form { margin-top: 22px; max-width: 420px; }
.footer-form .fields { grid-template-columns: 1fr auto; gap: 8px; }
.footer-form .field input { height: 48px; background: #fff; border-color: rgba(16, 24, 40, 0.18); }
.footer-form .form-msg { text-align: left; margin-top: 10px; }

.footer-side {
  display: grid;
  gap: 32px;
  justify-self: end;
  width: min(100%, 420px);
}
.footer-status { display: flex; flex-wrap: wrap; gap: 8px 40px; color: var(--ink); }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.footer-links ul { display: grid; gap: 12px; align-content: start; }
.footer-links a { color: var(--muted); font-size: 0.9375rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--ink); }

.footer-bar {
  margin-top: clamp(32px, 4vw, 44px);
  padding-block: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

/* The wordmark: smaller, contained, solid ink, even space above and below. */
.wordmark {
  margin-block: clamp(18px, 2.6vw, 32px);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4.5rem, 14vw, 11rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--ink);
  user-select: none;
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-side { justify-self: start; }
}

/* --------------------------------------------------------------------------
   Reduced motion: no smooth scroll, no parallax, final states shown.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tile { animation: none; }
}

/* Starting states for the page-load sequence (motion only). */
.js-motion .site-header,
.js-motion [data-hero-pill],
.js-motion [data-hero-sub],
.js-motion [data-hero-btn] { opacity: 0; }

@media (max-width: 820px) {
  :root { --header-h: 74px; } /* 20px offset + 54px pill */
}
