/* Tiewell landing. Palette is the app's own "cool ledger" (src/theme.ts):
   navy primary, coral counterpoint, cool paper ground, pastel avatar tints. */

:root {
  --ink: #1a2137;
  --ink-2: #3d4560;
  --muted: #545c70;            /* 6.1:1 on --paper */
  --paper: #f3f4f7;
  --surface: #ffffff;
  --line: #e1e4eb;
  --navy: #243461;
  --night: #1c2748;            /* hero ground, the icon's gradient midpoint */
  --night-2: #151d38;
  --on-night: #ffffff;
  --on-night-dim: #c3cbe2;     /* 9.4:1 on --night */
  --coral: #ee7c63;
  --coral-ink: #7a2d1a;

  /* avatar tints, straight from the icon */
  --sky: #d9ecfc;   --sky-fg: #0b5d91;
  --rose: #ffe3e3;  --rose-fg: #b4233c;
  --cream: #ffefd6; --cream-fg: #a24b0a;
  --mint: #c7f5e8;  --mint-fg: #0f6b58;
  --lilac: #e6e1ff; --lilac-fg: #5b36c7;

  --t-coral: #fae9e4; --t-blue: #e7edf8; --t-green: #e6f1eb; --t-orange: #fbede0;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(88px, 12vw, 168px);
  --radius: 28px;

  --z-nav: 20;
  --z-skip: 30;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; text-wrap: balance; line-height: 1.02; }
p { text-wrap: pretty; }
b, strong { font-weight: 650; }

.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: var(--z-skip); background: var(--surface); padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 8px; }

.section-title {
  font-size: clamp(2.25rem, 5.2vw, 4rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.section-lede { margin-top: 20px; font-size: 1.1875rem; color: var(--muted); max-width: 40ch; }

/* ───────── Badge (Apple: unmodified, no motion) ───────── */
.badge { display: inline-block; flex: none; border-radius: 10px; }
.badge img { height: 100%; width: auto; }
.badge-hero { height: 55px; }
.badge-nav { height: 40px; }

/* ───────── Nav ───────── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: var(--z-nav);
  color: var(--on-night);
  transition: background-color 300ms ease, color 300ms ease, box-shadow 300ms ease;
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.25rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.nav-links { display: flex; gap: 26px; margin-left: auto; font-size: 0.9375rem; font-weight: 500; }
.nav-links a { text-decoration: none; opacity: 0.82; transition: opacity 150ms ease; }
.nav-links a:hover { opacity: 1; }
.badge-nav {
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out), visibility 0s linear 250ms;
}
.nav.is-solid {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.nav.show-badge .badge-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .badge-nav { margin-left: auto; }
}

/* ───────── Phone (generic, upright, never tilted) ───────── */
.phone {
  --bezel: 9px;
  position: relative;
  aspect-ratio: 440 / 956;
  border-radius: 46px;
  padding: var(--bezel);
  background: #0e1322;
  box-shadow:
    inset 0 0 0 1.5px #3a4260,
    0 1px 1px rgb(12 18 38 / 0.08),
    0 24px 48px -12px rgb(12 18 38 / 0.28),
    0 60px 120px -40px rgb(12 18 38 / 0.35);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 38px; background: var(--paper); }

/* ───────── HERO ───────── */
.hero {
  position: relative;
  background:
    radial-gradient(90% 70% at 85% 40%, #2c3e70 0%, transparent 60%),
    linear-gradient(160deg, var(--night) 0%, var(--night-2) 100%);
  color: var(--on-night);
  padding: clamp(112px, 14vw, 160px) 0 clamp(72px, 9vw, 120px);
  overflow: clip;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9375rem; color: var(--on-night-dim); }
.kicker .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgb(238 124 99 / 0.2); }
.hero h1 {
  margin-top: 22px;
  font-size: clamp(3rem, 7.4vw, 5.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.96;
}
.h1-soft { color: var(--coral); display: inline-block; }
.lede { margin-top: 26px; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--on-night-dim); max-width: 34em; }
.cta-row { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.assurances { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9375rem; color: var(--on-night-dim); }
.assurances li { display: inline-flex; align-items: center; gap: 7px; }
.assurances li::before { content: ""; width: 14px; height: 14px; flex: none; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23ee7c63' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* hero visual: the icon's orbit, made literal */
.hero-visual { position: relative; display: grid; place-items: center; min-height: 640px; }
.phone-hero { width: 320px; z-index: 2; }
.orbit { position: absolute; inset: 50% auto auto 50%; width: 0; height: 0; --R: 280px; }
.ring { position: absolute; border-radius: 50%; border: 1.5px solid rgb(255 255 255 / 0.1); translate: -50% -50%; }
.ring-1 { width: calc(var(--R) * 2); height: calc(var(--R) * 2); }
.ring-2 { width: calc(var(--R) * 2.7); height: calc(var(--R) * 2.7); border-style: dashed; border-color: rgb(255 255 255 / 0.06); }
.orbiters { position: absolute; inset: 0; animation: spin 140s linear infinite; }
.orbiters > * {
  position: absolute; left: 0; top: 0;
  transform: rotate(var(--a)) translateX(var(--R)) rotate(calc(var(--a) * -1));
}
.bubble {
  display: grid; place-items: center;
  width: 58px; height: 58px; margin: -29px 0 0 -29px;
  border-radius: 50%;
  font: 700 1rem/1 var(--display); letter-spacing: -0.01em;
  box-shadow: 0 10px 30px -6px rgb(0 0 0 / 0.45);
  animation: counter 140s linear infinite;
}
.b-sky   { background: var(--sky);   color: var(--sky-fg); }
.b-rose  { background: var(--rose);  color: var(--rose-fg); }
.b-cream { background: var(--cream); color: var(--cream-fg); }
.b-mint  { background: var(--mint);  color: var(--mint-fg); }
.b-lilac { background: var(--lilac); color: var(--lilac-fg); }
.orbiters > .drifter { transform: rotate(var(--a)); }
.arm { position: absolute; left: 0; top: 0; transform: translateX(var(--R)); animation: drift 10s var(--ease-in-out) infinite; }
.drifting { position: relative; transform: rotate(calc(var(--a) * -1)); }
.drift-tag {
  position: absolute; top: 100%; left: 50%; translate: -50% 10px;
  white-space: nowrap; font: 600 0.75rem/1 var(--body);
  padding: 6px 9px; border-radius: 999px;
  background: #fef3c7; color: #92400e;
  animation: tag 10s var(--ease-in-out) infinite;
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes counter { to { rotate: -360deg; } }
/* RA drifts out past the ring, the tag appears, then he's pulled back in */
@keyframes drift {
  0%, 10%   { transform: translateX(var(--R)); }
  45%, 62%  { transform: translateX(calc(var(--R) + 84px)); }
  84%, 100% { transform: translateX(var(--R)); }
}
@keyframes tag {
  0%, 30% { opacity: 0; }
  45%, 62% { opacity: 1; }
  74%, 100% { opacity: 0; }
}

.frag {
  position: absolute; z-index: 3;
  background: var(--surface); color: var(--ink);
  border-radius: 18px;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 22px 50px -14px rgb(5 10 30 / 0.55);
  font-size: 0.875rem; line-height: 1.4;
}
.frag .em { margin-right: 6px; }
.frag-context { left: -16%; bottom: 9%; width: 240px; padding: 14px 16px; display: grid; gap: 8px; }
.frag-row.muted { color: var(--muted); }
.frag-bday { right: -8%; top: 6%; display: flex; align-items: center; gap: 10px; padding: 11px 16px 11px 12px; background: #fbeee6; }
.frag-bday .em { font-size: 1.375rem; margin: 0; }
.frag-bday small { display: block; color: #93531a; font-weight: 600; font-size: 0.8125rem; }

@media (max-width: 959px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 0; padding: 40px 0 20px; }
  .phone-hero { width: min(300px, 70vw); }
  .orbit { --R: min(220px, 46vw); }
  .frag-context { left: 0; bottom: 8%; width: min(230px, 58vw); }
  .frag-bday { right: 0; top: 14%; }
}
@media (max-width: 640px) {
  .orbiters { display: none; }   /* no room to drift on a phone; rings + fragments carry it */
}
@media (max-width: 520px) {
  .bubble { width: 46px; height: 46px; margin: -23px 0 0 -23px; font-size: 0.875rem; }
  .frag { font-size: 0.8125rem; }
  .frag-context { bottom: 6%; }
  .badge-hero { height: 52px; }
}

/* ───────── DRIFT ───────── */
.drift { padding: var(--section) 0; }
.drift-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.drift-copy h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.06; }
.drift-copy p { margin-top: 22px; font-size: 1.1875rem; color: var(--ink-2); max-width: 36em; }
.drift-copy p strong { color: var(--ink); }

.drift-chart { background: var(--surface); border-radius: var(--radius); padding: clamp(22px, 3vw, 36px); box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgb(28 39 72 / 0.35); }
.months { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 0.8125rem; color: var(--muted); font-weight: 500; }
.track { position: relative; height: 92px; margin-top: 8px; border-top: 1px dashed var(--line); }
.gap {
  position: absolute; left: 7%; right: 7%; top: 28px; height: 6px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--coral) 0 10px, transparent 10px 16px);
  transform-origin: left center;
}
.pin { position: absolute; top: 16px; display: grid; gap: 2px; font-size: 0.8125rem; line-height: 1.25; padding-top: 30px; }
.pin::before { content: ""; position: absolute; top: 4px; width: 22px; height: 22px; border-radius: 50%; border: 4px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); }
.pin small { color: var(--muted); }
.pin-start { left: calc(7% - 11px); }
.pin-start::before { left: 0; background: var(--navy); }
.pin-end { right: calc(7% - 11px); text-align: right; }
.pin-end::before { right: 0; background: var(--coral); }

.fix-card { margin-top: 24px; border: 1px solid var(--line); border-radius: 22px; padding: 18px; display: grid; gap: 14px; background: var(--surface); }
.fix-head { display: flex; align-items: center; gap: 12px; }
.fix-head > span:nth-child(2) { display: grid; line-height: 1.25; }
.fix-head small { color: var(--muted); font-size: 0.875rem; }
.fix-card p { color: var(--ink-2); font-size: 0.9688rem; }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; font: 700 0.9375rem/1 var(--display); }
.pill { margin-left: auto; font-size: 0.8125rem; font-weight: 700; padding: 5px 10px; border-radius: 8px; }
.pill-warn { background: #fef3c7; color: #92400e; }
.fix-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fix-actions span { text-align: center; padding: 11px; border-radius: 12px; font-weight: 700; font-size: 0.9375rem; }
.btn-ghost { border: 1px solid var(--line); }
.btn-solid { background: var(--navy); color: #fff; }
.drift-chart figcaption { margin-top: 18px; font-size: 0.875rem; color: var(--muted); }

@media (max-width: 899px) { .drift-grid { grid-template-columns: 1fr; } }

/* ───────── HOW ───────── */
.how { padding: 0 0 var(--section); }
.how-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); margin-top: clamp(40px, 6vw, 72px); }
.steps { display: grid; }
.step { min-height: 72vh; display: grid; align-content: center; gap: 14px; padding: 24px 0; transition: opacity 300ms ease; }
.step-n {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line);
  font: 750 1.125rem/1 var(--display); color: var(--navy);
  transition: background-color 300ms ease, color 300ms ease, box-shadow 300ms ease;
}
.step h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 750; letter-spacing: -0.03em; max-width: 16ch; }
.step p { font-size: 1.125rem; color: var(--ink-2); max-width: 30em; }
.phone-inline { display: none; }
.how-stage { position: relative; }
.phone-stage { position: sticky; top: calc(50vh - 330px); width: 320px; margin-inline: auto; }
.phone-stage img { position: absolute; inset: var(--bezel); width: calc(100% - var(--bezel) * 2); height: calc(100% - var(--bezel) * 2); opacity: 0; transition: opacity 450ms ease, filter 450ms ease; filter: blur(6px); }
.phone-stage img.is-on { opacity: 1; filter: none; }

.has-js .step:not(.is-active) { opacity: 0.38; }
.step.is-active .step-n { background: var(--navy); color: #fff; box-shadow: none; }

@media (max-width: 899px) {
  .how-grid { grid-template-columns: 1fr; }
  .how-stage { display: none; }
  .step { min-height: 0; padding: 32px 0; }
  .has-js .step:not(.is-active) { opacity: 1; }
  .phone-inline { display: block; width: min(300px, 76vw); margin: 18px auto 0; }
}

/* ───────── FEATURES ───────── */
.features { padding: var(--section) 0; background: var(--surface); }
.bento { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tile {
  background: var(--paper); border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 32px);
  display: flex; flex-direction: column; gap: 22px;
  overflow: hidden;
}
.tile h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.025em; }
.tile-copy p { margin-top: 8px; color: var(--muted); font-size: 1rem; max-width: 34em; }
.ui { margin-top: auto; }

.t-context { grid-column: span 4; background: var(--night); color: var(--on-night); }
.t-context .tile-copy p { color: var(--on-night-dim); }
.t-bday   { grid-column: span 2; }
.t-week   { grid-column: span 2; grid-row: span 2; }
.t-map    { grid-column: span 4; flex-direction: row; align-items: center; }
.t-map .tile-copy { flex: 1 1 0; }
.t-reach, .t-snooze { grid-column: span 2; }
.t-map .ui-tags { margin-top: 18px; }

/* context fragment */
.ui-context { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; color: var(--ink); }
.ui-panel { border-radius: 20px; padding: 18px; display: grid; gap: 10px; align-content: start; font-size: 0.9375rem; line-height: 1.45; }
.tint-coral { background: var(--t-coral); }
.tint-blue { background: var(--t-blue); }
.ui-h { font: 700 1.0625rem/1.2 var(--display); display: flex; gap: 8px; }
.ui-panel b { display: block; font-weight: 650; }
.ui-panel small { color: var(--muted); font-size: 0.8125rem; }
.ui-input { background: var(--surface); border-radius: 12px; padding: 10px 12px; color: #6b7285; font-size: 0.875rem; border: 1px solid var(--line); }

.ui-bdays { display: grid; gap: 10px; }
.ui-bdays li { display: flex; align-items: center; gap: 12px; background: var(--surface); padding: 10px 14px 10px 10px; border-radius: 16px; }
.ui-bdays .avatar { width: 36px; height: 36px; font-size: 0.8125rem; }
.ui-bdays em { margin-left: auto; font-style: normal; font-weight: 650; color: #93531a; font-size: 0.875rem; }

.ui-timeline { display: grid; gap: 12px; position: relative; padding-left: 14px; border-left: 1.5px solid var(--line); }
.ui-timeline li { background: var(--surface); border-radius: 18px; padding: 14px 16px; display: grid; gap: 6px; font-size: 0.9375rem; }
.ui-timeline small { color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.tag { justify-self: start; font-size: 0.8125rem; font-weight: 650; padding: 3px 10px; border-radius: 999px; }
.tag-green { background: var(--t-green); color: #285d44; }
.tag-blue { background: var(--t-blue); color: #354d8d; }
.tag-orange { background: var(--t-orange); color: #93531a; }

.ui-map { flex: 1 1 0; margin: 0; min-width: 0; max-width: 360px; }
.ui-map line { stroke: #c9cfda; stroke-width: 1.5; }
.ui-map text { font: 700 12px var(--display); text-anchor: middle; }
.n-coral { fill: var(--coral); } .ui-map .n-coral + text { fill: #fff; }
.n-lilac { fill: var(--lilac); } .n-sky { fill: var(--sky); } .n-mint { fill: var(--mint); } .n-cream { fill: var(--cream); }
.ui-map .n-lilac + text { fill: var(--lilac-fg); } .ui-map .n-sky + text { fill: var(--sky-fg); }
.ui-map .n-mint + text { fill: var(--mint-fg); } .ui-map .n-cream + text { fill: var(--cream-fg); }

.ui-chips, .ui-tags, .ui-sheet { display: flex; flex-wrap: wrap; gap: 8px; }
.ui-chips span, .ui-tags span, .ui-sheet span {
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; font-size: 0.9375rem; font-weight: 600;
}
.ui-tags span.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ui-sheet { flex-direction: column; gap: 6px; }
.ui-sheet span { border-radius: 14px; }
.ui-sheet span.on { background: var(--navy); color: #fff; border-color: var(--navy); }

@media (max-width: 1023px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-context, .t-map { grid-column: span 2; grid-row: auto; }
  .t-bday, .t-week, .t-reach, .t-snooze { grid-column: span 1; grid-row: auto; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .t-context, .t-map, .t-bday, .t-week, .t-reach, .t-snooze { grid-column: auto; }
  .ui-context { grid-template-columns: 1fr; }
  .t-map { flex-direction: column; align-items: stretch; }
  .ui-map { max-width: none; }
}

/* ───────── PRINCIPLES (coral drench) ───────── */
.principles { background: var(--coral); color: var(--ink); padding: var(--section) 0; }
.principles-title { font-size: clamp(3rem, 9vw, 6rem); font-weight: 800; letter-spacing: -0.045em; line-height: 0.95; }
.principle-list { margin-top: clamp(40px, 6vw, 80px); display: grid; border-top: 2px solid rgb(26 33 55 / 0.9); }
.principle-list li {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px 48px; align-items: baseline;
  padding: clamp(22px, 3vw, 34px) 0; border-bottom: 1px solid rgb(26 33 55 / 0.3);
}
.principle-list b { font: 750 clamp(1.5rem, 3vw, 2.25rem)/1.1 var(--display); letter-spacing: -0.03em; }
.principle-list span { font-size: 1.125rem; color: #2b1810; }
@media (max-width: 760px) { .principle-list li { grid-template-columns: 1fr; } }

/* ───────── PRIVACY ───────── */
.privacy { padding: var(--section) 0; }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.checks { display: grid; gap: 0; }
.checks li { position: relative; padding: 22px 0 22px 44px; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 1.0625rem; }
.checks li:first-child { padding-top: 4px; }
.checks li:first-child::before { top: 6px; }
.checks b { color: var(--ink); display: block; font-size: 1.1875rem; margin-bottom: 2px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 24px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--navy) no-repeat center/14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (max-width: 899px) { .privacy-grid { grid-template-columns: 1fr; } }

/* ───────── GALLERY ───────── */
.gallery { padding: var(--section) 0; background: var(--surface); }
.reel {
  margin-top: clamp(36px, 5vw, 64px);
  display: flex; gap: clamp(20px, 3vw, 36px);
  --reel-pad: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter)));
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--reel-pad);
  padding: 8px var(--reel-pad) 48px;
  scrollbar-width: thin; scrollbar-color: #c9cfda transparent;
}
.reel figure { flex: none; width: 260px; scroll-snap-align: start; }
.reel .phone { --bezel: 7px; border-radius: 38px; box-shadow: inset 0 0 0 1.5px #3a4260, 0 20px 40px -18px rgb(12 18 38 / 0.35); }
.reel .phone img { border-radius: 32px; }
.reel figcaption { margin-top: 18px; font-size: 0.9375rem; color: var(--muted); line-height: 1.4; }
.reel figcaption b { display: block; color: var(--ink); font: 700 1.125rem/1.3 var(--display); }

/* ───────── FAQ ───────── */
.faq { padding: var(--section) 0; }
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 0; font: 650 1.25rem/1.3 var(--display); letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface) no-repeat center/14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 3v10M3 8h10' fill='none' stroke='%23243461' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 250ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 48px 26px 0; color: var(--ink-2); font-size: 1.0625rem; max-width: 40em; }
@media (max-width: 899px) { .faq-grid { grid-template-columns: 1fr; } }

/* ───────── CLOSER ───────── */
.closer {
  background:
    radial-gradient(60% 80% at 50% 0%, #2c3e70 0%, transparent 70%),
    var(--night-2);
  color: var(--on-night); padding: var(--section) 0; text-align: center;
}
.closer-inner { display: grid; justify-items: center; }
.closer-icon { border-radius: 26px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6); }
.closer h2 { margin-top: 36px; font-size: clamp(2.5rem, 6.4vw, 5rem); font-weight: 800; letter-spacing: -0.04em; }
.closer p { margin: 18px 0 36px; font-size: 1.25rem; color: var(--on-night-dim); }

/* ───────── FOOTER ───────── */
.footer { background: var(--night-2); color: var(--on-night-dim); border-top: 1px solid rgb(255 255 255 / 0.08); padding: 36px 0 48px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; }
.footer .brand { color: var(--on-night); font-size: 1.125rem; }
.footer nav { display: flex; gap: 22px; font-size: 0.9375rem; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--on-night); text-decoration: underline; text-underline-offset: 3px; }
.footer .legal { flex-basis: 100%; font-size: 0.8125rem; color: #8f99b8; max-width: 70ch; }

/* ───────── Motion: first load + scroll-linked (progressive) ───────── */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 900ms var(--ease-out) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .hero-copy > :nth-child(3) { animation-delay: 160ms; }
  .hero-copy > :nth-child(4) { animation-delay: 240ms; }
  .phone-hero { animation: rise 1100ms var(--ease-out) 120ms both; }
  .frag-context { animation: pop 800ms var(--ease-out) 700ms both; }
  .frag-bday { animation: pop 800ms var(--ease-out) 850ms both; }
  .orbit { animation: fade 1600ms ease 200ms both; }

  @supports (animation-timeline: view()) {
    .gap { animation: grow linear both; animation-timeline: view(); animation-range: entry 20% cover 55%; }
    .tile, .reel figure, .principle-list li, .checks li {
      animation: settle linear both; animation-timeline: view(); animation-range: entry 0% entry 70%;
    }
  }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(4px); } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow { from { transform: scaleX(0.08); } }
@keyframes settle { from { opacity: 0.001; transform: translateY(28px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .orbiters, .bubble, .arm, .drift-tag { animation: none; }
  .drift-tag { opacity: 1; }
  .phone-stage img { transition: opacity 200ms ease; filter: none; }
}
