/*
 * Cheffify marketing pages: shared tokens and components (spec §3, §7).
 * The app's palette and type, flattened for static pages. SEO pages can link this file too.
 * Mono (JetBrains Mono) is for receipts and countdowns only.
 */

:root {
  --butter: #f6c413;
  --butter-text: #8a6a00; /* Butter as text on cream (AA) */
  --crust: #2b1708;
  --cream: #fff8ee;
  --frost: #e9f1f3;
  --frost-ink: #1e3a40;
  --basil: #3e7b3a;
  --tomato: #c9381f;
  --paper: #fffdf7;
  --ink: var(--crust);
  --ink-soft: #6b5544;
  --line: rgba(43, 23, 8, 0.15);
  --card: #ffffff;
  --bg: var(--cream);
  --shadow-ink: #2b1708;
  --radius-sheet: 28px;
  --radius-card: 16px;
  color-scheme: light;
}

.dark {
  --cream: #17110b;
  --crust: #f6ebdd;
  --frost: #1d2a2e;
  --frost-ink: #cfe3e8;
  --paper: #211a12;
  --ink: #f6ebdd;
  --ink-soft: #bba792;
  --line: rgba(246, 235, 221, 0.16);
  --card: #1f1811;
  --bg: #17110b;
  --butter-text: #f6c413;
  --basil: #7fbf6f;
  --tomato: #ff7a5c;
  color-scheme: dark;
}

/* No JS: follow the system. */
@media (prefers-color-scheme: dark) {
  html.no-js {
    --cream: #17110b;
    --crust: #f6ebdd;
    --frost: #1d2a2e;
    --frost-ink: #cfe3e8;
    --paper: #211a12;
    --ink: #f6ebdd;
    --ink-soft: #bba792;
    --line: rgba(246, 235, 221, 0.16);
    --card: #1f1811;
    --bg: #17110b;
    --butter-text: #f6c413;
    --basil: #7fbf6f;
    --tomato: #ff7a5c;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--butter);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--crust);
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--butter);
  color: #2b1708;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Type */
.display {
  font-family: "Fjalla One", "Arial Narrow", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.98;
}
.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 34em;
}
.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

/* Buttons: the offset shadow is for the primary action only. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 14px;
  font: 700 17px/1 "DM Sans", system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}
.btn-primary {
  background: var(--butter);
  color: #2b1708;
  border: 2px solid #2b1708;
  box-shadow: 4px 4px 0 var(--shadow-ink);
}
/* The shadow is Crust, and Crust is light in dark mode (spec §3). */
.dark .btn-primary {
  --shadow-ink: #f6ebdd;
}
@media (prefers-color-scheme: dark) {
  html.no-js .btn-primary {
    --shadow-ink: #f6ebdd;
  }
}
.btn-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--shadow-ink);
}
.btn-primary:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--shadow-ink);
}
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-quiet:hover {
  border-color: var(--ink-soft);
}
@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }
  .btn-primary:hover,
  .btn-primary:active {
    transform: none;
  }
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

/* The receipt: paper strip, zig-zag bottom edge, mono type. */
.receipt {
  --zig: 9px;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
  padding: 18px 18px calc(18px + var(--zig));
  border: 1.5px solid var(--line);
  border-bottom: 0;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
  filter: drop-shadow(0 1px 0 var(--line));
}
.receipt .r-rule {
  border: 0;
  border-top: 1.5px dashed var(--line);
  margin: 10px 0;
}
.receipt .r-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.receipt .r-row > span:last-child {
  text-align: right;
  color: var(--ink-soft);
}
.receipt .r-head {
  font-weight: 700;
  letter-spacing: 0.04em;
}
.receipt .r-used {
  color: var(--basil);
}
.receipt .r-skip {
  color: var(--ink-soft);
}
.receipt .r-buy {
  color: var(--tomato);
}

/* Site header and footer */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 400 24px/1 "Fjalla One", "Arial Narrow", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.brand img {
  width: 34px;
  height: 34px;
}
.site-header nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-header .signin {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
}
.site-header .signin:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.site-header .btn {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
}

.site-footer {
  background: #2b1708;
  color: #f6ebdd;
  padding: 48px 0 calc(32px + env(safe-area-inset-bottom));
  margin-top: 0;
}
.site-footer a {
  color: #f6ebdd;
  text-decoration: none;
}
.site-footer a:hover {
  color: #f6c413;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.site-footer .brand {
  color: #f6c413;
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.footer-grid h2 {
  font-size: 15px;
  font-weight: 700;
  color: #f6c413;
  margin-bottom: 10px;
}
.footer-grid li + li {
  margin-top: 6px;
}
.footer-note {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(246, 235, 221, 0.2);
  font-size: 14px;
  color: #c9b8a6;
}
