/* ==========================================================================
   Palmento Spuligni — Ristorante e Agriturismo a Zafferana Etnea
   Foglio di stile unico del sito statico.
   Sezioni: 1 Token · 2 Base · 3 Layout · 4 Header · 5 Hero · 6 Componenti
            9 Footer · 10 Elementi flottanti · 11 Modali · 12 Responsive
   ========================================================================== */

/* 1. Token ---------------------------------------------------------------- */
:root {
  --cream: #fbf7f1;
  --paper: #ffffff;
  --sand: #f2eadf;
  --ink: #191512;
  --muted: #6f665c;
  --brand: #b98a5e;
  --brand-dark: #8a5f36;
  --basalt: #14110f;
  --basalt-soft: #1f1a16;
  --olive: #58603f;
  --line: rgba(25, 21, 18, .12);
  --line-soft: rgba(25, 21, 18, .07);
  --shadow-sm: 0 6px 20px rgba(25, 21, 18, .07);
  --shadow: 0 18px 50px rgba(25, 21, 18, .12);
  --shadow-lg: 0 30px 80px rgba(25, 21, 18, .18);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --max: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --ui: "Oswald", "Arial Narrow", sans-serif;
  --body: "Mulish", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--brand); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* 3. Layout --------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(64px, 9vw, 116px) 0; }
.section--tight { padding: clamp(44px, 6vw, 72px) 0; }
.section--paper { background: var(--paper); }
.section--dark { background: var(--basalt); color: #ece5db; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .lead { color: rgba(236, 229, 219, .8); }

.kicker {
  font-family: var(--ui);
  font-weight: 400;
  font-size: .8rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--brand-dark);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kicker::after {
  content: "";
  flex: 0 0 46px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}
.section--dark .kicker { color: var(--brand); }

.head { max-width: 720px; }
.head--center { margin-inline: auto; text-align: center; }
.head--center .kicker { justify-content: center; }
.head--center .kicker::before {
  content: "";
  flex: 0 0 46px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.lead {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 62ch;
}
.head--center .lead { margin-inline: auto; }

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.split--reverse .split__media { order: 2; }

.split__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.split__media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.split__media:hover img { transform: scale(1.05); }

.split__media--stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  box-shadow: none;
  border-radius: 0;
  overflow: visible;
}
.split__media--stack img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-height: 200px;
}
.split__media--stack img:first-child { grid-row: span 2; min-height: 100%; }

/* 4. Header --------------------------------------------------------------- */
.topbar {
  background: var(--basalt);
  color: rgba(236, 229, 219, .78);
  font-size: .82rem;
  letter-spacing: .04em;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 42px;
  padding-block: 8px;
}
.topbar a:hover { color: var(--brand); }
.topbar__group { display: flex; align-items: center; gap: 20px; }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; }
.topbar__item svg { width: 15px; height: 15px; fill: var(--brand); flex: none; }

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 247, 241, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.header.is-stuck {
  background: rgba(251, 247, 241, .98);
  box-shadow: 0 10px 40px rgba(25, 21, 18, .12);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand img {
  width: clamp(120px, 14vw, 168px);
  transition: width .3s var(--ease);
}
.header.is-stuck .brand img { width: clamp(104px, 11vw, 130px); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list a {
  display: block;
  padding: 10px 14px;
  font-family: var(--ui);
  font-weight: 400;
  font-size: .88rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  transition: color .25s var(--ease);
}
.nav__list a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__list a:hover { color: var(--brand-dark); }
.nav__list a:hover::after,
.nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.nav__list a[aria-current="page"] { color: var(--brand-dark); }

/* Selettore lingua */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-left: 4px;
}
.lang__select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 7px 30px 7px 13px;
  font-family: var(--ui);
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--ink);
  cursor: pointer;
  /* freccetta disegnata, così è identica su tutti i browser */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f665c' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 10px;
  transition: background-color .25s var(--ease);
}
.lang__select:hover { background-color: rgba(25, 21, 18, .05); }
.lang__select option { color: var(--ink); background: var(--paper); }

.burger {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  position: relative;
}
.burger span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.6px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* 5. Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 22s ease-in-out infinite alternate;
}
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes kenburns {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1.5%, 0); }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 17, 15, .62) 0%, rgba(20, 17, 15, .42) 45%, rgba(20, 17, 15, .82) 100%);
}
.hero__inner { padding-block: clamp(90px, 14vw, 150px); max-width: 860px; }
.hero .kicker { color: #e6cfae; justify-content: center; }
.hero .kicker::before {
  content: "";
  flex: 0 0 46px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}
.hero h1 { color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.hero p {
  color: rgba(255, 255, 255, .9);
  font-size: 1.1rem;
  max-width: 60ch;
  margin-inline: auto;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 30px;
}
.hero__scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ui);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .75);
  display: grid;
  justify-items: center;
  gap: 8px;
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), transparent);
  animation: drop 2s var(--ease) infinite;
}
@keyframes drop {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Hero interno delle pagine secondarie */
.pagehero {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  padding-block: clamp(90px, 13vw, 160px);
  isolation: isolate;
}
.pagehero__media { position: absolute; inset: 0; z-index: -2; }
.pagehero__media img { width: 100%; height: 100%; object-fit: cover; }
.pagehero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 17, 15, .68), rgba(20, 17, 15, .55));
}
.pagehero h1 { color: #fff; margin-bottom: .35em; }
.pagehero p { color: rgba(255, 255, 255, .88); max-width: 58ch; margin-inline: auto; }
.pagehero .kicker { color: #e6cfae; justify-content: center; }
.pagehero .kicker::before {
  content: "";
  flex: 0 0 46px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}

.breadcrumb {
  font-size: .85rem;
  color: var(--muted);
  padding-block: 16px;
  border-bottom: 1px solid var(--line-soft);
}
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb span { opacity: .5; margin-inline: 8px; }

/* 6. Componenti ----------------------------------------------------------- */
/* Bottoni */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--ui);
  font-size: .87rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease),
              color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

.btn--primary { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--ink); box-shadow: var(--shadow); }

.btn--ghost { border-color: currentColor; color: inherit; }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--brand); color: #fff; }

.btn--outline-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--ink); }

.btn--block { width: 100%; }

.link-arrow {
  font-family: var(--ui);
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(5px); }

/* Griglia generica */
.grid {
  display: grid;
  gap: clamp(20px, 3vw, 30px);
  margin-top: 46px;
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Card immagine + testo */
.card {
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { overflow: hidden; aspect-ratio: 4 / 3; }
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.card:hover .card__media img { transform: scale(1.07); }
.card__body { padding: 26px 26px 30px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__body h3 { margin: 0; }
.card__body p { color: var(--muted); font-size: .96rem; }
.card__body .link-arrow { margin-top: auto; padding-top: 8px; }
.card__price {
  font-family: var(--ui);
  font-size: 1.15rem;
  letter-spacing: .06em;
  color: var(--brand-dark);
}
.card__price small { font-family: var(--body); font-size: .8rem; color: var(--muted); letter-spacing: 0; }

/* Card di navigazione con overlay */
.tile {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 17, 15, .05) 30%, rgba(20, 17, 15, .78) 100%);
}
.tile:hover img { transform: scale(1.08); }
.tile__label {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 22px;
  display: grid;
  gap: 4px;
}
.tile__label strong {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
}
.tile__label span {
  font-family: var(--ui);
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}

/* Elenco vantaggi / servizi */
.feature {
  display: grid;
  gap: 10px;
  padding: 30px 26px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.feature:hover { transform: translateY(-4px); border-color: var(--brand); }
.feature__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(185, 138, 94, .14);
  color: var(--brand-dark);
  margin-bottom: 6px;
}
.feature__icon svg { width: 22px; height: 22px; fill: currentColor; }
.feature h3 { margin: 0; font-size: 1.15rem; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }
.section--dark .feature {
  background: var(--basalt-soft);
  border-color: rgba(255, 255, 255, .1);
}
.section--dark .feature p { color: rgba(236, 229, 219, .72); }
.section--dark .feature__icon { background: rgba(185, 138, 94, .2); color: var(--brand); }

/* Lista menù */
.menu-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.menu-nav a {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--ui);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.menu-nav a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.menu-group + .menu-group { margin-top: 52px; }
.menu-group__title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
}
.menu-group__title h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  margin: 0;
  white-space: nowrap;
}
.menu-group__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.menu-list { display: grid; gap: 4px; }
.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 8px 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item h4 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.02rem;
  margin: 0;
}
.menu-item p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: .92rem;
  color: var(--muted);
}
.menu-item strong {
  font-family: var(--ui);
  font-size: 1.1rem;
  color: var(--brand-dark);
  letter-spacing: .04em;
}
.menu-note {
  margin-top: 34px;
  font-size: .86rem;
  color: var(--muted);
  border-left: 2px solid var(--brand);
  padding-left: 16px;
}

/* Blocco menù PDF + QR */
.pdf-box {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 52px);
  box-shadow: var(--shadow);
}
.pdf-box__qr {
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.pdf-box__qr img {
  width: 168px;
  border: 10px solid #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.pdf-box__qr strong { font-family: var(--ui); letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; }
.pdf-box__qr small { color: var(--muted); font-size: .8rem; }
.pdf-box__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Video verticale in formato reel */
.video-card {
  position: relative;
  aspect-ratio: 9 / 16;
  width: min(340px, 100%);
  margin-inline: auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
  isolation: isolate;
}
.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card__btn {
  position: absolute;
  inset: 0;
  border: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 17, 15, .5));
  display: grid;
  place-items: center;
  color: #fff;
}
.video-card__btn span {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .65);
  background: rgba(20, 17, 15, .38);
  backdrop-filter: blur(3px);
  transition: transform .3s var(--ease), background .3s var(--ease), border-color .3s var(--ease);
}
.video-card__btn:hover span { transform: scale(1.08); background: var(--brand); border-color: var(--brand); }
.video-card__btn svg { width: 26px; height: 26px; fill: currentColor; margin-left: 4px; }

/* Variante orizzontale: il video di Eventi e 16/9, non in formato reel */
.video-card--largo {
  aspect-ratio: 16 / 9;
  width: min(880px, 100%);
  margin-top: 40px;
}

/* Galleria */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 46px;
}
.gallery__item {
  border: 0;
  padding: 0;
  background: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery__item::after {
  content: "＋";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: #fff;
  background: rgba(20, 17, 15, .35);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item:hover::after { opacity: 1; }
.gallery__item--wide { grid-column: span 2; aspect-ratio: 8 / 3; }

/* Banda con numeri */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 30px;
  text-align: center;
}
.stat strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--brand);
  line-height: 1;
}
.stat span {
  font-family: var(--ui);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(236, 229, 219, .75);
}

/* CTA a tutta larghezza */
.cta {
  position: relative;
  text-align: center;
  color: #fff;
  padding-block: clamp(70px, 10vw, 120px);
  isolation: isolate;
}
.cta__media { position: absolute; inset: 0; z-index: -2; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; }
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(20, 17, 15, .68);
}
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); max-width: 56ch; margin-inline: auto; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 28px; }

/* Info contatti */
.info-list { display: grid; gap: 24px; list-style: none; margin: 34px 0 0; padding: 0; }
.info-list li { display: flex; gap: 16px; align-items: flex-start; }
.info-list svg { width: 20px; height: 20px; fill: var(--brand); flex: none; margin-top: 5px; }
.info-list strong {
  display: block;
  font-family: var(--ui);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.info-list a:hover { color: var(--brand-dark); }

.map {
  border: 0;
  width: 100%;
  height: clamp(300px, 42vw, 460px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  filter: grayscale(.25);
}

/* Form */
.form {
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; gap: 7px; }
.field > span {
  font-family: var(--ui);
  font-size: .76rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: #b3402f; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.5;
}
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--brand-dark); flex: none; }
.check a { color: var(--brand-dark); text-decoration: underline; }

.form__msg {
  margin: 0;
  font-size: .9rem;
  min-height: 1.2em;
}
.form__msg.is-ok { color: #3f6b3a; }
.form__msg.is-error { color: #b3402f; }

/* Animazioni di ingresso */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__media img, .hero__scroll::after { animation: none; }
  html { scroll-behavior: auto; }
  /* I video in autoplay vengono messi in pausa da main.js: resta il poster. */
}

/* Pulsanti piccoli, usati sotto il giorno di chiusura */
.btn--sm { padding: 9px 16px; font-size: .76rem; letter-spacing: .1em; }
.social-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Hero ridotto per le pagine interne con video di sfondo */
.hero--pagina { min-height: min(62vh, 560px); }
.hero--pagina .hero__inner { padding-block: clamp(70px, 10vw, 110px); }
.hero--pagina h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); }

/* 9. Footer --------------------------------------------------------------- */
.footer {
  background: var(--basalt);
  color: rgba(236, 229, 219, .72);
  padding-top: clamp(56px, 7vw, 82px);
  font-size: .95rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(28px, 4vw, 48px);
  padding-bottom: 46px;
}
.footer h3 {
  font-family: var(--ui);
  font-weight: 400;
  font-size: .82rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 18px;
}
.footer img.footer__logo { width: 150px; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: .92; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--brand); }
.footer__social { display: flex; gap: 12px; margin-top: 20px; }
.footer__social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.footer__social a:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-3px); }
.footer__social svg { width: 17px; height: 17px; fill: currentColor; }
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  font-size: .82rem;
  color: rgba(236, 229, 219, .55);
}

/* 10. Elementi flottanti -------------------------------------------------- */
.fab-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  gap: 12px;
  justify-items: center;
  transition: opacity .3s var(--ease);
}
.fab {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  box-shadow: var(--shadow);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.fab:hover { transform: translateY(-3px) scale(1.05); }
.fab svg { width: 24px; height: 24px; fill: currentColor; }
.fab--wa { background: #25d366; color: #fff; }
.fab--top { background: var(--ink); color: #fff; opacity: 0; pointer-events: none; }
.fab--top.is-visible { opacity: 1; pointer-events: auto; }

/* Cookie banner */
.cookie {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: 420px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: grid;
  gap: 14px;
}
.cookie[hidden] { display: none; }
.cookie { transition: opacity .3s var(--ease); }
.cookie h2 { font-size: 1.2rem; margin: 0; }
.cookie p { font-size: .88rem; color: var(--muted); margin: 0; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie .btn { padding: 11px 20px; font-size: .78rem; }

/* 11. Modali -------------------------------------------------------------- */
dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}
dialog::backdrop { background: rgba(20, 17, 15, .78); backdrop-filter: blur(4px); }

.modal {
  position: relative;
  width: min(520px, 92vw);
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 16px;
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
  font-size: 1.2rem;
  line-height: 1;
  transition: background .25s var(--ease);
}
.modal__close:hover { background: var(--brand); color: #fff; }
.modal h2 { margin: 0; font-size: 1.6rem; }
.modal p { font-size: .93rem; color: var(--muted); margin: 0; }

.modal--video { width: min(420px, 92vw); padding: 14px; gap: 0; }
.modal--video video {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  background: #000;
}
.modal--video .modal__close { top: 24px; right: 24px; }
.modal--video-largo { width: min(960px, 94vw); }
.modal--video-largo video { aspect-ratio: 16 / 9; }

.lightbox { width: min(1040px, 94vw); }
.lightbox img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox .modal__close { background: #fff; }

/* 12. Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .pdf-box { grid-template-columns: 1fr; text-align: center; }
  .pdf-box .kicker, .pdf-box__actions { justify-content: center; }
}

@media (max-width: 880px) {
  /* Niente backdrop-filter sotto gli 880px: creerebbe un contenitore per gli
     elementi position:fixed e il menu a scomparsa resterebbe incastrato
     nell'altezza dell'header invece di coprire tutto lo schermo. */
  .header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--cream);
  }
  .header.is-stuck { background: var(--cream); }

  .burger { display: block; }

  /* Il menu si apre in flusso dentro l'header: niente position fixed o
     absolute, quindi nessun antenato può alterarne l'ancoraggio. L'header è
     sticky, perciò il pannello aperto resta sotto l'hamburger ovunque ci si
     trovi nella pagina. Il grado di apertura è una max-height animabile:
     800px è ben oltre l'ingombro reale del menu, non taglia nulla. */
  .header__inner { flex-wrap: wrap; }
  .nav {
    flex: 0 0 100%;
    order: 3;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .4s var(--ease), visibility 0s linear .4s;
  }
  .nav.is-open {
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    visibility: visible;
    transition: max-height .45s var(--ease), visibility 0s;
  }
  /* svh tiene conto delle barre del browser mobile: dove è supportato vince. */
  @supports (height: 100svh) {
    .nav.is-open { max-height: calc(100svh - 96px); }
  }
  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__list a { padding: 15px 4px; font-size: 1.02rem; border-bottom: 1px solid var(--line-soft); }
  .nav__list a::after { display: none; }
  .nav .btn { margin-top: 18px; }
  .lang { margin: 16px 0 18px; align-self: flex-start; }
  .lang__select { padding: 9px 32px 9px 4px; font-size: .95rem; }

  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .topbar__inner { justify-content: center; }
  .topbar__group--secondary { display: none; }
  .gallery__item--wide { grid-column: span 1; aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .cookie { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .fab-stack { right: 12px; bottom: 84px; }
  .hero { min-height: 82vh; }
  .hero__scroll { display: none; }
  .btn { padding: 14px 24px; }
}

/* Stampa */
@media print {
  .header, .topbar, .footer, .fab-stack, .cookie, .hero__actions { display: none !important; }
  body { background: #fff; }
}
