/* Mood2Meal website — shared styles.
   Colours mirror theme/tokens.ts (light = Culinary Editorial, dark = Digital Curator). */

@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/PlayfairDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("assets/fonts/PlayfairDisplay-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fafaf5;
  --surface: #ffffff;
  --surface-low: #eceee9;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #1a1a16;
  --text-2: #5d6458;
  --text-3: #7d8076;
  --accent: #37563b;
  --accent-muted: rgba(55, 86, 59, 0.1);
  --on-accent: #ffffff;
  --clay: #b5603f;
  --clay-muted: rgba(201, 123, 90, 0.16);
  --shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121411;
    --surface: #1e221d;
    --surface-low: #1a1c19;
    --border: rgba(120, 130, 118, 0.2);
    --border-strong: rgba(120, 130, 118, 0.4);
    --text: #e3e3de;
    --text-2: #a5a69b;
    --text-3: #85877e;
    --accent: #acd0ad;
    --accent-muted: rgba(172, 208, 173, 0.14);
    --on-accent: #121411;
    --clay: #e0997a;
    --clay-muted: rgba(224, 153, 122, 0.14);
    --shadow: none;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--on-accent);
  padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { left: 16px; }

/* ── Header ─────────────────────────────────────────── */
.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 0 0 1px var(--border); }
.brand span { font-family: var(--display); font-size: 21px; letter-spacing: -0.2px; }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { color: var(--text); background: var(--surface-low); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-muted); }

/* ── Type ───────────────────────────────────────────── */
h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--display); letter-spacing: -0.5px; line-height: 1.12; text-wrap: balance; }
h1 em, h2 em { color: var(--accent); }

.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-muted); padding: 5px 12px; border-radius: 999px;
}

.lede { color: var(--text-2); font-size: 19px; line-height: 1.6; max-width: 34em; text-wrap: pretty; }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 700; text-decoration: none;
  padding: 15px 24px; border-radius: 16px; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-low); }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:hover { filter: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ── Landing ────────────────────────────────────────── */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(44px, 7vw, 76px); margin: 22px 0 22px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .note { margin: 16px 0 0; color: var(--text-3); font-size: 14px; }

.hero-art {
  position: relative; aspect-ratio: 1; border-radius: 40px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.hero-art::before, .hero-art::after {
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; filter: blur(60px);
}
.hero-art::before { background: var(--accent-muted); left: -12%; top: -8%; }
.hero-art::after { background: var(--clay-muted); right: -14%; bottom: -10%; }
.hero-art img {
  position: relative; z-index: 1; width: 46%; border-radius: 22.5%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

section { padding: 72px 0; }
section.tint { background: var(--surface-low); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 44px); margin-top: 16px; }
.section-head p { color: var(--text-2); margin: 14px 0 0; }

.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px;
  padding: 28px; box-shadow: var(--shadow);
}
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.card p { margin: 0; color: var(--text-2); font-size: 16px; }
.card .icon {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 18px;
  display: grid; place-items: center; background: var(--accent-muted); color: var(--accent);
}
.card .icon.clay { background: var(--clay-muted); color: var(--clay); }
.card .icon svg { width: 22px; height: 22px; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 4px 0 30px 64px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 20px;
  background: var(--accent); color: var(--on-accent);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 21.5px; top: 50px; bottom: 6px; width: 1px; background: var(--border-strong);
}
.steps h3 { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-2); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 9px 0 9px 30px; border-bottom: 1px solid var(--border); }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: "✦"; position: absolute; left: 2px; color: var(--accent); }

.fine { color: var(--text-3); font-size: 14px; }

.cta { text-align: center; }
.cta h2 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 14px; }
.cta p { color: var(--text-2); margin: 0 auto 28px; max-width: 30em; }

/* ── Document pages (privacy, terms, support, delete) ── */
.doc { padding: 40px 0 80px; }
.doc h1 { font-size: clamp(36px, 6vw, 52px); margin: 18px 0 10px; }
.doc .updated { color: var(--text-3); font-size: 14px; margin: 0 0 28px; }
.doc .lede { margin: 0 0 36px; }
.doc h2 {
  font-family: var(--body); font-size: 13px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px; line-height: 1.4;
}
.doc .card { margin-bottom: 16px; }
.doc .card p { margin: 0 0 12px; color: var(--text); }
.doc .card p:last-child { margin-bottom: 0; }
.doc .card ul, .doc .card ol { margin: 0; padding: 0; list-style: none; counter-reset: item; }
.doc .card li { position: relative; padding: 9px 0 9px 26px; border-bottom: 1px solid var(--border); }
.doc .card li:last-child { border-bottom: 0; padding-bottom: 0; }
.doc .card ul li::before { content: "—"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.doc .card ol li { counter-increment: item; padding-left: 34px; }
.doc .card ol li::before {
  content: counter(item); position: absolute; left: 0; top: 10px;
  width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; background: var(--accent-muted); color: var(--accent);
}
.doc .group-title {
  font-family: var(--display); font-size: 26px; font-weight: 400; margin: 44px 0 16px;
  letter-spacing: -0.3px; text-transform: none; color: var(--text); line-height: 1.2;
}

.callout {
  border-radius: 22px; padding: 28px; margin: 0 0 16px;
  background: var(--accent-muted); border: 1px solid var(--border);
}
.callout h2 { margin-bottom: 8px; }
.callout p { margin: 0 0 16px; }
.callout p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; position: relative;
  font-weight: 600; font-size: 17px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 400; color: var(--accent); line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { background: var(--surface-low); }
.faq .answer { padding: 0 24px 22px; color: var(--text-2); }
.faq .answer p { margin: 0 0 10px; }
.faq .answer p:last-child { margin-bottom: 0; }
.faq .answer ol { margin: 0 0 10px; padding-left: 22px; }
.faq .answer li { padding: 2px 0; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 44px; color: var(--text-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--text-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

/* ── Small screens ──────────────────────────────────── */
@media (max-width: 860px) {
  .hero { padding: 28px 0 48px; }
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { max-width: 360px; width: 100%; margin: 0 auto; order: -1; aspect-ratio: 16 / 10; }
  .hero-art img { width: 30%; }
  .grid.three, .grid.two { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { gap: 8px; }
  .nav { flex-wrap: nowrap; gap: 2px; }
  .nav a { padding: 8px 7px; font-size: 14px; white-space: nowrap; }
  .nav .hide-sm { display: none; }
  .brand { gap: 8px; }
  .brand span { font-size: 18px; }
  .card, .callout { padding: 22px; }
  .lede { font-size: 17px; }
  .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
