/* Mealwick website. Tokens mirror src/theme.ts and docs/design/premium-system.md in the app repo. */

@font-face {
  font-family: 'Gabarito';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('fonts/Gabarito_400Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Gabarito';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('fonts/Gabarito_700Bold.ttf') format('truetype');
}

:root {
  color-scheme: light dark;
  /* Light: enamel page, warm paper cards, graphite ink, one terracotta note. */
  --background: #f2f2ef;
  --surface: #fcfaf6;
  --surface-alt: #ecebe6;
  --raised: #ffffff;
  --text: #18191a;
  --text-muted: #5c6163;
  --border: #dcdcd7;
  --border-strong: #b9bcbb;
  --primary: #1b1d1e;
  --primary-text: #ffffff;
  --accent: #a3401f;
  --accent-text: #ffffff;
  --soon-wash: #f5e8d0;
  --soon: #8f5300;
  --night: #121618;
  --night-text: #f6f7f5;
  --night-muted: #b4bec3;
  --night-accent: #f0916c;
  --bezel: #1b1d1e;
  --bezel-edge: rgba(255, 255, 255, 0.08);
  --stage: linear-gradient(180deg, #ecebe6 0%, #e3e2dc 100%);
  --fresh: #2f6f4f;
  --expired: #b42318;
  --glass: rgba(176, 200, 210, 0.5);
  --glass-edge: #ffffff;
  --glass-under: rgba(40, 58, 66, 0.16);
  --shelf-shadow: rgba(0, 0, 0, 0.16);
  --shadow: 0 6px 14px rgba(0, 0, 0, 0.07);
  --shadow-phone: 0 24px 48px rgba(24, 25, 26, 0.18), 0 2px 6px rgba(24, 25, 26, 0.08);
  --shadow-float: 0 18px 40px rgba(24, 25, 26, 0.14), 0 2px 6px rgba(24, 25, 26, 0.06);
  --shadow-deep: 0 50px 90px rgba(24, 25, 26, 0.24), 0 12px 24px rgba(24, 25, 26, 0.1);
  --glow: rgba(163, 64, 31, 0.16);
  --glow-soft: rgba(163, 64, 31, 0.07);
  --nav-bg: rgba(252, 250, 246, 0.74);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --gutter: 16px;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #0e1011;
    --surface: #1a1b1b;
    --surface-alt: #242626;
    --raised: #2c2f30;
    --text: #eeefed;
    --text-muted: #9ea4a6;
    --border: #2a2d2e;
    --border-strong: #4a5053;
    --primary: #eeefed;
    --primary-text: #0e1011;
    --accent: #f0916c;
    --accent-text: #0e1011;
    --soon-wash: #3a2c14;
    --soon: #f2b45c;
    --night: #0c0f11;
    --night-text: #f6f7f5;
    --night-muted: #a9b4ba;
    --bezel: #2c2f30;
    --bezel-edge: rgba(255, 255, 255, 0.12);
    --stage: linear-gradient(180deg, #1f2223 0%, #161819 100%);
    --fresh: #7fcba2;
    --expired: #ff8a7a;
    --glass: rgba(150, 178, 190, 0.14);
    --glass-edge: rgba(225, 238, 244, 0.42);
    --glass-under: rgba(0, 0, 0, 0.45);
    --shelf-shadow: rgba(0, 0, 0, 0.45);
    --shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
    --shadow-phone: 0 24px 48px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-float: 0 18px 40px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-deep: 0 50px 90px rgba(0, 0, 0, 0.7), 0 12px 24px rgba(0, 0, 0, 0.4);
    --glow: rgba(240, 145, 108, 0.17);
    --glow-soft: rgba(240, 145, 108, 0.07);
    --nav-bg: rgba(26, 27, 27, 0.72);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: 'Gabarito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  text-wrap: balance;
}

h1 {
  font-size: 40px;
  line-height: 1.04;
  letter-spacing: -1.2px;
}

h2 {
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.8px;
}

h3 {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

p {
  margin: 0;
}

p + p,
ul + p,
p + ul,
ol + p,
p + ol {
  margin-top: 1em;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: currentColor;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.muted {
  color: var(--text-muted);
}

.label {
  font-size: 14px;
  line-height: 1.3;
  color: var(--text-muted);
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.prose {
  max-width: 680px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 700;
  text-decoration: none;
}

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

/* Header: wordmark and links. */
.site-header {
  padding-top: 18px;
  padding-bottom: 18px;
}

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

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.3px;
  text-decoration: none;
}

.wordmark img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  gap: 2px;
  margin-right: -8px;
}

.site-nav a {
  padding: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  border-radius: 999px;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.site-nav a[aria-current='page'] {
  color: var(--text);
}

.nav-extra {
  display: none;
}

/* Home: the header becomes a sticky pill that frosts over once you scroll. */
.home .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 0 0;
}

.home .site-header .wrap {
  width: calc(100% - 16px);
  padding: 6px 6px 6px 14px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: var(--shadow-float);
  transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.js .home .site-header:not(.is-scrolled) .wrap {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.home .site-nav {
  margin-right: 0;
}

@media (max-width: 419px) {
  .home .wordmark {
    font-size: 18px;
    gap: 8px;
  }

  .home .wordmark img {
    width: 26px;
    height: 26px;
  }

  .home .site-nav a {
    padding: 8px 6px;
  }
}

/* Sections */
.section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.section-head {
  margin-bottom: 28px;
  max-width: 640px;
}

.section-head p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 18px;
}

.big-head {
  max-width: 820px;
  margin-bottom: 40px;
}

.big-head h2 {
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.big-head .kicker {
  margin-bottom: 14px;
}

.big-head p:last-child {
  margin-top: 16px;
  font-size: clamp(18px, 2vw, 21px);
}

.lede {
  font-size: 19px;
  line-height: 1.45;
  color: var(--text-muted);
}

.kicker {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.kicker::before {
  content: '';
  flex: none;
  margin-top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

/* Phone: a graphite bezel around a real screenshot (402 by 874 points). */
.phone {
  position: relative;
  aspect-ratio: 402 / 874;
  padding: 9px;
  border-radius: 46px;
  background: var(--bezel);
  box-shadow: inset 0 0 0 1px var(--bezel-edge), var(--shadow-phone);
}

.phone picture {
  display: block;
  width: 100%;
  height: 100%;
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 38px;
  background: #0e1011;
}

/* Shelf band: a lit glass edge used as a divider. */
.band {
  display: block;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.band img {
  width: 100%;
  height: auto;
}

/* The food shelf graphic in the loop section. */
.food-shelf-wrap {
  margin: 0 0 40px;
  overflow-x: auto;
  scrollbar-width: none;
}

.food-shelf-wrap::-webkit-scrollbar {
  display: none;
}

.food-shelf {
  display: block;
  width: max(100%, 720px);
  height: auto;
  font-family: 'Gabarito', system-ui, sans-serif;
}

.footer-maker {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.footer-maker > img {
  flex: none;
  width: 48px;
  height: 48px;
  margin-top: 2px;
}

/* Buttons: one graphite primary, paper secondary. "Coming soon" pills are not buttons. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid transparent;
}

.button-primary {
  background: var(--primary);
  color: var(--primary-text);
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
  text-align: left;
}

.store-pill svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.store-pill b {
  display: block;
  font-size: 16px;
}

.store-pill span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
}

/* ------------------------------------------------------------------ */
/* Home hero: huge headline, three real screens fanned in 3D.          */
/* ------------------------------------------------------------------ */
.hx {
  position: relative;
  overflow: hidden;
  padding-top: 40px;
  text-align: center;
}

.hx-glow {
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(1400px, 180vw);
  height: 1100px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, var(--glow), transparent 70%),
    radial-gradient(closest-side at 50% 75%, var(--glow-soft), transparent);
  pointer-events: none;
}

.hx-copy {
  position: relative;
  z-index: 5;
  max-width: 1040px;
}

.hx-title {
  font-size: clamp(46px, 11.2vw, 128px);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.hx-title span {
  color: var(--accent);
}

.hx-copy .lede {
  max-width: 620px;
  margin: 22px auto 0;
  font-size: clamp(18px, 2vw, 21px);
}

.hx-copy .hero-actions {
  justify-content: center;
}

.hx-stage {
  --pw: clamp(172px, 26vw, 320px);
  --mx: 0;
  --my: 0;
  position: relative;
  max-width: 1240px;
  height: calc(var(--pw) * 2.174 + 72px);
  margin: 40px auto 0;
}

.fan {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  justify-content: center;
  align-items: start;
  padding-top: 28px;
  perspective: 1800px;
}

.fan-phone {
  grid-area: 1 / 1;
  width: var(--pw);
  transition: transform 700ms var(--ease);
}

.fan-mid {
  z-index: 3;
  transform: rotateY(calc(var(--mx) * 6deg)) rotateX(calc(var(--my) * -4deg));
}

.fan-left {
  z-index: 2;
  transform: translateX(-70%) translateY(9%) rotateY(calc(26deg + var(--mx) * 6deg)) rotateX(calc(var(--my) * -4deg)) rotateZ(-2deg) scale(0.86);
}

.fan-right {
  z-index: 1;
  transform: translateX(70%) translateY(9%) rotateY(calc(-26deg + var(--mx) * 6deg)) rotateX(calc(var(--my) * -4deg)) rotateZ(2deg) scale(0.86);
}

.fan .phone {
  box-shadow: inset 0 0 0 1px var(--bezel-edge), var(--shadow-deep);
  animation: rise 1100ms var(--ease) both;
}

.fan-mid .phone {
  animation-delay: 80ms;
}

.fan-left .phone,
.fan-right .phone {
  animation-delay: 260ms;
}

.hx-floor {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: calc(var(--pw) * 2.6);
  height: 60px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--shelf-shadow), transparent);
  filter: blur(6px);
  z-index: 1;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(80px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Food drifting behind the phones */
.hx-foods {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.food {
  position: absolute;
  translate: calc(var(--mx) * var(--d) * 1px) calc(var(--my) * var(--d) * 1px);
  transition: translate 900ms var(--ease);
  animation: drift 11s ease-in-out infinite alternate;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.16));
}

.f1 { left: 9%; top: 6%; animation-duration: 12s; }
.f2 { left: 27%; top: -2%; animation-duration: 9s; animation-delay: -3s; filter: blur(1.5px); opacity: 0.85; }
.f3 { right: 7%; top: 24%; animation-duration: 13s; animation-delay: -6s; }
.f4 { right: 25%; top: 0; animation-duration: 10s; animation-delay: -2s; }
.f5 { left: 23%; top: 58%; animation-duration: 14s; animation-delay: -5s; filter: blur(2px); opacity: 0.8; }
.f6 { right: 22%; top: 62%; animation-duration: 11s; animation-delay: -8s; }
.f7 { left: 3%; top: 44%; animation-duration: 10s; animation-delay: -4s; filter: blur(1.5px); opacity: 0.85; }
.f8 { right: 2%; top: 70%; animation-duration: 12s; animation-delay: -1s; }

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) rotate(-7deg);
  }
  to {
    transform: translate3d(12px, -26px, 0) rotate(9deg);
  }
}

/* UI chips quoting real app states */
.hx-chips {
  position: absolute;
  inset: 0;
  z-index: 4;
  list-style: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.chip {
  position: absolute;
  translate: calc(var(--mx) * var(--d) * 1px) calc(var(--my) * var(--d) * 1px);
  transition: translate 700ms var(--ease);
}

.chip-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px 9px 9px;
  border-radius: 18px;
  background: var(--raised);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-float);
  text-align: left;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  animation: chip-in 800ms var(--ease) both, bob 6s ease-in-out infinite alternate;
  animation-delay: 700ms, 1500ms;
}

.chip-card img,
.chip-tick {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-alt);
}

.chip-tick circle {
  fill: var(--fresh);
}

.chip-tick path {
  stroke: var(--raised);
}

.chip-card b {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.chip-card span span {
  display: block;
  color: var(--text-muted);
}

.chip-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid var(--raised);
}

.dot-expired {
  background: var(--expired);
}

.c1 { left: 5%; top: 10%; }
.c2 { left: 9%; top: 47%; }
.c3 { right: 4%; top: 13%; }
.c4 { right: 9%; top: 47%; }
.c5 { left: 17%; top: 79%; }
.c6 { right: 16%; top: 81%; }

.c2 .chip-card { animation-delay: 850ms, 2600ms; animation-duration: 800ms, 7s; }
.c3 .chip-card { animation-delay: 1000ms, 1900ms; animation-duration: 800ms, 6.5s; }
.c4 .chip-card { animation-delay: 1150ms, 3200ms; animation-duration: 800ms, 7.5s; }
.c5 .chip-card { animation-delay: 1300ms, 2200ms; animation-duration: 800ms, 5.5s; }
.c6 .chip-card { animation-delay: 1450ms, 2900ms; animation-duration: 800ms, 6.8s; }

@keyframes chip-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-12px);
  }
}

@media (max-width: 899px) {
  .c4,
  .c6 {
    display: none;
  }

  .c1 { left: 2%; top: 4%; }
  .c2 { left: 1%; top: 58%; }
  .c3 { right: 2%; top: 30%; }
  .c5 { left: auto; right: 3%; top: 82%; }
}

@media (max-width: 599px) {
  .hx {
    padding-top: 24px;
  }

  .hx-stage {
    margin-top: 28px;
  }

  .c5 {
    display: none;
  }

  .chip-card {
    gap: 8px;
    padding: 7px 11px 7px 7px;
    border-radius: 14px;
    font-size: 12px;
  }

  .chip-card b {
    font-size: 13px;
  }

  .chip-card img,
  .chip-tick {
    width: 28px;
    height: 28px;
    padding: 3px;
    border-radius: 9px;
  }

  .food {
    scale: 0.62;
  }

  .f5,
  .f7 {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* The loop: four steps with big numerals.                             */
/* ------------------------------------------------------------------ */
.steps {
  display: grid;
  gap: 28px;
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  border-top: 1px solid var(--border-strong);
  padding-top: 18px;
}

.steps li::before {
  content: '0' counter(step);
  display: block;
  font-size: clamp(72px, 9vw, 120px);
  line-height: 0.82;
  font-weight: 700;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
  color: var(--text);
  background: linear-gradient(170deg, var(--text) 35%, var(--accent) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.steps h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.steps p {
  color: var(--text-muted);
  font-size: 16px;
}

/* ------------------------------------------------------------------ */
/* Bento grid                                                          */
/* ------------------------------------------------------------------ */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: translate 300ms var(--ease), box-shadow 300ms var(--ease);
}

@media (hover: hover) {
  .tile:hover {
    translate: 0 -6px;
    box-shadow: var(--shadow-deep);
  }

  .tile:hover .tile-media .phone {
    transform: translateY(calc(var(--shift, 0%) - 1.5%));
  }
}

.tile-copy {
  padding: 26px 24px 0;
}

.tile-kicker {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.tile h3 {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.tile h3 + p,
.type-big + p {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 16px;
}

.tile-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  font-size: 15px;
  color: var(--text-muted);
}

.tile-list li {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.tile-list b {
  color: var(--text);
}

.tile-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
  height: 300px;
  margin-top: auto;
  padding: 26px 24px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 64px);
  mask-image: linear-gradient(180deg, transparent 0, #000 64px);
}

.tile-media .phone {
  flex: none;
  width: min(250px, 74%);
  transform: translateY(var(--shift, 0%));
  transition: transform 500ms var(--ease);
  box-shadow: inset 0 0 0 1px var(--bezel-edge), var(--shadow-float);
}

.tile-pair .phone {
  width: min(190px, 44%);
}

.tile-pair .phone + .phone {
  margin-top: 36px;
}

.tile-night {
  background: var(--night);
  border-color: var(--night);
}

.tile-night h3 {
  color: var(--night-text);
}

.tile-night .tile-kicker {
  color: var(--night-accent);
}

.tile-night h3 + p {
  color: var(--night-muted);
}

.tile-night .phone {
  --bezel-edge: rgba(255, 255, 255, 0.14);
  background: #2c2f30;
}

.tile-type {
  padding: 26px 24px;
  min-height: 240px;
}

.type-big {
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.type-big span {
  color: var(--text);
}

.tile-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--soon-wash);
  color: var(--soon);
  font-size: 14px;
  font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Tonight, from Chef: full bleed, dark in both themes                 */
/* ------------------------------------------------------------------ */
.night {
  position: relative;
  overflow: hidden;
  margin-top: 40px;
  padding: 88px 0;
  background: var(--night);
  color: var(--night-text);
}

.night-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% 30%, rgba(240, 145, 108, 0.2), transparent 70%),
    radial-gradient(50% 40% at 10% 90%, rgba(240, 145, 108, 0.08), transparent 70%);
}

.night-grid {
  position: relative;
  display: grid;
  gap: 56px;
  align-items: center;
}

.night-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 17px;
  font-weight: 700;
  color: var(--night-accent);
}

.night-kicker img {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 40px rgba(240, 145, 108, 0.35);
}

.night h2 {
  color: var(--night-text);
  font-size: clamp(36px, 5.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.night-copy > p {
  margin-top: 18px;
  color: var(--night-muted);
  font-size: clamp(17px, 1.8vw, 20px);
  max-width: 520px;
}

.night-copy ul {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  max-width: 520px;
  color: var(--night-muted);
  font-size: 16px;
}

.night-copy li {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.night-copy li b {
  color: var(--night-text);
}

.night-art {
  position: relative;
  aspect-ratio: 1 / 1.02;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.dish {
  position: absolute;
  margin: 0;
  overflow: hidden;
  background: #1a1b1b;
}

.dish > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-main {
  left: 0;
  top: 6%;
  width: 72%;
  aspect-ratio: 702 / 720;
  border-radius: 32px;
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6), 0 0 120px rgba(240, 145, 108, 0.22);
}

.dish-side {
  right: 0;
  top: 0;
  width: 44%;
  aspect-ratio: 720 / 472;
  border-radius: 22px;
  rotate: 4deg;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.55);
  z-index: 2;
}

.dish-card {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #fcfaf6;
  color: #5c6163;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.dish-card b {
  color: #18191a;
  font-size: clamp(17px, 2vw, 21px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.dish-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a3401f;
  font-weight: 700;
  font-size: 13px;
}

.dish-by img {
  width: 22px;
  height: 22px;
}

.dish-card-sm {
  left: 8px;
  right: auto;
  bottom: 8px;
  padding: 8px 12px;
  border-radius: 12px;
}

.dish-card-sm b {
  font-size: 14px;
}

.dish-card-sm .dish-by {
  font-size: 11px;
}

.night-phone {
  position: absolute;
  right: -2%;
  bottom: 2%;
  width: 30%;
  z-index: 3;
  rotate: -5deg;
}

.night-phone .phone {
  padding: 6px;
  border-radius: 30px;
  background: #2c2f30;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 40px 80px rgba(0, 0, 0, 0.6);
}

.night-phone .phone img {
  border-radius: 25px;
}

#chef-replay:not(:empty) {
  margin-top: 64px;
}

/* ------------------------------------------------------------------ */
/* Recipe marquee                                                      */
/* ------------------------------------------------------------------ */
.marquee-section {
  overflow: hidden;
  padding: 88px 0 56px;
}

.marquee-title {
  text-align: center;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--text-muted);
  letter-spacing: -0.02em;
  margin-bottom: 30px;
}

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee + .marquee {
  margin-top: 18px;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 70s linear infinite;
}

.marquee-rev .marquee-track {
  animation-duration: 58s;
  animation-direction: reverse;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-list {
  display: flex;
  flex: none;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.marquee-list li {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: clamp(34px, 6.4vw, 80px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.marquee-list li::after {
  content: '';
  flex: none;
  width: 0.2em;
  height: 0.2em;
  margin: 0 0.55em;
  border-radius: 999px;
  background: var(--accent);
}

.marquee-rev .marquee-list li {
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: -0.01em;
  margin-right: 12px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.marquee-rev .marquee-list li::after {
  display: none;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------------ */
/* Plans: the honest facts                                             */
/* ------------------------------------------------------------------ */
.plans {
  display: grid;
  gap: 28px;
  padding: 30px 22px;
  border-radius: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.plans h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.plans-head p {
  margin-top: 16px;
  color: var(--text-muted);
}

.plans-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  align-self: center;
}

.plans-facts li {
  position: relative;
  padding: 16px 0 16px 42px;
  border-top: 1px solid var(--border);
  font-size: 17px;
}

.plans-facts li:last-child {
  border-bottom: 1px solid var(--border);
}

.plans-facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-alt);
}

.plans-facts li::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 20px;
  width: 6px;
  height: 11px;
  border-right: 2px solid var(--fresh);
  border-bottom: 2px solid var(--fresh);
  rotate: 45deg;
}

/* ------------------------------------------------------------------ */
/* Closing                                                             */
/* ------------------------------------------------------------------ */
.closing {
  position: relative;
  overflow: hidden;
  padding: 72px 0 104px;
  text-align: center;
}

.closing::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1100px, 160vw);
  height: 100%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, var(--glow), transparent 75%);
  pointer-events: none;
}

.closing-cabinet {
  position: absolute;
  left: 50%;
  top: 40px;
  width: min(520px, 92%);
  transform: translateX(-50%);
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 85%);
  pointer-events: none;
}

.closing-cabinet img {
  width: 100%;
  height: auto;
}

.closing-inner {
  position: relative;
  max-width: 1040px;
}

.closing-mark {
  width: 112px;
  height: 112px;
  margin: 0 auto 28px;
  filter: drop-shadow(0 24px 40px var(--glow)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.12));
}

.closing-title {
  font-size: clamp(42px, 9.4vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.closing-title span {
  color: var(--accent);
}

.closing .lede {
  margin: 22px auto 0;
}

.closing .hero-actions {
  justify-content: center;
}

.closing .hero-actions + .hero-actions {
  margin-top: 14px;
}

.closing .button {
  min-height: 56px;
  padding: 0 30px;
  font-size: 17px;
  box-shadow: var(--shadow-float);
}

/* ------------------------------------------------------------------ */
/* Scroll reveal (only when main.js has run; visible without JS)       */
/* ------------------------------------------------------------------ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 800ms var(--ease) calc(var(--i, 0) * 90ms),
    transform 800ms var(--ease) calc(var(--i, 0) * 90ms),
    translate 300ms var(--ease),
    box-shadow 300ms var(--ease);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Reduce motion: every movement becomes a quiet fade. */
@media (prefers-reduced-motion: reduce) {
  .fan .phone,
  .chip-card {
    animation: fade 300ms ease both;
  }

  .food,
  .marquee-track {
    animation: none;
  }

  .fan-phone,
  .chip,
  .food,
  .tile,
  .tile-media .phone {
    transition: none;
  }

  .tile:hover {
    translate: none;
  }

  .tile:hover .tile-media .phone {
    transform: translateY(var(--shift, 0%));
  }

  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .marquee-track {
    width: auto;
    padding: 0 var(--gutter);
  }

  .marquee-list {
    flex: 1;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 8px;
  }

  .marquee-list[aria-hidden='true'] {
    display: none;
  }

  .marquee-list li {
    white-space: normal;
  }

  .js [data-reveal] {
    transform: none;
    transition: opacity 300ms ease;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Note box for drafts */
.note {
  background: var(--soon-wash);
  color: var(--soon);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.4;
}

.note strong {
  font-weight: 700;
}

/* The data-flow table stacks into cards on narrow screens. */
@media (max-width: 599px) {
  .flows,
  .flows tbody,
  .flows tr,
  .flows td {
    display: block;
  }

  .flows thead {
    display: none;
  }

  .flows tr {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px 16px;
    margin-bottom: 10px;
  }

  .flows td {
    border-bottom: 0;
    padding: 10px 0;
  }

  .flows td + td {
    border-top: 1px solid var(--border);
  }

  .flows td::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 2px;
  }
}

/* Legal and support pages */
.page {
  padding-top: 24px;
  padding-bottom: 56px;
}

.page h1 {
  margin-bottom: 12px;
}

.page .lede {
  margin-bottom: 24px;
}

.page h2 {
  font-size: 22px;
  letter-spacing: -0.4px;
  margin-top: 36px;
  margin-bottom: 10px;
}

.page h3 {
  font-size: 18px;
  margin-top: 22px;
  margin-bottom: 6px;
}

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

.page li + li {
  margin-top: 6px;
}

.page table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 16px;
}

.page th,
.page td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--border);
}

.page th {
  font-weight: 700;
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 8px;
}

.toc ol {
  margin: 8px 0 0;
  padding-left: 20px;
  columns: 1;
}

.toc li {
  margin: 0;
}

.toc a {
  text-decoration: none;
  color: var(--text);
  display: inline-block;
  padding: 4px 0;
}

.toc a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  padding-bottom: 40px;
  color: var(--text-muted);
  font-size: 15px;
}

.site-footer .wrap {
  display: grid;
  gap: 18px;
}

.site-footer p + p {
  margin-top: 4px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.footer-links a:hover {
  text-decoration: underline;
}

details summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: '';
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

details[open] summary::after {
  transform: rotate(-135deg);
}

details ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

/* 404 */
.lost {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.lost img {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin: 0 auto 20px;
  box-shadow: var(--shadow);
}

.lost .hero-actions {
  justify-content: center;
}

/* Wider screens */
@media (min-width: 600px) {
  :root {
    --gutter: 24px;
  }

  body {
    font-size: 18px;
  }

  h1 {
    font-size: 52px;
  }

  h2 {
    font-size: 34px;
  }

  .section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 28px;
  }

  .bento {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .tile-fridge {
    grid-column: span 2;
  }

  .tile-type:last-child {
    grid-column: span 2;
  }

  .plans {
    padding: 44px 40px;
  }

  .toc ol {
    columns: 2;
    column-gap: 24px;
  }

  .site-footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .site-nav {
    gap: 4px;
  }

  .site-nav a {
    padding: 8px 12px;
    font-size: 16px;
  }

  .home .site-header .wrap {
    width: calc(100% - 32px);
    padding: 6px 8px 6px 18px;
    border-radius: 999px;
  }
}

@media (min-width: 760px) {
  .nav-extra {
    display: inline-flex;
  }
}

@media (min-width: 900px) {
  h1 {
    font-size: 64px;
    letter-spacing: -2px;
  }

  .hx {
    padding-top: 64px;
  }

  .hx-title {
    font-size: clamp(46px, 9.4vw, 128px);
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .night {
    padding: 128px 0;
  }

  .night-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 72px;
  }

  .plans {
    grid-template-columns: 1.35fr 1fr;
    gap: 56px;
    padding: 64px 56px;
  }

  .closing {
    padding: 104px 0 136px;
  }
}

@media (min-width: 1000px) {
  .bento {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }

  .tile-fridge {
    grid-column: span 4;
    grid-row: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .tile-fridge .tile-copy {
    padding: 36px 8px 36px 36px;
  }

  .tile-fridge .tile-media {
    height: auto;
    min-height: 560px;
    padding-top: 40px;
  }

  .tile-fridge .tile-media .phone {
    width: min(290px, 88%);
  }

  .tile-recipes {
    grid-column: span 2;
    grid-row: span 2;
  }

  .tile-recipes .tile-media {
    flex: 1;
    min-height: 340px;
  }

  .tile-third,
  .tile-type:last-child {
    grid-column: span 2;
  }

  .tile-half {
    grid-column: span 3;
  }

  .tile-half .tile-media {
    height: 340px;
  }

  .tile-copy {
    padding: 30px 30px 0;
  }

  .tile-type {
    padding: 30px;
    min-height: 300px;
  }
}
