/* =========================================================================
   Sapori e Aromi d'Autunno — 38ª edizione
   Fase 1 · Landing di rilancio
   ========================================================================= */

/* ---------- Font self-hostati (GDPR-safe, nessuna chiamata a Google) ---- */
@font-face {
  font-family: 'Fraunces';
  src: url('../assets/fonts/fraunces-latin-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Karla';
  src: url('../assets/fonts/karla-latin-var.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Token ------------------------------------------------------ */
:root {
  /* Colori estratti dal logo vettoriale ufficiale — fonte di verità del marchio */
  --logo-marrone: #712603;   /* "SAPORI E AROMI" */
  --logo-arancio: #DF5423;   /* "D'AUTUNNO" */
  --logo-rosso:   #E30613;   /* foglia d'acero */
  --logo-giallo:  #FDC300;   /* "Il Salotto del Gusto" */
  --logo-oliva:   #978F00;
  --crema-logo:   #FFF6E7;   /* banner dentro al logo */

  /* Palette autunnale — dal brief: marrone + arancione, toni caldi */
  --castagna-900: #2B1A10;
  --castagna-800: #3D2415;
  --castagna-700: #5A351C;
  --castagna-600: #7A4B23;
  --arancio-600:  #B4531F;
  --arancio-500:  #C96A22;
  --arancio-400:  #DD8A3C;
  --oro-500:      #C08A2E;
  --oro-300:      #E3BC70;
  --crema-100:    #FDF7EF;
  --crema-200:    #FBF1E4;
  --crema-300:    #F3E7D5;
  --crema-400:    #E5D5BE;
  --foglia-700:   #4B5A2F;

  /* Ruoli semantici */
  --bg:            var(--crema-100);
  --bg-alt:        var(--crema-200);
  --surface:       #FFFFFF;
  --text:          #2A211A;
  --text-soft:     #6B5B4C;
  --text-invert:   #FFF9F1;
  --accent:        var(--arancio-600);
  --accent-hover:  var(--castagna-700);
  --border:        #E2D5C2;
  --border-strong: #CDB99F;
  --focus:         #1F5FA8;
  --error:         #A32B1C;
  --success:       #3F6B33;

  /* Tipografia */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Scala spaziale (8pt) — densità "comoda": pubblico over 50 */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  --wrap: 1180px;
  --radius: 10px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px rgba(43,26,16,.06), 0 2px 6px rgba(43,26,16,.05);
  --shadow-md: 0 4px 12px rgba(43,26,16,.08), 0 12px 28px rgba(43,26,16,.08);
  --shadow-lg: 0 12px 32px rgba(43,26,16,.14), 0 32px 64px rgba(43,26,16,.16);

  --t-fast: 160ms;
  --t-base: 240ms;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;      /* 17px — leggibilità alta */
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 1.125rem; } } /* 18px */

img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.12; }
p { margin: 0 0 var(--s-4); }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
ul { margin: 0; padding: 0; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-5); }
@media (min-width: 768px) { .wrap { padding-inline: var(--s-6); } }

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 999;
  background: var(--castagna-800); color: var(--text-invert);
  padding: var(--s-3) var(--s-4); border-radius: var(--radius);
  font-weight: 600; text-decoration: none;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--s-4); color: var(--text-invert); }

/* ---------- Header ----------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  /* Crema pieno e identico a quello del banner dentro al logo (#FFF6E7):
     con un colore diverso si vedrebbe il rettangolo del marchio. */
  background: var(--crema-logo);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-4); min-height: 70px;
}
@media (min-width: 768px) { .header-inner { min-height: 86px; } }

.brand {
  display: flex; align-items: center; gap: var(--s-3);
  text-decoration: none; color: var(--castagna-800);
  min-width: 0;
}
/* Il logo contiene già il nome: nessun testo affiancato che lo ripeta.
   Sotto i ~52px "Il Salotto del Gusto" diventa illeggibile e la foglia
   rossa gli si accavalla: non rimpicciolire oltre. */
.brand-logo {
  width: auto; height: 46px; flex: none;
  transition: opacity var(--t-fast) var(--ease);
}
.brand:hover .brand-logo { opacity: .82; }
@media (min-width: 768px) { .brand-logo { height: 62px; } }

.brand-ed {
  font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  color: var(--text-soft); white-space: nowrap;
  padding-left: var(--s-3);
  border-left: 1px solid var(--border-strong);
}
@media (max-width: 599px) { .brand-ed { display: none; } }

/* Nav */
.site-nav { display: flex; align-items: center; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: var(--s-2) var(--s-3);
  background: none; border: 1px solid var(--border-strong); border-radius: var(--radius);
  font: inherit; font-size: .9375rem; font-weight: 600; color: var(--castagna-800);
  cursor: pointer;
}
.nav-toggle-leaf { display: block; width: 19px; height: 22px; transition: transform var(--t-base) var(--ease); }
.nav-toggle[aria-expanded="true"] .nav-toggle-leaf { transform: rotate(135deg); }

.nav-menu {
  list-style: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--crema-100);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: var(--s-3) var(--s-5) var(--s-5);
  display: none;
}
.nav-menu.is-open { display: block; }
.nav-menu li + li { border-top: 1px solid var(--border); }
.nav-menu a {
  display: block; min-height: 48px; display: flex; align-items: center;
  color: var(--castagna-800); text-decoration: none; font-weight: 600;
}
.nav-menu a:hover { color: var(--accent); }
.nav-cta { color: var(--accent) !important; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static; display: flex; align-items: center; gap: var(--s-5);
    background: none; border: 0; box-shadow: none; padding: 0;
  }
  .nav-menu li + li { border-top: 0; }
  .nav-menu a { min-height: 44px; font-size: .9375rem; }
  .nav-cta {
    background: var(--arancio-600); color: #fff !important;
    padding-inline: var(--s-4); border-radius: 999px;
    transition: background var(--t-fast) var(--ease);
  }
  .nav-cta:hover { background: var(--castagna-700); }
}

/* ---------- Hero ------------------------------------------------------- */
.hero {
  position: relative; isolation: isolate;
  display: flex; align-items: center;
  min-height: 88svh;
  padding-block: var(--s-8) var(--s-9);
  overflow: hidden;
  color: var(--text-invert);
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background: var(--castagna-800); }

/* Fondo autunnale: resta visibile anche senza video (fallback nativo) */
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(1000px 600px at 78% 18%, rgba(221,138,60,.5), transparent 62%),
    radial-gradient(800px 520px at 12% 82%, rgba(180,83,31,.42), transparent 66%),
    linear-gradient(160deg, var(--castagna-900), var(--castagna-700) 55%, var(--arancio-600));
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  /* "sfondo soffuso": sfocato e desaturato, la locandina resta protagonista */
  filter: blur(3px) saturate(.85) brightness(.62);
  transform: scale(1.06);           /* nasconde i bordi della sfocatura */
  opacity: 0;
  transition: opacity 900ms var(--ease);
}
.hero-video.is-ready { opacity: 1; }

.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(43,26,16,.86) 0%, rgba(43,26,16,.62) 45%, rgba(43,26,16,.38) 100%),
    linear-gradient(to top, rgba(43,26,16,.72), transparent 55%);
}
@media (max-width: 899px) {
  .hero-scrim { background: linear-gradient(to bottom, rgba(43,26,16,.72), rgba(43,26,16,.86)); }
}

.hero-inner {
  display: grid; gap: var(--s-7);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.05fr .95fr; gap: var(--s-8); }
}

.kicker {
  font-size: .8125rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--oro-300); margin-bottom: var(--s-4);
}
.hero-title {
  font-size: clamp(2.5rem, 6.4vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: var(--s-4);
  color: #fff;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.hero-title em {
  font-style: normal;
  color: var(--oro-300);
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
}
.hero-lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: rgba(255,249,241,.9);
  max-width: 46ch;
  margin-bottom: var(--s-5);
}

/* Date */
.hero-dates {
  display: flex; align-items: center; gap: var(--s-3);
  flex-wrap: wrap; margin-bottom: var(--s-3);
}
.date-chip {
  display: inline-flex; flex-direction: column; align-items: center;
  background: rgba(255,249,241,.1);
  border: 1px solid rgba(227,188,112,.5);
  border-radius: var(--radius);
  padding: var(--s-2) var(--s-4);
  min-width: 74px;
  backdrop-filter: blur(4px);
}
.date-chip b {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1;
  color: #fff; font-variant-numeric: tabular-nums;
}
.date-chip span {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--oro-300); margin-top: 2px;
}
.date-and { font-family: var(--font-display); font-size: 1.25rem; color: var(--oro-300); }
.date-year {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  color: rgba(255,249,241,.75); margin-left: var(--s-1);
}
.hero-meta { font-size: .9375rem; color: rgba(255,249,241,.78); margin-bottom: var(--s-5); }
.hero-meta strong { color: var(--oro-300); }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Locandina */
.hero-poster { display: flex; justify-content: center; }
.poster-frame {
  position: relative; margin: 0;
  width: min(100%, 400px);
  aspect-ratio: 1 / 1.414;   /* proporzione A4: la locandina non viene ritagliata */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(227,188,112,.28);
  background: linear-gradient(155deg, var(--castagna-700), var(--castagna-900));
  transform: rotate(-1.4deg);
  transition: transform var(--t-base) var(--ease);
}
@media (min-width: 900px) { .poster-frame:hover { transform: rotate(0deg) translateY(-4px); } }
.poster-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Segnaposto: visibile finché la locandina non è in cartella */
.poster-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-2); text-align: center;
  background:
    repeating-linear-gradient(45deg, rgba(227,188,112,.05) 0 12px, transparent 12px 24px),
    linear-gradient(155deg, var(--castagna-700), var(--castagna-900));
  border: 2px dashed rgba(227,188,112,.35);
  border-radius: var(--radius-lg);
  color: var(--oro-300);
}
.pp-kicker { font-size: .6875rem; letter-spacing: .2em; text-transform: uppercase; opacity: .8; }
.pp-title {
  font-family: var(--font-display); font-size: 2.75rem; font-weight: 700;
  line-height: 1.05; color: rgba(255,249,241,.92);
}
.pp-note { font-size: .8125rem; opacity: .65; font-style: italic; }

/* Indicatore di scroll */
.hero-scroll {
  position: absolute; left: 50%; bottom: var(--s-5); transform: translateX(-50%);
  width: 30px; height: 48px; border: 2px solid rgba(227,188,112,.5);
  border-radius: 999px; display: grid; place-items: start center; padding-top: 8px;
  z-index: 2;
}
.hero-scroll span {
  width: 4px; height: 8px; border-radius: 2px; background: var(--oro-300);
  animation: scrollHint 1.9s var(--ease) infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60%      { transform: translateY(14px); opacity: 0; }
}
@media (max-width: 899px) { .hero-scroll { display: none; } }

/* ---------- Bottoni ---------------------------------------------------- */
.btn {
  --btn-bg: var(--arancio-600);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px; padding: var(--s-3) var(--s-6);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 2px solid transparent; border-radius: 999px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.btn:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  --btn-bg: transparent; --btn-fg: var(--text-invert);
  border-color: rgba(227,188,112,.6);
}
.btn-ghost:hover { background: rgba(255,249,241,.12); color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.btn-spinner {
  display: none; width: 17px; height: 17px; flex: none;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Sezioni ---------------------------------------------------- */
.section { padding-block: var(--s-8); }
@media (min-width: 768px) { .section { padding-block: var(--s-9); } }

.eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--arancio-600); margin-bottom: var(--s-3);
}
.eyebrow-light { color: var(--oro-300); }

.sec-head { margin-bottom: var(--s-7); max-width: 46ch; }
.sec-head-center { margin-inline: auto; text-align: center; }
.sec-head h2 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  color: var(--castagna-800);
  letter-spacing: -.015em;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.sec-intro { margin-top: var(--s-4); color: var(--text-soft); }

/* L'evento */
.section-evento { background: var(--bg); }
.prose-grid { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .prose-grid { grid-template-columns: 1.1fr .9fr; gap: var(--s-8); align-items: start; } }
.prose { max-width: 62ch; }
.lead { font-size: 1.1875rem; color: var(--castagna-700); }
@media (min-width: 768px) { .lead { font-size: 1.3125rem; line-height: 1.55; } }

.pillars { list-style: none; display: grid; gap: var(--s-4); }
.pillars li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--arancio-500);
  border-radius: var(--radius);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}
.pillars h3 {
  font-size: 1.1875rem; color: var(--castagna-800); margin-bottom: var(--s-2);
  font-variation-settings: 'SOFT' 40;
}
.pillars p { color: var(--text-soft); font-size: .9375rem; margin: 0; }

/* Date e info */
.section-info { background: var(--bg-alt); }
.info-grid { display: grid; gap: var(--s-6); }
@media (min-width: 800px) { .info-grid { grid-template-columns: minmax(260px, .8fr) 1.2fr; gap: var(--s-8); align-items: center; } }

.info-card-date {
  background: linear-gradient(155deg, var(--castagna-700), var(--castagna-900));
  color: var(--text-invert);
  border-radius: var(--radius-lg);
  padding: var(--s-7) var(--s-5);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.ic-label {
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--oro-300); margin-bottom: var(--s-3);
}
.ic-big {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.5rem, 9vw, 5rem); line-height: 1; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: var(--s-3);
  margin-bottom: var(--s-2); font-variant-numeric: tabular-nums;
}
.ic-big span { font-size: 1.5rem; color: var(--oro-300); font-weight: 400; }
.ic-sub { font-size: 1rem; color: rgba(255,249,241,.8); margin: 0; }

.info-list { display: grid; gap: var(--s-5); margin: 0; }
@media (min-width: 560px) { .info-list { grid-template-columns: 1fr 1fr; } }
.info-list dt {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--arancio-600); margin-bottom: var(--s-2);
}
.info-list dd { margin: 0; color: var(--text); }

.info-note {
  margin-top: var(--s-7); padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-soft);
  font-size: .9375rem; text-align: center;
}

/* Gallery */
.section-gallery { background: var(--bg); }
.gallery-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.g-item { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--crema-300); }
.g-item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  transition: transform var(--t-base) var(--ease);
}
.g-item:hover img { transform: scale(1.04); }
/* Segnaposto gallery */
.g-empty { border: 2px dashed var(--border-strong); background: var(--crema-200); }
.g-ph {
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, rgba(180,83,31,.05) 0 10px, transparent 10px 20px);
}
.g-empty figcaption {
  position: static; background: none; color: var(--text-soft);
  text-align: center; padding: var(--s-2) var(--s-3) var(--s-3); font-style: italic;
}

/* ---------- Form: espositori ------------------------------------------ */
.section-espositori {
  background: linear-gradient(165deg, var(--castagna-800), var(--castagna-900) 60%, #1F120A);
  color: var(--text-invert);
}
.form-layout { display: grid; gap: var(--s-7); }
@media (min-width: 900px) { .form-layout { grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: start; } }

.form-intro h2 {
  color: #fff; font-size: clamp(1.875rem, 4vw, 2.75rem);
  margin-bottom: var(--s-4); font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.form-intro > p { color: rgba(255,249,241,.85); }
.check-list { list-style: none; display: grid; gap: var(--s-3); margin: var(--s-5) 0; }
.check-list li {
  position: relative; padding-left: var(--s-6);
  color: rgba(255,249,241,.9); font-size: .9375rem;
}
.check-list li::before {
  content: ''; position: absolute; left: 0; top: .45em;
  width: 14px; height: 8px;
  border-left: 2.5px solid var(--oro-300); border-bottom: 2.5px solid var(--oro-300);
  transform: rotate(-45deg);
}
.form-note { font-size: .875rem; color: rgba(255,249,241,.65); font-style: italic; }

.form-col { display: grid; gap: var(--s-6); }

.quick-download {
  background: rgba(255,249,241,.06);
  border: 1px solid rgba(227,188,112,.35);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
}
.quick-download h3 {
  color: #fff; font-size: 1.25rem; margin-bottom: var(--s-3);
  font-variation-settings: 'SOFT' 40;
}
.quick-download p { color: rgba(255,249,241,.85); font-size: .9375rem; }
.quick-download p a { color: var(--oro-300); }
.quick-download .btn { margin-top: var(--s-5); }

.form-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-lg);
  color: var(--text);
}
@media (min-width: 768px) { .form-card { padding: var(--s-7); } }
.form-title {
  font-size: 1.375rem; color: var(--castagna-800); margin-bottom: var(--s-5);
  font-variation-settings: 'SOFT' 40;
}

/* Campi */
.field { margin-bottom: var(--s-4); }
.field-row { display: grid; gap: var(--s-4); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field label {
  display: block; margin-bottom: var(--s-2);
  font-size: .875rem; font-weight: 600; color: var(--castagna-800);
}
.req { color: var(--accent); }
.opt { font-weight: 400; color: var(--text-soft); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;                /* touch-friendly */
  padding: var(--s-3) var(--s-4);
  background: var(--crema-100);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;                 /* >=16px: evita lo zoom automatico iOS */
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%237A4B23' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--s-4) center;
  background-size: 12px;
  padding-right: var(--s-7);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--arancio-400); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--arancio-600);
  box-shadow: 0 0 0 3px rgba(180,83,31,.16);
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 1px;
}
.field.has-error input, .field.has-error select, .field.has-error textarea {
  border-color: var(--error);
  background: #FDF3F1;
}

/* Errori: sotto al campo, con icona (non solo colore) */
.err { display: none; margin: var(--s-2) 0 0; font-size: .8125rem; color: var(--error); font-weight: 600; }
.err::before { content: '⚠ '; }
.field.has-error .err { display: block; }

/* Checkbox */
.field-check { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: start; }
.field-check input[type="checkbox"] {
  width: 22px; height: 22px; margin: 2px 0 0;
  accent-color: var(--arancio-600); cursor: pointer; flex: none;
}
.field-check label { margin: 0; font-weight: 400; font-size: .875rem; color: var(--text-soft); cursor: pointer; }
.field-check .err { grid-column: 1 / -1; }

/* Honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Stato invio */
.form-status { margin-top: var(--s-4); font-size: .9375rem; font-weight: 600; text-align: center; min-height: 1.4em; }
.form-status.is-ok { color: var(--success); }
.form-status.is-ko { color: var(--error); }

/* Messaggio di successo */
.form-done {
  text-align: center; padding: var(--s-6) var(--s-4);
}
.form-done-icon {
  width: 56px; height: 56px; margin: 0 auto var(--s-4);
  border-radius: 50%; background: var(--success);
  display: grid; place-items: center;
}
.form-done-icon::after {
  content: ''; width: 18px; height: 10px;
  border-left: 3px solid #fff; border-bottom: 3px solid #fff;
  transform: rotate(-45deg) translate(1px, -2px);
}
.form-done h3 { font-size: 1.375rem; color: var(--castagna-800); margin-bottom: var(--s-3); }
.form-done p { color: var(--text-soft); margin: 0; }

/* ---------- Newsletter -------------------------------------------------- */
.section-newsletter { background: var(--bg-alt); }
.nl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-md);
  display: grid; gap: var(--s-6);
}
@media (min-width: 768px) { .nl-card { padding: var(--s-8); } }
@media (min-width: 900px) { .nl-card { grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; } }
.nl-copy h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.375rem); color: var(--castagna-800);
  margin-bottom: var(--s-3); font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.nl-copy p { color: var(--text-soft); margin: 0; }
.nl-form .field:last-of-type { margin-bottom: var(--s-5); }

/* ---------- Footer ------------------------------------------------------ */
.site-footer {
  background: var(--castagna-900);
  color: rgba(255,249,241,.75);
  padding-top: var(--s-8);
  font-size: .9375rem;
}
.footer-inner { display: grid; gap: var(--s-6); padding-bottom: var(--s-7); }
@media (min-width: 700px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-5); } }

.f-title {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 700;
  color: #fff; margin-bottom: var(--s-1);
}
.f-sub { color: var(--oro-300); margin-bottom: var(--s-2); }
.f-tag { font-style: italic; color: rgba(255,249,241,.5); font-size: .875rem; margin: 0; }

.f-col h3 {
  font-family: var(--font-body); font-size: .75rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--oro-300); margin-bottom: var(--s-3);
}
.f-col p { margin-bottom: var(--s-2); line-height: 1.6; }
.site-footer a { color: rgba(255,249,241,.85); }
.site-footer a:hover { color: var(--oro-300); }
.f-social a { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; }

.footer-bottom {
  border-top: 1px solid rgba(255,249,241,.14);
  padding-block: var(--s-4) var(--s-5);
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  align-items: center; justify-content: space-between;
  font-size: .8125rem; color: rgba(255,249,241,.5);
}
.footer-bottom p { margin: 0; }
.f-legal { display: flex; gap: var(--s-3); align-items: center; }

/* ---------- Preferenze di movimento ridotto ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero-video { display: none; }     /* niente video in movimento */
  .hero-scroll span { animation: none; }
  .poster-frame { transform: none; }
}

/* ---------- Stampa ------------------------------------------------------ */
@media print {
  .site-header, .hero-scroll, .hero-bg, .btn, .form-card, .nl-form { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .hero { min-height: auto; color: #000; }
}

/* =========================================================================
   Pagine legali (privacy.html, cookie.html)
   ========================================================================= */
.legal-back {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: var(--s-2) var(--s-4);
  border: 1.5px solid var(--border-strong); border-radius: 999px;
  font-size: .9375rem; font-weight: 600; color: var(--castagna-800);
  text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.legal-back:hover { background: var(--crema-200); border-color: var(--arancio-400); color: var(--castagna-800); }

.legal {
  padding-block: var(--s-8) var(--s-9);
  background: var(--bg);
}
.wrap-narrow { width: 100%; max-width: 760px; margin-inline: auto; padding-inline: var(--s-5); }
@media (min-width: 768px) { .wrap-narrow { padding-inline: var(--s-6); } }

.legal h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.75rem); color: var(--castagna-800);
  letter-spacing: -.015em; margin-bottom: var(--s-3);
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
}
.legal-updated {
  font-size: .875rem; color: var(--text-soft); margin-bottom: var(--s-6);
  padding-bottom: var(--s-4); border-bottom: 1px solid var(--border);
}
.legal h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.375rem; color: var(--castagna-700);
  margin: var(--s-7) 0 var(--s-3); font-variation-settings: 'SOFT' 40;
}
.legal h3 {
  font-family: var(--font-body); font-weight: 700;
  font-size: 1.0625rem; color: var(--castagna-800); margin: var(--s-5) 0 var(--s-2);
}
.legal p, .legal li { color: var(--text); }
.legal p { margin-bottom: var(--s-4); }
.legal ul { margin: 0 0 var(--s-4) var(--s-5); padding: 0; list-style: disc; }
.legal li { margin-bottom: var(--s-2); padding-left: var(--s-1); }
.legal a { color: var(--accent); }
.legal a:hover { color: var(--accent-hover); }

.legal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--arancio-500);
  border-radius: var(--radius); padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-5);
}
.legal-box p:last-child { margin-bottom: 0; }
.legal-box strong { color: var(--castagna-800); }

.legal-note {
  background: var(--crema-200); border: 1px dashed var(--border-strong);
  border-radius: var(--radius); padding: var(--s-4) var(--s-5);
  font-size: .9375rem; color: var(--text-soft); margin-block: var(--s-5);
}

.legal-table { width: 100%; border-collapse: collapse; margin-bottom: var(--s-5); font-size: .9375rem; }
.legal-table th, .legal-table td {
  text-align: left; padding: var(--s-3); border-bottom: 1px solid var(--border); vertical-align: top;
}
.legal-table th { background: var(--crema-200); color: var(--castagna-800); font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; }
.legal-table-wrap { overflow-x: auto; }
