/* ========================================
   RESET E VARIABILI GLOBALI
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0d0b09;
  --text: #f5f0e8;
  --accent: #c8922a;
  --secondary: #3a2e22;
  --surface: #1a1612;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Su desktop nascondiamo il cursore default */
@media (pointer: fine) {
  html, body, a, button, input, textarea, select {
    cursor: none;
  }
}

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

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

/* ========================================
   CURSORE CUSTOM (solo desktop con mouse)
   ======================================== */
.custom-cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 100000;
  mix-blend-mode: difference;
  /* Centrato rispetto al puntatore */
  margin-left: -6px;
  margin-top: -6px;
  transition: width 0.3s, height 0.3s, margin 0.3s;
  /* Nascosto di default — JS lo mostra al primo mousemove */
  display: none;
}

.custom-cursor.hovering {
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  background: rgba(200, 146, 42, 0.4);
}

/* Nasconde il cursore custom su touch / mobile */
@media (pointer: coarse) {
  .custom-cursor { display: none !important; }
}

/* ========================================
   LOADING SCREEN
   ======================================== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text);
  letter-spacing: 0.08em;
}

.loading-bar-container {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(300px, 60vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.loading-bar-track {
  width: 100%;
  height: 1px;
  background: var(--secondary);
  overflow: hidden;
}

.loading-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

.loading-percent {
  font-size: 0.75rem;
  color: rgba(245, 240, 232, 0.4);
  letter-spacing: 0.15em;
}

/* ========================================
   NAVBAR — sempre visibile
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 0 clamp(1.5rem, 4vw, 4rem);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease;
}

.navbar.solid {
  background: rgba(13, 11, 9, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.7);
  transition: color 0.3s ease;
}

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

.nav-cta {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 24px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  transition: background 0.3s ease, color 0.3s ease;
  font-family: var(--font-body);
}

.nav-cta:hover {
  background: var(--accent);
  color: var(--bg);
}

/* Hamburger — solo mobile */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Menu mobile fullscreen */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(13, 11, 9, 0.98);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 2rem;
  color: var(--text);
  transition: color 0.3s;
}

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

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
}

/* ========================================
   HERO — SCROLL SCRUBBING
   ======================================== */
.hero-wrapper {
  position: relative;
  height: 220vh;
}

.hero-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* Video fixed — resta a schermo intero, le sezioni ci scorrono sopra */
.hero-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  transition: opacity 0.3s ease;
}

/* Su mobile: il video gira in autoplay, no scroll scrubbing */
@media (pointer: coarse) {
  /* Il testo hero è sempre visibile (no scroll scrubbing) */
  .hero-text {
    opacity: 1 !important;
  }

  /* Senza scroll scrubbing lo spazio extra non serve */
  .hero-wrapper {
    height: 100vh;
  }

  /* Il video non è più fixed ma riempie l'hero normalmente */
  .hero-video {
    position: absolute;
  }
}

/* Vignette scura sui bordi — effetto cinema */
.hero-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 30%,
    rgba(13, 11, 9, 0.6) 70%,
    rgba(13, 11, 9, 0.95) 100%
  );
  pointer-events: none;
}

.hero-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

.hero-headline {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-subline {
  font-size: clamp(0.75rem, 1.2vw, 1rem);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.6);
}

/* ========================================
   SEZIONI — layout e animazioni di ingresso
   ======================================== */
.section {
  padding: clamp(4rem, 10vh, 10rem) clamp(1.5rem, 5vw, 6rem);
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   MANIFESTO
   ======================================== */
.manifesto {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.manifesto-quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 4rem;
}

.manifesto-columns {
  display: flex;
  justify-content: center;
}

.manifesto-col {
  flex: 1;
  padding: 0 clamp(1rem, 3vw, 3rem);
  position: relative;
}

.manifesto-col:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
}

.manifesto-col h3 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.manifesto-col p {
  font-size: clamp(0.8rem, 1vw, 0.9rem);
  color: rgba(245, 240, 232, 0.6);
  line-height: 1.6;
}

.gold-divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 4rem auto;
}

/* ========================================
   MENU
   ======================================== */
.menu-section {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(2rem, 4vw, 3.5rem);
  text-align: center;
  margin-bottom: 4rem;
  color: var(--text);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}

.menu-card {
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.menu-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 30px rgba(200, 146, 42, 0.15),
              inset 0 0 0 1px rgba(200, 146, 42, 0.3);
}

.menu-card-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(145deg, #2a1f14 0%, #3d2a18 25%, #4a3020 45%, #2a1f14 65%, #1a1410 100%);
  position: relative;
}

.menu-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 40% 30%, rgba(200, 146, 42, 0.15) 0%, transparent 60%);
}

.menu-card-body {
  padding: clamp(1rem, 2vw, 1.5rem);
}

.menu-card-name {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  margin-bottom: 0.4rem;
  color: var(--text);
}

.menu-card-ingredients {
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.5);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.menu-card-price {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .menu-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }
}

/* ========================================
   EXPERIENCE
   ======================================== */
.experience {
  max-width: 1000px;
  margin: 0 auto;
}

.experience-stats {
  display: flex;
  justify-content: center;
  gap: clamp(3rem, 8vw, 10rem);
  margin-bottom: 4rem;
}

.stat {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(245, 240, 232, 0.5);
  margin-top: 0.75rem;
}

.experience-text {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  color: rgba(245, 240, 232, 0.65);
  line-height: 1.8;
}

/* ========================================
   CONTATTI — grid form + mappa
   ======================================== */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

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

.reservation {
  text-align: center;
}

.reservation-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 2rem;
}

/* ========================================
   MAPPA — Google Maps con blocco preventivo
   ======================================== */
.map-container {
  width: 100%;
  min-height: 460px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

/* Placeholder — mostrato prima del consenso cookie */
.map-placeholder {
  width: 100%;
  height: 100%;
  min-height: 460px;
  background: var(--surface);
  border: 1px solid var(--secondary);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 2rem;
  text-align: center;
}

.map-placeholder-icon svg {
  width: 48px;
  height: 48px;
  color: var(--accent);
  opacity: 0.6;
}

.map-placeholder-text {
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.5);
  line-height: 1.6;
  max-width: 280px;
}

.map-placeholder-btn {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.map-placeholder-btn:hover {
  background: #d9a23b;
  transform: translateY(-1px);
}

.map-placeholder-address {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1rem;
  color: rgba(245, 240, 232, 0.4);
  margin-top: 0.5rem;
}

/* Iframe wrapper — visibile dopo il consenso */
.map-iframe-wrapper {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 460px;
}

.map-iframe-wrapper.active {
  display: block;
}

.map-iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  min-height: 460px;
  border: none;
  border-radius: 4px;
  filter: grayscale(0.3) contrast(1.1);
}

@media (max-width: 900px) {
  .map-container,
  .map-placeholder,
  .map-iframe-wrapper,
  .map-iframe-wrapper iframe {
    min-height: 350px;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.form-group label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 240, 232, 0.5);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--secondary);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  padding: 14px 16px;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.3s ease;
  letter-spacing: 0.02em;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

.btn-submit {
  margin-top: 1rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 16px 32px;
  border: none;
  border-radius: 2px;
  transition: background 0.3s ease, transform 0.2s ease;
  width: 100%;
}

.btn-submit:hover {
  background: #d9a23b;
  transform: translateY(-1px);
}

.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
}

.form-success.show {
  display: flex;
}

.form-success-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-success-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
}

.form-success h3 {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.8rem;
  color: var(--text);
}

.form-success p {
  font-size: 0.9rem;
  color: rgba(245, 240, 232, 0.6);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  border-top: 1px solid var(--accent);
  padding: clamp(3rem, 6vh, 5rem) clamp(1.5rem, 5vw, 6rem);
  text-align: center;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.footer-logo {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.footer-info {
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.45);
  line-height: 2;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.footer-socials a {
  color: rgba(245, 240, 232, 0.45);
  transition: color 0.3s ease;
}

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

.footer-socials svg {
  width: 20px;
  height: 20px;
}


/* ========================================
   WHATSAPP BUTTON — pulsante flottante
   ======================================== */
.whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9990;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn svg {
  width: 30px;
  height: 30px;
}

/* Su mobile: più piccolo e spostato sopra il cookie banner */
@media (max-width: 768px) {
  .whatsapp-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .whatsapp-btn svg {
    width: 26px;
    height: 26px;
  }
}

/* Quando il cookie banner è visibile, sposta il bottone WhatsApp sopra il banner */
.cookie-banner.visible ~ .whatsapp-btn {
  bottom: 100px;
}

@media (max-width: 600px) {
  .cookie-banner.visible ~ .whatsapp-btn {
    bottom: 180px;
  }
}

/* ========================================
   COOKIE BANNER
   ======================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99998;
  background: var(--surface);
  border-top: 1px solid var(--secondary);
  padding: 1.2rem clamp(1.5rem, 4vw, 4rem);
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

/* Classe aggiunta da JS per mostrare il banner */
.cookie-banner.visible {
  transform: translateY(0);
}

/* Classe aggiunta da JS per nascondere il banner */
.cookie-banner.hidden {
  transform: translateY(100%);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-text {
  font-size: 0.82rem;
  color: rgba(245, 240, 232, 0.7);
  line-height: 1.6;
  flex: 1;
  min-width: 250px;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-link {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  letter-spacing: 0.04em;
  transition: opacity 0.3s;
}

.cookie-link:hover {
  opacity: 0.7;
}

.cookie-btn {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 22px;
  border: none;
  border-radius: 2px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.cookie-accept {
  background: var(--accent);
  color: var(--bg);
}

.cookie-accept:hover {
  background: #d9a23b;
  transform: translateY(-1px);
}

.cookie-reject {
  background: transparent;
  color: rgba(245, 240, 232, 0.6);
  border: 1px solid var(--secondary);
}

.cookie-reject:hover {
  border-color: rgba(245, 240, 232, 0.3);
  color: var(--text);
}

/* Su mobile il banner diventa verticale */
@media (max-width: 600px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  .cookie-actions {
    width: 100%;
    justify-content: center;
  }
}
