/* Tally — tallyguestlist.com home.
   The app's own system: Outfit, white-first and monochrome, one green for "live",
   and the night palette the door scanner runs on. Motion uses the app's curves. */

:root {
  --white: #ffffff;
  --surface: #f4f4f2;
  --surface-strong: #eaeae7;
  --ink: #171717;
  --secondary: #626262;
  --tertiary: #8a8a88;
  --border: #e0e0de;
  --live: #1f7a4d;
  --night: #0b0b0b;
  --night-surface: #1a1a1a;
  --night-border: #2a2a2a;

  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.87, 0, 0.13, 1);

  --gutter: clamp(20px, 5.5vw, 88px);
  --nav-h: 76px;
  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--live); color: var(--white); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 10px;
}
.cta :focus-visible,
.step-night :focus-visible,
.story.is-night :focus-visible,
html.nav-night .nav :focus-visible { outline-color: var(--white); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

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

.skip {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  transition: top 0.5s var(--ease-expo);
}
.skip:focus { top: 16px; }

/* ───────────────────────── Type ───────────────────────── */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
}
.eyebrow-live { color: var(--live); }

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  flex: none;
}
.live-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--live);
  animation: live 2.4s var(--ease-expo) infinite;
}
@keyframes live {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(3.2); opacity: 0; }
}

.display {
  margin: 0;
  font-size: clamp(46px, 7.4vw, 124px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.lede {
  margin: 0;
  max-width: 40ch;
  font-size: clamp(18px, 1.45vw, 21px);
  line-height: 1.5;
  color: var(--secondary);
}

/* Masked lines that slide up into place. */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.line > span { display: inline-block; }

/* ───────────────────────── Buttons & links ───────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.7s var(--ease-expo),
    background-color 0.35s var(--ease-quint),
    color 0.35s var(--ease-quint);
}
.btn-sm { height: 42px; padding: 0 20px; font-size: 15px; }
.btn-lg { height: 60px; padding: 0 30px; font-size: 17px; }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #2b2b2b; }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--surface-strong); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.link-arrow span { display: inline-block; transition: transform 0.6s var(--ease-expo); }
.link-arrow:hover span { transform: translateX(5px); }
.link-light { color: var(--white); }

/* ───────────────────────── Tally marks (the app's brand motion) ───────────────────────── */

.marks rect { fill: currentColor; }
.js .marks rect {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0.001);
  opacity: 0;
  transition: transform 0.9s var(--ease-expo), opacity 0.3s var(--ease-quint);
}
.js .marks .slash { transform-origin: 50% 50%; }
.js .marks rect.on { transform: none; opacity: 1; }
.marks .ghost rect,
.js .marks .ghost rect { transform: none; opacity: 1; fill: var(--line, var(--border)); transition: fill 0.6s var(--ease-quint); }

/* ───────────────────────── Phone ───────────────────────── */

.phone {
  --pw: 320px;
  position: relative;
  width: var(--pw);
  margin: 0;
  padding: calc(var(--pw) * 0.03);
  border-radius: calc(var(--pw) * 0.165);
  background: var(--night);
  box-shadow:
    inset 0 0 0 1px var(--night-border),
    0 70px 120px -50px rgba(23, 23, 23, 0.38),
    0 30px 60px -30px rgba(23, 23, 23, 0.22);
}
/* Side buttons */
.phone::before,
.phone::after {
  content: "";
  position: absolute;
  width: calc(var(--pw) * 0.011);
  background: #1d1d1d;
}
.phone::before {
  right: calc(var(--pw) * -0.009);
  top: 27%;
  height: 11%;
  border-radius: 0 3px 3px 0;
}
.phone::after {
  left: calc(var(--pw) * -0.009);
  top: 19%;
  height: 4.5%;
  border-radius: 3px 0 0 3px;
  box-shadow: 0 calc(var(--pw) * 0.16) 0 #1d1d1d, 0 calc(var(--pw) * 0.3) 0 #1d1d1d;
}
.phone-screen {
  position: relative;
  aspect-ratio: 720 / 1565;
  border-radius: calc(var(--pw) * 0.135);
  overflow: hidden;
  background: var(--white);
  transform: translateZ(0);
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }

/* ───────────────────────── Nav ───────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0;
  display: flex;
  align-items: center;
  gap: 40px;
  color: var(--ink);
  transition: color 0.5s var(--ease-quint);
}
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 1px 0 rgba(23, 23, 23, 0.06);
  opacity: 0;
  transition: opacity 0.5s var(--ease-quint), background-color 0.5s var(--ease-quint);
}
html.is-scrolled .nav::before { opacity: 1; }
html.nav-night .nav { color: var(--white); }
html.nav-night .nav::before { background: rgba(11, 11, 11, 0.72); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }

.nav-brand { flex: none; border-radius: 6px; }
.nav-brand img { height: 26px; width: auto; transition: filter 0.5s var(--ease-quint); }
html.nav-night .nav-brand img { filter: invert(1); }

.nav-links { display: none; gap: 34px; margin-left: auto; }
.nav-links a {
  position: relative;
  font-size: 15px;
  text-decoration: none;
  color: currentColor;
  opacity: 0.62;
  transition: opacity 0.35s var(--ease-quint);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-expo);
}
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav .btn { margin-left: auto; }
html.nav-night .nav .btn-ink { background: var(--white); color: var(--ink); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav .btn { margin-left: 0; }
}

/* ───────────────────────── Hero ───────────────────────── */

.hero {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + 56px) var(--gutter) 0;
  display: grid;
  gap: 64px;
}
.marks-hero {
  width: clamp(84px, 7.6vw, 120px);
  height: auto;
  margin-bottom: clamp(28px, 4.4vh, 48px);
  color: var(--ink);
}
.hero-title {
  margin: 0;
  font-size: clamp(64px, 10.8vw, 192px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.05em;
}
.hero-sub {
  margin: clamp(24px, 3.4vh, 36px) 0 0;
  max-width: 30ch;
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.45;
  color: var(--secondary);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 30px;
  margin-top: clamp(32px, 4.6vh, 48px);
}
.hero-device { justify-self: center; }
.hero-device .phone { --pw: min(76vw, 330px); }

@media (min-width: 960px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 4vw;
    padding-top: var(--nav-h);
    padding-bottom: 40px;
  }
  .hero-device .phone { --pw: clamp(280px, min(25vw, calc((100svh - 150px) / 2.26)), 370px); }
}

/* ───────────────────────── Live tally ───────────────────────── */

.tally { padding: clamp(120px, 15vw, 220px) 0 clamp(100px, 12vw, 180px); }

.tally-head,
.story-intro {
  display: grid;
  gap: 26px;
  margin-bottom: clamp(52px, 7vw, 100px);
}
@media (min-width: 1024px) {
  .tally-head,
  .story-intro {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    align-items: end;
    column-gap: 6vw;
  }
  .tally-head .eyebrow,
  .story-intro .eyebrow { grid-column: 1 / -1; }
  .tally-head .lede,
  .story-intro .lede { padding-bottom: 0.5em; }
}

.counter {
  display: grid;
  gap: 28px;
  padding: clamp(22px, 3.4vw, 52px);
  border: 1px solid var(--border);
  border-radius: clamp(24px, 2.6vw, 36px);
  background: var(--white);
}
@media (min-width: 1024px) {
  .counter {
    grid-template-columns: minmax(0, 1.2fr) minmax(380px, 1fr);
    gap: clamp(36px, 4.4vw, 72px);
  }
}

.counter-readout { display: flex; flex-direction: column; gap: 28px; min-width: 0; }

.count { display: flex; align-items: flex-end; gap: clamp(14px, 2vw, 28px); }
.count-num {
  display: inline-block;
  font-size: clamp(128px, 18vw, 288px);
  font-weight: 300;
  line-height: 0.78;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}
.count-num.bump { animation: bump 0.6s var(--ease-expo); }
@keyframes bump {
  from { transform: translateY(0.1em); opacity: 0.25; }
  to { transform: none; opacity: 1; }
}
.count-label {
  display: flex;
  flex-direction: column;
  padding-bottom: 0.15em;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.2;
  color: var(--secondary);
}
.count-of { font-size: 0.72em; color: var(--tertiary); }

/* The wall: one stroke per person, five to a group — like counting by hand. */
.wall {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px 14px;
  max-width: 560px;
}
.wall svg { width: 100%; height: auto; overflow: visible; }
.wall .ghost rect { fill: var(--surface); }
.wall .s {
  fill: var(--ink);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0.001);
  opacity: 0;
  transition: transform 0.9s var(--ease-expo), opacity 0.25s var(--ease-quint);
}
.wall .slash { transform-origin: 50% 50%; }
.wall .s.on { transform: none; opacity: 1; }
.wall svg:nth-child(n + 11) { display: none; }
@media (min-width: 600px) {
  .wall { grid-template-columns: repeat(10, 1fr); }
  .wall svg:nth-child(n + 11) { display: block; }
}

.split {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 22px 24px;
  border-radius: 22px;
  background: var(--surface);
}
.split-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.split-labels {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
}
.split-labels span { display: inline-flex; align-items: center; gap: 10px; }
.key { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.key-ink { background: var(--ink); }
.key-mute { background: #bdbdba; }
.split-nums {
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.split-bar {
  position: relative;
  height: 10px;
  margin: 6px 0 2px;
  border-radius: 99px;
  background: #cfcfcb;
  overflow: hidden;
}
.split-bar span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--ink);
  transform: translateX(-100%);
  transition: transform 0.8s var(--ease-expo);
}
.split-foot { font-size: 14px; color: var(--secondary); }

.pad { display: flex; flex-direction: column; gap: 16px; }
.pad-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.pad-title { font-size: 17px; color: var(--secondary); }
.mult { display: flex; gap: 8px; }
.mult button {
  min-width: 46px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 17px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.35s var(--ease-quint), color 0.35s var(--ease-quint), transform 0.5s var(--ease-expo);
}
.mult button:hover { background: var(--surface-strong); }
.mult button[aria-checked="true"] { background: var(--ink); color: var(--white); }

.pad-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pad-free {
  display: flex;
  min-height: clamp(88px, 7.4vw, 104px);
  border-radius: 22px;
  background: var(--surface);
  overflow: hidden;
}
.pad-minus {
  position: relative;
  flex: none;
  width: clamp(48px, 4.4vw, 64px);
  display: grid;
  place-items: center;
  border-radius: 22px 0 0 22px;
  transition: background-color 0.35s var(--ease-quint);
}
.pad-minus svg { width: 20px; height: 20px; fill: var(--ink); }
.pad-minus::after {
  content: "";
  position: absolute;
  right: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: #d3d3cf;
}
.pad-minus:hover { background: var(--surface-strong); }
.pad-plus,
.pad-paid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-align: left;
  padding: 0 clamp(14px, 1.6vw, 22px);
  min-width: 0;
  transition: background-color 0.35s var(--ease-quint), transform 0.5s var(--ease-expo);
}
.pad-plus { flex: 1; border-radius: 0 22px 22px 0; }
.pad-plus:hover { background: var(--surface-strong); }
.pad-paid {
  min-height: clamp(88px, 7.4vw, 104px);
  border-radius: 22px;
  background: var(--ink);
  color: var(--white);
}
.pad-paid:hover { background: #2b2b2b; }
.pad-plus strong,
.pad-paid strong {
  font-size: clamp(21px, 2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}
.pad-plus span { font-size: 15px; color: var(--secondary); }
.pad-paid span { font-size: 15px; color: rgba(255, 255, 255, 0.66); }
.pad-plus:active,
.pad-paid:active,
.pad-minus:active,
.mult button:active { transform: scale(0.96); }
.pad-note { margin: 4px 0 0; font-size: 14px; color: var(--tertiary); }

@media (max-width: 599px) {
  .counter { padding: 18px; border-radius: 26px; }
  .count { padding: 6px 4px 0; }
  .wall { padding: 0 4px; }
  .mult { width: 100%; }
  .mult button { flex: 1; min-width: 0; padding: 0; }
  .pad-grid { gap: 10px; }
  .pad-minus { width: 40px; }
  .pad-plus, .pad-paid { padding: 0 12px; }
  .pad-plus strong, .pad-paid strong { font-size: clamp(18px, 5.3vw, 22px); }
  .pad-plus span, .pad-paid span { font-size: 13px; white-space: nowrap; }
  .split { padding: 18px; }
}

/* ───────────────────────── How a night runs ───────────────────────── */

.story {
  --fg: var(--ink);
  --fg2: var(--secondary);
  --fg3: var(--tertiary);
  --line: var(--border);
  --chip: var(--surface);
  position: relative;
  padding-top: clamp(40px, 6vw, 100px);
}
.story-pin { position: relative; }
.story-night {
  position: absolute;
  inset: 0;
  background: var(--night);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s var(--ease-expo);
}
.story-grid { position: relative; }
.story-device,
.story-rail { display: none; }

.step {
  display: grid;
  gap: 44px;
  padding: 64px 0;
  border-top: 1px solid var(--border);
  color: var(--fg);
}
.step .phone-inline { --pw: min(72vw, 300px); justify-self: center; }
.step-night {
  --fg: var(--white);
  --fg2: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.12);
  position: relative;
  isolation: isolate;
  border-top: 0;
}
.step-night::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--night);
}
.step-night + .step { border-top: 0; }
@media (min-width: 760px) {
  .step {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 7vw;
    padding: 96px 0;
  }
}

.step-kicker {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg2);
  transition: color 0.6s var(--ease-quint);
}
.step-title {
  margin: 0 0 22px;
  font-size: clamp(36px, 4vw, 64px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: var(--fg);
  transition: color 0.6s var(--ease-quint);
}
.step-body {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--fg2);
  transition: color 0.6s var(--ease-quint);
}
.step-points {
  list-style: none;
  max-width: 46ch;
  margin: 30px 0 0;
  padding: 0;
}
.step-points li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--fg);
  transition: color 0.6s var(--ease-quint), border-color 0.6s var(--ease-quint);
}
/* A single tally stroke as the bullet. */
.step-points li::before {
  content: "";
  flex: none;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
  transform: translateY(2px);
}

/* Pinned: the story holds still while the night plays through it. */
.story.is-pinned .story-pin { height: 100vh; height: 100svh; overflow: hidden; }
.story.is-pinned .story-grid {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 6vw;
  padding-top: var(--nav-h);
}
.story.is-pinned .story-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(36px, 7vh, 72px);
  height: 100%;
}
.story.is-pinned .story-rail { display: flex; align-items: center; gap: 26px; }
.marks-progress { width: 46px; height: auto; flex: none; color: var(--fg); transition: color 0.6s var(--ease-quint); }
.story-nav { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.story-nav button {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--fg3);
  transition: color 0.4s var(--ease-quint), background-color 0.4s var(--ease-quint);
}
.story-nav button span { font-size: 12px; font-variant-numeric: tabular-nums; opacity: 0.8; }
.story-nav button:hover { color: var(--fg); }
.story-nav button[aria-current="step"] { color: var(--fg); background: var(--chip); }

.story.is-pinned .story-steps { display: grid; }
.story.is-pinned .step {
  grid-area: 1 / 1;
  display: block;
  padding: 0;
  border: 0;
  visibility: hidden;
  transition: visibility 0s 0.6s;
}
.story.is-pinned .step.is-active { visibility: visible; transition-delay: 0s; }
.story.is-pinned .step-night::before,
.story.is-pinned .phone-inline { display: none; }
.story.is-pinned .step-night { --fg: inherit; --fg2: inherit; --line: inherit; }
.story.is-pinned .step-copy > * {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.45s var(--ease-quint), transform 0.9s var(--ease-expo);
}
.story.is-pinned .step[data-pos="before"] .step-copy > * { transform: translateY(-24px); }
.story.is-pinned .step.is-active .step-copy > * { opacity: 1; transform: none; }
.story.is-pinned .step.is-active .step-copy > :nth-child(2) { transition-delay: 0.06s; }
.story.is-pinned .step.is-active .step-copy > :nth-child(3) { transition-delay: 0.12s; }
.story.is-pinned .step.is-active .step-copy > :nth-child(4) { transition-delay: 0.18s; }

.story.is-pinned .story-device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.story-device .phone { --pw: clamp(260px, min(24vw, calc((100svh - var(--nav-h) - 120px) / 2.26)), 360px); }
.story-device .phone-screen img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 0.7s var(--ease-quint), transform 1.2s var(--ease-expo);
}
.story-device .phone-screen img.is-on { opacity: 1; transform: none; }
.device-caption {
  position: relative;
  width: 100%;
  height: 20px;
  margin: 0;
  font-size: 14px;
  text-align: center;
  color: var(--fg2);
  transition: color 0.6s var(--ease-quint);
}
.device-caption span {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease-quint), transform 0.7s var(--ease-expo);
}
.device-caption span.is-on { opacity: 1; transform: none; }

.story.is-night {
  --fg: var(--white);
  --fg2: rgba(255, 255, 255, 0.62);
  --fg3: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.12);
  --chip: var(--night-surface);
}
.story.is-night .story-night { opacity: 1; }

/* ───────────────────────── Honest door ───────────────────────── */

.rules { padding: clamp(120px, 14vw, 220px) 0; }
.rules-grid { display: grid; gap: 56px; }
@media (min-width: 1024px) {
  .rules-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: 6vw; align-items: start; }
  .rules-head { position: sticky; top: calc(var(--nav-h) + 64px); }
}
.rules-head .eyebrow { margin-bottom: 26px; }
.rules-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--border); }
.rule {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 22px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}
.rule h3 {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.3vw, 34px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.rule p { margin: 0; max-width: 46ch; font-size: 17px; line-height: 1.55; color: var(--secondary); }
.glyph { width: 48px; height: 36px; margin-top: 2px; }
.glyph rect { fill: var(--ink); }
.js .glyph rect {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0.001);
  transition: transform 0.9s var(--ease-expo);
}
.js .rule.is-in .glyph rect { transform: none; }
.js .rule.is-in .glyph rect:nth-child(1) { transition-delay: 0.25s; }
.js .rule.is-in .glyph rect:nth-child(2) { transition-delay: 0.35s; }
.js .rule.is-in .glyph rect:nth-child(3) { transition-delay: 0.45s; }
.js .rule.is-in .glyph rect:nth-child(4) { transition-delay: 0.55s; }

/* ───────────────────────── Hosts ───────────────────────── */

.hosts {
  padding: clamp(110px, 13vw, 200px) 0;
  background: var(--surface);
}
.hosts-grid { display: grid; gap: 64px; align-items: center; }
.hosts-copy { order: -1; }
.hosts-copy .eyebrow { margin-bottom: 26px; }
.hosts-copy .lede { margin-top: 30px; }
.hosts-device { justify-self: center; }
.hosts-device .phone { --pw: min(72vw, 320px); }
.hosts-points {
  list-style: none;
  max-width: 520px;
  margin: 44px 0 0;
  padding: 0;
  border-bottom: 1px solid #d9d9d5;
}
.hosts-points li {
  display: grid;
  gap: 2px;
  padding: 18px 0;
  border-top: 1px solid #d9d9d5;
  font-size: 16px;
  color: var(--secondary);
}
.hosts-points span { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }
@media (min-width: 960px) {
  .hosts-grid { grid-template-columns: auto minmax(0, 1fr); column-gap: 8vw; }
  .hosts-copy { order: 0; }
  .hosts-device .phone { --pw: clamp(280px, 25vw, 350px); }
}

/* ───────────────────────── Start & footer ───────────────────────── */

.cta {
  position: relative;
  padding-top: clamp(120px, 14vw, 220px);
  background: var(--night);
  color: var(--white);
}
.marks-cta { width: clamp(84px, 8vw, 124px); height: auto; margin-bottom: clamp(36px, 4vw, 56px); color: var(--white); }
.cta-title {
  margin: 0 0 clamp(64px, 8vw, 120px);
  font-size: clamp(52px, 9.4vw, 168px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.05em;
}
.start {
  list-style: none;
  display: grid;
  margin: 0 0 clamp(56px, 6vw, 88px);
  padding: 0;
}
.start li { padding: 28px 0 32px; border-top: 1px solid var(--night-border); }
.start-n {
  display: block;
  margin-bottom: 26px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.42);
  font-variant-numeric: tabular-nums;
}
.start h3 { margin: 0 0 8px; font-size: 22px; font-weight: 500; letter-spacing: -0.015em; }
.start p { margin: 0; max-width: 32ch; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, 0.6); }
@media (min-width: 860px) {
  .start { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
}
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.cta-app {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-right: 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  border-radius: 18px;
}
.cta-app img {
  width: 64px;
  height: 64px;
  border-radius: 22.5%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 40px -16px rgba(0, 0, 0, 0.6);
  transition: transform 0.7s var(--ease-expo);
}
.cta-app:hover img { transform: translateY(-3px) rotate(-2deg); }
.cta-app span { display: grid; gap: 2px; line-height: 1.25; }
.cta-app strong { font-size: 17px; font-weight: 500; color: var(--white); }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px 40px;
  margin-top: clamp(100px, 12vw, 180px);
  padding-top: 36px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  position: relative;
}
.foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--night-border);
}
.foot-brand { border-radius: 6px; }
.foot-brand img { height: 24px; width: auto; filter: invert(1); }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.foot-links a {
  font-size: 15px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.35s var(--ease-quint);
}
.foot-links a:hover { color: var(--white); }
.foot-copy { margin: 0; font-size: 14px; color: rgba(255, 255, 255, 0.4); }
@media (min-width: 700px) { .foot-copy { margin-left: auto; } }

/* ───────────────────────── Entrances ───────────────────────── */

.js .nav { opacity: 0; transform: translateY(-14px); }
.js .hero-title .line > span { transform: translateY(112%); }
.js .hero-sub,
.js .hero-cta { opacity: 0; transform: translateY(22px); }
.js .hero-device .phone { opacity: 0; transform: translateY(80px); }

.is-loaded .nav {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease-quint) 0.7s, transform 1s var(--ease-expo) 0.7s, color 0.5s var(--ease-quint);
}
.is-loaded .hero-title .line > span { transform: none; transition: transform 1.25s var(--ease-expo) 0.2s; }
.is-loaded .hero-title .line:nth-child(2) > span { transition-delay: 0.28s; }
.is-loaded .hero-sub { opacity: 1; transform: none; transition: opacity 0.9s var(--ease-quint) 0.5s, transform 1.2s var(--ease-expo) 0.5s; }
.is-loaded .hero-cta { opacity: 1; transform: none; transition: opacity 0.9s var(--ease-quint) 0.62s, transform 1.2s var(--ease-expo) 0.62s; }
.is-loaded .hero-device .phone { opacity: 1; transform: none; transition: opacity 1s var(--ease-quint) 0.35s, transform 1.5s var(--ease-expo) 0.35s; }

.js [data-reveal] {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease-quint) var(--d, 0s), transform 1.2s var(--ease-expo) var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal-lines] .line > span { transform: translateY(112%); transition: transform 1.2s var(--ease-expo); }
.js [data-reveal-lines] .line:nth-child(2) > span { transition-delay: 0.08s; }
.js [data-reveal-lines].is-in .line > span { transform: none; }

/* If the script never runs, show everything anyway. */
.js:not(.is-ready) .nav,
.js:not(.is-ready) .hero-title .line > span,
.js:not(.is-ready) .hero-sub,
.js:not(.is-ready) .hero-cta,
.js:not(.is-ready) .hero-device .phone,
.js:not(.is-ready) [data-reveal],
.js:not(.is-ready) [data-reveal-lines] .line > span,
.js:not(.is-ready) .marks rect,
.js:not(.is-ready) .glyph rect {
  animation: failsafe 0.01s 2.5s forwards;
}
@keyframes failsafe { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .live-dot::after { display: none; }
}
