/* ReciNook website — getrecinook.app
   Layout: editorial hero (serif headline left, phone right), then alternating
   feature rows that each show one real piece of the product, then a forest band to close. */
:root {
  /* Brand */
  --forest: #263B30;
  --forest-deep: #1B2B23;
  --sage: #728A70;
  --sand: #D6A77C;
  --ivory: #F8F6F1;
  --paper: #FFFDF9;

  /* Theme tokens (light) */
  --bg: #F8F6F1;
  --surface: #FFFDF9;
  --soft: #E7ECE5;
  --soft-sand: #F4E9DC;
  --fg: #262624;
  --muted: #5F5E57;
  --line: #E3DED2;
  --accent: #263B30;
  --accent-fg: #F8F6F1;
  --accent-ink: #263B30;
  --label: #4F6A4D;
  --band: #263B30;
  --band-fg: #F8F6F1;
  --band-muted: rgba(248, 246, 241, 0.78);
  --band-input: rgba(248, 246, 241, 0.1);
  --cta: #D6A77C;
  --cta-fg: #1B2B23;
  --danger: #A2453A;
  --shadow: 0 18px 40px rgba(27, 43, 35, 0.12);
  --phone-frame: #1B2B23;

  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius: 18px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131A16;
    --surface: #1B241F;
    --soft: #22302A;
    --soft-sand: #33291F;
    --fg: #EEEBE3;
    --muted: #AEACA3;
    --line: #2D3A33;
    --accent: #D6A77C;
    --accent-fg: #1B2B23;
    --accent-ink: #E2BE9C;
    --label: #A9C1A6;
    --band: #0E1411;
    --band-fg: #F8F6F1;
    --band-muted: rgba(248, 246, 241, 0.75);
    --band-input: rgba(248, 246, 241, 0.08);
    --danger: #E3907F;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    --phone-frame: #050806;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131A16;
  --surface: #1B241F;
  --soft: #22302A;
  --soft-sand: #33291F;
  --fg: #EEEBE3;
  --muted: #AEACA3;
  --line: #2D3A33;
  --accent: #D6A77C;
  --accent-fg: #1B2B23;
  --accent-ink: #E2BE9C;
  --label: #A9C1A6;
  --band: #0E1411;
  --band-fg: #F8F6F1;
  --band-muted: rgba(248, 246, 241, 0.75);
  --band-input: rgba(248, 246, 241, 0.08);
  --danger: #E3907F;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --phone-frame: #050806;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 12px; }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); line-height: 1.02; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.08; }
h3 { font-size: 1.45rem; line-height: 1.2; font-weight: 500; }
p { margin: 0; }
.eyebrow { font-size: 0.75rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 11; background: var(--bg); }
.nav { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.01em; }
.brand-mark { width: 32px; height: 32px; flex: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--fg); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--accent-fg);
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
.nav-links .btn { color: var(--accent-fg); }

/* Waitlist form */
.waitlist { display: flex; flex-wrap: wrap; gap: 10px; max-width: 470px; }
.waitlist input {
  flex: 1 1 220px; min-width: 0; min-height: 52px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--fg); font: inherit; font-size: 1rem;
}
.waitlist input::placeholder { color: var(--muted); }
.waitlist .btn { min-height: 52px; flex: 0 0 auto; }
.form-note { margin-top: 12px; font-size: 0.9rem; color: var(--muted); }
.form-status { margin-top: 12px; font-size: 0.95rem; font-weight: 500; }
.form-status:empty { display: none; }
.hero-copy .form-status, .hero-copy .form-note { margin-top: -10px; }
.form-status[data-state="ok"] { color: var(--label); }
.form-status[data-state="error"] { color: var(--danger); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hero */
.hero { padding-block: 56px 72px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--accent-ink); }
.sources { display: flex; flex-wrap: wrap; gap: 8px; }
.source {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 0.875rem; font-weight: 500;
}
.source svg { width: 15px; height: 15px; }
@media (max-width: 880px) {
  .hero { padding-block: 32px 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}

/* Phone mockup (drawn in HTML, uses the app's real UI) */
.stage { position: relative; display: flex; justify-content: center; padding-block: 8px 24px; }
.phone {
  width: 300px; max-width: 100%; aspect-ratio: 300 / 620;
  border-radius: 46px; padding: 10px;
  background: var(--phone-frame); box-shadow: var(--shadow);
  animation: rise 0.8s cubic-bezier(.2,.8,.2,1) both;
}
.screen {
  height: 100%; border-radius: 37px; overflow: hidden; position: relative;
  background: #F8F6F1; color: #262624; padding: 44px 16px 0; font-size: 12px; line-height: 1.35;
}
.screen .s-date { font-size: 8px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: #67665F; }
.screen .s-hello { font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1.05; letter-spacing: -0.02em; margin-top: 4px; }
.s-save { margin-top: 14px; background: #263B30; border-radius: 18px; padding: 14px; color: #F8F6F1; }
.s-save .s-k { font-size: 7.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #D6A77C; font-weight: 650; }
.s-save .s-t { font-family: var(--serif); font-weight: 600; font-size: 19px; margin-top: 4px; }
.s-save .s-b { display: flex; gap: 6px; margin-top: 10px; }
.s-save .s-b span { height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 10.5px; }
.s-save .s-b span:first-child { flex: 1; background: #D6A77C; color: #1B2B23; }
.s-save .s-b span:last-child { padding: 0 12px; background: rgba(248,246,241,0.14); }
.s-h { font-family: var(--serif); font-size: 15px; font-weight: 500; margin: 16px 0 8px; }
.s-row { display: flex; gap: 8px; }
.s-card { flex: 1; border-radius: 12px; overflow: hidden; background: #FFFDF9; box-shadow: 0 4px 10px rgba(27,43,35,0.07); }
.s-cover { height: 104px; position: relative; padding: 9px; display: flex; flex-direction: column; justify-content: flex-end; font-family: var(--serif); font-weight: 600; font-size: 13px; line-height: 1.12; }
.s-cover::before { content: ""; position: absolute; top: 9px; left: 9px; width: 55%; height: 10px; background: repeating-linear-gradient(to bottom, currentColor 0 2px, transparent 2px 5px); opacity: 0.3; }
.s-meta { padding: 5px 8px 7px; font-size: 8.5px; color: #67665F; }
.c-sand { background: #D6A77C; color: #1B2B23; }
.c-clay { background: #B9765C; color: #F8F6F1; }
.c-sage { background: #728A70; color: #F8F6F1; }
.c-forest { background: #263B30; color: #F8F6F1; }
.s-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; border-top: 1px solid #E6E1D6; background: rgba(248,246,241,0.96); display: flex; justify-content: space-around; padding-top: 9px; }
.s-tabs i { width: 17px; height: 17px; border-radius: 5px; border: 1.6px solid #67665F; }
.s-tabs i:first-child { border-color: #263B30; background: rgba(38,59,48,0.14); }

.float-card {
  position: absolute; right: max(0px, calc(50% - 250px)); bottom: 0; width: 230px;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow);
  animation: rise 0.8s 0.25s cubic-bezier(.2,.8,.2,1) both;
}
.float-card .fc-src { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 600; color: var(--label); }
.float-card .fc-title { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.2; margin-top: 4px; }
.float-card ul { list-style: none; margin: 10px 0 0; padding: 0; font-size: 0.82rem; }
.float-card li { display: grid; grid-template-columns: 62px 1fr; gap: 6px; padding: 5px 0; border-top: 1px solid var(--line); }
.float-card li b { font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .float-card { right: 0; width: 200px; } }
@keyframes rise { from { opacity: 0.001; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Sections */
.section { padding-block: 88px; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin-bottom: 48px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Steps: save → organize → plan → shop */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step { display: flex; flex-direction: column; gap: 10px; padding-top: 18px; border-top: 2px solid var(--fg); min-width: 0; }
.step-n { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--sage); font-weight: 500; }
.step h3 { font-size: 1.3rem; }
.step p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; } }
@media (max-width: 520px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Feature rows */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-block: 44px; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature-copy { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.feature-copy p { color: var(--muted); max-width: 30em; }
.feature.flip .feature-copy { order: 2; }
@media (max-width: 820px) { .feature { grid-template-columns: minmax(0, 1fr); gap: 28px; } .feature.flip .feature-copy { order: 0; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 8px 24px rgba(27, 43, 35, 0.05); min-width: 0; }
.panel-label { font-size: 0.72rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--label); margin-bottom: 12px; }

/* Grocery merge demo */
.merge { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; }
.merge-in, .merge-out { display: flex; flex-direction: column; gap: 8px; }
.line-item { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 0.92rem; }
.line-item b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-item small { display: block; color: var(--muted); font-size: 0.78rem; }
.merge-out .line-item { background: var(--bg); border: 1px solid var(--line); }
.flag { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--soft-sand); color: var(--fg); font-size: 0.72rem; font-weight: 600; }
.merge-arrow { color: var(--sage); }
@media (max-width: 560px) { .merge { grid-template-columns: minmax(0, 1fr); } .merge-arrow { transform: rotate(90deg); justify-self: center; } }

/* Week plan demo */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.day-name { font-size: 0.72rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); text-align: center; }
.day-name.today { color: var(--accent-ink); }
.meal { border-radius: 10px; min-height: 64px; padding: 7px; font-family: var(--serif); font-weight: 600; font-size: 0.8rem; line-height: 1.12; display: flex; align-items: flex-end; overflow-wrap: anywhere; }
.meal.empty { background: transparent; border: 1.5px dashed var(--line); }
@media (max-width: 560px) { .meal { min-height: 54px; font-size: 0.68rem; padding: 5px; } }

/* Cooking demo */
.cook { background: var(--forest-deep); color: #F8F6F1; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--line); }
.cook-top { display: flex; justify-content: space-between; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: #D6A77C; }
.cook-bar { height: 4px; border-radius: 2px; background: rgba(248,246,241,0.15); overflow: hidden; }
.cook-bar span { display: block; height: 100%; width: 50%; background: #D6A77C; }
.cook-step { font-family: var(--serif); font-size: 1.55rem; line-height: 1.3; font-weight: 500; }
.timer { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #D6A77C; font-weight: 600; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 5px 11px; border-radius: 999px; background: rgba(248,246,241,0.1); font-size: 0.82rem; }

/* PrepSmart */
.soon { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--soft-sand); color: var(--fg); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; vertical-align: middle; }
.compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.compare > div { border-radius: 12px; padding: 14px; background: var(--soft); min-width: 0; }
.compare > div:last-child { background: var(--soft-sand); }
.compare h4 { margin: 0 0 8px; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.compare ul { margin: 0; padding: 0; list-style: none; font-size: 0.88rem; display: flex; flex-direction: column; gap: 4px; }
.compare-note { margin-top: 12px; font-size: 0.82rem; color: var(--muted); }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.principle { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.principle svg { width: 28px; height: 28px; color: var(--accent-ink); }
.principle p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 820px) { .principles { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* Dietitians */
.rd { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 40px; align-items: center; padding: 40px; border-radius: 24px; background: var(--soft); }
.rd p { color: var(--muted); }
@media (max-width: 820px) { .rd { grid-template-columns: minmax(0, 1fr); padding: 28px; } }

/* FAQ */
.faq { display: flex; flex-direction: column; max-width: 760px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-weight: 400; color: var(--muted); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--muted); max-width: 40em; }

/* Closing band */
.band { background: var(--band); color: var(--band-fg); }
.band-inner { padding-block: 88px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.band h2 { color: var(--band-fg); }
.band p { color: var(--band-muted); }
.band .waitlist input { background: var(--band-input); border-color: rgba(248,246,241,0.22); color: var(--band-fg); }
.band .waitlist input::placeholder { color: rgba(248,246,241,0.7); }
.band .btn { background: var(--cta); color: var(--cta-fg); }
.band .form-note { color: var(--band-muted); }
.band .form-status[data-state="ok"] { color: #D6A77C; }
.band .form-status[data-state="error"] { color: #F2B5A8; }
@media (max-width: 820px) { .band-inner { grid-template-columns: minmax(0, 1fr); padding-block: 64px; } }

/* Footer */
.site-footer { padding-block: 40px 48px; font-size: 0.9rem; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); text-decoration: underline; }

/* Long-form pages (privacy, support) */
.doc { padding-block: 56px 88px; }
.doc-inner { max-width: 720px; }
.doc h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin-bottom: 12px; }
.doc h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.doc h3 { font-size: 1.15rem; margin: 24px 0 8px; font-family: var(--sans); font-weight: 650; letter-spacing: 0; }
.doc p, .doc li { color: var(--fg); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.doc .updated { color: var(--muted); font-size: 0.95rem; }
.callout { margin: 24px 0; padding: 16px 18px; border-radius: 14px; background: var(--soft-sand); font-size: 0.95rem; }
.contact-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-top: 16px; }
.contact-box code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1rem; user-select: all; }
