/* ============================================================
   RAMBLERS – Traditional Menu Stylesheet  (Mobile-First)
   ============================================================ */

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

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

/* ── Tokens ── */
:root {
  --ink:          #1a1008;
  --parchment:    #f5eed8;
  --cream:        #fdf8ec;
  --gold:         #9a6f2e;
  --gold-light:   #c49a4a;
  --rust:         #7a2e1a;
  --faded:        #6b5a3e;
  --border:       rgba(154,111,46,0.35);
  --tab-bg:       #2c1a0e;
  --section-head: #3d2010;

  /* Spacing scale */
  --space-xs:  8px;
  --space-sm:  12px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;

  /* Touch-target minimum (WCAG 2.5.5) */
  --touch-min: 44px;
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  background-color: var(--parchment);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(154,111,46,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(122,46,26,0.05) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

/* ── Container ── */
/* Mobile: full-width, edge-to-edge */
.menu-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 var(--space-xl);
  background: var(--cream);
  border: none;
  position: relative;
  min-height: 100vh;
}

.menu-container::before {
  content: '';
  display: block;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, var(--rust), var(--gold), var(--rust));
}

/* ── Header ── */
.menu-header {
  padding: var(--space-md) var(--space-md) 0;
  text-align: center;
}

.menu-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6em, 8vw, 2.8em);
  font-weight: 700;
  color: var(--rust);
  letter-spacing: 0.05em;
  line-height: 1.15;
  margin-bottom: 4px;
}

.menu-subtitle {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.5em, 2.5vw, 0.6em);
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  display: block;
}

.header-rule {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-sm) auto var(--space-xs);
  max-width: 260px;
}
.header-rule-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-light), transparent);
}
.header-rule-ornament {
  font-size: 1em;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
}

.tagline {
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(0.82em, 3.5vw, 0.95em);
  color: var(--faded);
  padding: var(--space-xs) var(--space-md) var(--space-md);
  line-height: 1.55;
}

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Cinzel', serif;
  font-size: 0.6em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  min-height: var(--touch-min);
  padding: var(--space-sm) var(--space-md) 0;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.back-link:hover, .back-link:focus { color: var(--rust); outline: none; }
.back-link svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2.5;
}

/* ── Tab Navigation ── */
.tab-container {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 0;
  background: var(--tab-bg);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 4px 16px rgba(26,16,8,0.3);
  flex-shrink: 0;
}
.tab-container::-webkit-scrollbar { display: none; }

.tab-button {
  flex-shrink: 0;
  min-height: var(--touch-min);
  /* Enough horizontal padding to be tappable */
  padding: 0 var(--space-sm);
  border: none;
  border-right: 1px solid rgba(154,111,46,0.18);
  background: transparent;
  color: rgba(253,248,236,0.55);
  font-family: 'Cinzel', serif;
  font-size: clamp(0.6em, 2.8vw, 0.72em);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.22s, color 0.22s;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tab-button:last-child { border-right: none; }
.tab-button:hover,
.tab-button:focus-visible {
  background: rgba(154,111,46,0.18);
  color: var(--gold-light);
  outline: none;
}
.tab-button.active {
  background: var(--gold);
  color: var(--cream);
}
.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 3px;
  background: var(--gold-light);
}

/* ── Menu Sections ── */
.menu-section {
  display: none;
  padding: var(--space-md) var(--space-md) var(--space-xs);
}
.menu-section.active {
  display: block;
  animation: sectionIn 0.28s ease both;
}

@keyframes sectionIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.food-category { display: none; }

.menu-section h3 {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.62em, 2.8vw, 0.78em);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  padding: var(--space-lg) 0 var(--space-xs);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-sm);
}

.menu-section > p,
.menu-section > ul + p {
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(0.8em, 3.2vw, 0.9em);
  color: var(--faded);
  text-align: center;
  margin: var(--space-sm) 0;
  padding: var(--space-xs) var(--space-sm);
  background: rgba(154,111,46,0.06);
  border-left: 2px solid var(--gold-light);
  border-right: 2px solid var(--gold-light);
  border-radius: 1px;
  line-height: 1.5;
}

/* ── Menu Items ── */
.menu-section ul { list-style: none; margin-bottom: 4px; }

.menu-section li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  /* Comfortable tap zone */
  padding: var(--space-sm) 0;
  border-bottom: 1px dotted rgba(154,111,46,0.22);
  gap: 2px var(--space-xs);
  position: relative;
}
.menu-section li:last-child { border-bottom: none; }

/* Hover highlight only on pointer devices */
@media (hover: hover) and (pointer: fine) {
  .menu-section li:hover {
    background: rgba(154,111,46,0.04);
    margin: 0 -10px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 2px;
  }
}

.menu-section li strong {
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  font-weight: 600;
  font-size: clamp(1em, 4vw, 1.12em);
  color: var(--section-head);
  /* Name takes most of the row, price gets the rest */
  flex: 1 1 60%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.35;
  padding-right: var(--space-xs);
}

.menu-section li .price {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.72em, 3vw, 0.84em);
  font-weight: 600;
  color: var(--rust);
  letter-spacing: 0.03em;
  text-align: right;
  /* Never wrap or break — prices must be legible */
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  padding-top: 3px;
  min-width: 40px;
}

/* Description / ingredients — always full width below name */
.menu-section li span:not(.price) {
  flex-basis: 100%;
  font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  font-size: clamp(0.78em, 3.2vw, 0.86em);
  color: var(--faded);
  margin-top: 1px;
  line-height: 1.45;
}

/* Extras (breakfast add-ons) — compact rows */
.extras li { padding: var(--space-xs) 0; }
.extras li strong { font-size: clamp(0.9em, 3.8vw, 1.02em); }

/* ── Overlay ── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(26,16,8,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.overlay-content {
  background: var(--cream);
  border: 1px solid var(--border);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  width: 100%;
  max-width: 340px;
}
.overlay-content h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.9em, 4vw, 1.1em);
  color: var(--rust);
  margin-bottom: var(--space-lg);
  line-height: 1.4;
}
#view-menu-overlay-btn {
  min-height: var(--touch-min);
  width: 100%;
  padding: var(--space-sm) var(--space-xl);
  border: 1.5px solid var(--gold);
  background: transparent;
  font-family: 'Cinzel', serif;
  font-size: 0.78em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  -webkit-tap-highlight-color: transparent;
}
#view-menu-overlay-btn:not(:disabled):hover,
#view-menu-overlay-btn:not(:disabled):focus {
  background: var(--rust);
  color: var(--cream);
  border-color: var(--rust);
  outline: none;
}

/* ── Utilities ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.flex-column {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}


/* ============================================================
   TABLET  ≥ 560px
   ============================================================ */
@media (min-width: 560px) {
  body { font-size: 16px; }

  .menu-container {
    width: 96%;
    max-width: 640px;
    margin: 20px auto 40px;
    border: 1px solid var(--border);
    border-top: none;
    box-shadow: 0 4px 8px rgba(26,16,8,0.07), 0 16px 56px rgba(26,16,8,0.13);
    min-height: unset;
  }

  .menu-header  { padding: var(--space-xl) var(--space-xl) 0; }
  .back-link    { padding: var(--space-sm) var(--space-xl) 0; }
  .menu-section { padding: var(--space-lg) var(--space-xl) var(--space-xs); }

  .tab-button { padding: 0 var(--space-md); }
}


/* ============================================================
   DESKTOP  ≥ 900px
   ============================================================ */
@media (min-width: 900px) {
  .menu-container {
    width: 92%;
    max-width: 680px;
    margin: 28px auto 56px;
  }
  .menu-container::before { height: 8px; }

  .menu-header { padding: 40px var(--space-xl) 0; }

  .tab-button { padding: 0 20px; }
}


/* ============================================================
   LANDSCAPE PHONE  (short but wide)
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .menu-container::before { height: 4px; }
  .menu-header { padding-top: var(--space-sm); }
  .tagline     { padding-bottom: var(--space-sm); }
  .menu-section { padding-top: var(--space-sm); }
  .tab-button  { min-height: 38px; }
}


/* ============================================================
   SAFE AREA INSETS (notch / dynamic island / home bar)
   ============================================================ */
@supports (padding: env(safe-area-inset-bottom)) {
  .menu-container {
    padding-bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
  }
  .tab-container {
    /* Prevent tabs from hiding behind notch on landscape */
    padding-left:  env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}
