/* ============================================================
   CENA CON DELITTO — Portale adesione locali
   Estetica: "dossier noir all'italiana"
   Dark  = sala a lume di candela
   Light = carta da fascicolo investigativo
   ============================================================ */

/* ---------- RESET ESSENZIALE ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
img, video, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; }

/* ---------- TOKENS ---------- */
:root {
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Sora", -apple-system, sans-serif;
  --font-mono: "Courier Prime", "Courier New", monospace;

  --maxw: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(.22, .61, .36, 1);

}

/* Tema chiaro — default: la carta del dossier */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f5edde;
  --bg-2: #efe4d0;
  --bg-3: #e8dbc2;
  --surface: #fbf6ea;
  --line: rgba(46, 34, 20, .16);
  --line-strong: rgba(46, 34, 20, .35);
  --text: #241b11;
  --text-dim: #6d5f4b;
  --gold: #9a6c1f;
  --gold-soft: rgba(154, 108, 31, .12);
  --blood: #9e1f31;
  --blood-soft: rgba(158, 31, 49, .1);
  --veil: linear-gradient(180deg, rgba(20, 14, 8, .5) 0%, rgba(20, 14, 8, .3) 45%, #f5edde 100%);
  --header-bg: rgba(245, 237, 222, .85);
  --shadow-card: 0 18px 45px -20px rgba(60, 40, 15, .35);
}

/* Tema scuro — la sala a lume di candela (dal toggle) */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0b08;
  --bg-2: #15110c;
  --bg-3: #1d1810;
  --surface: #171209;
  --line: rgba(224, 177, 92, .16);
  --line-strong: rgba(224, 177, 92, .35);
  --text: #f0e7d8;
  --text-dim: #b5a98f;
  --gold: #d9a44c;
  --gold-soft: rgba(217, 164, 76, .12);
  --blood: #b3273a;
  --blood-soft: rgba(179, 39, 58, .14);
  --veil: linear-gradient(180deg, rgba(10, 7, 4, .55) 0%, rgba(10, 7, 4, .35) 45%, #0e0b08 100%);
  --header-bg: rgba(14, 11, 8, .82);
  --shadow-card: 0 18px 50px -18px rgba(0, 0, 0, .55);
}

/* ---------- BASE ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color .45s var(--ease), color .45s var(--ease);
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.01em;
}

h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 em, h1 em {
  font-style: italic;
  color: var(--gold);
}

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.lead {
  margin-top: 1.1rem;
  font-size: 1.06rem;
  color: var(--text-dim);
}

/* Etichetta "kicker" in stile macchina da scrivere */
.kicker {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.kicker::before {
  content: "● ";
  color: var(--blood);
}

/* Cartellino "reperto" */
.evidence-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px dashed var(--line-strong);
  padding: .35rem .7rem;
  background: var(--bg-2);
}

.req { color: var(--blood); }

/* ---------- GRANA PELLICOLA ---------- */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 999;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}

@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 3%); }
}

/* ---------- BOTTONI ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .95rem 1.9rem;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .02em;
  text-decoration: none;
  border-radius: 999px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, border-color .25s;
}

.btn-primary {
  background: var(--blood);
  color: #fdf6ec;
  box-shadow: 0 10px 30px -10px rgba(179, 39, 58, .55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -10px rgba(179, 39, 58, .7);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-sm { padding: .6rem 1.25rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* ---------- HEADER ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}

.site-header.is-scrolled {
  background: var(--header-bg);
  border-bottom-color: var(--line);
}

.header-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: .85rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
}

.brand-logo {
  height: 42px;
  width: auto;
}


.main-nav {
  display: flex;
  gap: 1.6rem;
  margin-inline: auto;
}

.main-nav a {
  font-size: .88rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--text-dim);
  transition: color .2s;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}

.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* finché l'header è trasparente è appoggiato sull'hero fotografico scuro:
   menu e toggle sempre chiari, in entrambi i temi */
.site-header:not(.is-scrolled) .main-nav a { color: rgba(244, 236, 221, .8); }
.site-header:not(.is-scrolled) .main-nav a:hover { color: #fdf6ec; }
.site-header:not(.is-scrolled) .theme-toggle {
  color: rgba(244, 236, 221, .85);
  border-color: rgba(244, 236, 221, .35);
}
.site-header:not(.is-scrolled) .theme-toggle:hover {
  color: #e8b75e;
  border-color: #e8b75e;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-left: auto;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  color: var(--text-dim);
  transition: color .25s, border-color .25s, transform .25s var(--ease);
}

.theme-toggle:hover { color: var(--gold); border-color: var(--gold); transform: rotate(15deg); }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

/* ---------- HERO ---------- */
/* Layout asimmetrico: testo a sinistra, video verticale "reperto" a destra.
   L'hero resta fotografico e scuro in entrambi i temi. */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 8rem 0 6rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../assets/img/immagine1.png");
  background-size: cover;
  background-position: center 30%;
  filter: saturate(.9);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(75% 90% at 28% 45%, rgba(8, 5, 3, .88), rgba(8, 5, 3, .45)),
    var(--veil);
}

.hero-inner {
  max-width: var(--maxw);
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

/* nel tema chiaro l'hero resta scuro (foto): testo sempre chiaro */
.hero-content,
.hero-content .hero-sub,
.hero-content .hero-note { color: #f4ecdd; }

.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  font-weight: 450;
  text-wrap: balance;
  text-shadow: 0 4px 40px rgba(0, 0, 0, .45);
}

.hero h1 em { color: #e8b75e; }

.hero-sub {
  max-width: 560px;
  margin-top: 1.6rem;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  opacity: .92;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2.4rem;
}

/* il video verticale come "reperto" incorniciato */
.hero-video {
  justify-self: end;
  rotate: 1.6deg;
  max-width: 320px;
  width: 100%;
}

.hero-video video,
.hero-video img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(232, 183, 94, .35);
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .8);
  display: block;
}

.hero-video .evidence-tag {
  position: relative;
  top: -14px;
  left: 16px;
  rotate: -2deg;
  border-color: rgba(244, 236, 221, .4);
  color: rgba(244, 236, 221, .85);
  background: rgba(8, 5, 3, .55);
}

.hero .btn-ghost {
  border-color: rgba(244, 236, 221, .4);
  color: #f4ecdd;
}

.hero .btn-ghost:hover { border-color: #e8b75e; color: #e8b75e; }

.hero-note {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .75;
}

.hero .kicker { color: #e8b75e; }

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  translate: -50% 0;
  width: 26px;
  height: 42px;
  border: 1px solid rgba(244, 236, 221, .45);
  border-radius: 999px;
}

.hero-scroll span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 3px;
  height: 8px;
  translate: -50% 0;
  border-radius: 99px;
  background: #e8b75e;
  animation: scrollHint 1.8s var(--ease) infinite;
}

@keyframes scrollHint {
  0% { opacity: 0; transform: translateY(0); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* entrata hero in sequenza */
.hero-anim {
  opacity: 0;
  transform: translateY(24px);
  animation: heroIn 1s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- STATS STRIP ---------- */
.stats-strip {
  border-block: 1px solid var(--line);
  background: var(--bg-2);
}

.stats-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 2.2rem clamp(1.25rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 550;
  color: var(--gold);
  line-height: 1.15;
}

.stat > span {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stat .counter { font: inherit; }

/* ---------- SEZIONE FORMAT ---------- */
.format-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.format-media {
  position: sticky;
  top: 110px;
  rotate: -1.2deg;
}

.format-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
}

.format-media .evidence-tag {
  position: relative;
  top: -14px;
  left: 18px;
  rotate: 1.5deg;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .4);
}

.acts {
  counter-reset: act;
  display: grid;
  gap: 0;
}

.act {
  position: relative;
  padding: 1.6rem 0 1.6rem 2.2rem;
  border-left: 1px dashed var(--line-strong);
}

.act::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 2.25rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--blood);
  box-shadow: 0 0 0 4px var(--blood-soft);
}

.act:last-child { border-left-color: transparent; }

.act-num {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

.act h3 {
  font-size: 1.35rem;
  margin: .3rem 0 .4rem;
}

.act p { color: var(--text-dim); font-size: .96rem; }

/* chiusura editoriale, senza box: tre negazioni in grande */
.format-clarifier {
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
}

.format-clarifier::before {
  content: "✦";
  display: block;
  color: var(--blood);
  font-size: .9rem;
  letter-spacing: .5em;
  margin-bottom: 1.6rem;
}

.clarifier-display {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  font-weight: 450;
  line-height: 1.3;
  text-wrap: balance;
}

.clarifier-display em {
  font-style: italic;
  color: var(--gold);
}

.clarifier-body {
  margin-top: 1rem;
  color: var(--text-dim);
  font-size: 1rem;
}

/* ---------- MANIFESTO ---------- */
.manifesto {
  padding-block: clamp(4rem, 8vw, 6.5rem);
  background:
    radial-gradient(60% 120% at 50% 0%, var(--gold-soft), transparent 70%),
    var(--bg-2);
  border-block: 1px solid var(--line);
  text-align: center;
}

.manifesto blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.4vw, 3.2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.25;
  text-wrap: balance;
}

.manifesto blockquote em {
  color: var(--blood);
  font-style: italic;
}

.manifesto-sign {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---------- BENEFICI ---------- */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.benefit {
  padding: 1.8rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s var(--ease);
}

.benefit:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card);
}

.benefit-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--gold);
  background: var(--gold-soft);
  margin-bottom: 1.1rem;
}

.benefit-icon svg { width: 24px; height: 24px; }

.benefit h3 { font-size: 1.22rem; margin-bottom: .45rem; }
.benefit p { color: var(--text-dim); font-size: .94rem; }

/* ---------- LOCATION ---------- */
.location-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.location-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 9 / 14;
  border: 1px solid var(--line);
}

.location-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease), filter .6s;
}

.location-card:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.location-info {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 4.5rem 1.25rem 1.25rem;
  background: linear-gradient(180deg, transparent, rgba(8, 5, 3, .92));
  color: #f4ecdd;
}

.location-info .evidence-tag {
  border-color: rgba(244, 236, 221, .4);
  color: rgba(244, 236, 221, .85);
  background: rgba(8, 5, 3, .4);
  margin-bottom: .55rem;
}

.location-info h3 { font-size: 1.25rem; margin-bottom: .35rem; }

.location-info p {
  font-size: .85rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .45s var(--ease) .05s, max-height .45s var(--ease);
}

.location-card:hover .location-info p,
.location-card:focus-within .location-info p {
  opacity: .9;
  max-height: 120px;
}

/* ---------- GALLERY MARQUEE ---------- */
.gallery {
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
  border-block: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
}

.marquee {
  display: flex;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y; /* il drag orizzontale è nostro, lo scroll verticale resta alla pagina */
}

.marquee.is-dragging { cursor: grabbing; }

.marquee-track {
  display: flex;
  gap: 1rem;
  padding-inline: .5rem;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
}

.marquee-track img {
  height: clamp(180px, 26vw, 290px);
  width: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  flex-shrink: 0;
  -webkit-user-drag: none;
}

/* ---------- STEPS ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 2rem 1.6rem 1.8rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 3rem;
  font-weight: 300;
  color: var(--gold);
  opacity: .55;
  line-height: 1;
}

.step h3 { font-size: 1.25rem; margin: .8rem 0 .45rem; }
.step p { color: var(--text-dim); font-size: .94rem; }

/* nota a margine battuta a macchina, con timbro — niente box */
.steps-note {
  margin-top: clamp(2.8rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  gap: clamp(1.8rem, 4vw, 3.5rem);
  padding-block: 1.7rem;
  border-block: 1px dashed var(--line-strong);
}

.steps-note p { flex: 1; }

.note-stamp {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: .78rem;
  line-height: 1.5;
  letter-spacing: .28em;
  text-transform: uppercase;
  text-align: center;
  color: var(--blood);
  border: 3px double var(--blood);
  padding: .6rem .85rem .6rem 1.1rem;
  rotate: -6deg;
  opacity: .85;
  user-select: none;
}

.steps-note p {
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 1.75;
  color: var(--text-dim);
}

.steps-note strong {
  color: var(--text);
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.faq-intro { position: sticky; top: 110px; }

.faq-avatar {
  margin-top: 2rem;
  max-width: 240px;
  rotate: -1.5deg;
}

.faq-avatar img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.faq-avatar .evidence-tag {
  position: relative;
  top: -12px;
  left: 14px;
  rotate: 2deg;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.3rem 2.4rem 1.3rem 0;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 500;
  position: relative;
  transition: color .25s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: .3rem;
  top: 50%;
  translate: 0 -50%;
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--gold);
  transition: rotate .3s var(--ease);
}

.faq-item[open] summary { color: var(--gold); }
.faq-item[open] summary::after { rotate: 45deg; }

.faq-item p {
  padding: 0 0 1.4rem;
  color: var(--text-dim);
  font-size: .96rem;
  max-width: 60ch;
}

/* ---------- FORM ---------- */
.section-form {
  background:
    radial-gradient(70% 90% at 80% 10%, var(--blood-soft), transparent 60%),
    var(--bg-2);
  border-top: 1px solid var(--line);
}

.form-wrap {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.form-intro { position: relative; }

.form-points {
  margin-top: 1.6rem;
  display: grid;
  gap: .65rem;
}

.form-points li {
  position: relative;
  padding-left: 1.7rem;
  font-size: .95rem;
}

.form-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* timbro RISERVATO */
.stamp {
  display: inline-block;
  margin-top: 2.4rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--blood);
  border: 3px double var(--blood);
  padding: .5rem 1.1rem .5rem 1.45rem;
  rotate: -6deg;
  opacity: .75;
  user-select: none;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 1.2rem;
}

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

.field {
  display: grid;
  gap: .45rem;
  align-content: start;
}

.field label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 300;
  transition: border-color .25s, box-shadow .25s;
}

.field textarea { resize: vertical; min-height: 110px; }

.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); opacity: .6; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.field input.is-invalid,
.field select.is-invalid {
  border-color: var(--blood);
  box-shadow: 0 0 0 3px var(--blood-soft);
}

.field-check {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: .85rem;
  color: var(--text-dim);
  cursor: pointer;
}

.field-check input {
  margin-top: .25rem;
  width: 16px;
  height: 16px;
  accent-color: var(--blood);
  flex-shrink: 0;
}

.field-check a { color: var(--gold); }

.form-feedback {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--blood);
  min-height: 1.2em;
  margin: 0;
}

/* stato di successo */
.form-success {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
  text-align: center;
  animation: heroIn .7s var(--ease);
}

.form-success h3 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: .8rem;
}

.form-success p { color: var(--text-dim); margin-bottom: 1.6rem; }

.success-seal {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blood);
  color: #fdf6ec;
  margin-bottom: 1.4rem;
  box-shadow: 0 0 0 8px var(--blood-soft);
}

.success-seal svg { width: 30px; height: 30px; }

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding-block: 3rem 2.2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 2.5rem;
  align-items: start;
}

.footer-logo {
  height: 52px;
  width: auto;
}

.footer-brand p {
  margin-top: .7rem;
  font-size: .88rem;
  color: var(--text-dim);
  max-width: 36ch;
}

.footer-nav {
  display: grid;
  gap: .55rem;
}

.footer-nav a {
  font-size: .88rem;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .2s;
  width: fit-content;
}

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

.footer-contact h3 {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
}

.footer-contact p { margin-top: .8rem; }

.footer-contact a {
  font-size: .88rem;
  color: var(--gold);
}

.footer-contact a:hover { color: var(--text); }

/* Barra inferiore: divisore + credit centrato */
.footer-bar {
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: .8rem;
  color: var(--text-dim);
}


/* ---------- REVEAL ON SCROLL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0s);
}

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

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1020px) {
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .location-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
  .main-nav { display: none; }

  .hero { padding-block: 7.5rem 5.5rem; }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-cta { justify-content: center; }

  .hero-sub { margin-inline: auto; }

  .hero-video {
    justify-self: center;
    max-width: 250px;
  }

  .format-grid,
  .faq-grid,
  .form-wrap { grid-template-columns: 1fr; }

  .format-media,
  .faq-intro { position: static; }

  .format-media { max-width: 480px; }

  .faq-avatar { margin-inline: auto; }

  .steps { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
}

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

  .location-card { aspect-ratio: 4 / 5; }
  .location-info p { opacity: .9; max-height: none; }

  .hero-cta .btn { width: 100%; }
  .header-actions .btn { display: none; }
  .brand-logo { height: 36px; }

  .steps-note {
    flex-direction: column;
    text-align: center;
  }

  .note-stamp { rotate: -4deg; }

  /* footer in colonna unica, centrato */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-logo { margin-inline: auto; }
  .footer-brand p { margin-inline: auto; }

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem 1.4rem;
  }

  .footer-nav a { width: auto; }

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

/* ---------- MOTION SAFETY ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-anim,
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .grain { animation: none; }
  .hero-scroll { display: none; }
}

/* ---------- VIDEO HERO IN POPUP (Fancybox + Bunny CDN) ----------
   Il reperto resta in loop muto nella hero; il click apre il caso
   completo, con audio, in popup verticale 9:16. */
.hero-video-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.hero-video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(rgba(8, 5, 3, .05), rgba(8, 5, 3, .42));
  pointer-events: none;
}

.hero-video-play svg {
  width: 64px;
  height: 64px;
  padding: 17px 14px 17px 20px;
  box-sizing: border-box;
  color: #14100b;
  background: #e8b75e;
  border-radius: 50%;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, .55),
    0 0 0 9px rgba(232, 183, 94, .22);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.hero-video-trigger:hover .hero-video-play svg {
  transform: scale(1.1);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, .6),
    0 0 0 14px rgba(232, 183, 94, .15);
}

.video-popup-modal .fancybox__content {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none;
}

/* Nasconde la chiusura nativa di Fancybox: usiamo la nostra */
.video-popup-modal .f-button.is-close-btn,
.video-popup-modal .fancybox__toolbar,
.video-popup-modal [data-fancybox-close]:not(.video-popup-close) { display: none !important; }

/* Larghezza calcolata dal budget di altezza E di larghezza:
   la proporzione 9:16 resta sempre esatta, niente bande nel player */
.video-popup {
  position: relative;
  width: min(calc(min(82vh, 740px) * 9 / 16), calc(100vw - 2.5rem));
  aspect-ratio: 9 / 16;
}

.video-popup-frame {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(232, 183, 94, .35);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
}

.video-popup iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

.video-popup-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(244, 236, 221, .45);
  background: rgba(8, 5, 3, .6);
  backdrop-filter: blur(4px);
  color: #f4ecdd;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .2s;
}

.video-popup-close:hover { transform: rotate(90deg); border-color: #e8b75e; }

.fancybox__backdrop {
  background: rgba(8, 5, 3, .88);
  backdrop-filter: blur(8px);
}

/* ---------- CAPIENZA: stepper ± e note (campi allineati a Tavolata) ---------- */
.stepper {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  gap: .5rem;
}

.stepper input {
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stepper-btn {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  transition: border-color .2s, background-color .2s, transform .15s;
}

.stepper-btn:hover { border-color: var(--gold); background: var(--gold-soft); }
.stepper-btn:active { transform: scale(.94); }

.field-hint {
  margin-top: .5rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--text-dim);
  min-height: 1.2em;
}

.form-note {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
