/* FamilyPlate marketing site — editorial cookbook styling.
   Design tokens mirror the iOS app (ios/MealPlanner/UI/Theme.swift):
   warm cream paper, brown-tinted ink, a single tomato accent, serif headlines.
   Light only. No web fonts — a system serif stack keeps render-blocking at zero. */

:root {
  --bg: #f4ecdc;          /* cream paper */
  --surface: #e8decc;     /* raised card */
  --surface-2: #efe6d4;   /* softer card */
  --ink: #221a12;         /* warm near-black */
  --sepia: #7a6450;       /* secondary text */
  --rule: rgba(184, 162, 132, 0.55);
  --tomato: #c0341b;      /* accent — large text + fills only */
  --tomato-ink: #a02c16;  /* AA-safe tomato for small links on cream */
  --maxw: 64rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    Georgia, "Times New Roman", ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--tomato-ink); text-underline-offset: 0.15em; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 0 0 6px 0;
  z-index: 10;
}
.skip:focus { left: 0; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Type roles ---- */
.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sepia);
  margin: 0 0 0.75rem;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 3.5rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.7rem, 4vw, 2.25rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--sepia); max-width: 38rem; }
.serif-em { font-family: var(--serif); font-style: italic; }

/* ---- Header / nav ---- */
.site-header {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.1) blur(8px);
  z-index: 5;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--rule); }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 1.4rem;
}
.nav a:hover { color: var(--tomato-ink); }
@media (max-width: 32rem) { .nav a:first-child { display: none; } }

/* ---- Buttons / CTAs ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 0.85rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.btn-primary { background: var(--tomato); color: #fff; }
.btn-primary:hover { background: #aa2d18; transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border: 1px solid var(--rule); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.appstore { height: 52px; width: auto; }

/* ---- Hero ---- */
.hero { padding: clamp(3rem, 8vw, 5.5rem) 0 2rem; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  align-items: center;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.6rem; align-items: center; }
.hero-note { margin-top: 1rem; font-size: 0.9rem; color: var(--sepia); }
.phone {
  border-radius: 36px;
  border: 1px solid var(--rule);
  box-shadow: 0 24px 60px -28px rgba(34, 26, 18, 0.45);
  background: var(--surface);
  margin-inline: auto;
  max-width: 300px;
}
@media (max-width: 48rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .phone { max-width: 230px; }
}

/* ---- Sections ---- */
section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section-rule { border-top: 1px solid var(--rule); }
.section-head { max-width: 40rem; margin-bottom: 2rem; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
}
.feature {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1.5rem;
}
.feature .ic {
  width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--rule);
  font-size: 1.3rem;
  margin-bottom: 0.9rem;
}
.feature p { color: var(--sepia); margin: 0; }

/* ---- Screenshot gallery ---- */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1.5rem;
}
.shot { text-align: center; }
.shot img {
  border-radius: 24px;
  border: 1px solid var(--rule);
  box-shadow: 0 18px 40px -26px rgba(34, 26, 18, 0.4);
  margin: 0 auto 0.8rem;
  max-width: 248px;
  width: 100%;
}
.shot figcaption { color: var(--sepia); font-size: 0.95rem; }

/* ---- Steps ---- */
.steps { counter-reset: step; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.step { position: relative; padding-left: 3.2rem; }
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: -0.2rem;
  width: 2.3rem; height: 2.3rem;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700;
  color: var(--tomato); background: var(--surface);
  border: 1px solid var(--rule); border-radius: 50%;
}

/* ---- FAQ ---- */
.faq { max-width: 46rem; }
.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 1.1rem 0;
}
.faq summary {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--tomato); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq p { color: var(--sepia); margin: 0.8rem 0 0.2rem; }

/* ---- CTA band ---- */
.cta-band { text-align: center; }
.cta-band .btn { margin-top: 1.2rem; }

/* ---- Contact form ---- */
.form-card {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  max-width: 38rem;
}
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}
.field input:focus, .field textarea:focus {
  outline: 2px solid var(--tomato);
  outline-offset: 1px;
  border-color: var(--tomato);
}
.field textarea { min-height: 8rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4rem; margin-top: 0.4rem; font-size: 0.95rem; }
.form-status.ok { color: #4f6b2f; }
.form-status.err { color: var(--tomato-ink); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
  color: var(--sepia);
  font-size: 0.92rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer nav a { color: var(--sepia); text-decoration: none; margin-right: 1.2rem; }
.site-footer nav a:hover { color: var(--tomato-ink); }

/* ---- Legal / article pages ---- */
.article { max-width: 46rem; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.article h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
.article h2 { font-size: 1.4rem; margin: 2.4rem 0 0.6rem; }
.article p, .article li { color: var(--ink); }
.article .eff { color: var(--sepia); }
.article .note {
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}
.article ul { padding-left: 1.25rem; }
.article li { margin: 0.35rem 0; }
