/*
 * menumenace.com: the marketing home, the legal/support pages and the
 * prerendered share pages (functions/src/lib/shell.ts links this file).
 *
 * Menu Menace is app-only: Hosting serves site/ and never the Vue app.
 * Framework-free and build-free on purpose: an App Review reviewer, a crawler
 * or a browser with JS off sees the whole page. Tokens are copied from
 * src/styles/tokens.css; keep them in step by hand.
 */
/* The two brand faces, latin subset. `node scripts/generate-assets.mjs` copies
 * them from @fontsource into site/fonts; these pages never load the app
 * bundle, so they carry their own @font-face. */
@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-wght-normal.woff2) format('woff2-variations');
}

@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/familjen-grotesk-latin-400-normal.woff2) format('woff2');
}

@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/familjen-grotesk-latin-700-normal.woff2) format('woff2');
}

:root {
  --bg: #fbf8f2;
  --bg-canvas: #ece8df;
  --card: #fff;
  --ink: #1c1a17;
  --ink-2: #6e675d;
  /* WEB-33: same value as src/styles/tokens.css --muted (the WEB-06 fix);
     #9b9384 was 2.87:1 on --bg, this is 4.51:1, and every use here (.updated,
     table th, footer.foot) is body-size text that needs 4.5:1. Keep in step
     with the app by hand — do not lighten back. */
  --muted: #787266;
  --line: #e3ddd1;
  --line-2: #efeae0;
  --yellow: #ffd23f;
  --orange: #e0642b;
  --green: #3f8f3a;
  --blue: #3a6fd8;
  --pink: #c9327f;
  --pink-tint: #f7d6e8;
  --purple: #7a4fd0;
  --display: 'Bricolage Grotesque Variable', 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Familjen Grotesk', system-ui, -apple-system, sans-serif;
  /* These pages support both palettes; the block below supplies the dark one.
     Without this the UA keeps painting its form controls and scrollbars light
     over a dark page. */
  color-scheme: light dark;
}

/* PROD-DARK — the static pages follow the DEVICE only.
 *
 * WHY THERE IS NO TOGGLE HERE. `site/*.html` is served verbatim by Firebase
 * Hosting with no build step and no JavaScript: there is no prefs store to
 * read and nothing to persist a choice in, so the app's three-way (Settings ▸
 * Appearance) has no counterpart on /privacy or /terms. A system-following
 * page is the honest version of that — it will never disagree with the OS,
 * which is the only signal it has.
 *
 * VALUES ARE COPIED BY HAND from src/styles/tokens.css's dark block, the same
 * way the light `:root` above is (see the WEB-33 note on --muted). Nothing
 * mechanises it: this file is outside `src/`, so tokens-lint never sees it.
 * Change one, change both.
 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1815;
    --bg-canvas: #100e0c;
    --card: #262219;
    --ink: #f2ede1;
    --ink-2: #c2b9a7;
    /* 5.82:1 on --bg, 5.21:1 on --card — the same WEB-33/WEB-06 bar the light
       value clears at 4.51:1. */
    --muted: #9c9382;
    --line: #353026;
    --line-2: #292419;
    --yellow: #f2c53c;
    --orange: #f08a52;
    --green: #6fc167;
    --blue: #86adf7;
    --pink: #f27ab0;
    --pink-tint: #3a1226;
    --purple: #b596ef;
  }
}

/* THE HEADER WORDMARK IS INLINE SVG WITH BAKED FILLS, and the web-fragments
 * gate pins that markup byte-for-byte across all eight pages (plus the copy
 * scripts/gen-licences.mjs re-emits). Four of its five ink fills are now
 * `currentColor`, which `.wordmark { color: var(--ink) }` below resolves — so
 * the stack mark and the word "Menu" follow the theme with no CSS override
 * and no per-page edit.
 *
 * THE FIFTH IS DELIBERATELY STILL `#1c1a17`: it is the "Menace" letter group,
 * which sits on the yellow highlighter chip. That chip stays yellow in both
 * themes (src/styles/tokens.css ▸ --on-yellow), so its letters must stay ink
 * in both — `currentColor` there would paint near-white on yellow. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-canvas);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  padding: 28px 22px 64px;
}

@media (min-width: 768px) {
  .wrap {
    padding: 48px 40px 80px;
  }
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark svg {
  height: 18px;
  width: auto;
  display: block;
}

.open-app {
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--card);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 32px 0 0;
}

h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin: 36px 0 0;
}

h3 {
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  margin: 22px 0 0;
}

p,
ul,
ol {
  margin: 12px 0 0;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-top: 6px;
}

a {
  color: var(--blue);
}

/* WEB-33: keyboard focus must be visible on every interactive element —
   same outline the app uses (src/styles/base.css). */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* WEB-33: same skip-link pattern as src/App.vue — off-screen via position
   (not display:none, which would drop it from the tab order entirely),
   revealed when it takes keyboard focus, first stop after Tab. */
.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

.mark {
  display: inline-block;
  background: var(--yellow);
  padding: 0 10px 2px;
  border-radius: 10px;
  transform: rotate(-2deg);
}

.mark.pink {
  background: var(--pink-tint);
  color: var(--pink);
}

.lede {
  margin-top: 14px;
  font-size: 17px;
  color: var(--ink-2);
  text-wrap: pretty;
}

.updated {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  margin-top: 16px;
}

.card.loud {
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
}

.formula {
  background: var(--ink);
  color: var(--bg);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  overflow-x: auto;
}

.formula b {
  color: var(--yellow);
  font-weight: 800;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 14.5px;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

footer.foot {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1.5px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

footer.foot a {
  color: var(--ink-2);
}

.verified {
  color: var(--green);
  font-weight: 700;
}

.estimate {
  color: var(--ink-2);
  font-weight: 700;
}

/* ── Marketing home (site/index.html) ─────────────────────────────────────── */

.home .wordmark svg {
  height: 24px;
}

.wrap.wide {
  max-width: 1080px;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

.home h1 {
  font-size: clamp(40px, 7vw, 68px);
  margin-top: 12px;
}

.home h2 {
  font-size: clamp(26px, 4vw, 36px);
  margin-top: 72px;
}

.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  margin-top: 24px;
}

@media (min-width: 820px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 56px;
    margin-top: 48px;
  }
}

.hero .lede {
  font-size: 19px;
  max-width: 34em;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.store-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  min-width: 176px;
  padding: 8px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--yellow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.store-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--yellow);
}

.store-small {
  font-size: 12px;
  line-height: 1.2;
}

.store-big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.fine {
  font-size: 13px;
  color: var(--muted);
  margin-top: 14px;
}

.phone {
  margin: 0;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 28px;
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--card);
}

.hero-phone {
  max-width: 320px;
  justify-self: center;
  transform: rotate(2deg);
}

.step-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

@media (min-width: 720px) {
  .step-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  margin: 0;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px 20px;
}

.step h3 {
  margin-top: 12px;
}

.step p {
  margin-top: 6px;
  color: var(--ink-2);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1c1a17;
  font-family: var(--display);
  font-weight: 800;
}

.shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 20px;
  margin-top: 56px;
}

@media (min-width: 820px) {
  .shots {
    grid-template-columns: repeat(4, 1fr);
  }
}

.shots .phone img {
  border-radius: 20px;
  box-shadow: 5px 5px 0 var(--ink);
}

.shots figcaption {
  margin-top: 12px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
}

.grid {
  display: grid;
  gap: 0 16px;
}

@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid .card h3 {
  margin-top: 0;
}

.grid .card p {
  margin-top: 6px;
  color: var(--ink-2);
}

.more {
  margin-top: 20px;
  font-weight: 700;
}

.cta {
  margin-top: 72px;
  padding: 28px 24px;
  text-align: center;
}

.cta h2 {
  margin-top: 0;
}

.cta .stores {
  justify-content: center;
}

/* ── Prerendered share pages (functions/src/lib/shell.ts) ─────────────────── */

.mm-list {
  /* Each row carries its own .mm-rank number. */
  list-style: none;
  padding-left: 0;
}

.mm-row {
  margin-bottom: 6px;
}

.mm-value {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.mm-tag {
  background: var(--yellow);
  color: #1c1a17;
  padding: 0 4px;
  border-radius: 4px;
}

.mm-verified {
  color: var(--green);
}

.mm-disclaimer {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 24px;
}

.app-cta {
  margin-top: 40px;
}

.app-cta h2 {
  margin-top: 0;
}
