:root {
  /* Brand palette — sampled from assets/logo.jpg + assets/menu-portrait.jpg (Task 8).
     cream/cream-deep = menu parchment; espresso = script-ink core; wheat = wheat-stalk gold. */
  --cream: #fbf1dc;        /* menu parchment body (avg of ~994k px) */
  --cream-deep: #eddcbe;   /* deeper parchment toward the menu border */
  --espresso: #3a2a18;     /* script-ink darkest core (#3C2B11 sampled) */
  --espresso-soft: #5c4630;/* script-ink stroke-body average (#533E2A sampled) */
  --wheat: #d2b293;        /* wheat-stalk gold, true sampled avg — soft/decorative role */
  --wheat-deep: #8a6320;   /* deep wheat-gold — text-safe accent (AA on cream, 4.8:1) */

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-script: 'Pinyon Script', cursive;

  --maxw: 760px;            /* phone-first content column, comfortable on desktop */
  --measure: 62ch;          /* readable prose width cap */
  --pad: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(3.25rem, 11vw, 6.5rem);
  --radius: 14px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 1rem + 0.6vw, 1.25rem);
  font-feature-settings: "liga" 1, "kern" 1;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--wheat-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.section { padding: var(--section-y) var(--pad); }
.container { max-width: var(--maxw); margin-inline: auto; }

.eyebrow {
  font-family: var(--font-script);
  color: var(--wheat-deep);
  font-size: clamp(1.7rem, 1.2rem + 2vw, 2.2rem);
  line-height: 1;
  margin: 0;
}
h2.heading {
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 1rem + 3.4vw, 2.4rem);
  line-height: 1.15;
  margin: 0.25em 0 0.7em;
}

/* Vintage ornamental divider — a gold hairline broken by a centered fleuron,
   echoing the printed menu's section rules. Place under a heading or between blocks. */
.ornament {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.9rem;
  margin: 1.4rem auto 0;
  max-width: 18rem;
  color: var(--wheat-deep);
}
.ornament::before,
.ornament::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--wheat-deep));
}
.ornament::after { transform: scaleX(-1); }
.ornament > span { font-size: 0.85rem; line-height: 1; }

/* Primary call-to-action button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px;
  background: var(--espresso); color: var(--cream);
  padding: 0.9em 1.7em; border-radius: 999px;
  text-decoration: none; font-weight: 600; letter-spacing: 0.03em;
  font-size: 1.05rem;
  border: 1px solid transparent;
  box-shadow: 0 2px 10px rgba(58, 42, 24, 0.18);
  transition: background-color .25s var(--ease-out),
              transform .25s var(--ease-out),
              box-shadow .25s var(--ease-out);
}
.btn:hover {
  background: var(--espresso-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(58, 42, 24, 0.28);
}
.btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(58, 42, 24, 0.22); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; min-height: 92svh;
  display: grid; place-items: center; text-align: center;
  padding: clamp(2rem, 8vw, 5rem) var(--pad);
  background: var(--cream-deep) url('assets/img/hero.jpg') center/cover no-repeat;
}
/* Layered overlay: top-to-bottom darkening + center radial lift so text always
   sits on a controlled, legible field regardless of the photo behind it. */
.hero__overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(40, 28, 16, 0.18), rgba(40, 28, 16, 0.52) 75%),
    linear-gradient(180deg, rgba(40, 28, 16, 0.30) 0%, rgba(40, 28, 16, 0.20) 40%, rgba(40, 28, 16, 0.58) 100%);
}
.hero__inner {
  position: relative;
  display: grid; gap: clamp(1.1rem, 3vw, 1.6rem);
  justify-items: center;
  color: var(--cream);
  max-width: 30rem;
}
.hero__card {
  display: block;
  width: min(300px, 72vw);
  background: var(--cream);
  border: 1px solid rgba(138, 99, 32, 0.45);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  box-shadow: 0 10px 30px rgba(30, 20, 10, 0.35);
}
.hero__logo {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}
.hero__tagline {
  font-family: var(--font-script);
  font-size: clamp(1.75rem, 1rem + 5.5vw, 2.8rem);
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 2px 12px rgba(20, 12, 4, 0.55);
}

/* Scroll-down cue: a wheat stalk that nods downward, with a pulsing chevron */
.hero__scroll {
  margin-top: clamp(0.4rem, 2vw, 1rem);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--wheat);
  text-decoration: none;
  opacity: 0.92;
  filter: drop-shadow(0 2px 6px rgba(20, 12, 4, 0.5));
  transition: opacity 0.2s ease;
}
.hero__scroll:hover { opacity: 1; }
.hero__wheat {
  width: clamp(36px, 9vw, 46px);
  height: auto;
  transform-origin: 50% 0;
  animation: heroNod 2.6s ease-in-out infinite;
}
.hero__chev { animation: heroChev 2.6s ease-in-out infinite; }
@keyframes heroNod {
  0%, 100% { transform: translateY(0) rotate(-2.5deg); }
  50%      { transform: translateY(6px) rotate(2.5deg); }
}
@keyframes heroChev {
  0%, 100% { opacity: 0.35; transform: translateY(-1px); }
  50%      { opacity: 1;    transform: translateY(3px); }
}

/* ---------------- About ---------------- */
.about { background: var(--cream); text-align: center; }
.about .container { max-width: var(--measure); }
.about p:not(.eyebrow) {
  font-size: clamp(1.18rem, 1rem + 1.1vw, 1.5rem);
  line-height: 1.7;
  color: var(--espresso-soft);
  margin-bottom: 0;
}

/* ---------------- Menu (echoes the printed menu) ---------------- */
.menu { background: var(--cream-deep); text-align: center; }
.menu__prices {
  list-style: none;
  padding: 1.4rem clamp(1rem, 4vw, 2rem);
  margin: 0 auto 3rem; max-width: 30rem;
  border-top: 1px solid var(--wheat-deep);
  border-bottom: 1px solid var(--wheat-deep);
  font-size: 1.1rem;
}
.menu__prices li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .45rem 0;
}
.menu__prices li + li { border-top: 1px dotted rgba(138, 99, 32, 0.35); }
.menu__prices li > span:last-child { font-weight: 600; white-space: nowrap; }

.menu__group { margin: 3rem 0; }
.menu__group:last-of-type { margin-bottom: 0; }
.menu__group h3 {
  font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  font-size: clamp(1.25rem, 1rem + 2vw, 1.8rem); margin: 0 0 0.4rem;
}
/* Ornamental rule under each category heading — the printed menu's signature flourish. */
.menu__group h3::after {
  content: "❖";
  display: block;
  color: var(--wheat-deep);
  font-size: .7rem;
  letter-spacing: 0;
  margin: .5rem auto 1.4rem;
}
.menu__cols { display: grid; gap: 1.75rem; }
@media (min-width: 540px) {
  .menu__cols {
    grid-template-columns: 1fr 1px 1fr;
    align-items: start;
    gap: 0 2rem;
    max-width: 34rem;
    margin-inline: auto;
  }
  /* Center vertical hairline between Basic / Specialty, like the print menu. */
  .menu__cols::before {
    content: "";
    grid-column: 2; grid-row: 1;
    align-self: stretch;
    background: linear-gradient(180deg, transparent, var(--wheat-deep) 15%, var(--wheat-deep) 85%, transparent);
  }
  .menu__cols > div:first-child { grid-column: 1; }
  .menu__cols > div:last-child { grid-column: 3; }
  /* A group with a single column (e.g. Banana Bread = Basic only) centers and
     drops the divider, so it never reads as a lopsided two-column block. */
  .menu__cols:not(:has(> div + div)) { grid-template-columns: 1fr; max-width: 22rem; }
  .menu__cols:not(:has(> div + div))::before { display: none; }
  .menu__cols:not(:has(> div + div)) > div:last-child { grid-column: 1; }
}
.menu__sub {
  font-style: italic;
  color: var(--wheat-deep);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  margin: 0 0 .55rem;
}
.menu__cols ul { list-style: none; padding: 0; margin: 0; }
.menu__cols li { padding: .26rem 0; }
.menu__note {
  font-style: italic; color: var(--espresso-soft);
  font-size: .95rem; margin-top: 1.75rem;
}

/* ---------------- Gallery ---------------- */
.gallery { background: var(--cream); text-align: center; }
.gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
@media (min-width: 640px) { .gallery__grid { grid-template-columns: repeat(3, 1fr); gap: 1.1rem; } }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius); }
.gallery img {
  aspect-ratio: 1 / 1; object-fit: cover; width: 100%;
  border-radius: var(--radius);
  transition: transform .5s var(--ease-out);
}
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  font-family: var(--font-script);
  color: var(--wheat-deep);
  font-size: 1.4rem;
  line-height: 1;
  margin-top: .5rem;
}

/* ---------------- Closing CTA + footer ---------------- */
.cta { background: var(--espresso); color: var(--cream); text-align: center; }
.cta .container { max-width: var(--measure); }
.cta .eyebrow { color: var(--wheat); }
.cta p:not(.eyebrow) { color: rgba(251, 241, 220, 0.9); line-height: 1.65; }
.cta .ornament { color: var(--wheat); }
.cta .ornament::before, .cta .ornament::after { background: linear-gradient(90deg, transparent, var(--wheat)); }
.cta .btn { background: var(--cream); color: var(--espresso); box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.cta .btn:hover { background: #fff; }

.footer {
  background: var(--espresso); color: var(--cream); text-align: center;
  padding: 2.5rem var(--pad);
  display: grid; gap: .6rem;
  border-top: 1px solid var(--espresso-soft);
  font-size: 0.95rem;
}
.footer a {
  display: inline-block;
  padding: 0.6rem 0.8rem;          /* ~44px tap target without altering layout */
  margin: -0.2rem auto;
  color: var(--wheat);
  text-decoration-color: rgba(210, 178, 147, 0.5);
  text-underline-offset: 3px;
}
.footer a:hover { color: #fff; }

/* ---------------- Accessibility utilities ---------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- Motion ---------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .gallery img { transition: none; }
  .btn:hover, .gallery figure:hover img { transform: none; }
  .hero__wheat, .hero__chev { animation: none; }
  html { scroll-behavior: auto; }
}
