:root {
  color-scheme: dark;
  --ink: #f5efe4;
  --muted: #c8c2b8;
  --paper: #111614;
  --surface: #18211d;
  --line: #39443e;
  --wash: #101816;
  --tomato: #ff8a65;
  --tomato-deep: #ffb199;
  --herb: #76d099;
  --herb-deep: #c4f0d3;
  --stock: #d46a56;
  --stock-deep: #ffad9b;
  --blue: #80c6df;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  --page-backdrop: rgba(12, 16, 14, 0.39);
  --header-bg: rgba(18, 22, 21, 0.94);
  --brand-tile-bg: #1f2421;
  --brand-tile-fg: #fff;
  --button-bg: #d46a56;
  --button-fg: #fff;
  --button-hover: #80c6df;
  --button-light-bg: #f1e5da;
  --button-light-fg: #171510;
  --footer-bg: #0d1110;
  --footer-fg: #fff;
  --footer-muted: rgba(255, 255, 255, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  position: relative;
  isolation: isolate;
  background: #1e252d;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  content: "";
  pointer-events: none;
}

body::before {
  z-index: -2;
  background-image: url("/assets/overlay.png"), linear-gradient(0deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)), url("/assets/goodsoup.gif");
  background-position: center center, center center, center center;
  background-size: auto, auto, cover;
}

body::after {
  z-index: -1;
  background: var(--page-backdrop);
}

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

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 0.8rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(31, 36, 33, 0.12);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  padding: 0.9rem max(1.25rem, calc((100vw - 1180px) / 2));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.brand-icon {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-tile-bg);
  color: var(--brand-tile-fg);
}

.home-panel,
.section,
.toolbar-band,
.site-footer {
  padding-left: max(1.25rem, calc((100vw - 1180px) / 2));
  padding-right: max(1.25rem, calc((100vw - 1180px) / 2));
  width: 100%;
}

.home-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 2rem;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 2rem;
}

.home-copy h1,
.collection-hero h1 {
  margin: 0;
  font-size: 4rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--tomato);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lede {
  margin: 1.35rem 0 0.2rem;
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 780;
}

.intro-text,
.hero-description {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 44rem;
}

body[data-page="home"] .intro-text {
  color: var(--ink);
}

.scroll-cue {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-top: 1.25rem;
  border-radius: 50%;
  background: var(--button-bg);
  color: var(--button-fg);
  font-size: 1.35rem;
  font-weight: 860;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  background: var(--button-hover);
}

.cover-strip {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-rows: 180px 180px;
  gap: 0.85rem;
}

.cover-strip img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.cover-strip img:first-child {
  grid-row: span 2;
}

.cover-strip-empty {
  min-height: 372px;
  pointer-events: none;
}

.section {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.collection-grid,
.recipe-grid {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.collection-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.collection-card,
.recipe-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 36, 33, 0.07);
}

.collection-card-media,
.recipe-card-media {
  position: relative;
  overflow: hidden;
  background: var(--wash);
  text-decoration: none;
}

.collection-card-media img,
.recipe-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.collection-card-media {
  aspect-ratio: 4 / 3;
}

.recipe-card-media {
  aspect-ratio: 1 / 0.72;
}

.collection-card:hover img,
.recipe-card:hover img {
  transform: scale(1.035);
}

.collection-card-body,
.recipe-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.1rem;
}

.collection-card h3,
.recipe-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.18;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.recipe-card h2 {
  font-size: 1.02rem;
}

.collection-card p,
.recipe-card p {
  margin: 0;
  color: var(--muted);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  padding: 0.25rem 0.55rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border: 0;
  border-radius: 6px;
  background: var(--button-bg);
  color: var(--button-fg);
  font-weight: 820;
  line-height: 1.15;
  padding: 0.75rem 1rem;
  text-align: center;
  text-decoration: none;
}

.button:hover,
.button:focus-visible {
  background: var(--button-hover);
  color: var(--button-fg);
}

.button-light {
  background: var(--button-light-bg);
  color: var(--button-light-fg);
}

.button-light:hover,
.button-light:focus-visible {
  background: var(--stock);
  color: var(--button-light-fg);
}

.collection-hero {
  position: relative;
  display: grid;
  min-height: 420px;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.collection-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(31, 36, 33, 0.86), rgba(31, 36, 33, 0.54), rgba(31, 36, 33, 0.28));
}

.collection-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 880px;
  flex-direction: column;
  justify-content: center;
  padding: 4rem max(1.25rem, calc((100vw - 1180px) / 2));
}

.collection-hero .eyebrow,
.collection-hero h1,
.collection-hero .hero-description {
  color: #fff;
}

.collection-hero .eyebrow {
  margin-top: 2rem;
}

.hero-description {
  margin-top: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.4rem;
}

.result-count {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  color: #fff;
  font-weight: 820;
  padding: 0.65rem 0.85rem;
}

.back-link {
  width: fit-content;
  color: #fff;
  font-weight: 780;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22rem;
}

.toolbar-band {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

.search-box {
  display: grid;
  width: 100%;
  max-width: 34rem;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 820;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--wash);
  color: var(--ink);
  font: inherit;
  outline: none;
  padding: 0.75rem 0.9rem;
}

.search-box input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45, 111, 143, 0.16);
}

.recipe-card-body {
  padding: 0.95rem;
}

.recipe-number {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(31, 36, 33, 0.86);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 860;
  line-height: 1;
  margin: 0;
  padding: 0.25rem;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
}

.recipe-place {
  color: var(--muted);
  font-size: 0.9rem;
}

.recipe-card .button {
  margin-top: auto;
}

.accent-herb .eyebrow {
  color: var(--herb);
}

.accent-stock .eyebrow {
  color: var(--stock-deep);
}

.accent-herb .recipe-number {
  background: rgba(23, 63, 48, 0.88);
}

.accent-stock .recipe-number {
  background: rgba(92, 59, 18, 0.88);
}

.collection-hero.accent-tomato .eyebrow,
.collection-hero.accent-herb .eyebrow,
.collection-hero.accent-stock .eyebrow {
  color: #fff;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.site-footer strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
}

.site-footer p,
.site-footer span {
  display: block;
  margin: 0;
  color: var(--footer-muted);
}

.site-footer a,
.footer-email {
  display: inline-block;
  margin-top: 0.25rem;
  color: var(--footer-fg);
  font-weight: 820;
  overflow-wrap: anywhere;
}

@media (max-width: 1040px) {
  .home-panel {
    grid-template-columns: 1fr;
  }

  .collection-grid,
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body::before {
    background-position: center center, center center, 55% center;
  }

  .home-panel,
  .section,
  .toolbar-band,
  .site-footer {
    width: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .site-header {
    align-items: center;
    backdrop-filter: none;
    flex-direction: row;
    justify-content: space-between;
    width: 100vw;
    max-width: 100vw;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .home-panel {
    padding-top: 2.5rem;
    padding-bottom: 1rem;
  }

  .home-copy h1,
  .collection-hero h1 {
    font-size: 2.85rem;
  }

  .cover-strip {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 170px);
  }

  .cover-strip-empty {
    display: none;
  }

  .cover-strip img:first-child {
    grid-row: auto;
  }

  .scroll-cue {
    display: none;
    width: 3rem;
    height: 3rem;
    margin-top: 1rem;
  }

  .section {
    padding-top: 1.5rem;
  }

  body[data-page="home"] .home-panel {
    min-height: calc(66svh - 4rem);
    padding-top: 3.25rem;
    padding-bottom: 2rem;
  }

  body[data-page="home"] .lede {
    margin-top: 1.75rem;
    margin-bottom: 0.45rem;
  }

  body[data-page="home"] .intro-text {
    margin-top: 0.25rem;
  }

  body[data-page="home"] .scroll-cue {
    margin-top: 1.65rem;
  }

  body[data-page="home"] .section {
    padding-top: 2.25rem;
  }

  body[data-page="home"] .section-heading {
    gap: 0.85rem;
    margin-bottom: 1.75rem;
  }

  .collection-grid,
  .recipe-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .collection-hero {
    min-height: 380px;
  }

  .collection-hero-content {
    width: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .collection-hero::after {
    background: rgba(31, 36, 33, 0.72);
  }

  .site-footer {
    flex-direction: column;
  }
}
