/* FamHQ marketing site — tokens mirror the app's default vibe
   (core frontend/src/ui/colors.js DEFAULT_COLORS + manifest theme_color). */
:root {
  --green: #2D6A4F;        /* primary */
  --green-2: #4A9B7F;      /* secondary */
  --green-deep: #1F4E3A;
  --paper: #F7F5F0;        /* bgPrimary */
  --sand: #E8E4DC;         /* bgSand */
  --cream: #FEFCF3;        /* bgSecondary */
  --ink: #1A1916;          /* textDark */
  --ink-2: #6B6860;        /* textSecondary */
  --ink-3: #A39F96;        /* textMuted */
  --coral: #D97B6F;        /* theme_color */
  --sun: #E9B949;
  --sky: #7E9CC4;
  --line: rgba(26, 25, 22, 0.09);

  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-item: 14px;
  --r-card: 22px;
  --shadow-item: 0 1px 6px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lift: 0 14px 34px rgba(31, 43, 36, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--cream); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

.wrap { width: min(1140px, calc(100% - 32px)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 32px)); margin-inline: auto; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(46px, 6.4vw, 80px); line-height: 0.98; }
h2 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.04; }
h3 { font-size: 24px; line-height: 1.15; }
h1 em, h2 em { font-style: italic; color: var(--green); }
p { margin: 0; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 34em; }
.eyebrow {
  font: 700 12px/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-2); display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 16px/1 var(--sans); text-decoration: none;
  padding: 15px 22px; border-radius: 999px;
  background: var(--green); color: var(--cream);
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.25);
  transition: transform .18s ease, background .18s ease;
}
.btn:hover { background: var(--green-deep); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px rgba(45, 106, 79, 0.35); }
.btn.ghost:hover { background: rgba(45, 106, 79, 0.07); }
.btn.small { padding: 11px 17px; font-size: 14px; }
.textlink { color: var(--green); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- header / footer ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 21px/1 var(--sans); letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; }
.navlinks { display: flex; align-items: center; gap: 26px; font-size: 15px; color: var(--ink-2); }
.navlinks a:not(.btn) { text-decoration: none; }
.navlinks a:not(.btn):hover { color: var(--green); }
.navlinks a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.footer { border-top: 1px solid var(--line); margin-top: 40px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding: 28px 0 40px; color: var(--ink-2); font-size: 14px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--green); text-decoration: underline; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { margin: 14px 0 14px; }
.section-head p { color: var(--ink-2); }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; padding: 40px 0 88px; }
.hero h1 { margin: 18px 0 22px; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
.hero .fine { margin-top: 16px; font-size: 14px; color: var(--ink-2); }

/* The fridge door — the site's one signature element. */
.door {
  position: relative; aspect-ratio: 1 / 1.02; border-radius: 30px;
  background:
    linear-gradient(100deg, rgba(255,255,255,.55), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, #ECE8E0, #DFDAD0);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), inset 0 -18px 40px rgba(0,0,0,.04), 0 30px 60px rgba(31, 43, 36, 0.12);
}
.door::before { /* handle */
  content: ""; position: absolute; left: 18px; top: 20%; width: 12px; height: 38%;
  border-radius: 8px; background: linear-gradient(90deg, #CFC9BD, #F4F1EA 60%, #D8D2C6);
  box-shadow: 0 3px 8px rgba(0,0,0,.12);
}
.note {
  position: absolute; background: var(--cream); border-radius: var(--r-card);
  box-shadow: var(--shadow-lift); padding: 18px 18px 16px; font-size: 13px;
  transform: rotate(var(--tilt, 0deg));
  animation: stick .7s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: var(--d, 0s);
}
.magnet {
  position: absolute; top: -9px; left: 50%; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.7), rgba(255,255,255,0) 45%), var(--m, var(--coral));
  box-shadow: 0 3px 5px rgba(0,0,0,.22);
}
.note .label { font: 700 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.note .title { font: 400 21px/1.1 var(--serif); margin: 0 0 12px; }

.n-week { top: 9%; left: 13%; width: 49%; --tilt: -1.5deg; --d: .1s; }
.ev { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-item); margin-top: 7px; border-left: 4px solid var(--c, var(--coral)); }
.ev span:first-child { font-size: 11px; color: var(--ink-2); font-weight: 600; }
.ev b { display: block; font-size: 13px; }
.ev small { color: var(--ink-2); font-size: 11.5px; }

.n-list { top: 7%; right: 6%; width: 30%; --tilt: 3deg; --d: .25s; --m: var(--green-2); }
.n-list ul { list-style: none; margin: 0; padding: 0; line-height: 26px;
  background-image: repeating-linear-gradient(180deg, transparent 0 25px, rgba(126,156,196,.35) 25px 26px); }
.n-list li::before { content: ""; display: inline-block; width: 11px; height: 11px; border-radius: 4px; border: 1.5px solid var(--ink-3); margin-right: 8px; vertical-align: -1px; }
.n-list li.done { color: var(--ink-3); text-decoration: line-through; }
.n-list li.done::before { background: var(--green-2); border-color: var(--green-2); }

.n-chore { bottom: 9%; left: 11%; width: 40%; --tilt: 2deg; --d: .4s; --m: var(--sun); }
.stars { display: grid; grid-template-columns: 48px repeat(5, 1fr); gap: 6px 4px; align-items: center; font-size: 11.5px; }
.stars i { height: 14px; border-radius: 5px; background: var(--sand); }
.stars i.on { background: var(--sun); }
.stars b { font-weight: 600; }

.n-dinner { bottom: 12%; right: 7%; width: 37%; --tilt: -3deg; --d: .55s; --m: var(--sky); text-align: center; }
.n-dinner .plate { font: 400 30px/1 var(--serif); margin: 4px 0 6px; }
.n-dinner p { color: var(--ink-2); font-size: 12px; }

.n-art { top: 44%; right: 12%; width: 14%; padding: 8px; --tilt: -7deg; --d: .7s; --m: var(--coral); background: #fff; border-radius: 6px; }
.n-art svg { width: 100%; height: auto; }

@keyframes stick {
  from { opacity: 0; transform: translateY(-18px) rotate(calc(var(--tilt, 0deg) * -1.6)) scale(1.04); }
  to   { opacity: 1; transform: rotate(var(--tilt, 0deg)); }
}

/* ---------- modules ---------- */
.modules { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.module { background: var(--cream); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 22px 20px; }
.module .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--green-2)); box-shadow: 0 2px 4px rgba(0,0,0,.18); }
.module h3 { font-size: 22px; margin: 16px 0 8px; }
.module p { color: var(--ink-2); font-size: 15px; line-height: 1.5; }

/* ---------- two-up rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.split .section-head { margin-bottom: 0; }
.stack { display: grid; gap: 10px; }
.row { background: var(--cream); border-radius: var(--r-item); box-shadow: var(--shadow-item); padding: 16px 18px; }
.row b { display: block; font-size: 16px; margin-bottom: 2px; }
.row span { color: var(--ink-2); font-size: 15px; }
.band { background: var(--sand); }

/* ---------- privacy promise ---------- */
.promise { background: var(--green); color: var(--cream); border-radius: 32px; padding: 64px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; }
.promise .eyebrow { color: #A8D5BF; }
.promise h2 em { color: #CDEBD9; }
.promise p { color: #D6E8DD; }
.promise .section-head { margin-bottom: 0; }
.promise ul { list-style: none; margin: 0; padding: 0; }
.promise li { padding: 16px 0; border-top: 1px solid rgba(254,252,243,.16); color: #D6E8DD; font-size: 16px; }
.promise li b { display: block; color: var(--cream); font-size: 17px; }
.promise .textlink { color: var(--cream); display: inline-block; margin-top: 22px; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.plan { background: var(--cream); border-radius: 26px; box-shadow: var(--shadow-card); padding: 34px; display: flex; flex-direction: column; }
.plan.alt { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.plan h3 { font-size: 28px; }
.price { font: 400 54px/1 var(--serif); margin: 18px 0 6px; }
.price small { font: 500 16px var(--sans); color: var(--ink-2); }
.plan .sub { color: var(--ink-2); font-size: 15px; }
.plan ul { margin: 22px 0 28px; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 15.5px; }
.plan li { padding-left: 26px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--green-2); border-bottom: 2px solid var(--green-2); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; align-self: flex-start; }

/* ---------- closing ---------- */
.closing { text-align: center; padding: 88px 0 72px; }
.closing h2 { margin: 14px 0 14px; }
.closing p { color: var(--ink-2); margin-bottom: 28px; }

/* ---------- document pages (privacy / terms / hosting) ---------- */
.doc-hero { padding: 56px 0 28px; }
.doc-hero h1 { font-size: clamp(42px, 6vw, 64px); margin: 14px 0 14px; }
.doc-hero .meta { color: var(--ink-2); font-size: 15px; }
.summary { background: var(--cream); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 26px 28px; margin: 12px 0 36px; }
.summary h2 { font-size: 26px; margin-bottom: 10px; }
.summary ul { margin: 0; padding-left: 20px; }
.summary li { margin: 6px 0; }
.toc { font-size: 15px; columns: 2; column-gap: 32px; padding-left: 20px; margin: 0 0 12px; color: var(--ink-2); }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--green); text-decoration: underline; }
.prose h2 { font-size: 30px; margin: 52px 0 12px; scroll-margin-top: 20px; }
.prose h3 { font: 700 17px/1.3 var(--sans); margin: 26px 0 8px; }
.prose p, .prose li { color: #3E3C37; }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--green); }
.prose code { font-size: 13.5px; background: var(--sand); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 14px 0; background: var(--cream); border-radius: var(--r-item); overflow: hidden; box-shadow: var(--shadow-item); }
.table th, .table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table th { font: 700 12px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); background: #F1EEE6; }
.table tr:last-child td { border-bottom: 0; }
.table .scope-row td { padding-bottom: 0; border-bottom: 0; }
.table .scope-row code { word-break: normal; overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; }
.callout { border-left: 4px solid var(--green-2); background: #EEF3EE; padding: 16px 18px; border-radius: 0 var(--r-item) var(--r-item) 0; margin: 18px 0; }
.callout p { color: #2F4A3D; }

/* ---------- waitlist ---------- */
.waitlist .signup { display: flex; gap: 10px; max-width: 480px; margin: 0 auto 16px; }
.signup input[type=email] {
  flex: 1; min-width: 0; font: 400 16px/1 var(--sans); color: var(--ink);
  padding: 15px 20px; border-radius: 999px; border: 1.5px solid rgba(45, 106, 79, 0.3); background: var(--cream);
}
.signup input[type=email]:focus { outline: 3px solid var(--coral); outline-offset: 2px; border-color: var(--green); }
.signup .btn { border: 0; cursor: pointer; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { display: none; }
.form-error:target { display: block; color: #9A3B30; background: #FBEDEA; border-radius: var(--r-item); padding: 12px 16px; max-width: 480px; margin: 0 auto 16px; }
.waitlist .fine { font-size: 14px; }
@media (max-width: 480px) { .waitlist .signup { flex-direction: column; } .signup .btn { justify-content: center; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-bottom: 64px; }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .split, .promise, .plans { grid-template-columns: 1fr; gap: 32px; }
  .promise { padding: 44px 32px; }
  .section { padding: 72px 0; }
}
@media (max-width: 720px) {
  .navlinks a:not(.btn) { display: none; }
  .door { aspect-ratio: auto; padding: 30px 18px 26px 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 14px; }
  .door::before { left: 14px; }
  .note { position: relative; inset: auto; width: auto; }
  .n-week { grid-column: 1 / -1; }
  .n-art { display: none; }
  .toc { columns: 1; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .lede { font-size: 17px; }
  .modules { grid-template-columns: 1fr; }
  .door { grid-template-columns: 1fr; }
  .plan { padding: 26px 22px; }
  .promise { padding: 36px 22px; border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
