:root {
  --espresso-900: #3b2416;
  --charcoal-950: #171518;
  --latte-100: #f2e7d5;
  --oat-200: #d9c7af;
  --taupe-500: #9b8b76;
  --walnut-700: #654b35;
  --terracotta-500: #b86b3e;
  --olive-600: #5f6b4d;

  --surface: #fffaf2;
  --text: var(--espresso-900);
  --muted: #6f6257;
  --line: rgba(59, 36, 22, 0.17);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", Arial, sans-serif;

  --page-pad: clamp(14px, 4vw, 48px);
  --content-max: 1320px;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-soft: 0 12px 34px rgba(34, 22, 14, 0.12);
  --ease-out: cubic-bezier(.22, .61, .36, 1);

  --menu-bg-image: url("/assets/images/menu/menu-background.webp");
}

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

html {
  background: #e6d7c3;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: #e6d7c3;
}

/* Ambient café image behind the menu. If the image is missing,
   the neutral background still renders correctly. */
body::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(rgba(248, 242, 233, .72), rgba(248, 242, 233, .72)),
    var(--menu-bg-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  transform: translateZ(0);
}

body::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 12% 6%, rgba(255,255,255,.27), transparent 34rem),
    linear-gradient(180deg, rgba(255,250,242,.10), rgba(255,250,242,.28));
  pointer-events: none;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: white;
  background: var(--charcoal-950);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: max(10px, env(safe-area-inset-top)) var(--page-pad) 10px;
  color: var(--latte-100);
  background: rgba(23, 21, 24, .92);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}
.brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: .08em;
}
.brand__sub {
  margin-top: 5px;
  font-size: .62rem;
  letter-spacing: .28em;
}
.micro-nav { display: flex; align-items: center; gap: 8px; }
.micro-nav__link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid rgba(242,231,213,.30);
  border-radius: var(--radius-pill);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
}

/* Compact top intro */
.menu-hero {
  padding: clamp(36px, 6vw, 74px) var(--page-pad) clamp(28px, 4vw, 48px);
  background: rgba(255,250,242,.76);
  border-bottom: 1px solid rgba(59,36,22,.12);
  backdrop-filter: blur(7px);
}
.menu-hero__inner {
  width: min(100%, var(--content-max));
  margin-inline: auto;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--walnut-700);
  font-size: .70rem;
  font-weight: 700;
  letter-spacing: .17em;
}
.menu-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6.8rem);
  font-weight: 600;
  line-height: .90;
  letter-spacing: -.04em;
}
.menu-hero__intro {
  max-width: 680px;
  margin: 18px 0 0;
  color: #574a40;
  font-size: clamp(.96rem, 2.4vw, 1.18rem);
}
.dietary-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 18px;
  color: var(--muted);
  font-size: .76rem;
}
.dietary-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dietary-legend strong {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(59,36,22,.24);
  border-radius: 50%;
  font-size: .68rem;
}

/* Menu stack */
.menu-shell {
  width: min(100%, var(--content-max));
  margin-inline: auto;
  padding: clamp(18px, 4vw, 42px) var(--page-pad) clamp(64px, 8vw, 96px);
}
.menu-loading,
.menu-error {
  margin: 18px 0;
  padding: 24px;
  border: 1px solid rgba(59,36,22,.12);
  border-radius: var(--radius-md);
  background: rgba(255,250,242,.82);
  backdrop-filter: blur(8px);
}
.menu-loading { text-align: center; color: var(--muted); }
.menu-error h2 { margin-top: 0; font-family: var(--font-display); }

.menu-accordion-stack {
  display: grid;
  /* Intentional visual line between covers. */
  gap: clamp(11px, 1.7vw, 20px);
}

/* Native accessible accordion */
.menu-category-accordion {
  overflow: clip;
  border: 1px solid rgba(255,255,255,.56);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  background: rgba(255,250,242,.34);
}

.category-cover {
  position: relative;
  width: 100%;
  /* Keeps the cover banner-like on PC and mobile; image is cropped, never stretched. */
  height: clamp(158px, 18vw, 260px);
  overflow: hidden;
  list-style: none;
  cursor: pointer;
  isolation: isolate;
  user-select: none;
}
.category-cover::-webkit-details-marker { display: none; }
.category-cover::marker { content: ""; }
.category-cover:focus-visible {
  outline: 3px solid rgba(213,165,42,.88);
  outline-offset: -4px;
}

.category-cover__image {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.001);
  transition: transform 420ms var(--ease-out), filter 260ms var(--ease-out);
}

.category-cover::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(15,13,12,.69) 0%,
    rgba(20,16,13,.49) 34%,
    rgba(20,16,13,.12) 72%,
    rgba(20,16,13,.08) 100%
  );
  pointer-events: none;
}
.category-cover::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(15,13,12,.22));
  pointer-events: none;
}
.menu-category-accordion[open] .category-cover__image { transform: scale(1.015); }

.category-cover__content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: end;
  align-items: end;
  gap: 16px;
  padding: clamp(16px, 3vw, 32px);
  color: white;
  text-shadow: 0 2px 14px rgba(0,0,0,.42);
}
.category-cover__copy { min-width: 0; }
.category-cover__title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4.8vw, 3.35rem);
  font-weight: 650;
  line-height: .98;
  letter-spacing: -.02em;
}
.category-cover__subtitle {
  display: block;
  margin-top: 6px;
  color: rgba(255,255,255,.90);
  font-size: clamp(.78rem, 2.2vw, 1rem);
  font-weight: 500;
}

.category-chevron {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 50%;
  background: rgba(15,13,12,.26);
  backdrop-filter: blur(8px);
}
.category-chevron::before {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  top: 13px;
  left: 15px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(45deg);
  transition: transform 220ms var(--ease-out), top 220ms var(--ease-out);
}
.menu-category-accordion[open] .category-chevron::before {
  top: 17px;
  transform: rotate(225deg);
}

/* If a cover cannot load, the ambient background and text still work. */
.menu-category-accordion.is-cover-missing .category-cover {
  background: linear-gradient(135deg, rgba(101,75,53,.86), rgba(59,36,22,.72));
}
.menu-category-accordion.is-cover-missing .category-cover__image { display: none; }

/* Open category. Translucency allows the café background to remain faintly present. */
.category-panel {
  border-top: 1px solid rgba(255,255,255,.45);
  background: rgba(255,250,242,.74);
  backdrop-filter: blur(8px);
}
.category-panel__inner {
  display: grid;
  gap: clamp(24px, 4vw, 46px);
  padding: clamp(16px, 3.5vw, 34px);
}

/* Milk options: text only, not product cards. */
.modifier-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(59,36,22,.12);
  border-radius: var(--radius-sm);
  background: rgba(255,250,242,.70);
}
.modifier-note__label {
  font-family: var(--font-display);
  font-weight: 650;
}
.modifier-note__options {
  color: var(--muted);
  font-size: .86rem;
}

.group-block { display: grid; gap: 14px; }
.group-heading h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  line-height: 1;
}
.group-heading p {
  max-width: 700px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .88rem;
}
.group-heading__base { font-style: italic; }

/* Product cards. The gap is the requested visual line/margin. */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 2vw, 20px);
}
.product-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(122px, 42%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(59,36,22,.13);
  border-radius: var(--radius-md);
  background: rgba(255,250,242,.92);
  box-shadow: 0 6px 18px rgba(59,36,22,.07);
}
.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(217,199,175,.96), rgba(242,231,213,.74));
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 340ms var(--ease-out);
}
.product-card:hover .product-media img { transform: scale(1.022); }
.product-media.is-missing::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(59,36,22,.18);
  border-radius: 50%;
}
.product-media.is-missing img { display: none; }
.product-info {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: clamp(12px, 2.5vw, 20px);
}
.product-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.product-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 3.5vw, 1.5rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.product-price {
  color: var(--espresso-900);
  font-size: .98rem;
  font-weight: 700;
  white-space: nowrap;
}
.product-description {
  margin: 0;
  color: var(--muted);
  font-size: clamp(.74rem, 2.5vw, .88rem);
  line-height: 1.42;
}
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.product-tag {
  display: inline-flex;
  min-width: 28px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid rgba(95,107,77,.28);
  border-radius: var(--radius-pill);
  color: var(--olive-600);
  background: rgba(95,107,77,.08);
  font-size: .63rem;
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px var(--page-pad);
  color: rgba(242,231,213,.84);
  background: rgba(59,36,22,.96);
  font-size: .8rem;
}
.site-footer__brand {
  font-family: var(--font-display);
  font-size: 1.04rem;
  text-decoration: none;
}


/* ==========================================================
   MOBILE PRODUCT CARDS — V2.1
   Decision:
   - On phones, product photography takes the full card width.
   - Product name / copy closes the card below the image.
   - Original 4:5 photography ratio is preserved.
   - Tablet and desktop behavior remains unchanged.
   ========================================================== */

@media (max-width: 639px) {
  /* Let the cards use almost all of the opened accordion width. */
  .category-panel__inner {
    gap: 22px;
    padding: 12px 10px 16px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-card {
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(255,250,242,.95);
  }

  /* Full-width hero photograph.
     The image is never stretched: its original 4:5 ratio is kept. */
  .product-media {
    width: 100%;
    aspect-ratio: 4 / 5;
  }

  .product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  /* Bottom information strip that visually closes the card. */
  .product-info {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 72px;
    padding: 15px 16px 17px;
    border-top: 1px solid rgba(59,36,22,.12);
    background: rgba(255,250,242,.98);
  }

  .product-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .product-title {
    font-size: clamp(1.25rem, 5.5vw, 1.62rem);
    line-height: 1.04;
  }

  .product-description {
    font-size: clamp(.78rem, 3.5vw, .90rem);
    line-height: 1.42;
  }

  .product-tags {
    margin-top: 2px;
  }
}

@media (min-width: 640px) {
  .site-header { min-height: 76px; }
  .category-cover { height: clamp(190px, 18vw, 260px); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-card { grid-template-columns: minmax(148px, 44%) minmax(0, 1fr); }
}

@media (min-width: 1100px) {
  .menu-accordion-stack { gap: 18px; }
  .category-cover__content { padding-inline: 34px; }
  .product-grid { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
