/* ═══════════════════════════════════════════════
   Trattoria Bellavista — Cinematic Redesign
   ═══════════════════════════════════════════════ */

:root {
  --bg: #0e0e10;
  --surface: #1a1a1e;
  --surface2: #242428;
  --text: #f0ebe4;
  --muted: #8a8580;
  --accent: #c8a84e;
  --accent2: #d4693a;
  --warm: #d4693a;
  --border: #2a2a2e;
  --r: 16px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}
a { color: var(--accent); text-decoration: none; transition: color .3s; }
a:hover { color: var(--text); }
::selection { background: var(--accent); color: var(--bg); }
img { display: block; max-width: 100%; }

/* ─── Navigation ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 32px;
  background: rgba(14,14,16,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all .4s;
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--text); letter-spacing: .02em;
}
.nav-logo em { font-style: italic; color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-transform: uppercase; letter-spacing: .12em;
  transition: color .3s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  padding: 10px 24px; background: var(--accent); color: var(--bg);
  font-size: 13px; font-weight: 600; border-radius: 24px;
  letter-spacing: .04em; transition: all .3s;
}
.nav-cta:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }
.nav-cta-outline {
  background: transparent; border: 1px solid var(--accent); color: var(--accent);
}
.nav-cta-outline:hover { background: var(--accent); color: var(--bg); }

/* ─── Hero Cinema (Scroll-Driven Canvas) ─── */
.hero-cinema { height: 300vh; position: relative; }
.hero-cinema-sticky {
  position: sticky; top: 0; height: 100vh;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.hero-cinema-sticky canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero-overlay {
  position: relative; z-index: 2;
  text-align: center; padding: 0 24px;
  pointer-events: none;
}
.hero-overlay::before {
  content: ''; position: absolute; inset: -200px;
  background: radial-gradient(ellipse at center, rgba(10,8,8,0.75) 0%, transparent 70%);
  z-index: -1;
}
.hero-label {
  font-size: 14px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(48px, 10vw, 100px);
  font-weight: 700; line-height: 1.05;
  color: var(--text); letter-spacing: -.02em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.8), 0 0 60px rgba(0,0,0,0.4);
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 18px; color: #e0dbd4;
  margin-top: 16px; letter-spacing: .06em;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}
.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #e0dbd4; font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  opacity: .7; animation: hintPulse 2s infinite;
}
.hero-scroll-hint svg { width: 20px; height: 20px; stroke: currentColor; fill: none; }
@keyframes hintPulse { 0%,100% { opacity: .7; } 50% { opacity: .3; } }

/* ─── Section Globals ─── */
.section { padding: 120px 24px; }
.section-dark { background: var(--surface); }
.container { max-width: 1100px; margin: 0 auto; }
.section-label {
  font-size: 12px; letter-spacing: .25em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px; text-align: center;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600; text-align: center; margin-bottom: 16px;
  letter-spacing: -.015em; line-height: 1.15;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-sub {
  text-align: center; font-size: 17px; color: var(--muted);
  max-width: 560px; margin: 0 auto 56px; line-height: 1.7;
}

/* ─── Kinetic Marquee ─── */
.marquee-section {
  padding: 24px 0; overflow: hidden;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.marquee-track {
  display: flex; gap: 48px;
  animation: marquee 30s linear infinite;
  width: max-content;
}
.marquee-item {
  font-family: 'Playfair Display', serif;
  font-size: 20px; color: var(--muted);
  white-space: nowrap; letter-spacing: .02em;
}
.marquee-item span { color: var(--accent); margin: 0 16px; font-size: 14px; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ─── Text Scramble ─── */
.scramble-section { padding: 100px 24px; text-align: center; }
.scramble-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700; line-height: 1.15;
  min-height: 1.2em; letter-spacing: -.02em;
}
.scramble-headline .char { display: inline-block; transition: color .15s; }
.scramble-headline .char.resolved { color: var(--text); }
.scramble-headline .char.scrambling { color: var(--accent); opacity: .5; }
.scramble-sub {
  font-size: 18px; color: var(--muted); margin-top: 20px;
  max-width: 520px; margin-left: auto; margin-right: auto;
  line-height: 1.7; opacity: 0; transform: translateY(10px);
  transition: all .8s cubic-bezier(.16,1,.3,1);
}
.scramble-sub.visible { opacity: 1; transform: translateY(0); }

/* ─── Accordion Slider (Menu) ─── */
.accordion { display: flex; height: 65vh; gap: 6px; max-width: 1100px; margin: 0 auto; border-radius: var(--r); overflow: hidden; }
.accordion-panel {
  flex: 1; position: relative; cursor: pointer;
  transition: flex .6s cubic-bezier(.16,1,.3,1);
  overflow: hidden;
}
.accordion-panel.active { flex: 5; }
.panel-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.accordion-panel:hover .panel-bg { transform: scale(1.05); }
.panel-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,14,16,0.9) 0%, rgba(14,14,16,0.3) 50%, rgba(14,14,16,0.1) 100%);
}
.panel-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 32px; z-index: 2;
}
.panel-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--accent); letter-spacing: .1em;
  margin-bottom: 8px;
  opacity: 0; transform: translateY(10px);
  transition: all .4s .1s cubic-bezier(.16,1,.3,1);
}
.panel-h3 {
  font-family: 'Playfair Display', serif;
  font-size: 28px; font-weight: 600; color: var(--text);
  margin-bottom: 8px;
  opacity: 0; transform: translateY(10px);
  transition: all .4s .15s cubic-bezier(.16,1,.3,1);
}
.panel-desc {
  font-size: 14px; color: var(--muted); line-height: 1.6;
  max-width: 320px;
  opacity: 0; transform: translateY(10px);
  transition: all .4s .2s cubic-bezier(.16,1,.3,1);
}
.accordion-panel.active .panel-num,
.accordion-panel.active .panel-h3,
.accordion-panel.active .panel-desc {
  opacity: 1; transform: translateY(0);
}

/* ─── Odometer Stats ─── */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.stat-card {
  text-align: center; padding: 32px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); min-width: 180px;
  overflow: hidden;
}
.stat-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px; font-weight: 700; color: var(--accent);
  line-height: 1;
  display: flex; align-items: center; justify-content: center; gap: 2px;
}
.odo-digit { display: inline-block; overflow: hidden; height: 48px; line-height: 48px; }
.odo-strip {
  display: flex; flex-direction: column;
  transition: transform 2s cubic-bezier(.25,.1,.25,1);
}
.odo-strip span { display: block; height: 48px; line-height: 48px; text-align: center; }
.stat-suffix {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; color: var(--accent);
  line-height: 1;
}
/* Separator suffixes (apostrophes, commas) inside odometer — match digit size */
.stat-suffix.odo-sep {
  font-size: inherit; height: 48px; line-height: 48px;
  display: inline-flex; align-items: center;
}
/* Unit suffix (°C, +, %) displayed after the number */
.stat-unit {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; color: var(--accent);
  font-size: 24px;
  line-height: 48px;
  margin-left: 2px;
  align-self: flex-start;
}
.stat-label {
  font-size: 13px; color: var(--muted); margin-top: 8px;
  text-transform: uppercase; letter-spacing: .12em;
}

/* ─── Menu Grid ─── */
.menu-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  max-width: 900px; margin: 0 auto;
  border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; background: var(--surface);
}
.menu-category { padding: 40px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); }
.menu-category:nth-child(even) { border-right: none; }
.menu-category:nth-last-child(-n+2) { border-bottom: none; }
.menu-cat-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px; color: var(--accent); margin-bottom: 20px;
}
.menu-item { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px dotted var(--border); }
.menu-item:last-child { border-bottom: none; }
.menu-item-left { flex: 1; }
.menu-item-name { font-size: 15px; color: var(--text); font-weight: 500; }
.menu-item-desc { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }
.menu-item-price { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--accent); white-space: nowrap; margin-left: 16px; }
.menu-download {
  text-align: center; margin-top: 48px;
}
.menu-download a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border: 1px solid var(--accent); border-radius: 32px;
  color: var(--accent); font-size: 14px; font-weight: 500;
  letter-spacing: .04em; transition: all .3s;
}
.menu-download a:hover { background: var(--accent); color: var(--bg); }

/* ─── Menu CTA Row (Order / Reserve) ─── */
.menu-cta-row {
  display: flex; justify-content: center; gap: 16px; margin-top: 48px; flex-wrap: wrap;
}
.menu-order-btn, .menu-reserve-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 36px; border-radius: 32px;
  font-size: 15px; font-weight: 600; letter-spacing: .02em;
  transition: all .3s; cursor: pointer;
}
.menu-order-btn {
  background: var(--accent2); color: white; border: none;
}
.menu-order-btn:hover { background: #e07a48; color: white; transform: translateY(-2px); }
.menu-reserve-btn {
  background: var(--accent); color: var(--bg); border: none;
}
.menu-reserve-btn:hover { background: var(--text); color: var(--bg); transform: translateY(-2px); }

/* ─── Events Section ─── */
.events-card {
  max-width: 800px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden;
  display: grid; grid-template-columns: 1fr 1fr;
}
.events-img { min-height: 360px; background-size: cover; background-position: center; }
.events-content { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.events-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 28px; margin-bottom: 16px;
}
.events-content h3 em { font-style: italic; color: var(--accent); }
.events-content p { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.events-content .highlight { color: var(--accent); font-weight: 600; }
.events-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; padding: 12px 28px;
  background: var(--accent); color: var(--bg);
  font-size: 14px; font-weight: 600; border-radius: 28px;
  transition: all .3s; width: fit-content;
}
.events-cta:hover { background: var(--text); transform: translateY(-2px); }

/* ─── Contact / Map ─── */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  max-width: 900px; margin: 0 auto;
}
.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 40px;
}
.contact-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 22px; margin-bottom: 20px;
}
.contact-card h3 em { font-style: italic; color: var(--accent); }
.contact-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.contact-item:last-child { border-bottom: none; }
.contact-icon { color: var(--accent); font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.contact-text { font-size: 14px; color: var(--muted); line-height: 1.6; }
.contact-text strong { color: var(--text); font-weight: 500; }
.contact-text a { color: var(--accent); }
.map-embed { border-radius: var(--r); overflow: hidden; min-height: 300px; border: 1px solid var(--border); height: 100%; }
.map-embed iframe { width: 100%; height: 100%; min-height: 100%; border: none; filter: grayscale(0.3) contrast(1.1); }

/* ─── Demo Toast ─── */
.demo-toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(100px);
  z-index: 9999; background: var(--surface2); color: var(--text);
  padding: 16px 28px; border-radius: 12px;
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  opacity: 0; transition: all .4s cubic-bezier(.16,1,.3,1);
  pointer-events: none; white-space: nowrap;
}
.demo-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.demo-toast span { color: var(--accent); }

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px; text-align: center;
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px; color: var(--text); margin-bottom: 16px;
}
.footer-logo em { font-style: italic; color: var(--accent); }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 24px; }
.footer-links a { font-size: 13px; color: var(--muted); transition: color .3s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--muted); }

/* ─── Scroll Reveal ─── */
.reveal { opacity: 0; transform: translateY(40px); transition: all .8s cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .accordion { flex-direction: column; height: auto; }
  .accordion-panel { min-height: 200px; }
  .accordion-panel.active { min-height: 350px; flex: none; }
  .menu-grid { grid-template-columns: 1fr; }
  .menu-category { border-right: none !important; }
  .events-card { grid-template-columns: 1fr; }
  .events-img { min-height: 220px; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat-card { padding: 24px 12px; }
  .stat-number { font-size: 36px; line-height: 1; }
  .odo-digit { height: 36px; line-height: 36px; }
  .odo-strip span { height: 36px; line-height: 36px; }
  .stat-suffix.odo-sep { height: 36px; line-height: 36px; }
  .stat-unit { font-size: 18px; line-height: 36px; }
  .hero-title { text-shadow: 0 2px 12px rgba(0,0,0,0.9); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
