/* ============================================================
   Dalia · landing system
   editorial typography · oklch palette · cinematic motion
   ============================================================ */

:root {
  /* surfaces */
  --bg:           oklch(98%   0.005 320);
  --bg-soft:      oklch(96.5% 0.008 320);
  --bg-deep:      oklch(94%   0.014 318);
  --bg-warm:      oklch(96%   0.018 60);

  /* ink */
  --ink:          oklch(22%   0.04  315);
  --ink-strong:   oklch(15%   0.05  315);
  --ink-soft:     oklch(45%   0.025 315);
  --ink-faint:    oklch(60%   0.018 315);
  --ink-quiet:    oklch(75%   0.012 315);

  /* accent — Dalia purple */
  --accent:       oklch(54%   0.16  305);
  --accent-deep:  oklch(44%   0.18  305);
  --accent-soft:  oklch(94%   0.04  305);
  --accent-glow:  oklch(82%   0.13  305);

  /* functional, in-app inherited */
  --mint:         oklch(72%   0.14  165);
  --coral:        oklch(72%   0.17  25);
  --amber:        oklch(78%   0.14  65);

  /* lines */
  --line:         oklch(88%   0.012 315);
  --line-soft:    oklch(93%   0.008 315);

  /* shadows */
  --shadow-sm:    0 4px 12px -2px   oklch(35% 0.08 315 / 0.07);
  --shadow-md:    0 14px 32px -10px oklch(35% 0.08 315 / 0.16);
  --shadow-lg:    0 32px 64px -16px oklch(32% 0.10 315 / 0.22);
  --shadow-phone: 0 50px 90px -25px oklch(30% 0.12 315 / 0.32),
                  0 16px 32px -12px oklch(30% 0.10 315 / 0.18);

  /* type */
  --serif:  'Fraunces', 'Playfair Display', Georgia, serif;
  --sans:   'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* easing */
  --ease-out-quart:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-quint:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-soft:   cubic-bezier(0.34, 1.2, 0.64, 1);

  /* rhythm */
  --gutter:       clamp(1.25rem, 4vw, 2rem);
  --section-y:    clamp(5rem, 12vw, 9rem);
  --container:    1240px;
}

/* ============================================================
   reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

/* ============================================================
   typography
   ============================================================ */
.serif { font-family: var(--serif); font-variation-settings: "SOFT" 50, "WONK" 0; font-weight: 450; letter-spacing: -0.015em; }
.sans  { font-family: var(--sans); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 50;
  font-weight: 450;
  letter-spacing: -0.022em;
  color: var(--ink-strong);
  line-height: 1.02;
  margin: 0;
}

h1.hero {
  font-size: clamp(2rem, 4.2vw, 3.8rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-wrap: balance;
  display: block;
  min-height: 0;
  padding: 0;
  gap: 0;
  grid-template-columns: none;
}
h1.hero em {
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: var(--accent);
}

h2.section-title {
  font-size: clamp(2rem, 4.8vw, 3.6rem);
  line-height: 1.04;
  max-width: 18ch;
}

h3.feature-title {
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  line-height: 1.18;
}

p.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0;
}

p { margin: 0; max-width: 70ch; }

/* ============================================================
   layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: var(--section-y);
  position: relative;
}

/* ============================================================
   nav — minimal, fixed wordmark only
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: oklch(98% 0.005 320 / 0.7);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color 600ms var(--ease-out-quart), background 600ms var(--ease-out-quart);
}
.nav.scrolled { border-bottom-color: var(--line-soft); }

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.wordmark .brand-logo {
  width: 1.08em;
  height: 1.08em;
  display: block;
  object-fit: contain;
  flex: 0 0 auto;
  transform: translateY(-0.03em);
}
.wordmark .dot {
  width: 1.08em;
  height: 1.08em;
  background: center / contain no-repeat url("/icons/dalia-logo-header.png");
  display: inline-block;
  flex: 0 0 auto;
  transform: translateY(-0.03em);
}

.nav-cta {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 220ms, border-color 220ms, background 220ms;
}
.nav-cta:hover { color: var(--ink-strong); border-color: var(--ink-strong); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.nav-links a {
  position: relative;
  padding-block: 0.35rem;
  transition: color 220ms var(--ease-out-quart);
}
.nav-links a::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease-out-quart);
}
.nav-links a:hover { color: var(--ink-strong); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ============================================================
   hero
   ============================================================ */
.hero {
  min-height: 100svh;
  padding-top: clamp(4.5rem, 7.5vh, 6rem);
  padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  position: relative;
  isolation: isolate;
}
.hero-text { max-width: 42rem; }
.hero-text .eyebrow { margin-bottom: 1rem; }
.hero-text h1 { margin-bottom: 1.2rem; }
.hero-text .lede { margin-bottom: 1.6rem; font-size: clamp(1rem, 1.15vw, 1.1rem); }

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.5rem;
  background: var(--ink-strong);
  color: var(--bg);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transform: translate3d(0, 0, 0);
  transition: transform 280ms var(--ease-out-quart), box-shadow 280ms var(--ease-out-quart), background 280ms;
  box-shadow: 0 1px 0 oklch(0% 0 0 / 0.04), var(--shadow-sm);
}
.btn-primary:hover  { transform: translate3d(0, -2px, 0); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translate3d(0,  0,   0); }

.btn-primary .pill {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--bg);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}
.btn-ghost::after {
  content: "";
  position: absolute;
  inset: auto 0 0.45rem 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 360ms var(--ease-out-quart);
}
.btn-ghost:hover { color: var(--ink-strong); }
.btn-ghost:hover::after { transform: scaleX(1); }
.btn-ghost .arrow { transform: translate3d(0, 0, 0); transition: transform 360ms var(--ease-out-quart); }
.btn-ghost:hover .arrow { transform: translate3d(0, 2px, 0); }

.narrative-hero {
  min-height: min(920px, 100svh);
}
.narrative-hero::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  opacity: 0.9;
}
.narrative-hero .hero-text { max-width: 48rem; }
.narrative-hero h1.hero {
  font-size: clamp(3rem, 5.9vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  max-width: 13.5ch;
}
.narrative-hero .lede {
  max-width: 52ch;
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  color: var(--ink);
}
.hero-microcopy {
  margin-top: 1.25rem;
  color: var(--ink-faint);
  font-size: 0.86rem;
  max-width: 58ch;
}
.narrative-hero .phone.hero-phone {
  max-width: clamp(260px, 28vw, 360px);
}

/* ============================================================
   narrative sections
   ============================================================ */
.section-center {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.6rem, 5vw, 4rem);
}
.section-center h2 {
  margin-inline: auto;
  margin-top: 1.1rem;
  max-width: 16ch;
}

.problem-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
}
.problem-copy h2 { margin-top: 1rem; margin-bottom: 1.4rem; }
.signal-board {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-height: 360px;
  position: relative;
}
.signal-card {
  position: relative;
  min-height: 120px;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, oklch(99% 0.006 320 / 0.92), oklch(96% 0.014 318 / 0.84)),
    var(--bg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-strong);
  line-height: 1.15;
}
.signal-card:nth-child(1) { grid-column: 1 / span 2; transform: translateY(-46px) rotate(-2deg); }
.signal-card:nth-child(2) { grid-column: 3 / span 2; transform: translateY(24px) rotate(1.5deg); }
.signal-card:nth-child(3) { grid-column: 5 / span 2; transform: translateY(-30px) rotate(2deg); }
.signal-card:nth-child(4) { grid-column: 2 / span 2; transform: translateY(30px) rotate(1deg); }
.signal-card:nth-child(5) { grid-column: 4 / span 2; transform: translateY(-2px) rotate(-1.5deg); }

.story-section {
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 70% at 15% 25%, oklch(82% 0.13 305 / 0.26), transparent 58%),
    linear-gradient(135deg, var(--ink-strong), oklch(24% 0.055 315));
  color: var(--bg);
}
.story-grid {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: clamp(2rem, 7vw, 6rem);
  align-items: start;
}
.story-section .section-title,
.story-section h2 { color: var(--bg); max-width: 15ch; }
.story-section .lede {
  color: oklch(92% 0.012 315 / 0.82);
  margin-top: 1.4rem;
}
.story-kicker {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-style: italic;
  line-height: 1.05;
  color: oklch(87% 0.08 65);
  max-width: 12ch;
}
.story-line {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid oklch(98% 0.005 320 / 0.22);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-style: italic;
  line-height: 1.25;
  color: var(--bg);
}

.audience {
  text-align: center;
}
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
  text-align: left;
}
.audience-grid article {
  min-height: 128px;
  padding: 1.15rem 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, var(--bg), var(--bg-soft));
  color: var(--ink);
  box-shadow: 0 1px 0 oklch(100% 0 0 / 0.7) inset;
}
.audience-remate {
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  max-width: 48rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.25;
  color: var(--accent-deep);
}

.insight-showcase {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: center;
}
.insight-copy h2 { margin-top: 1rem; margin-bottom: 1.4rem; }
.insight-device {
  position: relative;
  min-height: 650px;
  display: grid;
  place-items: center;
  perspective: 2200px;
}
.insight-device::before {
  content: "";
  position: absolute;
  width: min(80%, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 66%);
  filter: blur(28px);
  z-index: -1;
}
.insight-device .phone {
  max-width: 300px;
  transform: translateX(-90px) rotateY(12deg) rotateZ(-2deg);
}
.insight-card {
  position: absolute;
  right: 2%;
  bottom: 10%;
  max-width: 340px;
  padding: 1.35rem 1.45rem;
  border-radius: 18px;
  border: 1px solid oklch(88% 0.012 315 / 0.86);
  background: oklch(98% 0.005 320 / 0.9);
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: var(--shadow-lg);
}
.insight-card span {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
}
.insight-card p {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.55;
}
.insight-card p + p { margin-top: 0.8rem; color: var(--ink-soft); }

.trust-redesign {
  background:
    linear-gradient(180deg, transparent, var(--bg-soft) 24%, var(--bg-soft) 76%, transparent);
}
.trust-redesign-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  align-items: start;
}
.trust-redesign h2 { margin-top: 1rem; margin-bottom: 1.4rem; }
.trust-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.trust-cards article {
  padding: 1.2rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
}
.trust-cards strong {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink-strong);
}
.trust-cards span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.trust-cards .emergency-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, oklch(98% 0.005 320), oklch(96% 0.035 65));
  border-color: oklch(78% 0.14 65 / 0.45);
}

.guiltless {
  background:
    radial-gradient(ellipse 70% 70% at 82% 20%, oklch(72% 0.14 165 / 0.14), transparent 58%),
    linear-gradient(180deg, transparent 0%, var(--bg-warm) 34%, var(--bg-warm) 66%, transparent 100%);
}

.founder-note {
  padding-top: clamp(3rem, 8vw, 6rem);
}
.letter-card {
  max-width: 780px;
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, oklch(99% 0.004 320), oklch(96% 0.018 60)),
    var(--bg);
  box-shadow: var(--shadow-md);
}
.letter-card .eyebrow { margin-bottom: 1.8rem; }
.letter-card p {
  max-width: 62ch;
  font-size: clamp(1.1rem, 1.55vw, 1.28rem);
  line-height: 1.65;
  color: var(--ink);
}
.letter-card p + p { margin-top: 1.1rem; }
.letter-card strong {
  display: block;
  margin-top: 2.2rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink-strong);
}
.letter-card strong span {
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--ink-faint);
  font-weight: 500;
}

.faq-section {
  padding-top: clamp(4rem, 10vw, 7rem);
}
.faq-list {
  max-width: 860px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 2.2rem 1.25rem 0;
  position: relative;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.25;
  color: var(--ink-strong);
  outline: none;
  border-radius: 10px;
  transition: color 220ms var(--ease-out-quart), background 220ms var(--ease-out-quart);
}
.faq-list summary:focus-visible {
  background: oklch(96% 0.025 315 / 0.72);
  box-shadow: 0 0 0 3px oklch(58% 0.17 305 / 0.18);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1.18rem;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 1.2rem;
  transition: transform 260ms var(--ease-out-quart);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p {
  max-width: 68ch;
  padding: 0 0 1.35rem;
  color: var(--ink-soft);
}

.form-note {
  margin: 1rem auto 0;
  max-width: 48rem;
  color: var(--ink-faint);
  font-size: 0.9rem;
}

/* hero phone */
.hero-stage {
  position: relative;
  perspective: 2400px;
  perspective-origin: 50% 30%;
  display: grid;
  place-items: center;
  min-height: auto;
  /* parallax JS sets translate3d on this element on scroll; pre-declare
     will-change so Safari promotes the layer up front instead of mid-scroll
     (which causes a visible jump). */
  will-change: transform;
}
.hero-blob {
  position: absolute;
  inset: -12% -8% -8% -8%;
  z-index: -1;
  filter: blur(70px) saturate(1.3);
  opacity: 0.85;
  pointer-events: none;
  /* transform-based animation — Safari composes this on GPU reliably,
     unlike SVG `d:` keyframes which fall back to slow software rendering. */
  transform-origin: 50% 50%;
  animation: blobBreathe 26s ease-in-out infinite;
  will-change: transform;
}
.hero-blob svg { width: 100%; height: 100%; }
@keyframes blobBreathe {
  0%, 100% { transform: scale(1)    rotate(0deg); }
  50%      { transform: scale(1.06) rotate(4deg); }
}

.phone {
  position: relative;
  display: block;
  width: 100%;
  max-width: 320px;
  filter: drop-shadow(var(--shadow-phone));
  transform-style: preserve-3d;
  will-change: transform;
}
.phone img { width: 100%; height: auto; display: block; }

.phone.hero-phone {
  max-width: clamp(240px, 26vw, 300px);
  transform: rotateY(-13deg) rotateX(5deg) translateZ(0);
  animation: phoneFloat 5.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes phoneFloat {
  /* explicit translateZ(0) on every keyframe so Safari keeps the element
     on its compositor layer for the whole animation cycle */
  0%, 100% { transform: rotateY(-13deg) rotateX(5deg) translateZ(0) translateY(0); }
  50%      { transform: rotateY(-13deg) rotateX(5deg) translateZ(0) translateY(-12px); }
}

/* hero glow ring */
.hero-ring {
  position: absolute;
  inset: 8% 12% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.35;
  z-index: -1;
  filter: blur(20px);
  pointer-events: none;
}

/* ============================================================
   reveal — global fade+rise, clip-mask for headlines
   ============================================================ */
/* Entrance animations use @keyframes (not transition) so Safari can't merge
   the initial and final paints into one frame and skip the from-state.
   `translate3d(0, …, 0)` forces GPU compositing on every browser. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  will-change: opacity, transform;
}
.reveal.in {
  animation: revealRise 900ms var(--ease-out-quart) both;
}

.reveal-stagger > * {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  will-change: opacity, transform;
}
.reveal-stagger.in > * {
  animation: revealRise 900ms var(--ease-out-quart) both;
}

@keyframes revealRise {
  from { opacity: 0; transform: translate3d(0, 28px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0,    0); }
}
.reveal-stagger.in > :nth-child(1) { animation-delay: 0ms; }
.reveal-stagger.in > :nth-child(2) { animation-delay: 90ms; }
.reveal-stagger.in > :nth-child(3) { animation-delay: 180ms; }
.reveal-stagger.in > :nth-child(4) { animation-delay: 270ms; }
.reveal-stagger.in > :nth-child(5) { animation-delay: 360ms; }
.reveal-stagger.in > :nth-child(6) { animation-delay: 450ms; }

/* word-by-word reveal removed — caused layout instability with inline-block
   stacking + vertical-align + clip-path. The h1 uses the simpler .reveal
   (whole-headline fade + rise) which is editorial and predictable. */

/* ============================================================
   section · how it works (3 phones, arc layout)
   full-bleed bg, content stays inside an inner .container
   ============================================================ */
.howto {
  background: linear-gradient(180deg, transparent 0%, var(--bg-soft) 30%, var(--bg-soft) 70%, transparent 100%);
}
.howto > .container { position: relative; }
.howto-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.howto-head .lede { justify-self: end; }

.howto-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  perspective: 2200px;
  padding-block: 2rem;
}
.howto-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.howto-step .step-num {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-size: 1rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.howto-step h3 { font-size: clamp(1.3rem, 1.8vw, 1.55rem); }
.howto-step p { color: var(--ink-soft); font-size: 0.97rem; max-width: 26ch; }

/* Full 3D chain: stage already has perspective; step + phone-wrap need
   preserve-3d so the rotateY interpolation propagates through the hierarchy
   instead of being flattened mid-transition (which is the Safari snap). */
.howto-stage,
.howto-step {
  transform-style: preserve-3d;
}
.howto-step .phone-wrap {
  transition: transform 600ms var(--ease-out-quart);
  transform-style: preserve-3d;
  /* Permanent layer promotion: Safari creates the 3D compositor layer up front
     instead of mid-hover (which causes a one-frame snap before the transition). */
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-origin: 50% 50%;
}
/* Base (idle) states. Function list is identical across all four rules:
   translate3d → rotateY → rotateZ → scale. Identical lists are required
   for Safari to interpolate component-by-component instead of falling back
   to a discrete snap at the start of the transition. */
.howto-step:nth-of-type(1) .phone-wrap { transform: translate3d(0, 20px, 0) rotateY( 10deg) rotateZ(-2.5deg) scale(1); }
.howto-step:nth-of-type(2) .phone-wrap { transform: translate3d(0, 0,    0) rotateY(  0deg) rotateZ( 0deg)   scale(1.06); }
.howto-step:nth-of-type(3) .phone-wrap { transform: translate3d(0, 20px, 0) rotateY(-10deg) rotateZ( 2.5deg) scale(1); }

/* Per-position :hover rules. KEY DECISION: rotateY/rotateZ values are IDENTICAL
   to the base state. Only translate3d (lift) and scale (grow) change. This
   avoids the Safari rotateY-matrix-interpolation snap entirely — there's
   simply no rotation to interpolate. Visual effect: phone rises and grows
   while keeping its editorial 3D angle. */
.howto-step:nth-of-type(1):hover .phone-wrap { transform: translate3d(0, 10px, 0) rotateY( 10deg) rotateZ(-2.5deg) scale(1.05); }
.howto-step:nth-of-type(2):hover .phone-wrap { transform: translate3d(0, -8px, 0) rotateY(  0deg) rotateZ( 0deg)   scale(1.10); }
.howto-step:nth-of-type(3):hover .phone-wrap { transform: translate3d(0, 10px, 0) rotateY(-10deg) rotateZ( 2.5deg) scale(1.05); }

.howto-step .phone { max-width: 260px; }
.howto-step:nth-of-type(2) .phone { max-width: 280px; }

.howto-connector {
  position: absolute;
  top: 32%;
  left: 0;
  right: 0;
  height: 80px;
  pointer-events: none;
  z-index: -1;
}
.howto-connector svg { width: 100%; height: 100%; overflow: visible; }
.howto-connector path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.2;
  stroke-dasharray: 4 6;
  stroke-dashoffset: 1000;
  opacity: 0.35;
  transition: stroke-dashoffset 1800ms var(--ease-out-quart) 200ms;
}
.howto-stage.in .howto-connector path { stroke-dashoffset: 0; }

/* ============================================================
   section · the whole day (annotated phone, full-bleed deco)
   ============================================================ */
.wholeday {
  position: relative;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 50% 55%, oklch(95% 0.025 305) 0%, transparent 65%);
}
.wholeday-deco {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  width: 100%;
  height: 100%;
  filter: blur(2.5px);
  opacity: 0.72;
}
.wholeday-deco svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.wholeday-deco .deco-layer-a,
.wholeday-deco .deco-layer-b {
  transform-origin: 50% 50%;
  will-change: transform;
}
.wholeday-deco .deco-layer-a {
  animation: decoDriftA 38s ease-in-out infinite;
}
.wholeday-deco .deco-layer-b {
  animation: decoDriftB 46s ease-in-out -8s infinite;
}
@keyframes decoDriftA {
  0%, 100% { transform: translate3d(-1.6%, -0.6%, 0); }
  50%      { transform: translate3d( 1.6%,  0.6%, 0); }
}
@keyframes decoDriftB {
  0%, 100% { transform: translate3d( 1.2%,  0.8%, 0); }
  50%      { transform: translate3d(-1.2%, -0.8%, 0); }
}
.wholeday-deco .deco-curve {
  fill: none;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 2200ms var(--ease-out-quart);
}
.wholeday.in .deco-curve { opacity: 1; }
.wholeday.in .deco-layer-a .deco-curve:nth-child(1) { transition-delay: 200ms; }
.wholeday.in .deco-layer-a .deco-curve:nth-child(2) { transition-delay: 700ms; }
.wholeday.in .deco-layer-b .deco-curve:nth-child(1) { transition-delay: 1100ms; }
.wholeday > .container { position: relative; }
.wholeday-head { margin-inline: auto; max-width: 38rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.wholeday-head h2 { margin-inline: auto; }
.wholeday-head .lede { margin-inline: auto; margin-top: 1.5rem; }

.wholeday-stage {
  position: relative;
  perspective: 2400px;
  display: grid;
  place-items: center;
  min-height: 720px;
  padding-block: 2rem;
}
.wholeday-stage .phone {
  max-width: 360px;
  transform: rotateX(3deg);
}
.wholeday-stage .phone-glow {
  position: absolute;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  z-index: -1;
  filter: blur(40px);
}

.annot {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-md);
  font-size: 0.86rem;
  line-height: 1.4;
  max-width: 220px;
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(0.85);
  transition: opacity 700ms var(--ease-out-soft), transform 700ms var(--ease-out-soft);
}
.annot strong {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 0.15rem;
  letter-spacing: -0.01em;
}
.annot.in { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.wholeday-stage.in .annot:nth-of-type(1) { transition-delay: 200ms; }
.wholeday-stage.in .annot:nth-of-type(2) { transition-delay: 500ms; }
.wholeday-stage.in .annot:nth-of-type(3) { transition-delay: 800ms; }
.wholeday-stage.in .annot:nth-of-type(4) { transition-delay: 1100ms; }

.annot-1 { top: 12%;  left: 4%;  text-align: left; }
.annot-2 { top: 30%;  right: 4%; text-align: left; }
.annot-3 { bottom: 32%; left: 4%; text-align: left; }
.annot-4 { bottom: 14%; right: 4%; text-align: left; }

.annot-line {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 800ms var(--ease-out-quart) 600ms;
}
.wholeday-stage.in .annot-line { opacity: 0.35; }
.annot-line svg { width: 100%; height: 100%; overflow: visible; }
.annot-line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

/* ============================================================
   section · progress (overlapping phones, full-bleed warm bg)
   ============================================================ */
.progress-section {
  background: linear-gradient(180deg, transparent 0%, var(--bg-warm) 35%, var(--bg-warm) 65%, transparent 100%);
}
.progress-section > .container { position: relative; }
.progress-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.progress-text h2 { margin-bottom: 1.5rem; }
.progress-text .lede { margin-bottom: 2rem; }
.progress-text ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.2rem;
}
.progress-text li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  font-size: 0.97rem;
  color: var(--ink-soft);
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--line-soft);
}
.progress-text li:last-child { border-bottom: 0; }
.progress-text li strong {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink-strong);
  white-space: nowrap;
}

.progress-stack {
  position: relative;
  perspective: 2200px;
  min-height: 620px;
  display: grid;
  place-items: center;
}
.progress-stack .phone-back {
  position: absolute;
  max-width: 240px;
  transform: translate(-95px, -45px) rotateY(12deg) rotateZ(-2deg);
  opacity: 0.94;
  z-index: 1;
}
.progress-stack .phone-front {
  position: relative;
  max-width: 290px;
  transform: translate(60px, 45px) rotateY(-9deg) rotateZ(2deg);
  z-index: 2;
}

/* ============================================================
   section · challenges 3D carousel
   ============================================================ */
.challenges {
  text-align: center;
  overflow: hidden;
}
.challenges-head { max-width: 42rem; margin-inline: auto; margin-bottom: clamp(3rem, 6vw, 5rem); }
.challenges-head h2 { margin-inline: auto; }
.challenges-head .lede { margin-inline: auto; margin-top: 1.5rem; }

.challenge-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2rem;
}
.chip {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
  transform: translate3d(0, 0, 0);
  transition: color 240ms var(--ease-out-quart), border-color 240ms var(--ease-out-quart), transform 240ms var(--ease-out-quart);
}
.chip:hover { color: var(--ink-strong); border-color: var(--accent); transform: translate3d(0, -1px, 0); }

.carousel {
  position: relative;
  perspective: 2000px;
  height: 620px;
  margin-top: clamp(3rem, 6vw, 4rem);
}
.carousel-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 950ms var(--ease-out-quart);
}
.carousel-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 580px;
  margin-left: -140px;
  margin-top: -290px;
  display: grid;
  place-items: center;
  transition: transform 950ms var(--ease-out-quart), opacity 950ms var(--ease-out-quart), filter 950ms var(--ease-out-quart);
  cursor: grab;
}
.carousel-card.is-dragging { cursor: grabbing; }
.carousel-card .phone { width: 100%; max-width: 280px; }
/* All carousel positions share the same transform function order:
   translate3d → rotateY → scale. Safari interpolates smoothly only when
   both ends of a transition have identical function lists. */
.carousel-card[data-pos="-1"] { transform: translate3d(-180px, 0, -160px) rotateY( 40deg) scale(1);   opacity: 0.55; filter: saturate(0.85); }
.carousel-card[data-pos="0"]  { transform: translate3d(   0,   0,    0)   rotateY(  0deg) scale(1);   opacity: 1;    filter: none;             z-index: 5; }
.carousel-card[data-pos="1"]  { transform: translate3d( 180px, 0, -160px) rotateY(-40deg) scale(1);   opacity: 0.55; filter: saturate(0.85); }
.carousel-card[data-pos="-2"],
.carousel-card[data-pos="2"]  { transform: translate3d(   0,   0, -240px) rotateY(  0deg) scale(0.7); opacity: 0; pointer-events: none; }

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  border: 0;
  padding: 0;
  transform: scale(1);
  transition: background 300ms, transform 300ms;
}
.dot.active { background: var(--accent); transform: scale(1.5); }

/* ============================================================
   section · day closure (full-bleed deep bg + radial overlays)
   ============================================================ */
.closure {
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.closure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 70% at 85% 15%, var(--accent-soft) 0%, transparent 55%),
    radial-gradient(ellipse 60% 70% at 15% 85%, var(--bg-warm) 0%, transparent 55%);
  opacity: 0.85;
  pointer-events: none;
}
.closure > .container { position: relative; }
.closure-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  position: relative;
}
.closure-text { max-width: 36rem; }
.closure-text h2 { margin-bottom: 1.6rem; }
.closure-text .lede { margin-bottom: 2rem; }

.closure-stage {
  position: relative;
  perspective: 2200px;
  display: grid;
  place-items: center;
  min-height: 640px;
}
.closure-stage .phone {
  max-width: 320px;
  transform: rotateY(-7deg) rotateX(3deg);
  clip-path: inset(0 0 0 0);
  transition: clip-path 1400ms var(--ease-out-quart);
}
.closure-stage:not(.in) .phone { clip-path: inset(50% 0 50% 0); }

/* ============================================================
   trust band
   ============================================================ */
.trust {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding-block: clamp(2rem, 4vw, 3rem);
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 3vw, 3rem);
}
.trust-item { display: flex; flex-direction: column; gap: 0.4rem; }
.trust-item .label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.trust-item .value {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
}

/* ============================================================
   final CTA
   ============================================================ */
.final-cta {
  text-align: center;
  position: relative;
  padding-block: clamp(6rem, 14vw, 10rem);
  isolation: isolate;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: -10% 10% 10%;
  z-index: -1;
  background: radial-gradient(ellipse at center, var(--accent-soft) 0%, transparent 65%);
  filter: blur(40px);
  opacity: 0.85;
}

.final-stage {
  position: relative;
  perspective: 2400px;
  display: grid;
  place-items: center;
  min-height: 480px;
  margin-bottom: 3rem;
}
.final-stage .phone {
  max-width: 280px;
  transform: rotateX(8deg) rotateY(-5deg);
  animation: phoneFloat 5.5s ease-in-out infinite;
}

.final-cta h2 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  margin-inline: auto;
  margin-bottom: 1.5rem;
  max-width: 18ch;
  line-height: 0.98;
}
.final-cta h2 em { font-style: italic; font-variation-settings: "SOFT" 100; color: var(--accent); }
.final-cta .lede { margin-inline: auto; margin-bottom: 2.5rem; }

.final-form {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.4rem 0.35rem 1.4rem;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 280ms, box-shadow 280ms;
  max-width: 100%;
}
.final-form:focus-within { border-color: var(--accent); box-shadow: var(--shadow-md); }
.final-form input {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink-strong);
  padding: 0.65rem 0;
  width: 240px;
  outline: 0;
}
.final-form input::placeholder { color: var(--ink-faint); }
.final-form button {
  background: var(--ink-strong);
  color: var(--bg);
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  transform: translate3d(0, 0, 0);
  transition: transform 240ms var(--ease-out-quart), background 240ms;
}
.final-form button:hover { background: var(--accent-deep); transform: translate3d(0, -1px, 0); }

/* waitlist form states — loading / success / error */
.final-form.is-loading { opacity: 0.85; pointer-events: none; }
.final-form.is-success {
  border-color: var(--mint);
  box-shadow: 0 0 0 4px oklch(72% 0.14 165 / 0.15);
}
.final-form.is-success input  { color: var(--mint); }
.final-form.is-success button {
  background: var(--mint);
  color: var(--ink-strong);
  cursor: default;
  pointer-events: none;
}
.final-form.is-error {
  border-color: var(--coral);
  animation: waitlistShake 360ms var(--ease-out-quart);
}
.final-form.is-error button { background: var(--coral); }
@keyframes waitlistShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20%      { transform: translate3d(-6px, 0, 0); }
  40%      { transform: translate3d(5px, 0, 0); }
  60%      { transform: translate3d(-3px, 0, 0); }
  80%      { transform: translate3d(2px, 0, 0); }
}
.final-form input:disabled,
.final-form button:disabled { cursor: default; }

/* ============================================================
   footer
   ============================================================ */
.footer {
  padding: 2.5rem var(--gutter) 3rem;
  border-top: 1px solid var(--line-soft);
}
.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-meta {
  font-size: 0.82rem;
  color: var(--ink-faint);
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.footer-meta a { transition: color 220ms; }
.footer-meta a:hover { color: var(--ink-strong); }
.footer-back {
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  letter-spacing: -0.005em;
  margin-left: auto;
  padding-left: 1.4rem;
  border-left: 1px solid var(--line);
}
.footer-back .arrow,
.footer-back::first-letter { /* no-op, kept for parity */ }
@media (max-width: 720px) {
  .footer-back { margin-left: 0; padding-left: 0; border-left: 0; }
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
}
.lang-switch a {
  color: var(--ink-faint);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  transition: color 220ms, background 220ms;
}
.lang-switch a.active { color: var(--ink-strong); background: var(--bg-soft); }
.lang-switch a:hover { color: var(--ink-strong); }
.lang-switch .sep { color: var(--ink-quiet); }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 960px) {
  .nav-links { display: none; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: clamp(5rem, 12vh, 7rem);
    overflow: hidden;
  }
  .narrative-hero h1.hero {
    max-width: 11ch;
    font-size: clamp(3rem, 13vw, 5.2rem);
  }
  /* on mobile the phone becomes a faded right-side decoration behind the text;
     the text stays in normal flow at full width and the hero height is whatever
     the text needs */
  .hero-text {
    max-width: 100%;
    position: relative;
    z-index: 2;
  }
  .hero-stage {
    position: absolute;
    top: 0;
    right: -12%;
    bottom: 0;
    width: 62%;
    max-width: 320px;
    min-height: 0;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero-ring { width: 280px; height: 280px; inset: 8% -10% auto auto; opacity: 0.2; }

  .problem-section,
  .story-grid,
  .insight-showcase,
  .trust-redesign-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .signal-board {
    min-height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .signal-card:nth-child(n) {
    grid-column: auto;
    transform: none;
    min-height: 104px;
  }
  .story-kicker { max-width: 18ch; }
  .story-section .section-title { max-width: 13ch; }
  .insight-device {
    min-height: 560px;
  }
  .insight-device .phone {
    transform: translateX(-42px) rotateY(10deg) rotateZ(-1deg);
    max-width: 260px;
  }
  .insight-card {
    right: 0;
    bottom: 4%;
  }
  .trust-cards { grid-template-columns: 1fr; }

  .howto-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .howto-head .lede { justify-self: start; }
  .howto-stage { grid-template-columns: 1fr; gap: 4rem; }
  .howto-step:nth-of-type(n) .phone-wrap { transform: rotateY(0) rotateZ(0); }
  .howto-step:nth-of-type(n):hover .phone-wrap {
    transform: translate3d(0, -4px, 0) rotateY(0) rotateZ(0) scale(1.015);
  }
  .howto-connector { display: none; }

  .annot { max-width: 180px; font-size: 0.78rem; padding: 0.6rem 0.8rem; }
  .annot-1, .annot-3 { left: 0; }
  .annot-2, .annot-4 { right: 0; }

  .progress-grid { grid-template-columns: 1fr; gap: 3rem; }
  .progress-stack { min-height: 540px; }
  .progress-stack .phone-back { transform: translate(-70px, -40px) rotateY(12deg); max-width: 200px; }
  .progress-stack .phone-front { transform: translate(40px, 40px) rotateY(-9deg); max-width: 240px; }

  .closure-grid { grid-template-columns: 1fr; gap: 3rem; }
  .closure-stage { min-height: 480px; }

  .trust-grid { grid-template-columns: repeat(2, 1fr); }

  .carousel { height: 540px; }
  .carousel-card { width: 230px; height: 480px; margin-left: -115px; margin-top: -240px; }
  .carousel-card[data-pos="-1"] { transform: translate3d(-130px, 0, -120px) rotateY( 38deg) scale(1); }
  .carousel-card[data-pos="1"]  { transform: translate3d( 130px, 0, -120px) rotateY(-38deg) scale(1); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav { padding: 0.85rem var(--gutter); }
  .wordmark { font-size: 1.3rem; }
  .nav-cta { font-size: 0.78rem; padding: 0.45rem 0.85rem; }

  .hero-text h1,
  .narrative-hero h1.hero {
    font-size: clamp(2.65rem, 12vw, 4rem);
    line-height: 1.14;
    margin-bottom: 1.5rem;
  }
  .narrative-hero h1.hero em {
    display: inline-block;
    padding-bottom: 0.08em;
  }

  .signal-board,
  .audience-grid {
    grid-template-columns: 1fr;
  }
  .insight-device {
    min-height: 620px;
    align-items: start;
    padding-top: 1rem;
  }
  .insight-device .phone {
    transform: none;
    max-width: 230px;
  }
  .insight-card {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
  }
  .letter-card {
    border-radius: 18px;
    padding: 1.5rem;
  }
  .faq-list summary {
    padding-right: 1.8rem;
  }

  .progress-stack .phone-back { transform: translate(-50px, -30px) rotateY(12deg); max-width: 170px; }
  .progress-stack .phone-front { transform: translate(30px, 30px) rotateY(-9deg); max-width: 210px; }

  .trust-grid { grid-template-columns: 1fr; }

  .final-form { width: 100%; flex-direction: column; padding: 0.5rem; gap: 0.4rem; border-radius: 22px; }
  .final-form input { width: 100%; padding: 0.85rem 1rem; }
  .final-form button { width: 100%; padding: 0.85rem; }
}

/* ============================================================
   narrative refinement pass
   ============================================================ */
h1.hero em,
h2.section-title em,
.final-cta h2 em {
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  color: var(--accent);
}
.story-section h2.section-title em { color: oklch(87% 0.08 65); }

.signal-board {
  display: grid;
  min-height: 390px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: minmax(112px, auto) minmax(118px, auto) minmax(112px, auto);
  isolation: isolate;
  gap: 0.95rem;
  align-items: stretch;
}
.context-core {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: stretch;
  justify-self: stretch;
  position: relative;
  display: flex;
  flex-direction: column;
  place-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.2rem 1.4rem;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 20%, oklch(100% 0.006 320), transparent 42%),
    linear-gradient(100deg, oklch(98.5% 0.009 320), oklch(95.5% 0.032 305), oklch(98.5% 0.009 320)),
    var(--bg);
  border: 1px solid oklch(54% 0.16 305 / 0.18);
  box-shadow: 0 20px 48px -34px oklch(30% 0.1 315 / 0.34);
  z-index: 3;
  overflow: hidden;
}
.context-core::before,
.context-core::after {
  content: "";
  position: absolute;
  top: 50%;
  width: min(42%, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: url("/images/signal-cover-reading.webp") center / cover no-repeat;
  opacity: 0.36;
  transform: translateY(-50%);
  pointer-events: none;
}
.context-core::before { left: min(-8vw, -86px); }
.context-core::after {
  right: min(-8vw, -86px);
  transform: translateY(-50%) scaleX(-1);
}
.context-core > * {
  position: relative;
  z-index: 1;
}
.context-core span,
.context-core strong {
  display: block;
}
.context-core span {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-family: var(--sans);
}
.context-core strong {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.25vw, 2.2rem);
  line-height: 1.05;
  font-weight: 500;
  color: var(--ink-strong);
}
.signal-card {
  z-index: 2;
  min-height: 0;
  transform: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.28rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  text-align: left;
  font-style: normal;
  box-shadow: 0 18px 38px -26px oklch(30% 0.1 315 / 0.32);
  overflow: hidden;
  padding-right: clamp(4.5rem, 7vw, 6rem);
}
.signal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, oklch(99% 0.006 320 / 0.99) 0%, oklch(98% 0.008 320 / 0.95) 54%, oklch(98% 0.008 320 / 0.5) 78%, transparent 100%);
}
.signal-card::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: clamp(96px, 42%, 156px);
  border-radius: 0 18px 18px 0;
  background: var(--signal-cover) center / cover no-repeat;
  opacity: 0.58;
  mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
  pointer-events: none;
}
.signal-card strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.08rem;
  line-height: 1.05;
  color: var(--ink-strong);
}
.signal-card small {
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.25;
  color: var(--ink-soft);
}
.signal-dot {
  position: relative;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px oklch(54% 0.16 305 / 0.1);
  margin-bottom: 0.28rem;
}
.signal-food {
  grid-column: 1 / span 2 !important;
  grid-row: 1;
  --signal-cover: url("/images/signal-cover-food.webp");
}
.signal-notes {
  grid-column: 3 / span 2 !important;
  grid-row: 1;
  --signal-cover: url("/images/signal-cover-notes.webp");
}
.signal-glucose {
  grid-column: 5 / span 2 !important;
  grid-row: 1;
  --signal-cover: url("/images/signal-cover-glucose.webp");
}
.signal-activity {
  grid-column: 1 / span 3 !important;
  grid-row: 3;
  --signal-cover: url("/images/signal-cover-activity.webp");
}
.signal-insulin {
  grid-column: 4 / span 3 !important;
  grid-row: 3;
  --signal-cover: url("/images/signal-cover-insulin.webp");
}

.story-grid {
  grid-template-columns: 0.5fr 0.88fr 0.62fr;
  align-items: center;
}
.story-copy { min-width: 0; }
.story-visual {
  display: grid;
  place-items: center;
}
.story-sheet {
  width: min(100%, 320px);
  transform: rotate(2deg);
  padding: 1.35rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, oklch(98% 0.008 320 / 0.95), oklch(92% 0.025 305 / 0.88));
  color: var(--ink);
  box-shadow: 0 30px 70px -32px oklch(0% 0 0 / 0.56);
}
.sheet-label {
  display: block;
  margin-bottom: 1rem;
  color: var(--accent-deep);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
.sheet-row {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.8rem;
  padding-block: 0.7rem;
  border-top: 1px solid oklch(54% 0.16 305 / 0.16);
}
.sheet-row span {
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.sheet-row strong {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink-strong);
}
.story-sheet p {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.5;
}

.audience-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.audience-visual {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  perspective: 2200px;
}
.audience-visual::before {
  content: "";
  position: absolute;
  width: 110%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 52%, var(--accent-soft), transparent 66%),
    radial-gradient(circle at 25% 74%, oklch(72% 0.14 165 / 0.2), transparent 34%);
  filter: blur(18px);
}
.audience-visual .phone {
  max-width: 245px;
  transform: rotateY(-10deg) rotateZ(-2deg);
}
.audience-badge {
  position: absolute;
  padding: 0.48rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: oklch(98% 0.005 320 / 0.88);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  color: var(--ink-strong);
  font-size: 0.8rem;
}
.badge-a { left: 2%; top: 22%; }
.badge-b { right: 0; top: 38%; }
.badge-c { left: 12%; bottom: 24%; }

.insight-device {
  min-height: 620px;
}
.insight-device .phone {
  max-width: 340px;
  transform: rotateY(8deg) rotateZ(-1.5deg);
}
.insight-card { display: none; }

.privacy-visual {
  position: relative;
  margin-top: 2rem;
  min-height: 210px;
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 1.2rem;
}
.privacy-phone {
  aspect-ratio: 0.72;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 22%, var(--accent-soft), transparent 48%),
    var(--bg);
  box-shadow: var(--shadow-md);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.35rem;
}
.privacy-lock {
  width: 2.8rem;
  height: 2.3rem;
  border: 2px solid var(--accent);
  border-radius: 0.7rem;
  position: relative;
}
.privacy-lock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1.45rem;
  width: 1.8rem;
  height: 1.65rem;
  border: 2px solid var(--accent);
  border-bottom: 0;
  border-radius: 1rem 1rem 0 0;
  transform: translateX(-50%);
}
.privacy-phone strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink-strong);
}
.privacy-phone small,
.privacy-flow span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}
.privacy-flow {
  display: grid;
  gap: 0.7rem;
}
.privacy-flow span {
  width: fit-content;
  padding: 0.52rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.privacy-flow span:nth-child(2) { margin-left: 1.8rem; }
.privacy-flow span:nth-child(3) { margin-left: 0.7rem; }

.faq-answer {
  overflow: hidden;
  height: auto;
}
.faq-list details:not([open]) .faq-answer {
  height: 0;
}
.faq-list details.is-animating .faq-answer {
  transition: height 360ms var(--ease-out-quart), opacity 240ms var(--ease-out-quart);
}
.faq-list details[open] summary {
  color: var(--accent-deep);
}
.faq-list p {
  padding: 0 0 1.35rem;
}

@media (max-width: 960px) {
  .signal-board {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: auto;
    gap: 0.8rem;
    padding-top: 0;
  }
  .context-core {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    margin-inline: auto;
    margin-bottom: 0.6rem;
  }
  .signal-card,
  .signal-card:nth-child(n) {
    grid-column: auto !important;
    grid-row: auto;
    transform: none;
  }
  .story-grid,
  .audience-layout {
    grid-template-columns: 1fr;
  }
  .story-visual {
    justify-content: start;
  }
  .audience-visual {
    min-height: 420px;
  }
  .privacy-visual {
    max-width: 420px;
  }
}

@media (max-width: 560px) {
  .story-sheet {
    transform: none;
  }
  .audience-visual {
    min-height: 360px;
  }
  .audience-visual .phone {
    max-width: 190px;
  }
  .audience-badge {
    font-size: 0.74rem;
  }
  .insight-device {
    min-height: 470px;
  }
  .insight-device .phone {
    max-width: 245px;
    transform: none;
  }
  .privacy-visual {
    grid-template-columns: 120px 1fr;
    min-height: 170px;
  }
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
  }
  .reveal, .reveal-stagger > *, .reveal-words .word > span { transform: none; }
  .phone, .hero-phone, .final-stage .phone { animation: none; transform: none !important; }
  .closure-stage .phone { clip-path: none; }
  .howto-step .phone-wrap { transform: none !important; }
}

/* ============================================================
   Legal pages — terms / privacy / medical-disclaimer
   ============================================================ */
.legal-body { background: var(--bg); }

.legal-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.legal-skip:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--ink-strong);
  color: var(--bg);
  border-radius: 999px;
  z-index: 100;
  font-size: 0.85rem;
}

.legal-page {
  /* env() respects iPhone notch / safe-area so the title clears the fixed navbar */
  padding-top: calc(env(safe-area-inset-top, 0px) + clamp(5.5rem, 10vh, 7rem));
  padding-bottom: clamp(3rem, 8vh, 6rem);
}
.legal-container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.legal-header {
  max-width: 38rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.legal-back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  transition: color 220ms;
}
.legal-back:hover { color: var(--ink-strong); }

.legal-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
}

.legal-meta {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.legal-meta p { margin: 0 0 0.7rem; max-width: none; }
.legal-meta p:last-child { margin-bottom: 0; }
.legal-meta strong { color: var(--ink-strong); font-weight: 600; }
.legal-meta blockquote {
  margin: 1.5rem 0 0;
  padding: 1.1rem 1.3rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
  font-size: 0.95rem;
}
.legal-meta blockquote p { margin: 0; max-width: none; }

.legal-layout {
  display: grid;
  grid-template-columns: 18rem 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

/* TOC */
.legal-toc {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}
.legal-toc-title {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 600;
  margin: 0 0 1rem;
}
.legal-toc-nav { display: flex; flex-direction: column; gap: 0.4rem; }
.legal-toc-item {
  display: block;
  padding: 0.45rem 0.85rem 0.45rem 0.85rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--ink-soft);
  border-left: 2px solid transparent;
  transition: color 200ms, border-color 200ms, background 200ms;
  border-radius: 0 6px 6px 0;
}
.legal-toc-item:hover { color: var(--ink-strong); background: var(--bg-soft); }
.legal-toc-item.active { color: var(--accent-deep); border-left-color: var(--accent); }

/* Content prose */
.legal-content {
  max-width: 44rem;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
}
.legal-content > * + * { margin-top: 1rem; }
.legal-content h2 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 50;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  letter-spacing: -0.018em;
  line-height: 1.2;
  margin: 3.2rem 0 1rem;
  color: var(--ink-strong);
  scroll-margin-top: 5rem;
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 50;
  font-weight: 500;
  font-size: clamp(1.1rem, 1.55vw, 1.25rem);
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin: 2rem 0 0.7rem;
  color: var(--ink-strong);
  scroll-margin-top: 5rem;
}
.legal-content h4 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
  margin: 1.4rem 0 0.5rem;
  color: var(--ink-strong);
}
.legal-content p { max-width: none; margin: 0 0 1rem; }
.legal-content p:last-child { margin-bottom: 0; }

.legal-content ul, .legal-content ol { padding-left: 1.4rem; margin: 0.8rem 0; }
.legal-content li { margin: 0.35rem 0; }
.legal-content li > p { margin: 0; }
.legal-content li > ul, .legal-content li > ol { margin: 0.4rem 0; }

.legal-content strong { color: var(--ink-strong); font-weight: 600; }
.legal-content em { font-style: italic; }
.legal-content code {
  font-family: 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.12em 0.42em;
  background: var(--bg-soft);
  border-radius: 5px;
  color: var(--accent-deep);
}
.legal-content pre {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--ink);
}
.legal-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.legal-content a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-color: oklch(54% 0.16 305 / 0.35);
  text-underline-offset: 2px;
  transition: text-decoration-color 200ms;
}
.legal-content a:hover { text-decoration-color: var(--accent-deep); }

.legal-content blockquote {
  margin: 1.5rem 0;
  padding: 1.1rem 1.4rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
  font-size: 0.97rem;
}
.legal-content blockquote p { margin: 0; }
.legal-content blockquote strong { color: var(--accent-deep); }

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.legal-content thead { background: var(--bg-soft); }
.legal-content th, .legal-content td {
  padding: 0.7rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.legal-content th {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-strong);
}
.legal-content tr:last-child td { border-bottom: 0; }
.legal-content td p { margin: 0; }

.legal-content hr {
  border: 0;
  height: 1px;
  background: var(--line-soft);
  margin: 2.5rem 0;
}

.legal-divider { margin: 4rem 0 2rem !important; }

.legal-related {
  margin-top: 2rem;
  padding: 1.5rem 1.7rem;
  background: var(--bg-soft);
  border-radius: 16px;
}
.legal-related h3 {
  font-size: 1.1rem;
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-style: italic;
  font-variation-settings: "SOFT" 100;
  font-weight: 500;
  color: var(--accent-deep);
}
.legal-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.legal-related a {
  color: var(--ink-strong);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms;
}
.legal-related a:hover { border-bottom-color: var(--accent); }

@media (max-width: 900px) {
  /* Generous lateral breathing room — variable --gutter is too tight here */
  .legal-container { padding-inline: clamp(1.5rem, 6vw, 2.25rem); }

  /* Ensure no horizontal overflow at any viewport */
  .legal-body,
  .legal-page,
  .legal-container,
  .legal-content,
  .legal-meta,
  .legal-header,
  .legal-toc { overflow-x: hidden; }
  .legal-content,
  .legal-meta,
  .legal-toc { overflow-wrap: anywhere; }

  .legal-layout { grid-template-columns: 1fr; gap: 2rem; }

  .legal-header { margin-bottom: 2rem; }
  .legal-title {
    font-size: clamp(1.7rem, 7.5vw, 2.4rem);
    line-height: 1.1;
    word-break: normal;
    overflow-wrap: anywhere;
  }
  .legal-meta { font-size: 0.9rem; }
  .legal-meta a { word-break: break-all; }

  .legal-toc {
    position: static;
    max-height: none;
    background: var(--bg-soft);
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    overflow-y: visible;
  }
  .legal-toc-nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.3rem;
  }
  .legal-toc-item {
    display: block !important;
    width: 100%;
    border-left: 0;
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    line-height: 1.4;
  }
  .legal-toc-item.active {
    background: var(--bg);
    color: var(--accent-deep);
  }

  /* Tables become horizontally scrollable instead of expanding the layout */
  .legal-content table {
    display: block;
    overflow-x: auto;
    font-size: 0.88rem;
  }
}

@media (max-width: 560px) {
  .legal-content { font-size: 15.5px; }
  .legal-content h2 { font-size: 1.4rem; }
  .legal-content h3 { font-size: 1.05rem; }
  .legal-content pre { font-size: 0.78rem; }
  .legal-content code { word-break: break-all; }
}
