/* ════════════════════════════════════════════════════════════
   Nourafit landing — token layer (authoritative: mobile/src/theme.ts)
   ════════════════════════════════════════════════════════════ */
:root {
  --bg: #FAF8F5; --surface: #FFFFFF; --surface-alt: #EEECEA;
  --brand: #1D9E75; --brand-dark: #0F6E56; --brand-light: #6DB89E; --brand-fill: #E1F5EE;
  --cal: #EF9F27; --cal-fill: #FFF8E1; --protein: #7F77DD; --protein-fill: #F0EDFF;
  --text: #2C2C2A; --text-2: #888780; --text-3: #B4B2A9;
  --border: #E8E6E1;
  --r-card: 16px; --r-bubble: 18px; --r-btn: 14px; --r-pill: 999px;
  --shadow-card: 0 2px 12px rgba(0,0,0,.08);
  --shadow-bubble: 0 1px 6px rgba(0,0,0,.06);
  --shadow-brand: 0 4px 16px rgba(29,158,117,.3);
  --grad-splash: linear-gradient(180deg,#FAF8F5 0%,#E8F0EB 40%,#D4EDE2 100%);
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* carb segment color (matches spec) */
  --carb: #85B7EB;

  /* error / negative state (waitlist form) */
  --negative: #A32D2D;
}

/* ════════════════════════════════════════════════════════════
   Reset / base
   ════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Paper grain — barely-there texture that keeps the cream from feeling flat */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* ════════════════════════════════════════════════════════════
   Nav
   ════════════════════════════════════════════════════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-cta {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-dark);
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--brand-light);
  transition: background .14s ease, color .14s ease;
}
.nav-cta:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.nav-cta:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
@media (max-width: 560px) { .nav-cta { display: none; } }
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-avatar {
  width: 38px;
  height: 38px;
  border-radius: 28%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--brand-fill);
  box-shadow: 0 2px 8px rgba(29,158,117,.25);
  animation: avatarFloat 4s ease-in-out infinite;
}
.nav-avatar img { width: 38px; height: 38px; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: var(--text);
  line-height: 1;
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ════════════════════════════════════════════════════════════
   Hero
   ════════════════════════════════════════════════════════════ */
.hero {
  background: var(--grad-splash);
  padding-top: clamp(48px, 8vw, 104px);
  padding-bottom: clamp(40px, 6vw, 80px);
  overflow: hidden;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 24px;
}
.hero-h1 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(40px, 7.4vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.025em;
  max-width: 13ch;
  color: var(--text);
}
.hero-serif {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--brand-dark);
}
.hero-sub {
  margin-top: 28px;
  max-width: 44ch;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.6;
  color: var(--text-2);
}

/* Asymmetric editorial hero on wide screens */
@media (min-width: 1000px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 56px;
  }
  .hero-copy { align-items: flex-start; flex: 1.15; }
  .hero-visual { flex: 1; min-width: 0; }
  .hero .phone-stage { margin-top: 0; }
  .hero .phone-frame { transform: rotate(-2deg); }
}

/* ── Signup form ── */
.signup {
  margin-top: 32px;
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 460px;
}
.signup-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  padding: 14px 22px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.signup-input::placeholder { color: var(--text-3); }
.signup-input:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(29,158,117,.15);
}
.signup-btn {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: var(--r-pill);
  padding: 14px 26px;
  background: linear-gradient(135deg, #1D9E75, #178A66);
  box-shadow: var(--shadow-brand);
  transition: transform .12s ease, filter .12s ease;
}
.signup-btn:hover { filter: brightness(1.04); }
.signup-btn:active { transform: translateY(1px); }
.signup-btn:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
}
.signup-micro {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
  max-width: 42ch;
}

/* ════════════════════════════════════════════════════════════
   Phone frame + chat demo
   ════════════════════════════════════════════════════════════ */
.phone-stage {
  position: relative;
  margin-top: 56px;
  display: flex;
  justify-content: center;
  width: 100%;
  /* clip the decorative glow so it never causes page overflow on narrow screens */
  overflow: hidden;
  padding-block: 40px;
}
.phone-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 560px;
  height: 560px;
  max-width: 130vw;
  max-height: 130vw;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(29,158,117,.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.phone-frame {
  position: relative;
  z-index: 1;
  width: 320px;
  height: 650px;
  max-width: calc(100vw - 48px);
  background: var(--bg);
  border: 8px solid #2C2C2A;
  border-radius: 44px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(15, 110, 86, 0.18), 0 8px 24px rgba(0,0,0,0.12);
}

.phone-statusbar {
  position: relative;
  height: 30px;
  background: var(--surface);
  flex-shrink: 0;
}
.phone-notch {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 14px;
  border-radius: 10px;
  background: #2C2C2A;
}

.phone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.phone-avatar {
  width: 34px;
  height: 34px;
  border-radius: 28%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--brand-fill);
  box-shadow: 0 2px 8px rgba(29,158,117,.25);
  flex-shrink: 0;
}
.phone-avatar img { width: 34px; height: 34px; }
.phone-avatar--float { animation: avatarFloat 4s ease-in-out infinite; }
.phone-header-text { display: flex; flex-direction: column; }
.phone-header-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.phone-header-tag {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.2;
}

/* Demo thread — reserve ~420px to avoid layout shift when Task 4 animates */
.demo-thread {
  flex: 1;
  min-height: 420px;
  background: var(--bg);
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

/* ════════════════════════════════════════════════════════════
   Chat components (reusable — Tasks 4 & 5 reuse these)
   ════════════════════════════════════════════════════════════ */
.msg-row { display: flex; gap: 8px; }
.msg-row--coach { justify-content: flex-start; }
.msg-row--user { justify-content: flex-end; }

.coach-avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--brand-fill);
  box-shadow: 0 2px 4px rgba(29,158,117,.2);
  flex-shrink: 0;
}
.coach-avatar img { width: 28px; height: 28px; }
.coach-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 85%;
}

/* Coach bubble — white, 4px top-left cut */
.bubble-coach {
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  line-height: 22px;
  padding: 12px 15px;
  border-radius: var(--r-bubble);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow-bubble);
}

/* User bubble — brand bg, white text, 4px bottom-right cut */
.bubble-user {
  max-width: 78%;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  line-height: 22px;
  padding: 12px 15px;
  border-radius: var(--r-bubble);
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 6px rgba(15,110,86,.2);
}
.bubble-user--photo { padding: 6px; }
.meal-photo {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
}

/* Meal card — white, r-card, macro bar */
.meal-card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 14px 14px 12px;
}
.meal-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.meal-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.meal-card-cal {
  font-size: 15px;
  font-weight: 800;
  color: var(--cal);
  flex-shrink: 0;
}
.macro-bar {
  height: 6px;
  border-radius: 3px;
  display: flex;
  gap: 2px;
  overflow: hidden;
  background: var(--surface-alt);
}
.macro-seg { height: 6px; border-radius: 3px; }
.macro-seg--protein { background: var(--protein); }
.macro-seg--carb { background: var(--cal); }
.macro-seg--fat { background: var(--carb); }
.macro-legend {
  display: flex;
  gap: 14px;
  margin-top: 8px;
}
.macro-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot--protein { background: var(--protein); }
.dot--carb { background: var(--cal); }
.dot--fat { background: var(--carb); }

/* Weight card — mirrors the app's compact trend chart */
.weight-card {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 13px 14px 10px;
  min-width: 220px;
}
.weight-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.weight-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.weight-card-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-dark);
}
.weight-spark {
  width: 100%;
  height: 56px;
}
.weight-grid {
  fill: none;
  stroke: #F0EDE6;
  stroke-width: 1;
}
.weight-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 4;
  stroke-linecap: round;
}
.weight-dot {
  fill: var(--brand);
  stroke: #fff;
  stroke-width: 3;
}

/* Notification card — white, 14px radius, leading 30px avatar, timestamp */
.notif-card {
  display: flex;
  gap: 10px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 12px 14px;
}
.notif-avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--brand-fill);
}
.notif-avatar img { width: 30px; height: 30px; }
.notif-body { flex: 1; min-width: 0; }
.notif-text {
  font-size: 13.5px;
  line-height: 20px;
  color: var(--text);
}
.notif-time {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
}

/* ════════════════════════════════════════════════════════════
   Sections (placeholders for later tasks)
   ════════════════════════════════════════════════════════════ */
.section {
  padding-block: clamp(88px, 12vw, 144px);
  overflow-x: clip;
}
/* Single tinted accent section (the moat) — everything else stays cream */
.section--tint {
  background: linear-gradient(180deg, rgba(225,245,238,0) 0%, rgba(225,245,238,.55) 18%, rgba(225,245,238,.55) 82%, rgba(225,245,238,0) 100%);
}
.section-head { max-width: 720px; }
.sec-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.section-h2 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 18ch;
  color: var(--text);
  overflow-wrap: break-word;
}
.section-h2 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--brand-dark);
}
/* Shared subheading / caption type */
.section-sub {
  margin-top: 12px;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.5;
  color: var(--text-2);
}
.section-caption {
  margin-top: 36px;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(17px, 2.4vw, 21px);
  line-height: 1.5;
  color: var(--brand-dark);
  max-width: 40ch;
  margin-inline: auto;
}

/* ════════════════════════════════════════════════════════════
   How it works — three steps
   ════════════════════════════════════════════════════════════ */
.steps {
  margin-top: 56px;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 64px);
}
.step { display: block; }
.step-no {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  color: var(--brand);
}
.step-title {
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.step-body {
  margin-top: 9px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 34ch;
}
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }
}

/* ════════════════════════════════════════════════════════════
   The whole picture — holistic split
   ════════════════════════════════════════════════════════════ */
.whole-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}
@media (min-width: 900px) {
  .whole-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    gap: clamp(44px, 6vw, 76px);
  }
}
.whole-copy {
  max-width: 520px;
}
.mech-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.mech-item {
  display: flex;
  gap: 14px;
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.55;
  color: var(--text);
}
.mech-item b { color: var(--brand-dark); font-weight: 700; }
.mech-mark { color: var(--brand); font-weight: 700; flex-shrink: 0; }
.whole-dashboard {
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  border: 1px solid rgba(232,230,225,.8);
}
.dashboard-top,
.chart-head,
.insight-card {
  display: flex;
  align-items: center;
}
.dashboard-top {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.dashboard-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}
.dashboard-title {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}
.dashboard-chip {
  flex-shrink: 0;
  border-radius: var(--r-pill);
  padding: 7px 11px;
  background: var(--brand-fill);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.metric-card,
.chart-card,
.mini-chart-card,
.insight-card {
  background: #FBFAF8;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.metric-card {
  padding: 12px;
}
.metric-label,
.chart-head span,
.mini-note {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
}
.metric-card strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}
.metric-card span:last-child {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-2);
}
.chart-card {
  margin-top: 10px;
  padding: 14px;
}
.chart-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.chart-head strong {
  font-size: 13px;
  color: var(--brand-dark);
}
.line-chart {
  width: 100%;
  height: 110px;
}
.chart-grid {
  fill: none;
  stroke: #F0EDE6;
  stroke-width: 1;
}
.chart-area {
  fill: rgba(29,158,117,.12);
}
.chart-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 4;
  stroke-linecap: round;
}
.chart-dot {
  fill: var(--brand);
  stroke: #fff;
  stroke-width: 4;
}
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.mini-chart-card {
  padding: 13px;
}
.bar-chart {
  height: 82px;
  display: flex;
  align-items: end;
  gap: 6px;
  padding-top: 8px;
}
.bar-chart span {
  flex: 1;
  min-width: 0;
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, var(--brand), var(--brand-light));
}
.sleep-meter {
  height: 10px;
  margin-top: 24px;
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  overflow: hidden;
}
.sleep-meter span {
  display: block;
  width: 58%;
  height: 100%;
  border-radius: inherit;
  background: var(--cal);
}
.mini-note {
  margin-top: 12px;
  color: var(--text-2);
}
.insight-card {
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
}
.insight-card p {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

/* ════════════════════════════════════════════════════════════
   "A day with Noura" — vertical timeline
   ════════════════════════════════════════════════════════════ */
.timeline {
  position: relative;
  max-width: 560px;
  margin: 48px auto 0;
  padding-left: 32px;
}
/* the 2px line */
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}
.moment {
  position: relative;
  padding-bottom: 48px;
}
.moment:last-child { padding-bottom: 0; }
/* brand-green dot on the line */
.moment::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--bg);
}
.moment-time {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}
.moment-card { display: block; }
.moment-seq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Notification sender label inside notif cards */
.notif-sender {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.notif-text strong { font-weight: 700; }

/* Smaller meal photo for timeline */
.meal-photo--sm { width: 120px; height: 120px; }

/* Weekly review chip — brand-fill background, brand-dark text */
.review-chip {
  background: var(--brand-fill);
  color: var(--brand-dark);
  border-radius: var(--r-card);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 21px;
}
.review-chip strong { font-weight: 700; }

/* Plan-review proposal card — the twice-monthly recalc + approve artifact */
.proposal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
}
.proposal-head { display: flex; gap: 10px; }
.proposal-head .notif-avatar { border-radius: 9px; }
.proposal-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--brand);
}
.proposal-lead {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.proposal-targets {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 13px 15px;
  background: var(--brand-fill);
  border-radius: 12px;
}
.proposal-target {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}
.pt-label { color: var(--text-2); font-weight: 600; }
.pt-change s { color: var(--text-3); }
.pt-change b { color: var(--brand-dark); font-weight: 800; }
.proposal-actions { margin-top: 14px; display: flex; gap: 10px; }
.proposal-approve {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1D9E75, #178A66);
  padding: 9px 18px;
  border-radius: var(--r-pill);
  box-shadow: 0 2px 8px rgba(29,158,117,.28);
}
.proposal-later {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
}

/* ════════════════════════════════════════════════════════════
   "She remembers you" — two-column memory comparison
   ════════════════════════════════════════════════════════════ */
.memory-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.memory-col { display: block; }
.memory-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 12px;
}
.memory-proof {
  margin: 26px auto 0;
  max-width: 680px;
  border: 1px solid rgba(29,158,117,.18);
  border-radius: var(--r-card);
  background:
    linear-gradient(135deg, rgba(255,255,255,.86), rgba(225,245,238,.74)),
    var(--surface);
  box-shadow: var(--shadow-card);
  padding: 18px;
}
.memory-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.memory-proof-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.memory-proof-grid span {
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(29,158,117,.12);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  padding: 10px 12px;
}

/* ════════════════════════════════════════════════════════════
   "Ask her anything" — single exchange
   ════════════════════════════════════════════════════════════ */
.ask-thread {
  max-width: 560px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ════════════════════════════════════════════════════════════
   Scroll reveals (Task 5)
   ════════════════════════════════════════════════════════════ */
.js .moment {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.moment.in { opacity: 1; transform: none; }

/* Generic reveal used by memory + ask sections */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* Children within a moment stagger in once the moment is revealed */
.js .reveal-child {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.moment.in .reveal-child { opacity: 1; transform: none; }
.moment.in .reveal-child:nth-child(1) { transition-delay: 0ms; }
.moment.in .reveal-child:nth-child(2) { transition-delay: 80ms; }
.moment.in .reveal-child:nth-child(3) { transition-delay: 160ms; }

/* Notification, review chip, and proposal cards slide from the top */
.notif-card--reveal,
.review-chip--reveal,
.proposal-card--reveal {
  transform: translateY(-12px);
}
.moment.in .notif-card--reveal,
.moment.in .review-chip--reveal,
.moment.in .proposal-card--reveal {
  transform: none;
}

/* ════════════════════════════════════════════════════════════
   Features — editorial numbered list, no cards, no icons
   ════════════════════════════════════════════════════════════ */
.feature-list {
  margin-top: 56px;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(40px, 6vw, 88px);
}
.feature-item {
  display: flex;
  gap: 22px;
  align-items: baseline;
  padding-block: 26px;
  border-top: 1px solid var(--border);
}
.feature-no {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 26px;
  line-height: 1;
  color: var(--brand);
  flex-shrink: 0;
  min-width: 38px;
}
.feature-title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.feature-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 36ch;
}

/* ════════════════════════════════════════════════════════════
   FAQ — honest answers
   ════════════════════════════════════════════════════════════ */
.faq-list {
  margin-top: 52px;
  max-width: 760px;
}
.faq-item {
  padding-block: 28px;
  border-top: 1px solid var(--border);
}
.faq-item:first-child { border-top: none; padding-top: 8px; }
.faq-q {
  font-family: var(--font-body);
  font-size: clamp(18px, 2.4vw, 22px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.faq-a {
  margin-top: 11px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 64ch;
}

/* ════════════════════════════════════════════════════════════
   Proof strip + repeat CTA (Task 6)
   ════════════════════════════════════════════════════════════ */
.proof-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.proof-line {
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 52ch;
}
.proof-line em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  color: var(--brand-dark);
}
.proof-cta-h2 {
  margin-top: 44px;
  text-align: center;
  max-width: none;
}
.signup--cta {
  margin-top: 28px;
}

/* ════════════════════════════════════════════════════════════
   Waitlist success card (Task 6)
   The submitted .signup is replaced in place by this card.
   ════════════════════════════════════════════════════════════ */
.signup-success {
  margin-top: 32px;
  width: 100%;
  max-width: 460px;
  background: var(--brand-fill);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* CTA-section instance centers itself like the form did */
.signup--cta.signup-success { align-self: center; }
.success-avatar {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(29,158,117,.25);
}
.success-avatar img { width: 44px; height: 44px; }
.success-head {
  margin-top: 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1.2;
}
.success-line {
  margin-top: 6px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--brand-dark);
  max-width: 32ch;
}
.share-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  padding: 9px 15px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-bubble);
}
.share-btn:active { transform: translateY(0); }
.share-btn:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
}
.share-btn svg { display: block; }

/* ── Inline form error message ── */
.signup-error {
  margin-top: 10px;
  width: 100%;
  max-width: 460px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--negative, #A32D2D);
  text-align: left;
}
.signup--cta ~ .signup-error,
.proof-inner .signup-error { text-align: center; }

/* ════════════════════════════════════════════════════════════
   Legal page (privacy.html)
   ════════════════════════════════════════════════════════════ */
.legal { max-width: 640px; }
.legal-body {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-2);
}
.legal-body a { color: var(--brand); }
.legal-body a:hover { text-decoration: underline; }
.legal-back {
  margin-top: 28px;
  font-size: 15px;
  font-weight: 600;
}
.legal-back a { color: var(--brand); }
.legal-back a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════════
   Footer
   ════════════════════════════════════════════════════════════ */
.footer {
  padding-block: 64px 48px;
  background: var(--brand-dark);
  color: #E9F4EF;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.footer-wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 1;
  color: #E9F4EF;
  opacity: .95;
}
.footer p,
.footer-line {
  font-size: 13.5px;
  color: rgba(233, 244, 239, 0.72);
}
.footer-line a {
  color: rgba(233, 244, 239, 0.9);
  transition: color .12s ease;
}
.footer-line a:hover { color: #fff; text-decoration: underline; }
.footer-line a:focus-visible {
  outline: 2px solid #E9F4EF;
  outline-offset: 2px;
}
.footer-dot { color: rgba(233, 244, 239, 0.5); margin-inline: 4px; }

/* ════════════════════════════════════════════════════════════
   Responsive (mobile-first; rules above target small screens)
   ════════════════════════════════════════════════════════════ */
@media (min-width: 641px) {
  .hero { padding-top: 72px; padding-bottom: 96px; }
  .signup-input { font-size: 17px; }
}

/* Feature list: 2-col desktop → 1-col mobile */
@media (max-width: 720px) {
  .feature-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .memory-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .container { padding-inline: 18px; }
  .signup { flex-direction: column; }
  .signup-btn { padding: 14px 26px; }
}

@media (max-width: 560px) {
  .hero {
    padding-top: 42px;
  }
  .hero-h1 {
    font-size: 34px;
    max-width: 11.5ch;
    letter-spacing: 0;
  }
  .hero-sub {
    max-width: 28ch;
  }
  .signup {
    flex-direction: column;
    max-width: 280px;
  }
  .signup-btn {
    width: 100%;
  }
  .signup-micro {
    max-width: 28ch;
    text-align: center;
  }
  .phone-stage {
    margin-top: 34px;
    padding-block: 26px;
  }
  .phone-frame {
    width: min(270px, calc(100vw - 72px));
    height: 560px;
    border-width: 7px;
    border-radius: 38px;
  }
  .meal-photo {
    width: 158px;
    height: 158px;
  }
  .meal-photo--sm {
    width: 118px;
    height: 118px;
  }
  .memory-proof-grid {
    grid-template-columns: 1fr;
  }
  .section-h2 {
    font-size: 30px;
    max-width: 11.5ch;
    letter-spacing: 0;
  }
  .section-h2 em {
    display: block;
  }
  .section-sub,
  .step-body,
  .feature-body,
  .faq-a {
    max-width: 32ch;
  }
  .steps,
  .timeline,
  .memory-grid,
  .memory-proof,
  .whole-grid,
  .ask-thread,
  .feature-list,
  .faq-list {
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }
  .timeline {
    padding-left: 24px;
  }
  .timeline::before {
    left: 4px;
  }
  .moment::before {
    left: -25px;
  }
  .coach-stack {
    max-width: calc(100% - 36px);
  }
  .bubble-user {
    max-width: 88%;
  }
  .proposal-card {
    padding: 14px;
  }
  .proposal-head {
    align-items: flex-start;
  }
  .proposal-target {
    align-items: flex-start;
    gap: 8px;
  }
  .proposal-actions {
    flex-wrap: wrap;
  }
}

/* ════════════════════════════════════════════════════════════
   Hero chat demo animation (Task 4)
   ════════════════════════════════════════════════════════════ */
/* Thread behaves like a real chat: newest pinned to bottom, oldest
   scrolls out of view inside the clipped frame (no layout shift). */
.demo-thread {
  justify-content: flex-end;
}

/* Each message enters from below, settling with a soft overshoot. */
.demo-enter {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
    transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.demo-enter--in {
  opacity: 1;
  transform: translateY(0);
}

/* Macro bar segments grow from 0 → final flex value. */
.meal-card .macro-seg {
  transition: flex 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Typing indicator: 3 staggered dots. */
.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 14px 15px;
}
.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typingBlink 1.2s ease-in-out infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBlink {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* Whole-thread fade before the loop restarts. */
.demo-thread--fading {
  transition: opacity 400ms ease;
  opacity: 0;
}

/* ════════════════════════════════════════════════════════════
   Reduced motion
   ════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .nav-avatar, .phone-avatar--float { animation: none !important; }

  /* Scroll reveals: show everything statically, no transforms. */
  .moment,
  .reveal,
  .reveal-child,
  .notif-card--reveal,
  .review-chip--reveal,
  .proposal-card--reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
