/* ==========================================================================
   Phat Cart — shared stylesheet
   Used by every page. Header + footer blocks are drop-in identical sitewide.
   ========================================================================== */

/* ---- Fonts ---------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: 'Glorious Sunday';
  src: url('/fonts/Glorious-Sunday-Script.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---- Design tokens -------------------------------------------------------- */
:root {
  --sage: #788b5b;
  --sage-dark: #5a6b46;
  --cream: #faf7f2;
  --cream-alt: #f0ebe0;
  --dark: #1a1a1a;
  --grey: #666;
  --gold: #d4a04a;

  --font-script: 'Glorious Sunday', cursive;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --maxw: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(26, 26, 26, 0.08);
  --shadow-lift: 0 18px 44px rgba(26, 26, 26, 0.14);
  --transition: 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Reset / base --------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--dark);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Typography scale ----------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--dark);
}

h1 {
  font-size: clamp(48px, 7vw, 88px);
}

h2 {
  font-size: clamp(36px, 5vw, 56px);
}

h3 {
  font-size: clamp(24px, 3vw, 28px);
}

h4 {
  font-size: 20px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 14px;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}

.italic-sage {
  font-style: italic;
  color: var(--sage);
}

/* ---- Layout helpers ------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: clamp(64px, 9vw, 112px);
}

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
  padding: 15px 32px;
  border-radius: 999px;
  transition: background var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

.btn-primary {
  background: var(--sage);
  color: #fff;
}

.btn-primary:hover {
  background: var(--sage-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.text-link {
  display: inline-block;
  font-weight: 600;
  color: var(--sage);
  transition: gap var(--transition), color var(--transition);
}

.text-link:hover {
  color: var(--sage-dark);
}

/* ==========================================================================
   SHARED HEADER  (identical markup on every page)
   ========================================================================== */
.site-header {
  background: var(--sage);
  color: #fff;
  text-align: center;
  padding: 30px var(--gutter) 22px;
}

.site-header .brand {
  display: inline-block;
}

.brand-wordmark {
  font-family: var(--font-script);
  font-size: clamp(48px, 7vw, 66px);
  line-height: 1;
  color: #fff;
}

.brand-sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 6px;
}

.main-nav {
  margin-top: 20px;
}

.main-nav > ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 30px;
}

.main-nav a.nav-link,
.nav-order > button {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  padding: 4px 0;
  position: relative;
  transition: color var(--transition);
}

.main-nav a.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1.5px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.main-nav a.nav-link:hover::after {
  transform: scaleX(1);
}

.main-nav a.nav-link:hover,
.nav-order > button:hover {
  color: #fff;
}

/* Order dropdown */
.nav-order {
  position: relative;
}

.nav-order > button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.92);
}

.nav-order > button .caret {
  transition: transform var(--transition);
}

.nav-order[data-open='true'] > button .caret {
  transform: rotate(180deg);
}

.order-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff;
  color: var(--dark);
  border-radius: 12px;
  box-shadow: var(--shadow-lift);
  padding: 8px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), transform var(--transition),
    visibility var(--transition);
  z-index: 60;
}

.nav-order[data-open='true'] .order-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.order-menu a {
  display: block;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: none;
  color: var(--dark);
  transition: background var(--transition), color var(--transition);
}

.order-menu a:hover {
  background: var(--cream-alt);
  color: var(--sage-dark);
}

/* Social icons (shared header + footer) */
.social-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.header-social {
  margin-left: 6px;
}

.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  transition: background var(--transition), transform var(--transition);
}

.social-row a:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  overflow: hidden;
  background: var(--sage-dark) url('/images/gallery/11-interior-wide.jpg')
    center / cover no-repeat;
}

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

.hero-controls {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  background: rgba(26, 26, 26, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--transition), transform var(--transition);
}

.hero-controls button:hover {
  background: rgba(26, 26, 26, 0.6);
  transform: translateY(-2px);
}

.hero-controls .icon-pause,
.hero-controls .icon-unmute {
  display: none;
}

.hero-controls button[data-state='paused'] .icon-play {
  display: none;
}

.hero-controls button[data-state='paused'] .icon-pause {
  display: inline;
}

.hero-controls button[data-state='unmuted'] .icon-mute {
  display: none;
}

.hero-controls button[data-state='unmuted'] .icon-unmute {
  display: inline;
}

/* ==========================================================================
   ABOUT INTRO
   ========================================================================== */
.about-intro .about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.about-intro .about-photo {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-intro .about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-intro h2 {
  margin-bottom: 20px;
}

.about-intro p.lead {
  font-size: 18px;
  color: var(--grey);
  margin-bottom: 28px;
  max-width: 46ch;
}

.locations {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 32px;
}

.locations .loc {
  border-left: 3px solid var(--sage);
  padding-left: 16px;
}

.locations .loc .loc-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 4px;
}

.locations .loc address {
  font-style: normal;
  font-size: 15px;
  color: var(--dark);
  line-height: 1.5;
}

/* ==========================================================================
   TWO-CARD SECTION (Catering + Reservations)
   ========================================================================== */
.split-cards {
  background: #fff;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 40px);
}

.split-card {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.split-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.split-card .card-photo {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.split-card .card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.split-card:hover .card-photo img {
  transform: scale(1.05);
}

.split-card .card-body {
  padding: 30px 32px 34px;
}

.split-card h3 {
  margin-bottom: 12px;
}

.split-card p {
  color: var(--grey);
  font-size: 16px;
  margin-bottom: 18px;
}

/* ==========================================================================
   FOUR-CARD FEATURE GRID
   ========================================================================== */
.features {
  background: var(--cream);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.feature-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-end;
}

.feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.feature-card:hover img {
  transform: scale(1.05);
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 26, 26, 0.82) 0%,
    rgba(26, 26, 26, 0.35) 38%,
    rgba(26, 26, 26, 0) 62%
  );
}

.feature-card .feature-text {
  position: relative;
  z-index: 2;
  padding: 24px;
  color: #fff;
}

.feature-card .feature-text h3 {
  color: #fff;
  font-size: 25px;
  margin-bottom: 6px;
}

.feature-card .feature-text .text-link {
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.feature-card .feature-text .text-link:hover {
  color: var(--cream-alt);
}

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery {
  background: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery-grid figure {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.gallery-grid figure:hover img {
  transform: scale(1.08);
}

/* ==========================================================================
   REVIEWS
   ========================================================================== */
.reviews {
  background: var(--cream-alt);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.review-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.stars {
  color: var(--gold);
  font-size: 17px;
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.review-card blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--dark);
  margin-bottom: 20px;
}

.review-card .attribution {
  font-size: 13px;
  color: var(--grey);
}

.review-card .attribution .who {
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sage);
}

/* ==========================================================================
   PAST PARTNERS
   ========================================================================== */
.partners {
  background: var(--cream);
}

.partner-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 30px 24px;
  align-items: center;
}

.partner-grid img {
  width: 100%;
  height: 62px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter var(--transition), opacity var(--transition);
}

.partner-grid img:hover {
  filter: grayscale(0);
  opacity: 1;
}

/* ==========================================================================
   SHARED FOOTER  (identical markup on every page)
   ========================================================================== */
.site-footer {
  background: var(--sage-dark);
  color: rgba(255, 255, 255, 0.85);
  padding-block: clamp(48px, 7vw, 76px) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .brand-wordmark {
  font-size: 46px;
}

.footer-brand .brand-sub {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 15px;
  max-width: 34ch;
  margin-bottom: 22px;
}

.footer-brand .social-row a {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.footer-brand .social-row a:hover {
  background: rgba(255, 255, 255, 0.16);
}

.site-footer h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-col address,
.footer-col p {
  font-style: normal;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.footer-col .sub-loc {
  margin-top: 14px;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 52px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-block: 22px 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.7);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .about-intro .about-grid {
    grid-template-columns: 1fr;
  }

  .about-intro .about-photo {
    max-width: 420px;
    margin-inline: auto;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .partner-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .main-nav > ul {
    gap: 10px 20px;
  }

  .review-card {
    padding: 28px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   === Catering page ===
   Section-specific styles. Appended per build spec; does not touch the
   shared header/footer/homepage rules above.
   ========================================================================== */

/* Shared nav active-state utility (used by every page's header to mark the
   current section — lives here since catering is the first page to need it). */
.main-nav a.nav-link.active {
  color: #fff;
}

.main-nav a.nav-link.active::after {
  transform: scaleX(1);
}

/* ---- Hero / title -------------------------------------------------------- */
.catering-hero {
  position: relative;
  background: var(--cream);
  overflow: hidden;
  padding-block: clamp(56px, 8vw, 96px);
}

.catering-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/gallery/04-colorful-dishes.jpg') center / cover no-repeat;
  opacity: 0.18;
  z-index: 0;
}

/* cream tint layered over the photo to fade it further for readability */
.catering-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(250, 247, 242, 0.55),
    rgba(250, 247, 242, 0.75)
  );
  z-index: 1;
}

.catering-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  text-align: center;
}

.catering-hero h1 {
  font-size: clamp(38px, 6vw, 56px);
  margin-bottom: 22px;
}

.catering-intro {
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 500;
  line-height: 1.7;
  color: var(--dark);
  max-width: 62ch;
  margin: 0 auto;
}

.catering-intro strong {
  font-weight: 700;
}

/* ---- Form section + card ------------------------------------------------- */
.catering-form-section {
  background: var(--cream);
  padding-top: 0;
}

.catering-form-card {
  background: #fff;
  max-width: 760px;
  margin: 0 auto;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
}

/* ---- Fields -------------------------------------------------------------- */
.form-field {
  margin-bottom: 24px;
}

.form-field label {
  display: block;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.form-field label .optional {
  font-weight: 400;
  font-size: 14px;
  color: var(--grey);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--dark);
  background: #fff;
  border: 2px solid var(--dark);
  border-radius: 4px;
  padding: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

/* semibold once the field holds a value */
.form-field input:not(:placeholder-shown),
.form-field textarea:not(:placeholder-shown) {
  font-weight: 600;
}

.form-field select:valid {
  font-weight: 600;
}

.form-field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(120, 139, 91, 0.25);
}

/* post-interaction invalid cue (never fires on initial load) */
.form-field input:user-invalid,
.form-field select:user-invalid,
.form-field textarea:user-invalid {
  border-color: #b3452f;
}

/* ---- Inline budget row --------------------------------------------------- */
.form-field.budget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.form-field.budget-row label {
  margin-bottom: 0;
}

.form-field.budget-row input {
  width: 140px;
  flex: 0 0 auto;
  text-align: center;
}

/* ---- Conditional referral-name field ------------------------------------- */
.referral-name-field {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition: max-height var(--transition), opacity var(--transition),
    margin-bottom var(--transition);
}

.referral-name-field.visible {
  max-height: 200px;
  opacity: 1;
  margin-bottom: 24px;
}

/* With JS off the field stays collapsed; expose it to keyboard/AT users the
   moment any child receives focus so it never becomes an unreachable trap. */
.referral-name-field:focus-within {
  max-height: 200px;
  opacity: 1;
  margin-bottom: 24px;
}

/* ---- Submit -------------------------------------------------------------- */
.submit-btn {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--sage);
  border-radius: 6px;
  padding: 18px;
  margin-top: 8px;
  transition: background var(--transition), transform var(--transition);
}

.submit-btn:hover {
  background: var(--sage-dark);
  transform: translateY(-2px);
}

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 700px) {
  .catering-form-card {
    padding: 24px;
  }

  .form-field.budget-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .form-field.budget-row label {
    margin-bottom: 8px;
  }

  .form-field.budget-row input {
    width: 100%;
    text-align: left;
  }
}

/* ---- "Book the Truck" playful accent ------------------------------------- */
.fun-truck {
  color: #e07856;                                   /* warm coral, borrowed from Phat Cart pig mascot */
  font-style: italic;                                /* match Drop Off / Delivery's italic treatment */
  display: inline-block;                             /* enables transform */
  text-shadow:
    0 0 12px rgba(224, 120, 86, 0.35),               /* soft warm glow */
    0 0 24px rgba(224, 120, 86, 0.20),               /* wider halo */
    0 2px 4px rgba(0, 0, 0, 0.10);                   /* subtle depth */
  animation: fun-truck-breathe 3.5s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes fun-truck-breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.025);
    opacity: 0.92;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fun-truck {
    animation: none;
  }
}

/* ==========================================================================
   === Menu page ===
   Section-specific styles. Appended per build spec; does not touch the
   shared header/footer/homepage/catering rules above.
   ========================================================================== */

/* ---- Hero / title (mirrors catering-hero, different bg image) ------------ */
.menu-hero {
  position: relative;
  background: var(--cream);
  overflow: hidden;
  padding-block: clamp(24px, 3.5vw, 42px); /* ~half of prior — a proud but compact fold */
}

.menu-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/images/gallery/04-colorful-dishes.jpg') center / cover no-repeat;
  opacity: 0.18;
  z-index: 0;
}

.menu-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(250, 247, 242, 0.55),
    rgba(250, 247, 242, 0.75)
  );
  z-index: 1;
}

.menu-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  text-align: center;
}

.menu-hero h1 {
  font-size: clamp(38px, 6vw, 56px);
  margin-bottom: 18px;
}

.menu-info {
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey);
  max-width: 70ch;
  margin: 0 auto;
}

/* ---- Tabs (sticky bar) --------------------------------------------------- */
.menu-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  /* connected to the hero, not orphaned: gap ~40% tighter than before */
  margin-top: clamp(16px, 2.4vw, 26px);
  padding: 20px var(--gutter) 10px; /* bottom halved to tighten the tabs→content gap */
  background: var(--cream);
  transition: box-shadow 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease;
}

/* Applied by IntersectionObserver once the hero scrolls out of view. */
.menu-tabs.stuck {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  background: rgba(250, 247, 242, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
}

.menu-tab {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--dark);
  background: transparent;
  border: 2px solid var(--sage);
  border-radius: 999px;
  padding: 11px 26px;
  transition: background var(--transition), color var(--transition),
    transform var(--transition);
}

.menu-tab:hover {
  background: rgba(120, 139, 91, 0.12);
}

.menu-tab[aria-selected='true'] {
  background: var(--sage);
  color: #fff;
}

/* ---- Brand tagline (replaces the old hero as the "brand moment") ---------- */
.menu-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 18px;
  color: rgba(0, 0, 0, 0.55);
  text-align: center;
  padding: 40px 24px 20px;
  max-width: 500px;
  margin-inline: auto;
}

/* ---- Per-tab context line (time / rules; only the active tab's shows) ----- */
.menu-context {
  padding: 12px 24px 20px;
  text-align: center;
}

/* Active tab has no context text (e.g. All Day) → collapse the block so it
   contributes zero vertical space. :has() handles modern browsers; the JS-set
   .empty class is the fallback for browsers without :has(). */
.menu-context:has(.context-line.active:empty),
.menu-context.empty {
  padding: 0;
}

.context-line {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  display: none;
}

.context-line.active {
  display: block;
}

/* ---- Section container --------------------------------------------------- */
.menu-body {
  /* Top padding kept small but non-zero so the first header's 24px margin-top
     doesn't margin-collapse up through the body. */
  padding-block: 6px clamp(64px, 9vw, 100px);
}

.menu-section {
  display: none;
  scroll-margin-top: 100px; /* clears the sticky tab bar on anchor jumps */
}

.menu-section.active {
  display: block;
}

.menu-section-head {
  text-align: center;
  margin-bottom: 36px;
}

.menu-section-head h2 {
  font-family: var(--font-display);
  color: var(--sage);
  font-size: clamp(30px, 4vw, 42px);
}

.menu-section-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--grey);
  margin-top: 8px;
  max-width: 68ch;
  margin-inline: auto;
}

/* ---- Sub-section headers (quiet divider, not a title) -------------------- */
.menu-subsection-header {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--sage);
  margin-top: 48px;
  margin-bottom: 16px;
}

/* thin sage line filling the space to the right of the heading text */
.menu-subsection-header::after {
  content: '';
  flex: 1;
  height: 0;
  border-top: 1px solid rgba(120, 139, 91, 0.3);
}

/* First header in a panel sits closer to the tabs now the title is gone. */
.menu-subsection-header:first-child {
  margin-top: 24px;
}

/* ---- Shared item bits ---------------------------------------------------- */
.item-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.item-name {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--dark);
}

.item-price {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--sage);
  white-space: nowrap;
}

.item-desc {
  color: var(--grey);
  line-height: 1.5;
}

.item-tag {
  font-weight: 500;
  color: var(--grey);
  font-size: 0.85em;
}

sup.raw {
  color: var(--sage);
  font-size: 0.7em;
  vertical-align: super;
  margin-left: 1px;
}

/* ---- Featured items (photo card) ----------------------------------------- */
/* 3-up on desktop; steps to 2-up then 1-up (breakpoints below). */
.items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.item-featured {
  background: var(--cream-alt);
  border-radius: 4px;
  overflow: hidden; /* photo respects the rounded corners */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover lift on pointer devices only — avoids sticky hover on touch. */
@media (hover: hover) {
  .item-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
  }
}

.featured-photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.featured-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-body {
  padding: 24px;
}

.item-featured .item-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
}

.item-featured .item-price {
  font-size: 20px;
}

.item-featured .item-desc {
  font-size: 15px;
  margin-top: 10px;
}

/* ---- Plain items (text rows) --------------------------------------------- */
.items-list {
  display: flex;
  flex-direction: column;
}

.item-plain {
  padding: 14px 0 16px;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.12);
}

.item-plain:last-child {
  border-bottom: none;
}

.item-plain .item-name,
.item-plain .item-price {
  font-size: 17px;
}

.item-plain .item-desc {
  font-size: 14px;
  margin-top: 6px;
  padding-left: 2px;
}

/* ---- Sides & Extras (compact grid) --------------------------------------- */
.sides-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 40px;
}

.side-item {
  padding: 12px 0;
  border-bottom: 1px dashed rgba(26, 26, 26, 0.14);
}

.side-item .item-name,
.side-item .item-price {
  font-size: 16px;
}

.side-item .item-desc {
  font-size: 13px;
  margin-top: 4px;
}

/* ---- ** legend (Breakfast + All Day tabs) -------------------------------- */
.menu-legend {
  font-family: var(--font-body);
  font-size: 12px;
  font-style: italic;
  color: rgba(0, 0, 0, 0.5);
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ---- Responsive ---------------------------------------------------------- */
/* Featured grid: 3-up ≥1024, 2-up 700–1023, 1-up ≤699. */
@media (max-width: 1023px) {
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }
}

@media (max-width: 768px) {
  .sides-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .menu-tabs {
    padding: 12px var(--gutter) 6px; /* more compact sticky bar on mobile */
  }
}

@media (max-width: 699px) {
  .items-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .featured-photo {
    aspect-ratio: 16 / 9;
  }
}

/* ==========================================================================
   === Reserve page ===
   Reuses the catering hero + form styles. Only the genuinely-new bits live
   here: a different hero photo, a slightly narrower card, the private-space
   checkbox row, and the private-space detail reveal.
   ========================================================================== */

/* Swap the hero photo (element carries both .catering-hero and .reserve-hero;
   this later, equal-specificity rule overrides just the image, keeping the
   cover/center/no-repeat from the .catering-hero shorthand). */
.reserve-hero::before {
  background-image: url('/images/gallery/02-interior-shelves.jpg');
}

.reserve-form-card {
  max-width: 680px;
}

/* ---- Private-space checkbox row ------------------------------------------ */
.form-field.checkbox .checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
  cursor: pointer;
}

.form-field.checkbox input[type='checkbox'] {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 3px;
  padding: 0;
  border: 2px solid var(--dark);
  border-radius: 4px;
  accent-color: var(--sage);
  cursor: pointer;
}

.form-field.checkbox .checkbox-help {
  font-size: 14px;
  font-weight: 400;
  color: var(--grey);
  margin: 0;
  padding-left: 32px; /* aligns under the label text, past the box + gap */
}

/* ---- Private-space detail reveal ----------------------------------------- */
/* Default is EXPANDED so that with JS disabled the textarea is always
   reachable. JS adds .js-collapsible, which collapses it until the checkbox is
   checked (.open) — progressive enhancement, mirrors the catering reveal. */
.private-space-detail {
  overflow: hidden;
}

.private-space-detail.js-collapsible {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  transition: max-height var(--transition), opacity var(--transition),
    margin-bottom var(--transition);
}

.private-space-detail.js-collapsible.open,
.private-space-detail.js-collapsible:focus-within {
  max-height: 340px;
  opacity: 1;
  margin-bottom: 24px;
}
