/* meetkeely.com. Tokens, type and motion come from the design book (design/index.html) and the app
   (ios/Keely/DesignSystem). One dark look, like the app: it is read half awake, first thing in the morning.
   1 Tokens · 2 Base · 3 Nav · 4 Story (hero, chapters, stage) · 5 Device · 6 Live orb · 7 Sections
   8 Proofs · 9 Loop · 10 Keel · 11 Footer · 12 Motion · 13 Responsive · 14 Reduced motion */

/* 1 · Tokens ------------------------------------------------------------------------------------------------ */
@property --tone { syntax: "<color>"; inherits: true; initial-value: #4FD8C4; }
@property --tone-hi { syntax: "<color>"; inherits: true; initial-value: #A8F3E6; }
@property --tone-lo { syntax: "<color>"; inherits: true; initial-value: #2E86D6; }

:root {
  color-scheme: dark;
  --night: #0A0F14;
  --deep-water: #111820;
  --raised: #18212B;
  --snow: #ECF1F5;
  --fog: #94A2B1;
  --mist: #7B8896;
  --hair: rgba(236, 241, 245, 0.075);
  --hair-2: rgba(236, 241, 245, 0.13);
  --fill: rgba(236, 241, 245, 0.07);
  --glacier: #4FD8C4;
  --sun: #F0C46C;
  --ember: #FF7A66;
  --aurora: #9A8CFF;
  --deep: #5B55E8;
  --light: #8793FF;
  --rem: #B9A5FF;
  --awake: #EDE9FB;
  --calm: #7FA3C8;
  --mild: #D8C08C;
  --elevated: #F2A25E;
  --high: #FF6F5E;
  --z1: #7D8A9C;
  --z2: #4FA8F0;
  --z3: #62CF8A;
  --z4: #F0C46C;
  --z5: #FF7A66;
  --led: #62CF8A;

  --font-voice: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-num: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;

  /* Motion. The head script swaps these for the app's exact springs (linear()) where the browser supports it. */
  --ease-settle: cubic-bezier(0.3, 1.3, 0.5, 1);
  --ease-glide: cubic-bezier(0.2, 0.9, 0.25, 1);
  --ease-tap: cubic-bezier(0.25, 1.1, 0.5, 1);
  --ease-drift: cubic-bezier(0.16, 1, 0.3, 1);
  --d-settle: 676ms;
  --d-glide: 692ms;
  --d-tap: 388ms;
  --d-drift: 1232ms;
  --breath: 10s;             /* six breaths a minute */
  --beat: calc(60s / 58);    /* the band's lights, at a resting heart rate */

  --nav-h: 64px;
  --gutter: 24px;
  --max: 1180px;
}
[data-tone="primed"] { --tone: #4FD8C4; --tone-hi: #A8F3E6; --tone-lo: #2E86D6; }
[data-tone="sleep"] { --tone: #9A8CFF; --tone-hi: #B9A5FF; --tone-lo: #5B55E8; }
[data-tone="calm"] { --tone: #7FA3C8; --tone-hi: #BFD3E8; --tone-lo: #4F6F99; }

/* 2 · Base -------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--snow);
  font: 17px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}
main { overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
h1, h2 { font-family: var(--font-voice); font-weight: 400; text-wrap: balance; font-optical-sizing: auto; }
h1 em, h2 em { font-style: italic; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--glacier); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(79, 216, 196, 0.3); }
.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 14px; border-radius: 12px;
  background: var(--snow); color: var(--night); font-weight: 600; text-decoration: none; translate: 0 -160%;
}
.skip:focus-visible { translate: 0 0; }

.eyebrow {
  display: flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fog);
}
.tone-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); flex: none; }
.lede, .sec-lede { font: 400 21px/1.5 var(--font-voice); color: var(--fog); max-width: 34em; }

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 32px; }
.cta.center { justify-content: center; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; min-height: 54px; padding: 0 22px;
  border-radius: 14px; background: var(--deep-water); box-shadow: inset 0 0 0 1px var(--hair-2);
  font-size: 17px; font-weight: 600; line-height: 1.15; color: var(--snow); text-decoration: none; white-space: nowrap;
}
.store small { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--glacier); }
a.store { transition: transform var(--d-tap) var(--ease-tap), background 0.2s; }
a.store:hover { background: var(--raised); }
a.store:active { transform: scale(0.97); }
.text-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 16px; font-weight: 600; color: var(--snow); text-decoration: none;
}
.text-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--d-glide) var(--ease-glide); }
.text-link:hover svg { transform: translateX(3px); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 26px;
  border-radius: 27px; background: var(--snow); color: var(--night); font-size: 17px; font-weight: 600; text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform var(--d-tap) var(--ease-tap), background 0.2s;
}
.btn:hover { background: #fff; }
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fine { margin-top: 18px; font-size: 13px; line-height: 1.55; color: var(--mist); max-width: 40em; }

/* 3 · Nav ---------------------------------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in oklab, var(--night) 74%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--hair); }
.nav-in {
  max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); height: var(--nav-h);
  display: flex; align-items: center; gap: 32px;
}
.brand { display: block; color: var(--snow); border-radius: 8px; }
.brand .lockup { height: 30px; width: auto; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--fog); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--snow); }
.nav-store {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 18px;
  background: var(--fill); font-size: 13.5px; font-weight: 600; color: var(--snow); white-space: nowrap; text-decoration: none;
}

/* 4 · Story: the hero and four chapters, with one phone beside them --------------------------------------------- */
.story {
  max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr);
}
.ch { padding-block: 64px; }
.ch h1 { font-size: clamp(50px, 6.1vw, 88px); line-height: 0.98; letter-spacing: -0.028em; margin-bottom: 26px; }
.ch h2 { font-size: clamp(38px, 3.9vw, 54px); line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 20px; }
.ch > p:not(.eyebrow):not(.lede) { color: var(--fog); max-width: 31em; }
.ch > p + p:not(.lede) { margin-top: 12px; }
.hero { padding-top: 48px; }
.hero .lede { max-width: 25em; }

.legend { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 28px; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--snow); }
.legend li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.legend span { font-weight: 500; color: var(--mist); font-variant-numeric: tabular-nums; }

.stage {
  position: relative; grid-row: 2; display: grid; justify-items: center; padding-block: 8px 24px;
  --device-w: min(340px, 78vw);
  transition: --tone 0.9s ease, --tone-hi 0.9s ease, --tone-lo 0.9s ease;
}
.stage-sticky { position: relative; display: grid; justify-items: center; }
.stage .shot:not([data-screen="today"]) { display: none; }
/* The screen's colour glowing behind the phone, as on the App Store slides: 30 % at the centre, 10 % at 45 %. */
.glow {
  position: absolute; left: 50%; top: 42%; width: calc(var(--device-w) * 1.95); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--tone) 30%, transparent), color-mix(in oklab, var(--tone) 10%, transparent) 45%, transparent);
  animation: swell var(--breath) ease-in-out infinite;
}

/* 5 · Device: the whole phone, as on the App Store slides (bezel 2.17 % of the screen, corners 12.5 %) ---------- */
.device { position: relative; width: var(--device-w, 320px); container-type: inline-size; isolation: isolate; }
.frame {
  padding: 2.08cqw; border-radius: 14.06cqw; background: #05080B;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(236, 241, 245, 0.16);
}
.screen {
  position: relative; aspect-ratio: 900 / 1955; border-radius: 11.98cqw; overflow: hidden; isolation: isolate;
  background: var(--night);
  --pt: calc(95.84cqw / 440);   /* one point of the 440 pt wide screen */
}
.screen img { width: 100%; height: 100%; object-fit: cover; }
.shot { position: absolute; inset: 0; }
.ch .device { display: block; margin: 40px auto 0; --device-w: min(300px, 74vw); }
.ch .device::before {
  content: ""; position: absolute; left: 50%; top: 42%; width: 200%; aspect-ratio: 1; translate: -50% -50%; z-index: -1;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--tone) 26%, transparent), color-mix(in oklab, var(--tone) 8%, transparent) 45%, transparent);
}

/* 6 · The live orb: the app's Recovery orb (RecoveryOrb.swift), replayed over the Today screenshot ------------- */
.live-orb {
  position: absolute; left: calc(88 * var(--pt)); top: calc(194 * var(--pt)); width: calc(264 * var(--pt)); aspect-ratio: 1;
  --state: #4FD8C4; --state-hi: #A8F3E6; --state-lo: #2E86D6;
}
/* Hides the screenshot's own orb: page colour out to 152.5 pt, feathered to 155 pt, clear of the text around it. */
.lo-cover {
  position: absolute; left: 50%; top: 50%; width: calc(310 * var(--pt)); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--night) 98.4%, rgba(10, 15, 20, 0) 100%);
}
.lo-body { position: absolute; inset: 0; }
.lo-tint {
  position: absolute; inset: 13%; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--state) 6%, transparent), transparent);
}
/* The light: blobs of the state's colours orbiting in a band around the ring (clear inside 0.37, peak at 0.46,
   gone by 0.6 of the size), breathing at six breaths a minute. */
.lo-aurora {
  position: absolute; inset: -10%;
  -webkit-mask-image: radial-gradient(closest-side, transparent 61.7%, rgba(0,0,0,.18) 67.5%, rgba(0,0,0,.62) 72.5%, #000 76.7%, rgba(0,0,0,.8) 82.5%, rgba(0,0,0,.35) 90%, rgba(0,0,0,.1) 95.8%, transparent 100%);
  mask-image: radial-gradient(closest-side, transparent 61.7%, rgba(0,0,0,.18) 67.5%, rgba(0,0,0,.62) 72.5%, #000 76.7%, rgba(0,0,0,.8) 82.5%, rgba(0,0,0,.35) 90%, rgba(0,0,0,.1) 95.8%, transparent 100%);
  animation: breath var(--breath) ease-in-out infinite;
}
.lo-halo {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(closest-side, transparent 65%, color-mix(in oklab, var(--state) 38%, transparent) 77.5%, transparent 96.7%);
}
/* Like the app's mesh: the state's colours all the way round, turning once every 50 s, with blobs drifting over it. */
.lo-aurora::before {
  content: ""; position: absolute; inset: 6%; border-radius: 50%; opacity: 0.92;
  background: conic-gradient(from 20deg, var(--state-lo), var(--state), var(--state-hi), var(--state), var(--state-lo), var(--state), var(--state-hi), var(--state), var(--state-lo));
  filter: blur(calc(6.6 * var(--pt)));
  animation: turn 50s linear infinite;
}
.lo-aurora i {
  position: absolute; left: 50%; top: 50%; width: 58%; height: 58%; margin: -29% 0 0 -29%; border-radius: 50%;
  filter: blur(calc(23.8 * var(--pt))); mix-blend-mode: screen; opacity: 0.5;
}
.lo-aurora i:nth-of-type(1) { background: var(--state-hi); --r: 30%; animation: orbit 19s linear infinite; }
.lo-aurora i:nth-of-type(2) { background: var(--state); --r: 32%; animation: orbit 27s linear infinite reverse; }
.lo-aurora i:nth-of-type(3) { background: var(--state-lo); --r: 28%; animation: orbit 35s linear -12s infinite; }
.lo-aurora i:nth-of-type(4) { background: var(--state); --r: 33%; opacity: 0.5; animation: orbit 23s linear -6s infinite; }
.lo-track, .lo-arc { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lo-track circle { fill: none; stroke: rgba(236, 241, 245, 0.08); stroke-width: 2.904; }
.lo-track rect { fill: rgba(236, 241, 245, 0.28); }
.lo-arc { filter: drop-shadow(0 0 calc(4.5 * var(--pt)) color-mix(in oklab, var(--state) 80%, transparent)); }
.lo-arc circle { fill: none; stroke: var(--state); stroke-width: 4.488; stroke-linecap: round; }
.lo-readout {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--snow); text-align: center;
}
.lo-label { font: 600 calc(13 * var(--pt))/calc(16 * var(--pt)) var(--font-ui); color: var(--fog); }
.lo-num { display: flex; align-items: flex-start; gap: calc(1.3 * var(--pt)); margin-bottom: calc(4 * var(--pt)); }
.lo-num b { font: 300 calc(76.56 * var(--pt))/1.19 var(--font-num); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.lo-num small { font: 400 calc(24.5 * var(--pt))/1.19 var(--font-num); color: var(--fog); margin-top: calc(16.8 * var(--pt)); }
.lo-chip {
  display: inline-flex; align-items: center; gap: calc(6 * var(--pt)); height: calc(22 * var(--pt)); padding: 0 calc(8 * var(--pt));
  border-radius: 999px; background: color-mix(in oklab, var(--state) 14%, transparent);
  font: 600 calc(11.5 * var(--pt))/1 var(--font-ui); color: var(--snow);
}
.lo-chip i { width: calc(8 * var(--pt)); height: calc(8 * var(--pt)); border-radius: 50%; background: var(--state); }

/* 7 · Sections ------------------------------------------------------------------------------------------------ */
.section { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); padding-block: 96px; }
.section h2 { font-size: clamp(38px, 4.2vw, 58px); line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 20px; }
.sec-head { max-width: 40em; }
.sec-head .sec-lede { max-width: 32em; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; align-items: center; }

.principles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 48px; }
.principle {
  display: flex; flex-direction: column; padding: 24px; border-radius: 26px;
  background: var(--deep-water); box-shadow: inset 0 0 0 1px var(--hair);
}
.principle h3 { margin: 22px 0 8px; font: 400 25px/1.15 var(--font-voice); letter-spacing: -0.01em; }
.principle p { font-size: 15px; line-height: 1.55; color: var(--fog); }

.ledger { display: grid; margin: 0; border-top: 1px solid var(--hair-2); }
.ledger > div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 20px 0;
  border-bottom: 1px solid var(--hair-2);
}
.ledger dt { font-size: 16px; color: var(--fog); }
.ledger dd { font-size: 15px; color: var(--fog); }
.ledger dd b { display: block; font-size: 16px; font-weight: 600; color: var(--snow); }

/* 8 · Proofs: small, real pieces of the app's language ---------------------------------------------------------- */
.proof {
  display: grid; align-content: center; gap: 14px; height: 156px; padding: 18px; border-radius: 18px;
  background: var(--night); box-shadow: inset 0 0 0 1px var(--hair);
}
.proof:has(.gap-chart) { gap: 10px; }
.gc-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.gc-stale { color: var(--fog); font-weight: 500; font-variant-numeric: tabular-nums; }
.gap-chart { width: 100%; height: auto; max-height: 64px; overflow: visible; }
.gc-grid { stroke: var(--hair-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.gc-line { fill: none; stroke: var(--calm); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.gc-dot { fill: var(--calm); stroke: var(--night); stroke-width: 2; vector-effect: non-scaling-stroke; }
.gc-key { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--mist); }
.gc-key i {
  width: 12px; height: 10px; border-radius: 2px;
  background: repeating-linear-gradient(45deg, rgba(236, 241, 245, 0.2) 0 1.5px, transparent 1.5px 4px);
}

.contrib { display: grid; gap: 6px; }
.c-top, .c-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.c-top span { color: var(--snow); font-weight: 600; }
.c-top b { font-weight: 600; font-variant-numeric: tabular-nums; }
.c-foot { font-size: 11.5px; color: var(--mist); font-variant-numeric: tabular-nums; }
.c-foot .good { color: var(--glacier); font-weight: 600; }
.c-bar { position: relative; height: 4px; border-radius: 2px; background: var(--fill); }
.c-bar::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1.5px; background: rgba(236, 241, 245, 0.35); }
.c-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--from); right: calc(100% - var(--to)); border-radius: 2px; }
.c-bar.good::after { background: var(--glacier); }
.c-bar.bad::after { background: var(--ember); }

.proof-deltas { gap: 10px; }
.delta-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 600; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.delta svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.delta.good { color: var(--glacier); }
.delta.bad { color: var(--ember); }

.load-track { display: grid; gap: 10px; }
.lt-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--fog); }
.lt-top b { font: 400 30px/1 var(--font-num); letter-spacing: -0.02em; color: var(--snow); margin-right: 4px; }
.lt-bar {
  position: relative; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, var(--fill) 70%, transparent);
}
.lt-target { position: absolute; top: -5px; bottom: -5px; left: 52%; width: 19%; border-radius: 7px; box-shadow: inset 0 0 0 1.5px rgba(236, 241, 245, 0.4); }
.lt-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 38.5%; border-radius: 5px; background: var(--snow); }
.lt-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--mist); }

/* 9 · Polar Loop ------------------------------------------------------------------------------------------------ */
.band-art {
  display: grid; justify-items: center; gap: 18px; padding: 48px 24px 28px; border-radius: 30px;
  background: radial-gradient(70% 60% at 50% 62%, rgba(98, 207, 138, 0.07), transparent 70%), var(--deep-water);
  box-shadow: inset 0 0 0 1px var(--hair);
}
.band-art svg { width: min(100%, 460px); height: auto; overflow: visible; }
.band-art figcaption { font: italic 400 17px/1.4 var(--font-voice); color: var(--fog); text-align: center; max-width: 24em; }
.leds, .led-glow { animation: led var(--beat) linear infinite; }
.needs { display: grid; margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--hair-2); }
.needs li { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--hair-2); }
.needs b { font-weight: 600; }
.needs span { font-size: 15px; color: var(--fog); }

/* 10 · Keel: the brand's promise, and its signature settle ------------------------------------------------------ */
.keel { max-width: 860px; margin: 0 auto; padding: 72px var(--gutter) 120px; text-align: center; }
.keel-mark {
  display: block; margin: 0 auto; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  width: min(200px, 44vw); aspect-ratio: 56 / 44; -webkit-tap-highlight-color: transparent;
}
.keel-mark svg { width: 100%; height: auto; overflow: visible; }
.keel-mark .ball { transform-origin: 32px 22px; }
.keel-hint { margin-top: 14px; font-size: 12.5px; color: var(--mist); }
.keel .keel-quote {
  margin: 48px auto 0; font: 400 clamp(30px, 3.6vw, 46px)/1.18 var(--font-voice); letter-spacing: -0.015em; max-width: 20em;
}
.keel-body { margin: 22px auto 0; font-size: 18px; color: var(--fog); max-width: 30em; }

/* 11 · Footer ------------------------------------------------------------------------------------------------- */
.foot { border-top: 1px solid var(--hair); }
.foot-in {
  max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); padding-block: 40px calc(48px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 20px;
}
.foot .lockup { height: 24px; width: auto; color: var(--fog); }
.foot-text { display: grid; gap: 8px; font-size: 13px; line-height: 1.55; color: var(--mist); max-width: 62em; }
.foot-links ul { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0 0 4px; padding: 0; list-style: none; }
.foot-links a {
  display: inline-flex; align-items: center; min-height: 32px; font-size: 14px; font-weight: 500;
  color: var(--fog); text-decoration: none; transition: color 0.2s;
}
.foot-links a:hover, .foot-links a[aria-current="page"] { color: var(--snow); }

/* 12 · Motion: arrivals settle, state changes glide, ambient loops follow the body -------------------------- */
@keyframes breath { 0%, 100% { transform: scale(0.975); opacity: 0.9; } 50% { transform: scale(1.025); opacity: 1; } }
@keyframes swell { 0%, 100% { transform: scale(0.975); } 50% { transform: scale(1.025); } }
@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--r)) rotate(0deg); }
  to { transform: rotate(360deg) translateX(var(--r)) rotate(-360deg); }
}
@keyframes led { from { opacity: 1; } to { opacity: 0.4; } }
@keyframes turn { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes arrive { from { opacity: 0; transform: translateY(44px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes show { to { opacity: 1; } }
/* The ball, displaced up the bowl, rocks back to rest: ζ 0.2, the mark's signature (design book › Brand). */
@keyframes rock {
  0%{transform:rotate(62deg)}1.92%{transform:rotate(55deg)}3.85%{transform:rotate(43.3deg)}5.77%{transform:rotate(28.7deg)}7.69%{transform:rotate(12.9deg)}9.62%{transform:rotate(-2.2deg)}11.54%{transform:rotate(-15.2deg)}13.46%{transform:rotate(-25.1deg)}15.38%{transform:rotate(-31.1deg)}17.31%{transform:rotate(-33.3deg)}19.23%{transform:rotate(-31.8deg)}21.15%{transform:rotate(-27.3deg)}23.08%{transform:rotate(-20.6deg)}25%{transform:rotate(-12.6deg)}26.92%{transform:rotate(-4.3deg)}28.85%{transform:rotate(3.4deg)}30.77%{transform:rotate(9.8deg)}32.69%{transform:rotate(14.4deg)}34.62%{transform:rotate(17deg)}36.54%{transform:rotate(17.5deg)}38.46%{transform:rotate(16.2deg)}40.38%{transform:rotate(13.4deg)}42.31%{transform:rotate(9.6deg)}44.23%{transform:rotate(5.3deg)}46.15%{transform:rotate(1deg)}48.08%{transform:rotate(-2.9deg)}50%{transform:rotate(-6deg)}51.92%{transform:rotate(-8.1deg)}53.85%{transform:rotate(-9.1deg)}55.77%{transform:rotate(-9.1deg)}57.69%{transform:rotate(-8.2deg)}59.62%{transform:rotate(-6.5deg)}61.54%{transform:rotate(-4.4deg)}63.46%{transform:rotate(-2.1deg)}65.38%{transform:rotate(.1deg)}67.31%{transform:rotate(2.1deg)}69.23%{transform:rotate(3.6deg)}71.15%{transform:rotate(4.5deg)}73.08%{transform:rotate(4.9deg)}75%{transform:rotate(4.7deg)}76.92%{transform:rotate(4.1deg)}78.85%{transform:rotate(3.1deg)}80.77%{transform:rotate(1.9deg)}82.69%{transform:rotate(.7deg)}84.62%{transform:rotate(-.4deg)}86.54%{transform:rotate(-1.4deg)}88.46%{transform:rotate(-2.1deg)}90.38%{transform:rotate(-2.5deg)}92.31%{transform:rotate(-2.6deg)}94.23%{transform:rotate(-2.4deg)}96.15%{transform:rotate(-2deg)}98.08%{transform:rotate(-1.5deg)}100%{transform:rotate(0deg)}
}

/* The first frame: the nav's ball settles, the words rise in their order, the phone drifts up. */
.brand .ball { transform-origin: 32px 22px; animation: fade-in 372ms ease-out 300ms both, rock 2.6s linear 672ms both; }
.js .enter { animation: rise var(--d-glide) var(--ease-glide) both; animation-delay: calc(140ms + var(--i, 0) * 45ms); }
.js .enter-device { animation: arrive var(--d-drift) var(--ease-drift) 220ms both; }
.js .stage .glow { animation: swell var(--breath) ease-in-out infinite, fade-in var(--d-drift) ease-out 420ms both; }

/* The morning reveal. JS plays it and marks the orb ready; if JS never gets there, the final frame shows at 2.5 s. */
.js .live-orb:not(.ready) .lo-body { opacity: 0; animation: show 0s 2.5s forwards; }

/* The keel's ball waits off-stage until the section arrives, then settles. */
.js .keel-mark.armed .ball { opacity: 0; }
.keel-mark.settling .ball { animation: fade-in 372ms ease-out both, rock 2.6s linear 372ms both; }

/* The stage dissolves between screens: the new one fades in over the old, which stays opaque until it's covered,
   so the two never mix into a half-transparent double exposure. Its colour cross-fades over 0.9 s (--tone). */
.stage .shot.is-on { transition: opacity 480ms var(--ease-glide); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Ambient loops pause off screen. */
.offscreen .glow, .offscreen .lo-aurora, .offscreen .lo-aurora::before, .offscreen .lo-aurora i, .offscreen .leds, .offscreen .led-glow { animation-play-state: paused !important; }

/* 13 · Responsive --------------------------------------------------------------------------------------------- */
@media (max-width: 719px) {
  :root { --gutter: 20px; --nav-h: 58px; }
  .nav-links { display: none; }
  .nav-store { margin-left: auto; font-size: 12.5px; height: 32px; padding: 0 12px; }
  .brand .lockup { height: 26px; }
  .ch { padding-block: 44px; }
  .hero { padding-top: 32px; }
  .lede, .sec-lede { font-size: 19px; }
  .section { padding-block: 72px; }
  .ledger > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .needs li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (min-width: 720px) {
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .story { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); column-gap: clamp(56px, 7vw, 112px); }
  .ch { grid-column: 1; min-height: 86svh; display: flex; flex-direction: column; justify-content: center; padding-block: 80px; }
  .hero { min-height: calc(100svh - var(--nav-h)); padding-block: 56px 88px; }
  .ch .device { display: none; }
  .stage {
    grid-column: 2; grid-row: 1 / span 5; align-items: start; padding: 0;
    --device-w: calc(clamp(250px, (100svh - var(--nav-h) - 96px) / 2.2161, 340px) * 1.0434);
  }
  .stage-sticky { position: sticky; top: calc(var(--nav-h) + (100svh - var(--nav-h) - var(--device-w) * 2.1234) / 2); }
  .stage .shot:not([data-screen="today"]) { display: block; }
  .stage .shot { opacity: 0; z-index: 0; }
  .stage .shot.is-was { opacity: 1; z-index: 1; }
  .stage .shot.is-on, .stage:not(.managed) .shot[data-screen="today"] { opacity: 1; z-index: 2; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 7vw, 104px); }
  .loop { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .foot-in { grid-template-columns: auto minmax(0, 1fr); gap: 48px; align-items: start; }
}
@media (min-width: 1100px) {
  .principles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 14 · Reduced motion: springs become 0.2 s cross-fades; breath, orbit, pulse and the settle stop ----------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.2s !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.2s !important; }
  .glow, .lo-aurora, .lo-aurora::before, .lo-aurora i, .leds, .led-glow, .brand .ball, .keel-mark .ball { animation: none !important; }
  .js .enter, .js .enter-device { animation-name: fade-in !important; }
  .js .live-orb .lo-body, .js .live-orb:not(.ready) .lo-body { opacity: 1; animation: none !important; }
  .js .keel-mark.armed .ball { opacity: 1; }
  html { scroll-behavior: auto; }
}
