/* ============================================================
   CASA TOXIC-FREE — Design System (restyle 2026)
   Tema: earth / forest. Demo per Fabrizio Piccini (PF Smart System)
   Stack: HTML5 + CSS3 + Vanilla JS — zero dipendenze
   Font: Cormorant Garamond (serif) + Manrope (sans), via Google Fonts
   ============================================================ */

/* Fallback metric-matched per Cormorant Garamond: evita il "salto"
   del titolo (fallback largo) prima che il webfont sia caricato. */
@font-face {
  font-family: 'Cormorant Fallback';
  src: local('Times New Roman'), local('Times');
  size-adjust: 97%;
}

/* ---------- 1. Design Tokens ---------- */
:root {
  /* Palette */
  --bg:        #F4EDE1;   /* crema caldo */
  --bg-alt:    #ECE2D2;   /* crema più scuro (sezioni alternate) */
  --ink:       #1A1611;   /* nero caldo / footer */
  --text:      #211C16;   /* testo principale */
  --text-2:    #5E564C;   /* testo secondario */
  --text-3:    #3A332B;   /* testo liste */
  --accent:    #2E4A3B;   /* verde bosco */
  --eyebrow:   #9A6B43;   /* legno / terra */
  --cta:       #B5912F;   /* oro */
  --cta-2:     #C9A748;   /* oro chiaro (hover / accenti) */
  --cream:     #FBF6EC;   /* bianco caldo su fondi scuri */

  /* Bordi e superfici */
  --border:    1px solid rgba(94,86,76,0.18);
  --shadow:    0 18px 50px rgba(26,20,12,0.16);
  --shadow-lg: 0 30px 70px rgba(26,20,12,0.22);
  --radius-sm: 5px;
  --radius:    6px;

  /* Tipografia */
  --serif: 'Cormorant Garamond', 'Cormorant Fallback', 'Times New Roman', serif;
  --sans:  'Manrope', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

  /* Scala tipografica fluida */
  --t-13: 0.72rem;
  --t-17: 1.0625rem;
  --t-21: clamp(1.15rem, 1.6vw, 1.3rem);
  --t-28: clamp(1.5rem, 2.5vw, 1.95rem);
  --t-38: clamp(2.1rem, 3.8vw, 3.2rem);
  --t-52: clamp(2.4rem, 5vw, 4rem);
  --t-72: clamp(2.9rem, 7.2vw, 6rem);

  /* Spacing 8px system */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-6: 48px;
  --s-8: 64px;
  --s-12: clamp(88px, 11vw, 150px);
  --s-16: 128px;

  --maxw: 1280px;
  --nav-h: 84px;
  --nav-h-solid: 70px;

  /* Alias retro-compatibili (usati dagli stili inline del configuratore realizza.html) */
  --white:    var(--cream);  /* superfici card chiare */
  --accent-2: var(--eyebrow);/* legno/terra */
  --cta-dark: #9C7F0A;       /* oro hover */
  --stone:    #8B8680;       /* grigio pietra decorativo */
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 var(--s-3);
  letter-spacing: -0.012em;
}
h1 { font-size: var(--t-72); line-height: 1.02; }
h2 { font-size: var(--t-38); }
h3 { font-size: var(--t-21); }

p { margin: 0 0 var(--s-2); max-width: 64ch; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--eyebrow); }

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

::selection { background: var(--cta-2); color: var(--cream); }

/* Label piccole maiuscole */
.eyebrow {
  display: inline-block;
  font-size: var(--t-13);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--eyebrow);
  font-weight: 700;
  margin-bottom: 20px;
}

/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 40px;
}

.section { padding-block: var(--s-12); }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: var(--s-8); }

.lead { font-size: var(--t-21); color: var(--text-2); }

/* ---------- 4. Accessibilità: focus & skip ---------- */
:focus-visible {
  outline: 3px solid var(--cta);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--cream);
  padding: var(--s-1) var(--s-2);
  z-index: 1000;
}
.skip-link:focus { left: var(--s-2); top: var(--s-2); color: var(--cream); }

/* ---------- 5. Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 16px 36px;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .4s cubic-bezier(.16,.7,.3,1), background-color .3s ease, color .3s ease, box-shadow .4s ease;
  text-align: center;
}

.btn--cta {
  background: var(--cta);
  color: var(--text);
  border-color: var(--cta);
  box-shadow: 0 14px 40px rgba(120,92,20,.4);
}
.btn--cta:hover {
  background: var(--cta-2);
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 20px 52px rgba(120,92,20,.5);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(33,28,22,0.28);
}
.btn--ghost:hover { background: var(--text); color: var(--bg); transform: translateY(-3px); }

.btn--light {
  background: transparent;
  color: var(--cream);
  border-color: rgba(251,246,236,0.55);
}
.btn--light:hover { background: var(--cream); color: var(--text); transform: translateY(-3px); }

.btn--wa {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  font-size: .95rem;
  padding: 13px 22px;
}
.btn--wa:hover { background: #1FB457; color: #fff; }

.btn--lg { min-height: 56px; padding: 19px 44px; font-size: 1.02rem; }

/* ---------- 6. Navbar (trasparente su hero -> solida allo scroll) ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  transition: background .4s ease, border-color .4s ease, height .4s ease, backdrop-filter .4s ease;
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.75rem;
  letter-spacing: 0.005em;
  color: var(--cream);
  white-space: nowrap;
  transition: color .4s ease;
}
.brand__mark {
  flex: none;
  width: 1.55em;
  height: 1.55em;
  background: currentColor;
  -webkit-mask: url(/immagini/logo/logo-icon.svg) center / contain no-repeat;
          mask: url(/immagini/logo/logo-icon.svg) center / contain no-repeat;
}
.brand .b1 { font-weight: 500; }
.brand .b2 { color: var(--cta-2); transition: color .4s ease; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav__links a {
  font-size: var(--t-13);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--cream);
  white-space: nowrap;
  transition: color .4s ease, opacity .25s ease;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { opacity: .62; color: var(--cream); }
.nav__links .nav__cross a { color: var(--cta-2); font-weight: 700; }
.nav__links .nav__cross a:hover { opacity: .7; color: var(--cta-2); }

/* Stato solido (toggle via JS quando si scrolla oltre l'hero) */
.nav.is-solid {
  background: rgba(244,237,225,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(33,28,22,0.1);
  height: var(--nav-h-solid);
}
.nav.is-solid .brand,
.nav.is-solid .nav__links a { color: var(--text); }
.nav.is-solid .brand .b2 { color: var(--accent); }
.nav.is-solid .nav__links a:hover,
.nav.is-solid .nav__links a[aria-current="page"] { color: var(--accent); opacity: 1; }
.nav.is-solid .nav__links .nav__cross a { color: var(--eyebrow); }

/* Pagine senza hero scuro: nav solida fin da subito (classe sul body) */
.nav-light .nav { position: sticky; }
.nav-light .nav:not(.is-solid) {
  background: rgba(244,237,225,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(33,28,22,0.1);
}
.nav-light .brand,
.nav-light .nav__links a { color: var(--text); }
.nav-light .brand .b2 { color: var(--accent); }
.nav-light .nav__links a:hover,
.nav-light .nav__links a[aria-current="page"] { color: var(--accent); opacity: 1; }
.nav-light .nav__links .nav__cross a { color: var(--eyebrow); }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
}
.nav__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--cream);
  position: relative;
  transition: transform .2s ease, opacity .2s ease, background .4s ease;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute; left: 0;
  width: 24px; height: 2px;
  background: var(--cream);
  transition: transform .2s ease, background .4s ease;
}
.nav__toggle span::before { top: -7px; }
.nav__toggle span::after  { top: 7px; }
.nav.is-solid .nav__toggle span,
.nav.is-solid .nav__toggle span::before,
.nav.is-solid .nav__toggle span::after,
.nav-light .nav__toggle span,
.nav-light .nav__toggle span::before,
.nav-light .nav__toggle span::after { background: var(--text); }
.nav__toggle[aria-expanded="true"] span { background: transparent !important; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 7b. Hero scroll-driven (frame sequence) ---------- */
.hero-scroll { position: relative; height: 320vh; background: var(--ink); }
.hero-scroll__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.hero-scroll__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  background: var(--ink); }
.hero-scroll__overlay { position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 50% 52%, rgba(20,16,11,0) 42%, rgba(20,16,11,.42) 100%),
    linear-gradient(180deg, rgba(20,16,11,.46) 0%, rgba(20,16,11,.22) 38%, rgba(20,16,11,.62) 100%); }
.hero-scroll__content { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  color: var(--cream); text-align: center; padding-inline: 32px; }
.hero-scroll__content .hero-line {
  width: 54px; height: 1px; background: var(--cta-2); margin: 0 auto 30px;
}
.hero-scroll__content h1 {
  color: var(--cream); max-width: 1000px; margin: 0 auto;
  text-shadow: 0 2px 40px rgba(0,0,0,.3);
}
.hero-scroll__content .hero__sub {
  max-width: 46ch; margin: 30px auto 0;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.6;
  color: rgba(251,246,236,0.9);
}
.hero-scroll__content .btn { margin-top: 42px; }
.hero-scroll__fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* indicatore "scopri" in basso */
.hero-cue {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: rgba(251,246,236,0.7);
}
.hero-cue span {
  font-size: .62rem; letter-spacing: .26em; text-transform: uppercase; font-weight: 600;
}
.hero-cue svg { animation: cue 2.4s ease-in-out infinite; }
@keyframes cue { 0%,100% { transform: translateY(0); opacity:.5; } 50% { transform: translateY(7px); opacity:1; } }

/* reduced motion: niente pin lungo */
@media (prefers-reduced-motion: reduce) {
  .hero-scroll { height: 100vh; }
}

/* ---------- 8. Sezioni 2 colonne ---------- */
.split {
  display: grid;
  /* min(340px,100%): desktop identical (340px cols), but on phones the column
     caps at container width instead of overflowing. Fixes every .split at once. */
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: clamp(40px, 6vw, 84px);
  align-items: center;
}
.split--reverse .split__media { order: -1; }

.media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.3;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.media img,
.media video { width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.16,.7,.3,1); }
.media:hover img,
.media:hover video { transform: scale(1.05); }

/* cornice decorativa (angolo) sull'immagine "perché noi" */
.media--framed::after {
  content: "";
  position: absolute; right: -14px; top: -14px;
  width: 120px; height: 120px;
  border-right: 1px solid rgba(154,107,67,0.5);
  border-top: 1px solid rgba(154,107,67,0.5);
  pointer-events: none;
}

/* Fallback play: iniettato dal JS e reso visibile se video.play() viene rifiutato
   (es. Low Power Mode iOS). Tiene il contenuto raggiungibile sopra al poster. */
.video-play {
  position: absolute; inset: 0; margin: auto; width: 66px; height: 66px;
  display: none; align-items: center; justify-content: center;
  border: none; border-radius: 50%; cursor: pointer; z-index: 3;
  background: rgba(20,16,11,0.55); color: var(--cream);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  transition: background .25s ease, transform .25s ease;
}
.video-play:hover { background: rgba(20,16,11,0.72); transform: scale(1.05); }
.video-play svg { width: 26px; height: 26px; margin-left: 3px; }

/* ---------- 9. Liste problemi / punti (check oro) ---------- */
.checklist { list-style: none; margin: var(--s-4) 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 18px; }
.checklist li {
  position: relative;
  padding-left: 34px;
  font-size: 1.05rem;
  color: var(--text-3);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 20px; height: 20px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23B5912F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* ---------- 10. Griglia features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-3);
  margin-top: 56px;
}
.feature {
  background: var(--accent);
  color: var(--cream);
  border: none;
  border-radius: var(--radius-sm);
  padding: 40px 34px;
  transition: transform .5s cubic-bezier(.16,.7,.3,1), box-shadow .5s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: 0 28px 60px rgba(26,20,12,0.28); }
.feature__icon {
  width: 34px; height: 34px;
  color: var(--cta-2);
  margin-bottom: 22px;
}
.feature h3 { color: var(--cream); font-size: 1.6rem; margin: 0 0 10px; }
.feature p  { font-size: 1rem; color: rgba(251,246,236,0.82); margin: 0; line-height: 1.6; }

/* ---------- 11. Banda full-width (lead gen / cross-sell) ---------- */
.band {
  position: relative;
  overflow: hidden;
  color: var(--cream);
  text-align: center;
  background: var(--accent);
}
.band__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.band__overlay { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(28,40,32,.78), rgba(20,16,11,.8)); }
.band__content { position: relative; z-index: 2; padding-block: var(--s-12);
  max-width: 820px; margin-inline: auto; padding-inline: 32px; }
.band h2 { color: var(--cream); font-size: var(--t-52); margin: 0 auto; }
.band p  { color: rgba(251,246,236,0.86); margin: 24px auto 0; font-size: 1.18rem; max-width: 50ch; }
.band .btn { margin-top: 38px; }

.band--cross .band__overlay { background: linear-gradient(180deg, rgba(20,16,11,.6), rgba(20,16,11,.74)); }

/* Lead-gen: lentissimo Ken Burns sullo sfondo (non su band--cross). Niente
   background-attachment:fixed (rotto su iOS). Fermato dalla regola globale
   prefers-reduced-motion (*{animation:none}). */
@keyframes bandKenBurns { from { transform: scale(1); } to { transform: scale(1.06); } }
.band:not(.band--cross) .band__bg {
  animation: bandKenBurns 14s ease-in-out infinite alternate;
  will-change: transform;
}

/* ---------- 12. Citazione ---------- */
.quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--t-28);
  line-height: 1.4;
  color: var(--accent);
  border-left: 2px solid var(--cta);
  padding-left: 26px;
  margin: 36px 0 0;
  max-width: 44ch;
}

/* ---------- 13. Valori (chi siamo) ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-3);
  margin-top: 56px;
}
.value {
  background: var(--accent);
  color: var(--cream);
  border-radius: var(--radius-sm);
  padding: 40px 34px;
  text-align: center;
}
.value h3 { color: var(--cream); font-size: 1.6rem; margin: 0; }

.philosophy {
  font-family: var(--serif);
  font-size: var(--t-28);
  line-height: 1.5;
  text-align: center;
  max-width: 24ch;
  margin: 0 auto;
  color: var(--text);
}

.prose { max-width: none; }
.prose.split p { max-width: 60ch; }

/* ---------- 14. Blog ---------- */
.page-hero {
  padding-block: calc(var(--nav-h) + var(--s-8)) var(--s-6);
  text-align: center;
}
.page-hero--img {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  text-align: center;
  background: var(--ink);
  overflow: hidden;
}
.page-hero--img .band__bg { z-index: 0; }
.page-hero--img .band__overlay {
  background: linear-gradient(180deg, rgba(20,16,11,.46) 0%, rgba(20,16,11,.62) 100%); }
.page-hero--img .page-hero__inner { position: relative; z-index: 2; padding: 32px; }
.page-hero--img h1 { position: relative; z-index: 2; color: var(--cream); }
.page-hero--img p { color: rgba(251,246,236,0.88); margin-inline: auto; }

.posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-4);
}
.post {
  background: var(--cream);
  border: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .4s cubic-bezier(.16,.7,.3,1), box-shadow .4s ease;
}
.post:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post__thumb { aspect-ratio: 16 / 9; overflow: hidden; flex: none; }
.post__thumb img { width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.16,.7,.3,1); }
.post:hover .post__thumb img { transform: scale(1.05); }
.post__body { padding: var(--s-3) 28px 28px; }
.post__date { font-size: var(--t-13); letter-spacing: 0.18em; text-transform: uppercase; color: var(--eyebrow); font-weight: 700; }
.post h3 { font-size: 1.5rem; margin: 12px 0 10px; }
.post p { font-size: 1rem; color: var(--text-2); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 15. Contatti ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-3);
  margin: var(--s-6) auto;
  max-width: 820px;
}
.contact-card {
  background: var(--cream);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: 40px 34px;
  text-align: center;
  box-shadow: var(--shadow);
}
.contact-card h3 { font-size: 1.5rem; margin: 0 0 10px; }
.contact-card p { color: var(--text-2); margin: 0 auto; }

.contact-meta { margin-top: var(--s-4); color: var(--text-2); text-align: center; }

/* contatti — layout centrato (no form) */
.contact-section { padding-block: clamp(96px, 13vw, 170px); }
.contact-wrap {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.contact-intro { display: flex; flex-direction: column; align-items: center; }
.contact-intro h1 { margin: 0 0 16px; }
.contact-intro .lead { max-width: 480px; font-size: 1.2rem; }
.contact-divider { width: 48px; height: 1px; background: rgba(33,28,22,0.2); margin: 40px 0; }
.contact-actions {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: center; width: 100%;
}
.contact-actions .btn { padding: 20px 32px; font-size: 1.08rem; }
.contact-actions .btn--wa { box-shadow: 0 12px 32px rgba(37,211,102,.25); }
.contact-where { margin-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.contact-where .eyebrow { margin-bottom: 4px; }
.contact-where__name { margin: 0; font-size: 1.05rem; color: var(--text-3); font-weight: 600; }
.contact-where__addr { margin: 0; font-size: 1rem; color: var(--text-2); }

/* form legacy (non più usato in contatti, mantenuto per compatibilità) */
.form {
  background: var(--cream);
  border: var(--border);
  border-radius: var(--radius-sm);
  padding: var(--s-6);
  max-width: 640px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: var(--s-3); }
.field label {
  display: block;
  font-size: var(--t-13);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: var(--s-1);
  color: var(--text);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 1.0625rem;
  color: var(--text);
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius-sm);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field textarea:focus { outline: 3px solid var(--cta); outline-offset: 1px; border-color: var(--accent); }
.req { color: var(--eyebrow); }

/* ---------- 16. Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(251,246,236,0.66);
  padding-block: clamp(20px, 2.5vw, 30px) 16px;
  font-size: 0.88rem;
}
.footer a { color: rgba(251,246,236,0.66); transition: color .25s ease; }
.footer a:hover { color: var(--cream); }
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-6);
}
.footer h4 {
  font-family: var(--sans);
  font-size: var(--t-13);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  font-weight: 700;
  margin: 0 12px 0 0;
  display: inline;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 14px; align-items: center; }
.footer__logo {
  display: block;
  width: auto;
  height: 36px;
  margin-top: 18px;
  opacity: .95;
}
.footer__logo + .footer__legal { margin-top: 10px; }
.footer__legal {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(251,246,236,0.12);
  font-size: .78rem;
  color: rgba(251,246,236,0.5);
  letter-spacing: 0.02em;
}

/* ---------- 17. Placeholder immagini mancanti ---------- */
.img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 220px;
  padding: var(--s-3);
  text-align: center;
  color: rgba(251,246,236,0.92);
  font-family: var(--sans);
  font-size: var(--t-13);
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #6E5B43 0%, #2E4A3B 100%);
}

/* ---------- 18. Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(.16,.7,.3,1), transform 1s cubic-bezier(.16,.7,.3,1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 19. Responsive ---------- */
@media (max-width: 900px) {
  .nav__inner { padding-inline: 24px; }
  .container { padding-inline: 24px; }
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(244,237,225,0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(33,28,22,0.1);
    padding: var(--s-2) 24px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 14px 0; width: 100%; color: var(--text); }
  .nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--accent); opacity: 1; }
  .nav__links .nav__cross a { color: var(--eyebrow); }
  .values { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .container { padding-inline: 20px; }
  .values { grid-template-columns: 1fr; }
  .band__content, .hero-scroll__content { padding-inline: 24px; }

  /* "I numeri": una colonna (niente 2×2 che sbriciola le descrizioni), gap più corto. */
  .stats-grid { grid-template-columns: 1fr !important; gap: 26px !important; }
  /* Chip fonte: target < 44pt → padding più generoso così l'altezza tocca ~44pt
     (solo i chip con bordo, non i link di testo inline). */
  #canapa .canapa-source-link[style*="padding:4px 10px"] { padding: 13px 16px !important; }

  /* Lead-gen band: CTA "pieno" sotto il pollice invece di padding orizzontale enorme. */
  .band .btn { width: min(100%, 340px); padding: 18px 24px !important; }
  /* Band = un beat, non una destinazione: meno padding verticale. */
  .band__content { padding-block: var(--s-8); }
  /* Crop verticale: alza un filo per tenere in vista la casa illuminata. */
  .band:not(.band--cross) .band__bg { object-position: center 42%; }

  /* Density: desktop rhythm feels like empty air on a phone → step down one notch. */
  .section { padding-block: var(--s-8); }

  /* Touch: :hover zoom is dead weight. Kill it; give the image one moment of life —
     a subtle scale-in (1.04 → 1) as the media block reveals. */
  .media:hover img, .media:hover video { transform: none; }
  .split__media.reveal .media img,
  .split__media.reveal .media video {
    transform: scale(1.04);
    transition: transform 1.1s cubic-bezier(.16,.7,.3,1);
  }
  .split__media.reveal.is-visible .media img,
  .split__media.reveal.is-visible .media video { transform: scale(1); }
}

/* picture wrapper deve riempire .media come faceva la <img> nuda */
.media picture { display: block; width: 100%; height: 100%; }

/* ---------- Sezione Problema (mobile ≤768): icone per-problema, righe compatte ----------
   Desktop INVARIATO: due colonne + immagine + check oro. Qui su mobile l'immagine
   non c'è (né viene scaricata: <source media> in index.html), la lista diventa
   righe compatte con hairline e un'icona diversa per ogni problema. */
@media (max-width: 768px) {
  /* Nasconde SOLO l'immagine della sezione Problema (.split non-reverse), non il
     video di "Perché noi". La sezione entra così in ~1 schermata a 390×844. */
  .split:not(.split--reverse) .split__media { display: none; }

  /* Reveal a stagger per riga (una tantum, transform/opacity — Safari-safe).
     La classe .is-revealed la mette l'IntersectionObserver in main.js. */
  .checklist li {
    opacity: 0; transform: translateY(14px);
    transition: opacity .5s cubic-bezier(.16,.7,.3,1), transform .5s cubic-bezier(.16,.7,.3,1);
  }
  .checklist.is-revealed li { opacity: 1; transform: none; }
  .checklist.is-revealed li:nth-child(1) { transition-delay: 0ms; }
  .checklist.is-revealed li:nth-child(2) { transition-delay: 80ms; }
  .checklist.is-revealed li:nth-child(3) { transition-delay: 160ms; }
  .checklist.is-revealed li:nth-child(4) { transition-delay: 240ms; }
  .checklist.is-revealed li:nth-child(5) { transition-delay: 320ms; }

  /* "Perché noi": il blockquote entra per ultimo, come beat a sé dopo i check. */
  .split--reverse .quote {
    opacity: 0; transform: translateY(14px);
    transition: opacity .5s cubic-bezier(.16,.7,.3,1), transform .5s cubic-bezier(.16,.7,.3,1);
  }
  .split--reverse .checklist.is-revealed ~ .quote { opacity: 1; transform: none; transition-delay: 440ms; }

  /* Il video "Perché noi" è 16:9: box 16:9 su mobile → niente teste tagliate/letterbox. */
  .split--reverse .media--framed { aspect-ratio: 16 / 9; }

  /* Righe compatte + separatori hairline: solo la lista problemi. */
  .checklist--problems { gap: 0; margin-top: var(--s-3); }
  .checklist--problems li {
    padding: 13px 0 13px 42px;
    font-size: 1rem; line-height: 1.35;
    border-bottom: 1px solid rgba(94,86,76,0.16);
  }
  .checklist--problems li:last-child { border-bottom: 0; padding-bottom: 0; }

  /* Icona per-problema al posto del check. Stroke oro #B5912F, width 1.5,
     round: stesso stile di .feature__icon. Sovrascrive solo background-image,
     eredita no-repeat/center/contain dalla regola base .checklist li::before. */
  .checklist--problems li::before { width: 24px; height: 24px; top: 11px; }
  .checklist--problems li:nth-child(1)::before { /* umidità / muffa */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23B5912F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5S6 9 6 13a6 6 0 0 0 12 0c0-4-6-10.5-6-10.5z'/%3E%3C/svg%3E"); }
  .checklist--problems li:nth-child(2)::before { /* rumori */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23B5912F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9v6h4l5 4V5L8 9H4z'/%3E%3Cpath d='M18 8a6 6 0 0 1 0 8'/%3E%3C/svg%3E"); }
  .checklist--problems li:nth-child(3)::before { /* materiali nocivi (VOC) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23B5912F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 2 20h20L12 3z'/%3E%3Cpath d='M12 10v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E"); }
  .checklist--problems li:nth-child(4)::before { /* elevato consumo energetico */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23B5912F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h6l-1 8 9-12h-6l1-8z'/%3E%3C/svg%3E"); }
  .checklist--problems li:nth-child(5)::before { /* perdita di valore */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23B5912F' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7l6 6 4-4 7 7'/%3E%3Cpath d='M21 12v4h-4'/%3E%3C/svg%3E"); }
}

/* ---------- Mobile hero interim: static black, no frame sequence ----------
   JS (hero-scroll.js) bails at ≤768px, so nothing loads hero-frames/ here.
   Kill the 320vh pin: the hero is exactly one viewport of flat --ink, and the
   content becomes a pure typographic hero (cream on ink already passes contrast). */
@media (max-width: 768px) {
  .hero-scroll { height: 100vh; height: 100svh; background: var(--ink); }
  /* Sticky child must match the parent's svh height (not 100vh) or its lower slice
     overlaps the next section and clips "Scopri" when the address bar is expanded. */
  .hero-scroll__sticky { position: static; height: 100vh; height: 100svh; }
  .hero-scroll__canvas { display: none; }
  .hero-scroll__overlay { display: none; }      /* gradients over flat black just muddy it */
  /* Lift the cue above the home indicator (needs viewport-fit=cover for env() to resolve). */
  .hero-cue { bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* ---------- 20. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  /* Show the staggered checklist and scale-in media statically (no JS class needed). */
  .checklist li { opacity: 1 !important; transform: none !important; }
  .split__media .media img, .split__media .media video { transform: none !important; }
}

/* ============================================================
   Cookie consent banner
============================================================ */
.cc-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; padding: 14px; transform: translateY(130%); transition: transform .35s ease; }
.cc-banner.is-in { transform: translateY(0); }
.cc-inner { max-width: 960px; margin: 0 auto; background: var(--white, #fff); color: var(--text, #211C16); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius, 12px); box-shadow: var(--shadow-lg, 0 20px 50px rgba(0,0,0,.25)); padding: 16px 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.cc-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-2, #5E564C); flex: 1 1 320px; }
.cc-text a { color: var(--cta, #B5912F); text-decoration: underline; }
.cc-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.cc-btn { font-family: inherit; font-weight: 700; font-size: 14px; letter-spacing: .02em; padding: 11px 20px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.cc-btn--accept { background: var(--cta, #B5912F); color: #fff; }
.cc-btn--accept:hover { background: var(--cta-dark, #9a7a26); transform: translateY(-1px); }
.cc-btn--ghost { background: transparent; color: var(--text, #211C16); border-color: rgba(0,0,0,.22); }
.cc-btn--ghost:hover { border-color: var(--text, #211C16); }
.cc-links a { color: inherit; text-decoration: underline; opacity: .85; }
@media (max-width: 540px) {
  .cc-inner { flex-direction: column; align-items: stretch; text-align: left; }
  .cc-actions { justify-content: stretch; }
  .cc-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .cc-banner { transition: none; } }
