/* Shared styles for the aromacooking.app static pages.
   The site's "Bistro" theme: a striped café awning, pastel plates behind the
   screenshots, soft cards with a pastel edge, and bistro-green buttons. Tag and
   flavor tints mirror the app's design-system catalog (DS_Catalog.swift); the
   --ds-* aliases below name each one by the app token it mirrors (see
   docs/features/DS.md, "Website mapping"). */
:root {
  --text: #2c2a26;
  --muted: #6d665d;
  --bg: #fbf7f0;
  --bg-alt: #f4ede2;
  --card: #fffdf8;
  --rule: #e8dfd0;
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 6px 20px rgba(80, 60, 40, .07);
  --link: #2f5d50;
  --bistro: #2f5d50;        /* labels and accents */
  --button: #2f5d50;
  --button-text: #fff;
  --button-ring: transparent;
  --awning: #fffaf3;        /* the light stripe of the awning */
  --awning-stripe: var(--blush); /* the colored stripe of the awning */
  /* Pastels for plates, card edges and labels. */
  --blush: #f4d4d0; --powder: #cfdfee; --pistachio: #d6e6cc; --butter: #f8ecc4; --lavender: #e3dbef;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  /* Handwriting for labels and notes: built into Apple devices and Windows. */
  --hand: "Bradley Hand", "Noteworthy", "Segoe Print", "Chalkboard SE", cursive;
  /* Index-card lines: a red rule under the title, faint blue rules under text. */
  --card-title-rule: rgba(214, 110, 100, .55);
  --card-line: rgba(120, 160, 200, .28);

  /* SwiftUI system colors (light). */
  --indigo: #5856d6; --green: #34c759; --pink: #ff2d55; --brown: #a2845e;
  --red: #ff3b30; --yellow: #ffcc00; --purple: #af52de; --teal: #30b0c7;
  --orange: #ff9500; --mint: #00c7be;
  --blue: #007aff; --cyan: #32ade6; --gray: #8e8e93;

  /* Design-system tokens shared with the app (DS_Tokens.swift, DS_Catalog.swift).
     Aliases only: they resolve through the system colors above, so dark mode
     follows automatically. Bistro surfaces above stay web-only. */
  --ds-launch-bg: #fef5e6;     /* LaunchBackground (light) */
  --ds-dracula-purple: #bd93f9; /* DS.Brand.draculaPurple */
  /* Course tags (RecipeTag.tint) */
  --ds-tint-entree: var(--indigo); --ds-tint-side: var(--green);
  --ds-tint-dessert: var(--pink); --ds-tint-drink: var(--brown);
  /* Flavors (FlavorProfile.tint) */
  --ds-tint-savory: #8e5b2e;      /* DS.Tint.savory (roasted brown) */ --ds-tint-sweet: var(--pink); --ds-tint-spicy: var(--red);
  --ds-tint-tangy: var(--yellow); --ds-tint-smoky: var(--gray); --ds-tint-herbal: var(--green);
  --ds-tint-umami: var(--purple); --ds-tint-creamy: var(--teal); --ds-tint-citrusy: var(--orange);
  --ds-tint-nutty: var(--brown);
  /* Meal slots (MealSlot.tint) */
  --ds-tint-snack: var(--purple); --ds-tint-breakfast: var(--orange);
  --ds-tint-lunch: var(--green); --ds-tint-dinner: var(--indigo);
  /* Smart categories (RecipeCategory.tint) */
  --ds-tint-favorites: var(--pink); --ds-tint-max-time: var(--orange);
  /* Shape and spacing scales (DS.Radius, DS.Space), in CSS px = app points */
  --ds-radius-xs: 4px; --ds-radius-s: 10px; --ds-radius-m: 12px; --ds-radius-ml: 14px;
  --ds-radius-l: 16px; --ds-radius-xl: 20px; --ds-radius-xxl: 28px;
  --ds-space-xxs: 4px; --ds-space-xs: 6px; --ds-space-s: 8px; --ds-space-m: 12px;
  --ds-space-l: 16px; --ds-space-xl: 20px; --ds-space-xxl: 24px; --ds-space-xxxl: 32px;
  --ds-pill-fill: 15%;         /* DS.Opacity.pillFill, for color-mix() */
  --ds-pill-stroke: 40%;       /* DS.Opacity.pillStroke */
}
@media (prefers-color-scheme: dark) {
  :root {
    /* Bistro green night: a deep green-black under a butter-striped awning. */
    --card-line: rgba(180, 205, 230, .2);
    --card-title-rule: rgba(232, 150, 140, .6);
    --text: #eef2ea;
    --muted: #b9c6bd;
    --bg: #1e2a25;
    --bg-alt: #24322c;
    --card: #283731;
    --rule: #3b4d45;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
    --link: #bfe3d1;
    --bistro: #bfe3d1;
    /* Mint fill with green-black text (~10:1): a deep-green fill vanished into
       the green-black page, which left "Coming soon" hard to pick out. */
    --button: #bfe3d1;
    --button-text: #1e2a25;
    --button-ring: transparent;
    --awning: #2c3d35;
    --awning-stripe: #e6cf8a;
    --blush: #5c4142; --powder: #34485a; --pistachio: #3f5c47; --butter: #5a5236; --lavender: #4a4459;
    --indigo: #5e5ce6; --green: #30d158; --pink: #ff375f; --brown: #ac8e68;
    --red: #ff453a; --yellow: #ffd60a; --purple: #bf5af2; --teal: #40c8e0;
    --orange: #ff9f0a; --mint: #63e6e2;
    --blue: #0a84ff; --cyan: #64d2ff;
    --ds-launch-bg: #19140d;   /* LaunchBackground (dark) */
    --ds-tint-savory: #c99a68;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
img { display: block; }
h1, h2, h3, .brand { font-family: var(--serif); font-weight: 600; }

/* Striped café awning with a scalloped edge across the top of every page. */
body::before {
  content: ""; display: block; height: 48px;
  background:
    radial-gradient(circle at 20px 0, var(--awning-stripe) 13px, transparent 14px) 0 34px / 80px 14px repeat-x,
    radial-gradient(circle at 60px 0, var(--awning) 13px, transparent 14px) 0 34px / 80px 14px repeat-x,
    repeating-linear-gradient(90deg, var(--awning-stripe) 0 40px, var(--awning) 40px 80px) 0 0 / 100% 34px no-repeat;
}

/* ---------- Header & footer (all pages) ---------- */
header.site, footer.site {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -.01em;
}
.brand img { border-radius: 22.5%; } /* the icon PNG is a squircle on a white square */
header.site nav { display: flex; gap: 20px; font-size: 15px; margin-left: auto; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover { color: var(--text); }
/* System / Light / Dark switch, added to the header by theme.js. */
.theme-switch {
  display: inline-flex; gap: 2px; padding: 3px; flex: none;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--card);
}
.theme-switch button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
}
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-checked="true"] { background: var(--bg-alt); color: var(--bistro); }
.theme-switch button:focus-visible { outline: 2px solid var(--bistro); outline-offset: 1px; }
/* Narrow screens: brand and switch share the top row, links drop beneath. */
@media (max-width: 640px) {
  header.site { flex-wrap: wrap; row-gap: 10px; }
  header.site nav { order: 1; width: 100%; margin-left: 0; }
  .theme-switch { margin-left: auto; }
}
footer.site {
  border-top: 1px solid var(--rule);
  padding-top: 20px; padding-bottom: 40px;
  color: var(--muted); font-size: 14px;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
}
footer.site a { color: var(--muted); }

/* ---------- Document pages (privacy, support) ---------- */
main.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 24px 56px;
}
h1 { font-size: 38px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 10px; }
.doc h2 { font-size: 22px; margin: 36px 0 8px; }
.lede { color: var(--muted); font-size: 19px; }
.updated { color: var(--muted); font-size: 14px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
}
.button.primary { background: var(--button); color: var(--button-text); border: 1px solid var(--button-ring); box-shadow: 0 6px 16px rgba(47, 93, 80, .25); }
.button.ghost { color: var(--text); border: 1px solid var(--rule); background: var(--card); }
.button[aria-disabled="true"] { cursor: default; }

/* ---------- Landing ---------- */
.home main { overflow-x: clip; }
.hero, .flavors, .features, .promise, .help {
  max-width: 1080px; margin: 0 auto; padding-left: 24px; padding-right: 24px;
}
.hero {
  display: grid; gap: 48px; align-items: center;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  padding-top: 40px; padding-bottom: 32px;
}
.eyebrow { margin: 0 0 12px; font-family: var(--hand); font-size: 22px; font-weight: 700; color: var(--bistro); }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.05; letter-spacing: -.01em; margin-bottom: 18px; }
.hero .lede { margin: 0 0 28px; max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { color: var(--muted); font-size: 14px; margin: 16px 0 0; }
.hero .fine { font-family: var(--hand); font-size: 18px; }

/* Hero screenshot, set on a soft brand glow. */
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art::before {
  content: ""; position: absolute; inset: 8% -6% -6% 8%;
  background: radial-gradient(circle, var(--blush), var(--powder) 70%); opacity: .7; filter: blur(40px); border-radius: 40px;
}
.hero-art .shot { position: relative; }

/* Tag tokens, tinted like the app's flavor and filter tokens (--ds-tint-*). */
.tok {
  --tint: var(--muted);
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: color-mix(in srgb, var(--tint) 75%, var(--text));
  background: color-mix(in srgb, var(--tint) 16%, transparent);
}
.tok.savory { --tint: var(--ds-tint-savory); }
.tok.nutty { --tint: var(--ds-tint-nutty); }
.tok.sweet { --tint: var(--ds-tint-sweet); }
.tok.spicy { --tint: var(--ds-tint-spicy); }
.tok.tangy { --tint: var(--ds-tint-tangy); }
.tok.smoky { --tint: var(--ds-tint-smoky); }
.tok.herbal { --tint: var(--ds-tint-herbal); }
.tok.umami { --tint: var(--ds-tint-umami); }
.tok.creamy { --tint: var(--ds-tint-creamy); }
.tok.citrusy { --tint: var(--ds-tint-citrusy); }
.tok.time { --tint: var(--ds-tint-max-time); }

.flavors {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  padding-top: 24px; padding-bottom: 24px;
}

/* Feature sections */
.features { padding-top: 56px; padding-bottom: 24px; }
.section-title {
  text-align: center; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -.01em;
  max-width: 18em; margin: 0 auto 56px;
}
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center;
  padding: 40px 0;
}
.feature.flip .feature-copy { order: 2; }
/* Feature text sits on a soft index card with a pastel edge matching its plate. */
.feature-copy {
  background: var(--card); border-radius: 20px; border: 1px dashed var(--rule); border-left: 6px solid var(--plate);
  padding: 28px; box-shadow: var(--shadow);
}
.feature { --plate: var(--powder); }
.feature:nth-of-type(5n+1) { --plate: var(--blush); }
.feature:nth-of-type(5n+3) { --plate: var(--pistachio); }
.feature:nth-of-type(5n+4) { --plate: var(--butter); }
.feature:nth-of-type(5n) { --plate: var(--lavender); }
.feature h3 {
  font-size: clamp(24px, 3vw, 32px); line-height: 1.2; letter-spacing: -.015em; margin: 0;
  padding-bottom: 10px; border-bottom: 2px solid var(--card-title-rule);
}
/* Text sits on ruled lines: the line-height matches the rule period. */
.feature p, .feature ul {
  line-height: 30px; margin: 0;
  background: repeating-linear-gradient(transparent 0 29px, var(--card-line) 29px 30px);
}
.feature p { padding-top: 2px; color: var(--muted); font-size: 17px; }
.feature ul { padding: 0; list-style: none; }
.feature li { position: relative; padding-left: 26px; margin: 0; }
.feature li::before {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--pistachio); border: 1px solid var(--bistro);
}
/* Section labels are jotted by hand, with a pastel highlighter stroke. */
.feature .kicker {
  display: inline-block; padding: 0 4px; font-family: var(--hand); font-size: 21px !important; font-weight: 700;
  background: linear-gradient(transparent 55%, var(--plate) 55% 92%, transparent 92%);
  color: var(--bistro) !important; margin-bottom: 6px !important;
  transform: rotate(-2deg); transform-origin: left center;
}
/* Real app screenshots. Phone shots are clipped to a rounded screen shape. */
.feature-art { position: relative; display: flex; justify-content: center; }
/* A pastel plate behind each screenshot. */
.feature-art::before {
  content: ""; position: absolute; top: 50%; left: 50%; z-index: 0;
  width: 82%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
  background: var(--plate);
  box-shadow: inset 0 0 0 14px color-mix(in srgb, var(--card) 60%, transparent), 0 10px 30px rgba(80, 60, 40, .08);
}
.feature-art > * { position: relative; z-index: 1; }
.shot {
  display: block; width: 100%; max-width: 300px; height: auto;
  border-radius: 36px; border: 6px solid var(--card); box-shadow: 0 18px 40px rgba(80, 60, 40, .14);
  background: var(--card);
}
.shot.wide { max-width: 100%; border-radius: 20px; }
.shot-fig { margin: 0; width: 100%; max-width: 300px; }
.shot-fig figcaption {
  margin-top: 12px; text-align: center; font-size: 13px; font-weight: 700;
  color: color-mix(in srgb, var(--mint) 70%, var(--text));
}
.shot-fig figcaption::before { content: "\25CF  "; }

/* Privacy promise & help */
.promise {
  text-align: center; margin-top: 40px; padding-top: 64px; padding-bottom: 64px;
  max-width: 1032px; border: 16px solid transparent; border-radius: 14px;
  /* A cream card framed by a powder-blue tablecloth check. */
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    repeating-conic-gradient(var(--powder) 0 25%, var(--awning) 0 50%) 0 0 / 24px 24px border-box;
}
.promise h2, .help h2 { font-size: clamp(26px, 3.5vw, 34px); letter-spacing: -.01em; margin: 0 0 10px; }
.promise p { color: var(--muted); font-size: 18px; max-width: 34em; margin: 0 auto 24px; }
.help {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding-top: 64px; padding-bottom: 64px;
}
.help p { color: var(--muted); margin: 0; }

/* Roadmap */
.paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 20px; }
.path {
  --tint: var(--indigo);
  background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 16px;
  border-top: 4px solid var(--tint);
}
.path.new { --tint: var(--green); }
.path.better { --tint: var(--orange); }
.path.redesign { --tint: var(--purple); }
.path h3 { margin: 0 0 4px; font-size: 17px; }
.path p { margin: 0; color: var(--muted); font-size: 15px; }
.timeline { list-style: none; margin: 20px 0 0; padding: 0 0 0 20px; border-left: 2px solid var(--rule); }
.milestone {
  position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: 18px;
  padding: 18px 20px; box-shadow: var(--shadow);
}
.milestone::before {
  content: ""; position: absolute; left: -29px; top: 24px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--button); border: 3px solid var(--bg);
}
.milestone h3 { margin: 0 0 6px; font-size: 20px; }
.milestone p { margin: 0; color: var(--muted); }
.milestone .status {
  display: inline-block; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--button-text); background: var(--button);
}
@media (max-width: 640px) { .paths { grid-template-columns: minmax(0, 1fr); } }

/* About */
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.value {
  --tint: var(--green);
  background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 16px;
  border-top: 4px solid var(--tint);
}
.value.two { --tint: var(--orange); }
.value.three { --tint: var(--purple); }
.value h3 { margin: 0 0 4px; font-size: 17px; }
.value p { margin: 0; color: var(--muted); font-size: 15px; }
.hello { margin-top: 48px; text-align: center; background: var(--bg-alt); border-radius: 24px; padding: 40px 24px; }
.doc .hello h2 { margin-top: 0; }
.hello p { color: var(--muted); margin: 0 auto 20px; }
@media (max-width: 640px) { .values { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Small screens ---------- */
@media (max-width: 820px) {
  .hero, .feature { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .feature.flip .feature-copy { order: 0; }
  .feature { padding: 28px 0; }
  .section-title { margin-bottom: 24px; }
}
@media (max-width: 480px) {
  header.site, footer.site, .hero, .flavors, .features, .promise, .help, main.doc { padding-left: 16px; padding-right: 16px; }
  header.site nav { gap: 12px; font-size: 14px; }
  header.site nav a[href$="#features"] { display: none; }
  .promise { border-width: 10px; }
  .feature-copy { padding: 20px; }
  .shot { max-width: 260px; border-radius: 30px; }
  .shot.wide { max-width: 100%; border-radius: 14px; }
}
