/* SnapSpoon — tokens from the app's Palette (Theme.swift). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #FBFAF8;
  --surface: #FFFFFF;
  --border: #ECE9E4;
  --ink: #1C1B19;
  --ink-2: #3A3833;
  --muted: #6B6862;
  --accent: #C2410C;
  --accent-text: #C2410C;
  --accent-soft: #FDEDE5;
  --accent-ink: #7C2D12;
  --green-soft: #E6F2EC;
  --green-ink: #1F5A40;
  --tint-1: #F4D9C6;
  --tint-2: #DCE8D5;
  --tint-3: #F3E3B5;
  --frame: #1C1B19;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141312;
    --surface: #1E1D1B;
    --border: #2E2C29;
    --ink: #F5F3EF;
    --ink-2: #D6D2CB;
    --muted: #A8A49C;
    --accent-text: #F97A45;
    --accent-soft: #3A2317;
    --accent-ink: #F9B48F;
    --green-soft: #183327;
    --green-ink: #8FD3B0;
    --frame: #34322E;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
}

a { color: var(--accent-text); }
a:hover { color: var(--accent-ink); }

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

/* Top bar */
.topbar { padding: 24px 0; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 800 21px/1 var(--display);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark img { border-radius: 9px; }

/* Hero */
main { flex: 1; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
  padding-block: 48px 72px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 14px;
  font-weight: 600;
}
.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
h1 {
  margin: 20px 0 16px;
  font: 800 clamp(40px, 6.4vw, 68px)/1.02 var(--display);
  letter-spacing: -0.03em;
}
h1 em { font-style: normal; color: var(--accent-text); }
.lede {
  margin: 0 0 32px;
  max-width: 34em;
  font-size: 19px;
  color: var(--ink-2);
}

.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.features li {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.features strong {
  display: block;
  font: 700 17px/1.3 var(--display);
  margin-bottom: 4px;
}
.features span { font-size: 15px; color: var(--muted); }

/* Phone mock: a recipe card, drawn with CSS */
.phone {
  justify-self: center;
  width: 300px;
  max-width: 100%;
  padding: 12px;
  border-radius: 46px;
  background: var(--frame);
  box-shadow: 0 30px 60px -20px rgba(28, 27, 25, 0.35);
}
.screen {
  border-radius: 36px;
  overflow: hidden;
  background: var(--bg);
}
.screen .hero-img {
  height: 150px;
  background: var(--tint-1);
  display: grid;
  place-items: center;
}
.screen .hero-img img { width: 64px; height: 64px; }
.screen .body {
  margin-top: -18px;
  position: relative;
  border-radius: 22px 22px 0 0;
  background: var(--bg);
  padding: 18px 18px 22px;
}
.screen h2 { margin: 0 0 4px; font: 800 21px/1.15 var(--display); letter-spacing: -0.02em; }
.screen .meta { margin: 0 0 14px; font-size: 12px; color: var(--muted); }
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}
.stepper .ctrl { display: flex; align-items: center; gap: 8px; }
.stepper .btn {
  width: 28px; height: 28px;
  border-radius: 9px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  font-weight: 700;
}
.stepper .btn.plus { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper .n { font: 800 18px/1 var(--display); min-width: 18px; text-align: center; }
.ing { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ing li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.ing b { width: 58px; flex-shrink: 0; }
.ing span { color: var(--ink-2); }
.screen .note { margin: 10px 0 0; font-size: 11px; color: var(--accent-ink); }

/* Footer */
.footer {
  padding: 28px 0 36px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}
.footer .shell { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Single-message pages (import hand-off, 404) */
.center {
  display: grid;
  place-items: center;
  padding-block: 40px 80px;
}
.card {
  width: 100%;
  max-width: 480px;
  padding: 32px 28px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.card .icon { width: 64px; height: 64px; border-radius: 16px; }
.card h1 { font-size: clamp(30px, 6vw, 38px); margin: 18px 0 10px; }
.card p { margin: 0 0 22px; color: var(--ink-2); }
.card .host {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  font-weight: 600;
  color: var(--ink);
}
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { color: #fff; filter: brightness(0.95); }
.button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--border); margin-top: 10px; }
.small { font-size: 13px; color: var(--muted); margin-top: 16px !important; margin-bottom: 0 !important; }
[hidden] { display: none !important; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block-start: 24px; }
  .phone { order: -1; width: 260px; }
}
@media (max-width: 480px) {
  .shell { padding: 0 16px; }
  .features { grid-template-columns: 1fr; }
  .lede { font-size: 17px; }
}
@media (prefers-reduced-motion: no-preference) {
  .phone { animation: rise 600ms ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
}
