/* Tokens mirror DESIGN.md and src/constants/index.ts. */
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/Inter_400Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/Inter_600SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Shantell Sans';
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/ShantellSans_700Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Shantell Sans';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/ShantellSans_800ExtraBold.woff2') format('woff2');
}

:root {
  --enamel: #f3f4f1;
  --paper: #ffffff;
  --ink: #1f2124;
  --ink-soft: #5a5e66;
  --seam: #e3e4e0;
  --magnet: #d2382c;
  --magnet-press: #b02a20;
  --note: #ffd54a;
  --note-ink: #5c4a12;
  --crayon: #2b57d0;
  --crayon-fill: #2b57d0;
  --leaf: #2a7d45;
  --sketch: #ffffff;
  --print-frame: #ffffff;
  --print-ink: #1f2124;
  --print-plate: #e3e4e0;
  --lift: 0 3px 8px rgb(31 33 36 / 0.14);
  --glow: 0 4px 10px rgb(176 42 32 / 0.3);
  --pin-shadow: 0 2px 2px rgb(31 33 36 / 0.3);
  --hand: 'Shantell Sans', 'Comic Sans MS', cursive;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --enamel: #141517;
    --paper: #202124;
    --ink: #ecede8;
    --ink-soft: #a6aab1;
    --seam: #303236;
    --note: #e8c147;
    --note-ink: #1f2124;
    --crayon: #93aef8;
    --crayon-fill: #3557c4;
    --leaf: #6bc08a;
    /* The Paper Stays Paper Rule: drawings and prints keep a light sheet. */
    --sketch: #e9e6de;
    --print-frame: #e9e6de;
    --print-plate: #d8d4c9;
    --lift: 0 3px 8px rgb(0 0 0 / 0.4);
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--enamel);
  color: var(--ink);
  font: 16px/23px var(--sans);
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--crayon);
  text-underline-offset: 3px;
}
a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--crayon);
  outline-offset: 3px;
}
h1,
h2,
h3 {
  font-family: var(--hand);
  margin: 0;
}
h1 {
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.5px;
}
h2 {
  font-size: clamp(26px, 4vw, 32px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
}
p {
  margin: 0;
}
.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}
.soft {
  color: var(--ink-soft);
}

/* Header and footer */
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font: 800 24px/1 var(--hand);
}
.brand img {
  width: 40px;
  height: 40px;
}
.site-nav {
  display: flex;
  gap: 4px;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 10px;
  border-radius: 18px;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.site-nav a:hover {
  background: var(--seam);
}
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--seam);
  padding: 24px 0 40px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}
.site-footer nav a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  color: var(--ink-soft);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 18px;
  font: 600 17px/1 var(--sans);
  text-decoration: none;
  transition: transform 120ms ease;
}
.button:active {
  transform: scale(0.97);
}
.button-primary {
  background: var(--magnet);
  color: #fff;
  box-shadow: var(--glow);
}
.button-primary:hover {
  background: var(--magnet-press);
}
.button-secondary {
  min-height: 48px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--seam);
}

/* Pinned material */
.note,
.print {
  position: relative;
  border-radius: 3px;
  box-shadow: var(--lift);
}
.note {
  background: var(--paper);
  padding: 24px;
}
.note-sticky {
  background: var(--note);
  color: var(--note-ink);
}
.note-sticky a:not(.button) {
  color: var(--note-ink);
}
.print {
  background: var(--print-frame);
  color: var(--print-ink);
  padding: 8px 8px 16px;
}
.print .well {
  aspect-ratio: 4 / 3;
  background: var(--print-plate);
  border-radius: 2px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.print .well img {
  height: 100%;
  width: auto;
  object-fit: contain;
}
.print figcaption {
  margin-top: 12px;
  padding: 0 4px;
  font: 700 18px/22px var(--hand);
}
.tilt-l {
  transform: rotate(-1.5deg);
}
.tilt-r {
  transform: rotate(1deg);
}
.tilt-l2 {
  transform: rotate(-2deg);
}
.pin {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: var(--magnet);
  box-shadow: var(--pin-shadow);
}
.pin-crayon {
  background: var(--crayon-fill);
}
.pin-note {
  background: #ffd54a;
}
.pin-leaf {
  background: var(--leaf);
}
.pin-left {
  left: 34px;
}

/* Home */
.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding: 32px 0 16px;
}
.hero .note-sticky {
  padding: 32px 24px 0;
}
.hero .note-sticky p {
  margin-top: 16px;
  font-size: 18px;
  line-height: 26px;
}
.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  /* The primary button pins across the lower edge of the note. */
  margin: 24px 0 -28px;
  transform: rotate(1.5deg);
}
.hero .coming {
  margin-top: 16px;
  font: 700 16px/20px var(--hand);
}
.hero .chef {
  max-width: min(380px, 70vw);
  justify-self: center;
}
.section {
  margin-top: 88px;
}
.section > h2 {
  margin-bottom: 8px;
}
.section > .soft {
  max-width: 560px;
}
.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 40px;
}
.steps .step-text {
  margin-top: 20px;
  padding: 0 4px;
}
.steps .step-text b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--crayon-fill);
  color: #fff;
  font-size: 14px;
}
.ingredients {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
  width: 100%;
  height: 100%;
}
.ingredients img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.chat {
  display: grid;
  gap: 40px;
  align-items: center;
}
.bubbles {
  display: grid;
  gap: 12px;
}
.bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
}
.bubble-user {
  justify-self: end;
  background: var(--crayon-fill);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble-bot {
  background: var(--paper);
  border-top-left-radius: 4px;
  box-shadow: var(--lift);
}
.plans {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}
.list-group {
  background: var(--paper);
  border-radius: 12px;
  box-shadow: var(--lift);
  overflow: hidden;
}
.list-group h3 {
  padding: 20px 16px 4px;
}
.list-group .tag {
  padding: 0 16px 12px;
  color: var(--ink-soft);
}
.list-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list-group li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  border-top: 1px solid var(--seam);
}
.list-group li::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--leaf);
}
.list-group.pro h3 {
  color: var(--magnet);
}
.promise {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}
.promise .note h3 {
  margin-bottom: 8px;
}

/* Text pages */
.page {
  max-width: 720px;
  padding-top: 24px;
}
.page h1 {
  font-size: clamp(32px, 5vw, 40px);
}
.page .meta {
  margin-top: 8px;
  color: var(--ink-soft);
}
.page h2 {
  margin-top: 40px;
  font-size: 22px;
  line-height: 28px;
}
.page p,
.page ul {
  margin-top: 12px;
}
.page li + li {
  margin-top: 6px;
}
.page .note {
  margin-top: 32px;
}
.faq details {
  border-top: 1px solid var(--seam);
}
.faq details:last-child {
  border-bottom: 1px solid var(--seam);
}
.faq summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}
.faq details p {
  margin: 0 0 16px;
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    padding-top: 56px;
  }
  .hero .note-sticky {
    padding: 48px 40px 0;
  }
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .chat {
    grid-template-columns: 0.8fr 1.2fr;
  }
  .plans,
  .promise {
    grid-template-columns: repeat(2, 1fr);
  }
  .promise {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
