/* ============================================================
   Restaurant Template — Universal Styles
   All colors derived from --accent set by site.js at load time
   ============================================================ */

:root {
  /* Defaults — overridden by site.js from site-config.json */
  --accent: #4a82e7;
  --accent-light: #6b9bef;
  --accent-dark: #3566c0;
  --accent-bg: #eef3fc;
  --font-heading: Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;

  /* Fixed palette */
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --text: #1A1A1A;
  --muted: #6B6B6B;
  --border: #E8E5DE;
  --radius: 10px;
  --radius-lg: 16px;
  --max-width: 900px;
  --mobile-bar-h: 64px;
}

/* Background styles — class set by site.js */
body.bg-gradient {
  background: linear-gradient(180deg, var(--accent-bg) 0%, var(--bg) 40%);
}
body.bg-pattern {
  background-color: var(--bg);
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ---- Reset & Base ---- */

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

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  padding-bottom: calc(var(--mobile-bar-h) + 16px);
  min-height: 100dvh;
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---- Typography ---- */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: 1.1rem; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

/* ---- Layout ---- */

.site-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 48px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

/* ---- Navigation ---- */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.top-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50%;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-bg);
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-left: 8px;
}

.lang-toggle button {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  font-family: var(--font-body);
}

.lang-toggle button.active {
  background: var(--accent);
  color: #fff;
}

/* Hamburger for mobile */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.nav-hamburger svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

@media (max-width: 600px) {
  .nav-links a:not(.lang-toggle-wrap) { display: none; }
  .nav-hamburger { display: block; }
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(250, 250, 248, 0.98);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-overlay a {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.mobile-menu-overlay a:hover {
  color: var(--accent);
}

.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
}

/* Body spacer for fixed nav */
.nav-spacer { height: 56px; }

/* ---- Hero ---- */

.hero {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 64px 20px 56px;
  text-align: center;
}

.hero h1 {
  color: #fff;
  margin-bottom: 12px;
}

.hero .tagline {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-bg);
}

.btn-white {
  background: #fff;
  color: var(--accent);
}

.btn-white:hover {
  background: #f0f0f0;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Cards Grid ---- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---- Story Section ---- */

.story-section {
  max-width: 680px;
  margin: 0 auto;
}

.story-section p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
}

/* ---- Menu Styles ---- */

.menu-category {
  margin-bottom: 40px;
}

.menu-category-title {
  font-size: 1.3rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

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

.menu-item-info {
  flex: 1;
  min-width: 0;
}

.menu-item-name {
  font-weight: 600;
  font-size: 1rem;
}

.menu-item-desc {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.menu-item-meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 2px;
}

.menu-item-price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
  white-space: nowrap;
  padding-top: 2px;
}

/* Categorized card style */
.menu-style-categorized .menu-category {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.menu-style-categorized .menu-category-title {
  border-bottom-color: var(--border);
  display: block;
  margin-bottom: 8px;
}

/* Wine tasting notes accordion */
.menu-item-accordion {
  cursor: pointer;
  user-select: none;
}

.menu-item-accordion .menu-item-name::after {
  content: " ▸";
  font-size: 0.8em;
  color: var(--muted);
  transition: transform 0.2s;
  display: inline-block;
}

.menu-item-accordion.open .menu-item-name::after {
  content: " ▾";
}

.menu-item-accordion .menu-item-desc {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.menu-item-accordion.open .menu-item-desc {
  max-height: 200px;
}

/* ---- Contact ---- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.contact-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.contact-row a {
  color: var(--accent);
  font-weight: 500;
}

.contact-row a:hover {
  text-decoration: underline;
}

#map-container {
  width: 100%;
  height: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ---- Privacy ---- */

.privacy-content h2 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.privacy-content p {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

/* ---- Mobile Bottom Bar ---- */

.mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: none;
  height: var(--mobile-bar-h);
  padding: 0 8px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

@media (max-width: 767px) {
  .mobile-bar { display: flex; }
}

.mobile-bar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 4px;
  transition: color 0.15s;
}

.mobile-bar a:hover,
.mobile-bar a:active {
  color: var(--accent);
}

.mobile-bar svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

/* ---- Utilities ---- */

.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.hidden { display: none !important; }

/* Leaflet map tone overlays */
#map-container.tone-warm { filter: sepia(0.2) saturate(1.1); }
#map-container.tone-cool { filter: saturate(0.8) hue-rotate(10deg); }
#map-container.tone-contrast { filter: contrast(1.15) saturate(1.1); }
