@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter+Tight:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --v2-bg: #F3EEE7;
  --v2-bg-deep: #EAE1D3;
  --v2-surface: #FFFDF9;
  --v2-surface-sunk: #F6F0E7;
  --v2-ink: #1B1A24;
  --v2-ink-2: #5B556A;
  --v2-ink-3: #948EA0;
  --v2-hair: rgba(27, 26, 36, .07);
  --v2-hair-2: rgba(27, 26, 36, .12);

  --v2-primary: #5B57E8;
  --v2-primary-600: #4A46D4;
  --v2-primary-soft: #E4E1FF;
  --v2-primary-tint: #F1EFFF;

  --v2-peach: #F5A27A;
  --v2-peach-soft: #FCE3D2;
  --v2-sage: #7FA78A;
  --v2-sage-soft: #DBE8DC;
  --v2-rose: #E4708C;
  --v2-rose-soft: #F7D6DF;
  --v2-saffron: #E0A24A;
  --v2-saffron-soft: #F6E3C4;

  --v2-success: #5A9A6E;

  --v2-glass: rgba(255, 253, 249, .72);
  --v2-glass-bd: rgba(255, 255, 255, .7);

  --v2-sh-1: 0 1px 2px rgba(27,26,36,.05), 0 4px 14px rgba(27,26,36,.06);
  --v2-sh-2: 0 2px 4px rgba(27,26,36,.06), 0 12px 32px rgba(27,26,36,.08);
  --v2-sh-hero: 0 2px 4px rgba(27,26,36,.06), 0 20px 48px rgba(91,87,232,.14), 0 40px 80px rgba(27,26,36,.08);

  --v2-r-chip: 12px;
  --v2-r-row: 18px;
  --v2-r-card: 24px;
  --v2-r-hero: 28px;
  --v2-r-pill: 999px;

  --v2-serif: "Instrument Serif", "Cormorant Garamond", ui-serif, Georgia, serif;
  --v2-sans: "Inter Tight", "DM Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --v2-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--v2-bg);
  color: var(--v2-ink);
  font-family: var(--v2-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(70% 50% at 12% 0%, #FDE9D5 0%, transparent 55%),
    radial-gradient(60% 45% at 95% 8%, #E4E1FF 0%, transparent 55%),
    radial-gradient(80% 60% at 50% 110%, var(--v2-bg-deep) 0%, transparent 60%),
    var(--v2-bg);
  min-height: 100vh;
}

a { color: inherit; }

/* ── Layout shell ─────────────────────────────────────── */
.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 64px;
}

/* ── Top nav (glass pill) ─────────────────────────────── */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px 10px 22px;
  border-radius: var(--v2-r-pill);
  background: var(--v2-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--v2-glass-bd);
  box-shadow: var(--v2-sh-1);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--v2-ink);
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, #8B87FF 0%, var(--v2-primary) 50%, var(--v2-peach) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 5px;
  background: rgba(255,255,255,.35);
  mix-blend-mode: overlay;
}
.brand-name {
  font-family: var(--v2-serif);
  font-size: 22px;
  letter-spacing: -.01em;
  line-height: 1;
}
.brand-name em { font-style: italic; color: var(--v2-primary); }

.nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav a {
  text-decoration: none;
  color: var(--v2-ink-2);
  padding: 8px 14px;
  border-radius: var(--v2-r-pill);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.nav a:hover { color: var(--v2-ink); background: rgba(27,26,36,.04); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--v2-r-pill);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform .12s ease, box-shadow .15s;
}
.btn-primary {
  background: linear-gradient(180deg, #6D69F0 0%, var(--v2-primary) 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(74,70,212,.3), 0 10px 22px rgba(74,70,212,.28), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  color: var(--v2-ink);
  background: var(--v2-surface);
  border: 1px solid var(--v2-hair-2);
}
.btn-ghost:hover { background: var(--v2-surface-sunk); }
.btn-lg { padding: 14px 22px; font-size: 15px; }

/* ── Section primitives ───────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--v2-ink-3);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 3px;
  background: var(--v2-primary);
}
.serif {
  font-family: var(--v2-serif);
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.05;
}
.serif em { font-style: italic; color: var(--v2-primary); }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 36px;
  align-items: center;
  margin-top: 64px;
  margin-bottom: 88px;
}
.hero-copy h1 {
  font-family: var(--v2-serif);
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 14px 0 28px;
  font-weight: 400;
  text-wrap: balance;
  padding-bottom: 4px;
}
.hero-copy h1 em { font-style: italic; color: var(--v2-primary); }
.hero-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--v2-ink-2);
  max-width: 52ch;
  margin: 0 0 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.hero-meta {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--v2-ink-3);
  font-size: 13px;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-meta .bullet {
  width: 4px; height: 4px; border-radius: 2px; background: var(--v2-ink-3);
}

/* ── Phone mockup ─────────────────────────────────────── */
.phone {
  width: 360px;
  height: 740px;
  border-radius: 48px;
  background: #14131B;
  padding: 9px;
  box-shadow: 0 40px 80px rgba(27,26,36,.18), 0 0 0 1px rgba(0,0,0,.08), 0 20px 48px rgba(91,87,232,.14);
  position: relative;
  margin: 0 auto;
}
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 40px;
  overflow: hidden;
  background: var(--v2-bg);
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 60% at 20% 0%, #FDE9D5 0%, transparent 55%),
    radial-gradient(70% 50% at 100% 30%, #E4E1FF 0%, transparent 55%),
    radial-gradient(90% 70% at 50% 110%, var(--v2-bg-deep) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.island {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 30px;
  border-radius: 22px;
  background: #000;
  z-index: 40;
}
.status {
  display: flex; justify-content: space-between;
  padding: 16px 26px 6px;
  font-size: 13px; font-weight: 600;
  position: relative; z-index: 5;
}

/* ── Section ──────────────────────────────────────────── */
.section {
  margin-top: 120px;
  scroll-margin-top: 90px;
}
.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}
.section-head h2 {
  font-family: var(--v2-serif);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.15;
  letter-spacing: -.015em;
  font-weight: 400;
  margin: 12px 0 22px;
  text-wrap: balance;
  padding-bottom: 4px;
}
.section-head h2 em { font-style: italic; color: var(--v2-primary); }
.section-head p {
  font-size: 17px;
  color: var(--v2-ink-2);
  line-height: 1.55;
  max-width: 60ch;
  margin: 0;
}

/* ── Feature row ──────────────────────────────────────── */
.feature {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-top: 1px solid var(--v2-hair);
}
.feature:nth-child(even) {
  grid-template-columns: 380px 1fr;
}
.feature:nth-child(even) .feature-copy { order: 2; }
.feature:nth-child(even) .feature-vis  { order: 1; }

.feature-copy h3 {
  font-family: var(--v2-serif);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.18;
  letter-spacing: -.015em;
  font-weight: 400;
  margin: 12px 0 18px;
  text-wrap: balance;
  padding-bottom: 2px;
}
.feature-copy h3 em { font-style: italic; color: var(--v2-primary); }
.feature-copy .lede {
  font-size: 17px;
  color: var(--v2-ink-2);
  line-height: 1.55;
  max-width: 52ch;
  margin: 0 0 24px;
}

/* ── How-to steps ─────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--v2-r-row);
  background: var(--v2-surface);
  box-shadow: var(--v2-sh-1);
}
.step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 14px;
  background: var(--v2-primary-tint);
  color: var(--v2-primary);
  font-family: var(--v2-mono);
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.step-body strong {
  font-weight: 600;
  display: block;
  font-size: 15px;
  color: var(--v2-ink);
  margin-bottom: 2px;
}
.step-body span {
  font-size: 13.5px;
  color: var(--v2-ink-2);
  line-height: 1.5;
}

/* ── Tag chips ────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
}
.tag {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--v2-r-chip);
  background: var(--v2-surface-sunk);
  color: var(--v2-ink-2);
  letter-spacing: .02em;
}
.tag-primary { background: var(--v2-primary-soft); color: var(--v2-primary-600); }
.tag-peach   { background: var(--v2-peach-soft);   color: #8C4A22; }
.tag-sage    { background: var(--v2-sage-soft);    color: #2F5A3D; }
.tag-rose    { background: var(--v2-rose-soft);    color: #93304B; }
.tag-saffron { background: var(--v2-saffron-soft); color: #7B4E16; }

/* ── Mini card / vis ──────────────────────────────────── */
.vis-card {
  background: var(--v2-surface);
  border-radius: var(--v2-r-hero);
  box-shadow: var(--v2-sh-hero);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.vis-card.tinted-peach {
  background: linear-gradient(160deg, var(--v2-peach-soft) 0%, var(--v2-surface) 60%);
}
.vis-card.tinted-sage {
  background: linear-gradient(160deg, var(--v2-sage-soft) 0%, var(--v2-surface) 60%);
}
.vis-card.tinted-rose {
  background: linear-gradient(160deg, var(--v2-rose-soft) 0%, var(--v2-surface) 60%);
}
.vis-card.tinted-primary {
  background: linear-gradient(160deg, var(--v2-primary-soft) 0%, var(--v2-surface) 60%);
}
.vis-card.tinted-saffron {
  background: linear-gradient(160deg, var(--v2-saffron-soft) 0%, var(--v2-surface) 60%);
}

/* ── Today ring (hero vis) ────────────────────────────── */
.ring-wrap { display: flex; align-items: center; gap: 18px; }
.ring-num {
  font-family: var(--v2-serif);
  font-size: 56px;
  line-height: 1;
}
.ring-num small {
  font-size: 24px;
  color: var(--v2-ink-3);
}

/* ── Calendar grid mini ───────────────────────────────── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 14px;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--v2-surface-sunk);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 4px 5px;
  font-size: 10px;
  color: var(--v2-ink-3);
  font-weight: 600;
  position: relative;
}
.cal-cell.has::after {
  content: "";
  position: absolute;
  bottom: 5px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 2px;
  background: var(--v2-primary);
}
.cal-cell.has.peach::after { background: var(--v2-peach); }
.cal-cell.has.sage::after  { background: var(--v2-sage); }
.cal-cell.today {
  background: var(--v2-ink);
  color: #fff;
}

/* ── Lists mini ───────────────────────────────────────── */
.list-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  font-size: 14px;
}
.list-row + .list-row { border-top: 1px solid var(--v2-hair); }
.check {
  width: 18px; height: 18px;
  border-radius: 9px;
  border: 2px solid var(--v2-hair-2);
  flex-shrink: 0;
}
.check.done {
  background: var(--v2-success);
  border-color: var(--v2-success);
  position: relative;
}
.check.done::after {
  content: "";
  position: absolute;
  inset: 3px 4px 4px 3px;
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
  width: 4px; height: 8px;
}
.list-row.done span {
  text-decoration: line-through;
  color: var(--v2-ink-3);
}

/* ── Meals mini ───────────────────────────────────────── */
.meal-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.meal {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--v2-r-row);
  background: var(--v2-surface);
  box-shadow: var(--v2-sh-1);
}
.meal-day {
  font-family: var(--v2-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--v2-ink-3);
  width: 32px;
}
.meal-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}
.meal-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--v2-ink-3);
}

/* ── Budget mini ──────────────────────────────────────── */
.budget-bar {
  height: 12px;
  border-radius: 6px;
  background: var(--v2-surface-sunk);
  overflow: hidden;
  margin-top: 8px;
  display: flex;
}
.budget-bar div { height: 100%; }
.budget-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 13px;
}
.budget-row + .budget-row { border-top: 1px solid var(--v2-hair); }
.budget-row .amt { font-family: var(--v2-mono); color: var(--v2-ink-2); }

/* ── Family roster mini ───────────────────────────────── */
.roster {
  display: flex; gap: 10px; margin-top: 12px;
  flex-wrap: wrap;
}
.avatar {
  width: 40px; height: 40px;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Privacy / footer ─────────────────────────────────── */
.callout {
  margin-top: 96px;
  padding: 56px;
  border-radius: var(--v2-r-hero);
  background:
    linear-gradient(160deg, rgba(91,87,232,.08) 0%, rgba(245,162,122,.06) 100%),
    var(--v2-surface);
  box-shadow: var(--v2-sh-hero);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  align-items: center;
}
.callout h2 {
  font-family: var(--v2-serif);
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.18;
  font-weight: 400;
  margin: 12px 0 20px;
  letter-spacing: -.01em;
  padding-bottom: 2px;
}
.callout h2 em { font-style: italic; color: var(--v2-primary); }
.callout p {
  color: var(--v2-ink-2);
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 52ch;
}

.footer {
  margin-top: 80px;
  padding: 32px 0 0;
  border-top: 1px solid var(--v2-hair);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  color: var(--v2-ink-3);
  font-size: 13px;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--v2-ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--v2-ink); }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 980px) {
  .hero, .feature, .feature:nth-child(even), .callout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .feature:nth-child(even) .feature-copy { order: initial; }
  .feature:nth-child(even) .feature-vis  { order: initial; }
  .feature { padding: 36px 0; }
  .section { margin-top: 80px; }
  .nav { display: none; }
  .phone { width: 300px; height: 620px; }
  .callout { padding: 32px; }
}
@media (max-width: 520px) {
  .topbar { padding: 8px 8px 8px 16px; }
  .brand-name { font-size: 18px; }
  .btn { padding: 9px 14px; font-size: 13px; }
  .hero { margin-top: 36px; margin-bottom: 56px; }
  .hero-copy h1 { font-size: 44px; }
}

/* Universal Link auth callback fallback page */
.callback-shell {
  min-height: 60vh;
  display: grid;
  place-items: center;
  padding: 64px 16px;
}
.callback-card {
  max-width: 480px;
  width: 100%;
  background: var(--v2-surface, #ffffff);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-align: center;
}
.callback-card h1 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
}
.callback-card p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--v2-text-muted, #4a4a4f);
}
.callback-card .btn {
  margin: 8px 0 24px;
}
.callback-fineprint {
  font-size: 13px !important;
  color: var(--v2-text-faint, #8a8a8f) !important;
  margin: 12px 0 0 !important;
}
