body {
  font-family: "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
}

:root {
  --contact-form-max-width-desktop: 38rem;
  --contact-form-max-width-mobile: 33rem;
}

.font-display {
  font-family: "Playfair Display", serif;
}

/* Scrollbar Personalizzata */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
  background: #c5a880;
  border-radius: 999px;
}

/* Gestione Pagine (Single Page Application) */
.page-section {
  display: none;
}
.page-section.active {
  display: block;
  animation: pageFade 0.45s ease both;
}

@keyframes pageFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Layout */
.container-prose {
  width: min(100% - 2rem, 80rem);
  margin-inline: auto;
}

.section-pad {
  padding-block: clamp(4.5rem, 8vw, 7rem);
}

/* Hero Sections */
.hero-shell, .inner-hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  background: #020617;
}

.inner-hero {
  min-height: 52vh;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
          linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.3)),
          linear-gradient(0deg, rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.15));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.animate-slow-zoom {
  animation: slowZoom 16s ease-in-out infinite alternate;
}

@keyframes slowZoom {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .animate-slow-zoom {
    animation: none;
  }
}

/* Tipografia */
.eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #d97706;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  font-weight: 700;
  color: #020617;
}

/* Navigazione */
.nav-link {
  border-bottom: 2px solid transparent;
  padding-block: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  transition: all 180ms ease;
}

.nav-link:hover, .nav-link.active {
  border-color: #f59e0b;
  color: #fbbf24;
}

.mobile-link {
  border-radius: 0.65rem;
  padding: 0.8rem 1rem;
  color: #334155;
  transition: all 180ms ease;
}

.mobile-link.active {
  background: #fffbeb;
  color: #b45309;
}

.contact-form-shell {
  width: min(100%, var(--contact-form-max-width-desktop));
  margin-inline: auto;
  align-self: start;
}

/* Bottoni */
.btn-primary, .btn-dark, .btn-ghost, .btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  padding: 0.95rem 1.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 180ms ease;
}

.btn-primary { background: #fbbf24; color: #020617; }
.btn-primary:hover { transform: translateY(-2px); background: #f59e0b; }

.btn-dark { background: #020617; color: #fff; }
.btn-dark:hover { background: #fbbf24; color: #020617; transform: translateY(-2px); }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }

.btn-soft {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.btn-soft:hover {
  border-color: #f59e0b;
  color: #92400e;
  transform: translateY(-2px);
}

/* Cards */
.interaction-card, .content-card {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
  transition: transform 280ms ease, box-shadow 280ms ease, border-color 280ms ease;
}

.interaction-card { padding: clamp(1.25rem, 3vw, 2rem); }
.content-card { padding: 1.65rem; }

.interaction-card:hover, .content-card:hover {
  transform: translateY(-5px);
  border-color: #fde68a;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.content-icon {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 999px;
  background: #020617;
  color: #fbbf24;
}

/* Form */
.form-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.7rem;
  background: #fff;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: all 160ms ease;
}

.form-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.info-line {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1.15rem;
  transition: border-color 220ms ease, transform 220ms ease;
}

.info-line i { color: #d97706; margin-top: 0.2rem; }

.info-line:hover {
  border-color: #fdba74;
  transform: translateX(2px);
}

/* Galleria */
.gallery-tile {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 4 / 3;
  background: #0f172a;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}

.gallery-tile:hover img {
  transform: scale(1.06);
}

.gallery-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent);
}

/* Toast Notification */
.toast {
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Animazioni Eleganti allo Scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.delay-200 { transition-delay: 200ms; }
.reveal.delay-300 { transition-delay: 300ms; }

.honeypot-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Stile per gli orari nel footer e contatti */
.hours-badge {
  display: flex;
  justify-content: space-between;
  width: 100%;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}
.hours-badge:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* --- Header Dinamico --- */
#main-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: 70px;
  border-bottom-color: rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

#main-header.scrolled .header-text { color: #020617; }
#main-header.scrolled .header-sub { color: #475569; }
#main-header.scrolled .nav-link { color: #334155; }
#main-header.scrolled .nav-link:hover,
#main-header.scrolled .nav-link.active { color: #d97706; }

/* --- Mobile Menu Side Panel --- */
#mobile-menu.active {
  transform: translateX(0);
}

#mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-link {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  color: #475569;
  transition: all 0.2s;
}

.mobile-link.active {
  background: #fffbeb;
  color: #b45309;
}

/* --- Miglioramento visualizzazione telefono --- */
@media (max-width: 640px) {
  #main-header {
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-color: rgba(148, 163, 184, 0.35);
  }
  #main-header .header-text { color: #fff; font-size: 0.95rem; }
  #main-header .header-sub { color: rgba(255, 255, 255, 0.78); }
  #mobile-toggle {
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(15, 23, 42, 0.9);
  }
  .section-pad { padding-block: 3.5rem; }
  .section-title { font-size: 1.85rem; }
  .hero-shell { min-height: 85vh; }
  #mobile-menu {
    width: 100%;
    max-width: 100%;
    padding-top: calc(env(safe-area-inset-top, 0px) + 1.5rem);
    overflow-y: auto;
  }

  /* Stack delle card più pulito */
  .content-card {
    padding: 1.25rem;
  }

  .contact-form-shell {
    width: min(100%, var(--contact-form-max-width-mobile));
  }
}