@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --night: #04050B;
  --surface: #141A3A;
  --bezel: #1E2333;
  --text: #F1F2F7;
  --muted: #A9AEC4;
  --accent: #FFD9A0;
  --accent-press: #F5C47E;
  --on-accent: #04050B;
  --key: #F4F1E6;
  --veil: rgba(4, 5, 11, .55);
  --veil-strong: rgba(4, 5, 11, .94);
  --hairline: rgba(244, 241, 230, .28);
  --phone-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .6);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 72px; --s9: 112px;

  --r-btn: 12px;
  --r-phone: 48px;
  --r-small: 8px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  --bezel-w: 9px;

  --gutter: clamp(16px, 6.6vw, 96px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--night); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 17px/1.55 "Outfit", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--on-accent); }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2 { font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p, li { text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; }

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.bar, main, .foot { position: relative; z-index: 1; }

/* ---- top bar ------------------------------------------------------------------------- */

.bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--gutter);
}
.brand {
  display: flex; align-items: center; gap: var(--s3);
  color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 21px; letter-spacing: -0.01em;
}
.brand img { border-radius: var(--r-small); }
.bar-get {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--hairline);
  border-radius: var(--r-btn);
  background: var(--veil);
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.bar { transition: background-color .3s var(--ease-out); }
.bar.scrolled { background: var(--veil-strong); }
.bar-get:hover { border-color: var(--accent); }

/* ---- the stage: steps on the left, one phone held still ------------------------------ */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 80px);
  padding: 0 var(--gutter);
}
.steps { grid-column: 1; }
.step {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s9) 0;
}
.step h2 { font-size: clamp(32px, 3.3vw, 46px); line-height: 1.08; max-width: 16ch; }
.step p { color: var(--muted); font-size: 19px; max-width: 40ch; margin: var(--s4) 0 0; }

.step-hero h1 { font-size: clamp(40px, 4.5vw, 64px); line-height: 1.02; max-width: 13ch; }
.step-hero .lede { font-size: 20px; max-width: 36ch; margin-top: var(--s5); }

/* steps fade up as they arrive, from an already-readable state */
.js .step:not(.step-hero) > * { transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); }
.js .step:not(.step-hero):not(.here) > :not(.phone) { opacity: .75; }

.stage-phone {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
}
.phone {
  margin: 0;
  position: relative;
  aspect-ratio: 720 / 1616;
  border: var(--bezel-w) solid var(--bezel);
  border-radius: var(--r-phone);
  background: var(--night);
  overflow: hidden;
  box-shadow: var(--phone-shadow);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--r-phone) - var(--bezel-w)); }
.stage-phone .phone { height: min(84vh, 800px); }
.stage-phone .phone img {
  position: absolute; inset: 0;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .5s var(--ease-out), transform .7s var(--ease-out);
}
.stage-phone .phone img.on { opacity: 1; transform: none; }
.phone-inline { display: none; }

.sky-note {
  position: fixed;
  right: var(--gutter);
  bottom: var(--s5);
  z-index: 2;
  margin: 0;
  max-width: 34ch;
  text-align: right;
  font-size: 14px;
  color: var(--muted);
  transition: opacity .3s;
}
.sky-note b { color: var(--accent); font-weight: 600; }
.sky-note.gone { opacity: 0; }

/* ---- download -------------------------------------------------------------------------- */

.get {
  display: flex;
  align-items: center;
  gap: var(--s5);
  margin-top: var(--s6);
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  text-decoration: none;
  padding: var(--s4) var(--s5);
  border-radius: var(--r-btn);
  transition: background-color .2s var(--ease-out), transform .2s var(--ease-out);
}
.btn:hover { background: var(--accent-press); }
.btn:active { transform: scale(.98); }
.btn.sent { animation: sent .5s var(--ease-out); }
@keyframes sent { 40% { transform: scale(.96); } }
.get-meta { font-size: 14px; color: var(--muted); margin: var(--s2) 0 0; }

.qr {
  margin: 0;
  display: grid;
  grid-template-columns: auto;
  justify-items: center;
  gap: var(--s2);
  width: 132px;
}
.qr-code {
  width: 116px; height: 116px;
  padding: var(--s2);
  background: var(--key);
  border-radius: var(--r-small);
}
.qr-code svg { display: block; width: 100%; height: 100%; }
.qr figcaption { font-size: 13px; line-height: 1.35; color: var(--muted); text-align: center; }

/* ---- Outbound -------------------------------------------------------------------------- */

.play {
  display: grid;
  grid-template-columns: minmax(0, 500px) auto;
  justify-content: start;
  align-items: center;
  column-gap: clamp(32px, 8vw, 140px);
  padding: var(--s9) var(--gutter);
  background: linear-gradient(to bottom, transparent, var(--night) 18%);
}
.play h2, .install h2 { font-size: clamp(32px, 3.3vw, 46px); line-height: 1.08; }
.play p { color: var(--muted); font-size: 19px; max-width: 40ch; margin: var(--s4) 0 0; }
.play-clip {
  margin: 0;
  width: 280px;
  border: var(--bezel-w) solid var(--bezel);
  border-radius: var(--r-phone);
  overflow: hidden;
  background: var(--night);
}
.play-clip video { width: 100%; border-radius: calc(var(--r-phone) - var(--bezel-w)); }

/* ---- install --------------------------------------------------------------------------- */

.install {
  padding: var(--s8) var(--gutter) var(--s9);
  background: var(--night);
}
.how {
  list-style: none;
  counter-reset: how;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s7);
  max-width: 1100px;
  padding: 0;
  margin: var(--s6) 0 0;
}
.how li {
  counter-increment: how;
  color: var(--muted);
  max-width: 32ch;
}
.how li::before {
  content: counter(how);
  display: block;
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: var(--s3);
  font-variant-numeric: tabular-nums;
}
.how b { color: var(--text); font-weight: 600; }
.how i { font-style: normal; color: var(--text); }
.why { color: var(--muted); max-width: 60ch; margin: var(--s5) 0 0; }
.cert { color: var(--muted); font-size: 14px; max-width: 60ch; margin: var(--s3) 0 0; }
.hash { display: block; margin-top: var(--s1); font-family: var(--mono); font-size: 13px; letter-spacing: .02em; word-spacing: .2em; color: var(--text); max-width: 41ch; }
.get-end { margin-top: var(--s7); }

.foot {
  padding: var(--s7) var(--gutter) var(--s8);
  border-top: 1px solid var(--hairline);
  background: var(--night);
  color: var(--muted);
  font-size: 14px;
}
.foot p { max-width: 80ch; margin: 0 0 var(--s3); }

/* ---- wide screens get the QR code; it can't be scanned from the phone it's on ---------- */

.qr[hidden] { display: none; }
@media (min-width: 900px) and (hover: hover) {
  .qr[hidden].ready { display: grid; }
  .get:has(.qr.ready) { flex-direction: row-reverse; justify-content: flex-end; gap: var(--s6); }
  .get:has(.qr.ready) .qr { width: auto; grid-template-columns: auto; justify-items: start; }
  .get:has(.qr.ready) .qr-code { width: 168px; height: 168px; }
  .get:has(.qr.ready) .qr figcaption { display: none; }
  .get:has(.qr.ready) .get-main { max-width: 26ch; }
  .get:has(.qr.ready) .scan { display: block; }
  .get:has(.qr.ready) .btn {
    background: none; color: var(--accent); padding: 0; font-size: 16px; font-weight: 500;
    text-decoration: underline; text-underline-offset: 4px;
  }
  .get:has(.qr.ready) .btn:hover { color: var(--text); }
}
.scan { display: none; margin: 0 0 var(--s3); color: var(--text); font-size: 19px; font-weight: 500; line-height: 1.35; }

/* ---- phones and narrow windows: each step carries its own screen ------------------------ */

@media (max-width: 899px) {
  .bar { padding: var(--s3) var(--gutter); }
  #sky { position: absolute; height: 100vh; height: 100svh; }
  .stage { display: block; position: relative; }
  .stage-phone { display: none; }
  .phone-inline { display: block; width: min(300px, 78vw); margin: var(--s7) auto 0; }
  .step { min-height: 0; padding: var(--s8) 0 var(--s7); }
  .step-hero { padding-top: 54vh; padding-top: 54svh; }
  .js .step:not(.step-hero):not(.here) > :not(.phone) { opacity: 1; }
  .sky-note { position: absolute; top: 40svh; bottom: auto; left: var(--gutter); right: var(--gutter); text-align: center; max-width: none; }
  .get { flex-direction: column; align-items: stretch; }
  .btn { display: block; text-align: center; }
  .play { grid-template-columns: 1fr; row-gap: var(--s7); padding-top: var(--s8); padding-bottom: var(--s8); }
  .play-clip { width: min(280px, 72vw); justify-self: center; }
  .how { grid-template-columns: 1fr; gap: var(--s5); }
  .how li::before { font-size: 32px; }
}
