/* Colors mirror docs/design/tokens.json; keep the names in sync. */
:root {
  --color-bg: #07090D;
  --color-surface: #10141B;
  --color-sky: #0C1120;
  --color-nav: #0B0E13;
  --color-border: #1E2530;
  --color-border-strong: #2A3240;
  --color-text: #EDF1F5;
  --color-text-secondary: #D3DAE2;
  --color-text-muted: #9AA6B2;
  --color-ground: #05070A;
  --color-horizon: #3A4456;
  --color-link-hover: #B8D3FF;
  --state-incoming: #FFB547;
  --state-incoming-bg: #241C10;
  --state-incoming-text: #E6D6BC;
  --state-incoming-border: #3A2E19;
  --state-loading: #8DB8FF;
  --state-go: #5CFF9E;
  --state-quiet: #A3ACB8;

  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", Inter, system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --radius-status: 24px;
  --radius-card: 20px;
  --radius-tile: 16px;
  --radius-banner: 14px;

  --container: min(1120px, 90vw);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { line-height: 1.1; font-weight: 600; }
.hero h1, .doc h1, .section-title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.025em; text-wrap: balance;
}
a { color: var(--state-loading); text-underline-offset: 3px; }
a:hover { color: var(--color-link-hover); }
:focus-visible { outline: 2px solid var(--state-loading); outline-offset: 3px; border-radius: 6px; }

.container { width: var(--container); margin-inline: auto; }
.container--narrow { width: min(760px, 90vw); }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 10px;
  background: var(--color-text); color: var(--color-bg); font-weight: 600;
}
.skip-link:focus { top: 16px; }
main:focus { outline: none; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--color-text-muted); }

.is-quiet { color: var(--state-quiet); }
.is-building { color: var(--state-loading); }
.is-incoming { color: var(--state-incoming); }
.is-go { color: var(--state-go); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: currentColor; flex: none; }
.dot--ring { background: transparent; border: 2px solid currentColor; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 19, .78);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--color-border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--color-text); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.wordmark:hover { color: var(--color-text); }
.wordmark__icon { width: 32px; height: 32px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.nav__links { display: flex; gap: 28px; list-style: none; padding: 0; }
.nav__links a { color: var(--color-text-muted); text-decoration: none; font-size: 15px; }
.nav__links a:hover { color: var(--color-text); }
@media (max-width: 820px) { .nav__links { display: none; } }

/* App Store badge */
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 12px;
  border: 1px solid transparent;
  background: var(--color-text); color: var(--color-bg);
  text-decoration: none; line-height: 1.1; font-weight: 600; font-size: 19px;
}
.store-badge:hover { color: var(--color-bg); }
.store-badge small { display: block; font-size: 11px; font-weight: 500; letter-spacing: .2px; opacity: .75; }
.store-badge__logo {
  width: 24px; height: 24px; flex: none; background: currentColor;
  -webkit-mask: url("/assets/img/apple-logo.svg") center / contain no-repeat;
  mask: url("/assets/img/apple-logo.svg") center / contain no-repeat;
}
.store-badge.is-soon { background: transparent; color: var(--color-text); border-color: var(--color-border-strong); cursor: default; padding-left: 18px; }
.store-badge.is-soon:hover { color: var(--color-text); }
.store-badge.is-soon .store-badge__logo { display: none; }
.store-badge--small { padding: 7px 12px 7px 10px; font-size: 14px; gap: 7px; border-radius: 10px; }
.store-badge--small.is-soon { padding-left: 12px; }
.store-badge--small small { font-size: 10px; }
.store-badge--small .store-badge__logo { width: 18px; height: 18px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 88px 0 168px;
  background: linear-gradient(180deg, var(--color-sky) 0%, #0A0F1C 60%, var(--color-sky) 100%);
}
.hero__aurora {
  position: absolute; inset: -25% -10% 25%; z-index: -2;
  background:
    radial-gradient(55% 50% at 74% 20%, rgba(92, 255, 158, .30), transparent 70%),
    radial-gradient(42% 40% at 30% 8%, rgba(141, 184, 255, .26), transparent 70%),
    radial-gradient(30% 28% at 55% 38%, rgba(92, 255, 158, .14), transparent 70%);
  filter: blur(12px);
  animation: aurora-drift 18s ease-in-out infinite alternate;
}
@keyframes aurora-drift {
  from { transform: translateX(-2%) scaleY(1); }
  to { transform: translateX(3%) scaleY(1.08); }
}
.hero__stars {
  position: absolute; inset: 0; z-index: -2; opacity: .55;
  background-image:
    radial-gradient(1px 1px at 8% 18%, #fff, transparent),
    radial-gradient(1px 1px at 22% 42%, #fff, transparent),
    radial-gradient(1px 1px at 37% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 48% 30%, #fff, transparent),
    radial-gradient(1px 1px at 63% 8%, #fff, transparent),
    radial-gradient(1px 1px at 81% 36%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 92% 14%, #fff, transparent),
    radial-gradient(1px 1px at 14% 62%, #fff, transparent),
    radial-gradient(1px 1px at 70% 55%, #fff, transparent);
}
.hero__ridge {
  position: absolute; left: 0; right: 0; bottom: 0; height: 190px; z-index: -1;
  background: var(--color-ground);
  clip-path: polygon(0 62%, 8% 48%, 16% 58%, 27% 30%, 38% 54%, 47% 40%, 58% 60%, 68% 36%, 79% 56%, 90% 34%, 100% 50%, 100% 100%, 0 100%);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(52px, 7.4vw, 88px); letter-spacing: -0.035em; margin: 0 0 22px; }
.hero__sub { font-size: clamp(18px, 2vw, 21px); color: var(--color-text-secondary); max-width: 32ch; margin-bottom: 32px; }
.hero__note { margin-top: 16px; font-size: 14px; color: var(--color-text-muted); }
.hero__phone { justify-self: center; }
@media (max-width: 900px) {
  .hero { padding: 56px 0 140px; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
}

/* Phone frame with a screenshot */
.phone {
  position: relative; width: 300px; padding: 10px; border-radius: 48px; background: #1A1F28;
  box-shadow: 0 0 0 1px var(--color-border-strong), 0 30px 60px rgba(0, 0, 0, .5);
}
.phone__shot { width: 100%; height: auto; border-radius: 38px; }
.phone--shot::after {
  content: ""; position: absolute; top: 17px; left: 50%; translate: -50% 0;
  width: 80px; height: 23px; border-radius: 12px; background: #000;
}
.state-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.state-tag .dot { width: 8px; height: 8px; }

/* Sections */
.section { padding: 104px 0; }
.section--rule { border-top: 1px solid var(--color-border); }
.section-title { font-size: clamp(32px, 4.2vw, 48px); margin-bottom: 16px; max-width: 18ch; }
.section-lede { font-size: 19px; color: var(--color-text-secondary); max-width: 56ch; }
@media (max-width: 600px) { .section { padding: 72px 0; } }

/* Why: an example night */
.why { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.why__intro p { color: var(--color-text-secondary); font-size: 18px; }
.why__intro p + p { margin-top: 16px; }
.why__intro .why__aside { color: var(--color-text-muted); font-size: 16px; }
.night { list-style: none; padding: 0; border-top: 1px solid var(--color-border); }
.night__row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--color-border); }
.night__time { font-family: var(--font-mono); font-size: 14px; color: var(--color-text-muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.night__row.is-building .night__time, .night__row.is-incoming .night__time, .night__row.is-go .night__time { color: currentColor; }
.night__body > p:first-child { color: var(--color-text-secondary); }
.night__alert { margin-top: 10px; padding-left: 18px; position: relative; font-size: 15px; color: var(--color-text-muted); line-height: 1.5; }
.night__alert .dot { position: absolute; left: 0; top: 7px; width: 8px; height: 8px; }
.is-building .night__alert .dot { background: var(--state-loading); }
.is-incoming .night__alert .dot { background: var(--state-incoming); }
.is-go .night__alert .dot { background: var(--state-go); }
.night__alert b { display: block; color: var(--color-text); font-weight: 600; }
.night__row--kp .night__body p { color: var(--color-text-muted); font-style: italic; }
.night__note { margin-top: 12px; font-size: 13px; color: var(--color-text-muted); }
@media (max-width: 900px) { .why { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 480px) { .night__row { grid-template-columns: 68px minmax(0, 1fr); gap: 12px; } }

/* How: the chain as a rail */
.how { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 72px; align-items: start; }
.rail { list-style: none; padding: 0; margin-top: 40px; }
.rail__stop { position: relative; padding: 0 0 32px 36px; }
.rail__stop::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: -8px; width: 2px; background: var(--color-border-strong); }
.rail__stop:last-child { padding-bottom: 0; }
.rail__stop:last-child::before { display: none; }
.rail__stop::after { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.rail__stop--ring::after { background: var(--color-bg); border: 2px solid currentColor; }
.rail__stop h3 { font-size: 19px; color: var(--color-text); }
.rail__where { font-family: var(--font-mono); font-size: 13px; color: currentColor; margin: 4px 0 8px; }
.rail__stop p:not(.rail__where) { color: var(--color-text-secondary); font-size: 16px; line-height: 1.55; max-width: 58ch; }
.how__shot { position: sticky; top: 104px; }
.how__shot figcaption, .gallery figcaption { margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--color-text-muted); max-width: 300px; }
.states__intro { margin: 72px 0 16px; color: var(--color-text-secondary); }
.states { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--color-border); }
.states > div { padding: 16px 20px 0 0; }
.states dt { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.states dd { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--color-text-muted); }
.state__warn { width: 14px; height: 14px; flex: none; }
@media (max-width: 980px) {
  .how { grid-template-columns: 1fr; gap: 48px; }
  .how__shot { position: static; justify-self: center; }
  .states { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
}
@media (max-width: 520px) { .states { grid-template-columns: 1fr; } }

/* Features: a row of real screens, then the rest as a list */
.gallery {
  list-style: none; margin: 48px auto 0; padding: 0;
  width: var(--container);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
}
.gallery .phone { width: 100%; max-width: 250px; padding: 8px; border-radius: 40px; }
.gallery .phone__shot { border-radius: 32px; }
.gallery .phone--shot::after { top: 14px; width: 66px; height: 19px; }
.gallery figcaption b { display: block; color: var(--color-text); font-weight: 600; font-size: 16px; margin-bottom: 4px; }
@media (max-width: 980px) {
  .gallery {
    width: auto; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 230px;
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 5vw 12px; scroll-padding: 0 5vw;
  }
  .gallery > li { scroll-snap-align: start; }
}
.also { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 72px; align-items: start; margin-top: 88px; }
.specs { border-top: 1px solid var(--color-border); }
.specs > div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--color-border); }
.specs dt { font-weight: 600; }
.specs dd { color: var(--color-text-secondary); font-size: 16px; line-height: 1.55; }
.specs i { font-style: normal; color: var(--color-text); }
@media (max-width: 980px) {
  .also { grid-template-columns: 1fr; gap: 48px; }
  .also__art { justify-self: center; }
}
@media (max-width: 600px) { .specs > div { grid-template-columns: 1fr; gap: 4px; } }

/* Lock Screen art (Live Activity and widget) */
.lock { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; width: 100%; max-width: 440px; }
.live-activity { padding: 14px 16px; border-radius: 22px; background: var(--color-surface); border: 1px solid var(--color-border); display: grid; gap: 10px; }
.live-activity__top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.live-activity__place { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-secondary); }
.live-activity__place img { border-radius: 22.5%; }
.live-activity__main { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.live-activity__count { font-size: 34px; font-weight: 700; letter-spacing: -.5px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-activity__numbers { font-family: var(--font-mono); font-size: 11.5px; text-align: right; color: var(--color-text-secondary); }
.segments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.segments span { height: 5px; border-radius: 3px; background: var(--color-border-strong); }
.segments .is-incoming { background: var(--state-incoming); }
.widget {
  width: 132px; height: 132px; padding: 14px; border-radius: 26px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--color-surface); border: 1px solid var(--color-border);
}
.widget__count { font-size: 24px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.widget__place { font-size: 12px; color: var(--color-text-muted); }
@media (max-width: 480px) { .lock { grid-template-columns: 1fr; } .widget { justify-self: center; } }

/* Two columns: heading left, content right (privacy, FAQ) */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.split__body p { color: var(--color-text-secondary); font-size: 18px; }
.split__body p + p { margin-top: 16px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 48px; border-top: 1px solid var(--color-border); }
.price-card { padding: 32px 48px 8px 0; display: flex; flex-direction: column; gap: 10px; }
.price-card--pro { padding-left: 48px; padding-right: 0; border-left: 1px solid var(--color-border); }
.price-card h3 { font-size: 15px; font-weight: 600; color: var(--color-text-muted); }
.price-card--pro h3 { color: var(--state-go); }
.price-card__price { display: flex; align-items: baseline; gap: 8px; color: var(--color-text-muted); }
.price-card__amount { font-family: var(--font-display); font-size: 44px; font-weight: 700; letter-spacing: -0.03em; color: var(--color-text); font-variant-numeric: tabular-nums; }
.price-card__lede { color: var(--color-text-muted); margin-top: -6px; }
.price-card__list { list-style: none; padding: 0; margin: 18px 0 8px; border-top: 1px solid var(--color-border); }
.price-card__list li { padding: 11px 0; border-bottom: 1px solid var(--color-border); color: var(--color-text-secondary); }
.price-card__note { font-size: 14px; color: var(--color-text-muted); margin-top: 8px; }
@media (max-width: 760px) {
  .pricing { grid-template-columns: 1fr; }
  .price-card { padding: 28px 0 8px; }
  .price-card--pro { padding-left: 0; border-left: 0; border-top: 1px solid var(--color-border); margin-top: 32px; }
}

/* FAQ */
.faq { border-top: 1px solid var(--color-border); }
.faq details { border-bottom: 1px solid var(--color-border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; content: "+" / ""; position: absolute; right: 4px; top: 14px; font-size: 22px; font-weight: 400; color: var(--color-text-muted); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--color-link-hover); }
.faq details p { padding: 0 0 20px; color: var(--color-text-secondary); max-width: 64ch; }

/* Footer */
.footer { border-top: 1px solid var(--color-border); padding: 56px 0 48px; background: var(--color-nav); }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; }
.footer__brand p { margin-top: 10px; color: var(--color-text-muted); font-size: 15px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; font-size: 15px; }
.footer__links a { color: var(--color-text-secondary); text-decoration: none; }
.footer__links a:hover { color: var(--color-text); }
.footer__credits, .footer__legal { grid-column: 1 / -1; font-size: 13px; color: var(--color-text-muted); max-width: 80ch; }
@media (max-width: 640px) { .footer__inner { grid-template-columns: 1fr; } }

/* Document pages (privacy, support, 404) */
.doc { padding: 72px 0 112px; }
.doc h1 { font-size: clamp(40px, 6vw, 60px); margin: 12px 0 12px; }
.doc__updated { color: var(--color-text-muted); font-size: 14px; }
.doc__lede { font-size: 20px; color: var(--color-text-secondary); margin: 24px 0 8px; }
.doc h2 { font-size: 22px; margin: 48px 0 12px; }
.doc p, .doc li { color: var(--color-text-secondary); }
.doc p + p { margin-top: 12px; }
.doc ul + p, .doc ol + p { margin-top: 16px; }
.doc .doc__more { margin-top: 48px; }
.doc ul, .doc ol { padding-left: 22px; display: grid; gap: 10px; }
.doc b { color: var(--color-text); }
.doc--center { text-align: center; padding: 140px 0; }
.button {
  display: inline-block; margin-top: 28px; padding: 12px 20px; border-radius: 12px;
  background: var(--color-text); color: var(--color-bg); font-weight: 600; text-decoration: none;
}
.button:hover { color: var(--color-bg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__aurora { animation: none; }
  .faq summary::after { transition: none; }
}
