/* ============================================================
   Da Flavio — foglio di stile unico
   Palette: crema, espresso, basilico (verde), pomodoro (rosso).
   ============================================================ */

:root {
  --radius: 0.625rem;

  --background: oklch(0.985 0.012 85);   /* crema calda */
  --foreground: oklch(0.22 0.025 40);    /* espresso */
  --primary: oklch(0.42 0.13 145);       /* verde basilico */
  --secondary: oklch(0.95 0.02 80);
  --muted: oklch(0.94 0.018 80);
  --muted-foreground: oklch(0.45 0.03 50);
  --accent: oklch(0.56 0.19 28);         /* rosso pomodoro */
  --accent-foreground: oklch(0.985 0.012 85);
  --border: oklch(0.88 0.022 75);

  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-script: "Allura", "Great Vibes", cursive;

  --shadow-elegant: 0 30px 60px -30px oklch(0.22 0.025 40 / 0.35);
}

/* ---------- reset di base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

em {
  font-style: italic;
}

/* ---------- utility condivise ---------- */
.section {
  position: relative;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

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

.section-title {
  margin-top: 1rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
}

.script-accent {
  font-family: var(--font-script);
  font-style: normal;
  color: var(--accent);
}

.muted {
  color: var(--muted-foreground);
}

.lead-spacing {
  margin-top: 1.5rem;
  line-height: 1.75;
}

.text-center {
  text-align: center;
}

.btn {
  display: inline-block;
  border-radius: 9999px;
  padding: 0.75rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.btn-light {
  background: var(--background);
  color: var(--foreground);
}

.btn-light:hover {
  opacity: 0.9;
}

.link-accent {
  transition: color 0.2s ease;
}

.link-accent:hover {
  color: var(--accent);
}

/* ---------- header ---------- */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  height: 3rem;
  background: rgba(255, 255, 255, 0.9);
  object-fit: contain;
  border-radius: 6px;
}

.brand-name {
  display: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--background);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.nav a {
  transition: color 0.2s ease;
}

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

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem;
  font-size: 0.75rem;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lang-btn {
  border: none;
  background: transparent;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-btn.is-active {
  background: var(--background);
  color: var(--foreground);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 100svh;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    oklch(0.22 0.025 40 / 0.7) 0%,
    oklch(0.22 0.025 40 / 0.4) 50%,
    oklch(0.22 0.025 40 / 0.85) 100%
  );
}

.hero-content {
  position: relative;
  max-width: 64rem;
  margin: 0 auto;
  padding: 8rem 1.5rem;
  width: 100%;
  text-align: center;
  color: var(--background);
}

.hero-script {
  font-family: var(--font-script);
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  color: rgba(255, 255, 255, 0.9);
}

.hero-title {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(3.75rem, 12vw, 6rem);
  font-weight: 500;
  line-height: 0.95;
}

.hero-eyebrow {
  margin: 1.5rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  color: rgba(255, 255, 255, 0.8);
}

.hero-eyebrow .rule {
  height: 1px;
  width: 3rem;
  background: rgba(255, 255, 255, 0.5);
}

.hero-lead {
  max-width: 36rem;
  margin: 2rem auto 0;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.85);
  text-wrap-style: balance;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
}

/* ---------- story ---------- */
.story-grid {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 4rem;
}

.stats {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  color: var(--accent);
}

.stat-value-inline {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.icon-star {
  height: 1rem;
  width: 1rem;
  color: var(--accent);
}

.stat-label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.story-image {
  position: relative;
}

.story-image-bg {
  position: absolute;
  inset: -1rem;
  border-radius: 2rem;
  background: oklch(0.42 0.13 145 / 0.1);
}

.story-image-img {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: 1.5rem;
  object-fit: cover;
  box-shadow: var(--shadow-elegant);
}

/* ---------- menu ---------- */
.menu {
  background: oklch(0.95 0.02 80 / 0.6);
}

.menu-wrap {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.menu-subtitle {
  max-width: 36rem;
  margin: 1rem auto 0;
}

.menu-tabs {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.menu-tab {
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.menu-tab:hover {
  border-color: oklch(0.56 0.19 28 / 0.5);
}

.menu-tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-foreground);
}

.menu-card {
  margin-top: 3rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 2rem;
  box-shadow: var(--shadow-elegant);
}

.menu-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  color: var(--accent);
}

.menu-card-rule {
  margin-top: 0.5rem;
  height: 1px;
  width: 4rem;
  background: var(--accent);
}

.menu-list {
  margin-top: 2rem;
  list-style: none;
  padding: 0;
}

.menu-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}

.menu-item:first-child {
  border-top: none;
}

.menu-item-body {
  min-width: 60%;
  flex: 1;
}

.menu-item-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--foreground);
}

.menu-item-sub {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--muted-foreground);
}

.menu-item-allergens {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-style: normal;
}

.menu-item-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.menu-item-rule {
  display: none;
  height: 1px;
  width: 3rem;
  background: var(--border);
}

.menu-item-price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent);
  white-space: nowrap;
}

.menu-note {
  margin-top: 2rem;
  font-size: 0.75rem;
}

/* ---------- allergeni: pulsante + dialog ---------- */
.menu-allergeni-actions {
  margin-top: 1.25rem;
  text-align: center;
}

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

.btn-allergeni:hover {
  background: var(--accent);
  color: var(--accent-foreground);
}

.allergeni-dialog {
  width: min(92vw, 34rem);
  max-height: 85vh;
  margin: auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: var(--background);
  color: var(--foreground);
  box-shadow: var(--shadow-elegant);
  overflow: auto;
}

.allergeni-dialog::backdrop {
  background: oklch(0.22 0.025 40 / 0.55);
  backdrop-filter: blur(2px);
}

.allergeni-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.allergeni-dialog-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2;
}

.allergeni-dialog-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--background);
  color: var(--foreground);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.allergeni-dialog-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.allergeni-dialog-sub {
  margin: 0.5rem 0 1.25rem;
  font-size: 0.8rem;
}

.allergeni-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.allergeni-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

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

.allergeni-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-foreground);
  font-size: 0.8rem;
  font-weight: 600;
}

.allergeni-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.allergeni-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.6;
}

.allergeni-desc {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--muted-foreground);
  line-height: 1.35;
}

/* ---------- visit ---------- */
.visit-grid {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  gap: 3rem;
}

.info-rows {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-row {
  display: flex;
  gap: 1rem;
}

.info-icon {
  margin-top: 0.25rem;
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: oklch(0.56 0.19 28 / 0.1);
  color: var(--accent);
}

.info-icon svg {
  height: 1.25rem;
  width: 1.25rem;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.info-value {
  margin-top: 0.25rem;
  color: var(--foreground);
}

.map-frame {
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elegant);
}

.map-frame iframe {
  display: block;
  height: 100%;
  min-height: 420px;
  width: 100%;
  border: 0;
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--foreground);
  padding: 3rem 0;
  color: rgba(255, 255, 255, 0.8);
}

.footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo {
  height: 13rem;
  background: var(--background);
  object-fit: contain;
  border-radius: 10px;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--background);
}

.footer-address {
  font-size: 0.875rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- animazioni di ingresso (reveal on scroll) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* il hero è già in vista al caricamento: nessun ritardo evidente */
.hero.reveal {
  transform: none;
}

/* dissolvenza al cambio categoria/lingua del menu */
.menu-list.is-switching,
.menu-card-title.is-switching {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.menu-list,
.menu-card-title {
  transition: opacity 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Breakpoint responsive
   ============================================================ */
@media (min-width: 640px) {
  .brand-name { display: block; }
  .menu-item-rule { display: block; }
}

@media (min-width: 768px) {
  .nav { display: flex; }

  .section {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }

  .story-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .visit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-lead { font-size: 1.125rem; }

  .menu-card { padding: 3.5rem; }
}
