/* iCookNow site — shared styles. No build step; Cloudflare Pages serves web/ as-is.
   Design language mirrors the app: docs/design-reference.md + apps/mobile/src/constants/theme.ts.
   - Type:  Lora (headings) / Literata (body) / Caveat (genuine marginalia only)
   - Colour: "Quiet Linen" paper; the one accent (Avocado `--primary`) is spent
     only on the primary CTA. `--secondary` (Tomato Brick) is reserved for an
     aside/callout, matching the app's PRO-TIP role.
   - Light-only, like the app (use-theme.ts forces the light palette). */

:root {
  color-scheme: light;

  --serif: "Lora", ui-serif, Georgia, "Times New Roman", serif;
  --body: "Literata", ui-serif, Georgia, "Times New Roman", serif;
  --script: "Caveat", "Segoe Script", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* tokens copied from Colors.light — theme.ts is the source of truth */
  --background: #f3efe6;
  --surface: #faf7f0;
  --input-bg: #fbf7ef;
  --selected: #e7e5e4;
  --hairline: #e2dccf;
  --text: #1c1917;
  --text-secondary: #665f59;
  --text-faint: #8a8178;
  --primary: #5c6b42;
  --primary-ink: #fbfaf5;
  --secondary: #a8402a;
  --secondary-tint: #f8f0ee;
  --info: #3d6b85;
  --info-tint: #e9f0f3;
  --info-border: #b3cfda;

  --radius: 14px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.06);
  --shadow-md: 0 1px 2px rgba(28, 25, 23, 0.06), 0 14px 34px rgba(28, 25, 23, 0.08);
  --measure: 680px;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 60px 24px 88px;
}

/* ---- masthead ---------------------------------------------------------- */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.wordmark svg { color: var(--primary); flex: none; }

.beta-pill {
  font-family: var(--body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* ---- hero ------------------------------------------------------------- */

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.32; /* Lora needs >= ~1.35 to clear descenders; roomy here */
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 15ch;
}

.lede {
  font-size: 18px;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 52ch;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--primary);
  color: var(--primary-ink);
  font-family: var(--body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: filter 0.15s ease;
}
.cta:hover { filter: brightness(1.06); }
.cta svg { color: currentColor; }

.hero-aside {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-secondary);
}
.hero-aside a { color: var(--text-secondary); }

/* ---- faux recipe card (a taste of the app's own hierarchy) ----------- */

.showcase {
  margin: 52px 0 8px;
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.recipe-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 26px 26px 28px;
  transform: rotate(-1.1deg);
}
.recipe-card::before { /* faint stacked card behind, for depth */
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  transform: rotate(2.4deg) translate(10px, 8px);
  z-index: -1;
  box-shadow: var(--shadow-sm);
}

.r-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.35;
  margin: 0 0 4px;
}
.r-meta {
  font-size: 12.5px;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  margin: 0 0 6px;
}

.sec-head { /* mirrors the app's SectionHeader: Lora + 1px rule under */
  font-family: var(--serif);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin: 20px 0 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--selected);
}

.ing, .step {
  font-size: 13.5px;
  line-height: 1.72;
  margin: 0;
}
.ing + .ing, .step + .step { margin-top: 2px; }
.ing b { font-weight: 600; }
.ing .n { /* a genuine margin note — the one place Caveat is allowed */
  font-family: var(--script);
  font-size: 15px;
  line-height: 1;
  color: var(--text-faint);
}
.step { padding-left: 16px; position: relative; }
.step::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-secondary);
}
.step-tip { /* aside content: plain text tinted with a stage colour, no box */
  font-family: var(--body);
  font-style: italic;
  font-size: 12.5px;
  color: #6b4a30;
  margin: 3px 0 0 16px;
}

.card-margin-note {
  position: absolute;
  right: -14px;
  bottom: 26px;
  transform: rotate(6deg);
  font-family: var(--script);
  font-size: 20px;
  line-height: 1.1;
  color: var(--secondary);
  max-width: 8.5ch;
  text-align: center;
}

/* ---- sections ------------------------------------------------------------ */

h2.section {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin: 56px 0 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--selected);
}

.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 28px;
}
.feature h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15.5px;
  margin: 10px 0 4px;
}
.feature p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}
.feature .icon { color: var(--primary); }

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.prose p { max-width: 58ch; }
.prose p + p { margin-top: 14px; }

a { color: var(--primary); }
a:hover { text-decoration: underline; }

/* ---- footer --------------------------------------------------------------- */

footer.site {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--selected);
  color: var(--text-secondary);
  font-size: 13.5px;
}
footer.site a { color: var(--text-secondary); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }

/* ---- legal pages (privacy.html / terms.html) ---------------------------- */

.legal { max-width: 640px; }
.legal h1 {
  font-size: clamp(24px, 5vw, 28px);
  line-height: 1.35;
  max-width: none;
}
.legal h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 17px;
  margin: 34px 0 8px;
}
.legal p, .legal li { font-size: 15px; }
.legal ul { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .updated {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: -6px;
}
.todo { /* an aside/callout — same register as the app's PRO-TIP treatment */
  background: var(--secondary-tint);
  border-left: 3px solid var(--secondary);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 14px;
  margin: 22px 0;
}

/* ---- confirmed.html ---------------------------------------------------- */

.centered { max-width: 460px; margin: 0 auto; text-align: center; }
.centered h1 { max-width: none; }
.centered .wordmark { justify-content: center; margin-bottom: 28px; }
footer.site.centered { text-align: center; }

@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; gap: 22px; }
  header.site { margin-bottom: 48px; }
  .card-margin-note { right: 2px; bottom: -14px; }
}
