/* ==========================================================================
   Koller – restyling homepage (mockup)
   Colori e font ereditati dal sito attuale: giallo #FBB906, marrone #6B2B11,
   Poppins. Contrasti rivisti: il giallo resta accento, non colore del testo
   su fondo chiaro.
   ========================================================================== */

:root {
  --yellow: #fbb906;
  --yellow-soft: #fec94a;
  --yellow-tint: #fff4d6;
  --brown: #6b2b11;
  --brown-deep: #4a1c0a;
  --brown-ink: #2b1a12;
  --text: #4a423d;          /* era #707070: contrasto 4.9 → 9.6 */
  --muted: #7a706a;
  --cream: #fbf7f1;
  --sand: #f3ece2;
  --line: #e6ddd2;
  --white: #fff;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 18px 50px -20px rgba(43, 26, 18, .35);
  --shadow-sm: 0 6px 18px -8px rgba(43, 26, 18, .25);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-inout: cubic-bezier(.77, 0, .18, 1);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { color: var(--brown-ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Eyebrow + stripe motif (richiamo alle righe del logo) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brown); margin-bottom: 16px;
}
.eyebrow::before {
  content: ""; width: 34px; height: 10px; flex: none;
  background: repeating-linear-gradient(-60deg, var(--yellow) 0 4px, transparent 4px 8px);
}
.on-dark .eyebrow { color: var(--yellow-soft); }

.h-xl { font-size: clamp(34px, 5.2vw, 64px); font-weight: 600; }
.h-l  { font-size: clamp(28px, 3.6vw, 44px); }
.h-m  { font-size: clamp(22px, 2.4vw, 30px); }
.lead { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.65; color: var(--text); }
.mark { color: var(--brown); box-shadow: inset 0 -.38em 0 var(--yellow-tint); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--yellow); --fg: var(--brown-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent;
  background: var(--bg); color: var(--fg); text-decoration: none;
  font: 600 15px/1 "Poppins", sans-serif; letter-spacing: .02em; cursor: pointer;
  transition: transform .35s var(--ease-out), background-color .25s, box-shadow .35s var(--ease-out), color .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:focus-visible { outline: 3px solid var(--brown); outline-offset: 3px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--brown { --bg: var(--brown); --fg: #fff; }
.btn--brown:hover { --bg: var(--brown-deep); }
.btn--ghost { --bg: transparent; --fg: #fff; border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { --bg: rgba(255,255,255,.12); }
.btn--outline { --bg: transparent; --fg: var(--brown); border-color: var(--brown); }
.btn--outline:hover { --bg: var(--brown); --fg: #fff; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--brown);
  text-decoration: none; border-bottom: 2px solid var(--yellow); padding-bottom: 2px;
}
.link-arrow span { transition: transform .3s var(--ease-out); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s, height .3s var(--ease-out);
}
.header.is-scrolled { box-shadow: 0 8px 30px -18px rgba(43,26,18,.4); border-color: var(--line); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.header__logo img { height: 52px; width: auto; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a {
  position: relative; padding: 10px 14px; text-decoration: none;
  font-size: 14px; font-weight: 500; color: var(--brown-ink); letter-spacing: .02em;
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current]::after { transform: scaleX(1); }
.header__cta { display: flex; gap: 10px; }
.header__cta .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.burger span { display: block; width: 24px; height: 2px; margin: 5px auto; background: var(--brown-ink); }
@media (max-width: 1080px) {
  .nav, .header__cta .btn--outline { display: none; }
  .burger { display: block; margin-left: 0; }
  .header__cta { margin-left: auto; }
}
@media (max-width: 560px) {
  :root { --header-h: 68px; }
  .header__logo img { height: 40px; }
  .header__cta .btn span.lbl { display: none; }
  .header__cta .btn { width: 44px; padding: 0; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section--cream { background: var(--cream); }
.section--sand { background: var(--sand); }
.section--brown { background: var(--brown); color: #f4e9e1; }
.section--brown h2, .section--brown h3 { color: #fff; }

/* ---------- Media (niente più immagini che "scattano" in pagina) ---------- */
.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--sand); }
.media img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s var(--ease-out), transform 1.4s var(--ease-out); }
.media img.is-loaded { opacity: 1; }

/* ---------- Scroll reveal ----------
   body[data-reveal] = tendina | fade | none  (selezionabile dal pannello demo) */
[data-reveal] .rv { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal] .rv.in { opacity: 1; transform: none; }

/* immagini: "tendina" che scende e scopre la foto.
   Il clip va sull'<img>, non sul contenitore: un elemento completamente
   ritagliato non viene mai visto dall'IntersectionObserver. */
[data-reveal="tendina"] .rv-img img { clip-path: inset(0 0 100% 0); transform: scale(1.12); transition: opacity .8s var(--ease-out), clip-path 1.3s var(--ease-inout) var(--d, 0s), transform 1.8s var(--ease-out) var(--d, 0s); }
[data-reveal="tendina"] .rv-img.in img { clip-path: inset(0 0 0 0); transform: scale(1); }

/* immagini: variante "veneziana" (lamelle orizzontali che si aprono) */
@property --slat { syntax: "<percentage>"; initial-value: 0%; inherits: false; }
[data-reveal="veneziana"] .rv-img img {
  --slat: 0%;
  -webkit-mask: linear-gradient(#000 var(--slat), transparent 0) 0 0 / 100% 36px repeat;
          mask: linear-gradient(#000 var(--slat), transparent 0) 0 0 / 100% 36px repeat;
  transition: opacity .8s var(--ease-out), --slat 1.1s var(--ease-inout) var(--d, 0s), transform 1.4s var(--ease-out);
}
[data-reveal="veneziana"] .rv-img.in img { --slat: 101%; }

[data-reveal="fade"] .rv-img { opacity: 0; transition: opacity 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal="fade"] .rv-img.in { opacity: 1; }

[data-reveal="none"] .rv, [data-reveal="none"] .rv-img, [data-reveal="none"] .rv-img img { opacity: 1; transform: none; clip-path: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  [data-reveal] .rv, [data-reveal] .rv-img, [data-reveal] .rv-img img { opacity: 1 !important; transform: none !important; clip-path: none !important; -webkit-mask: none !important; mask: none !important; }
}

/* ---------- Form (leggibilità: label visibili, campi con bordo, focus chiaro) ---------- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--brown-ink); }
.field label .req { color: var(--brown); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 52px; padding: 14px 16px;
  font: 400 16px/1.4 "Poppins", sans-serif; color: var(--brown-ink);
  background: #fff; border: 1.5px solid #cfc4b8; border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #9a8f87; }
.field input:hover, .field textarea:hover { border-color: #a89a8d; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brown); box-shadow: 0 0 0 4px rgba(251,185,6,.35); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--text); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brown); flex: none; }
.check a { color: var(--brown); font-weight: 600; }
.form__foot { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.form__note { font-size: 12.5px; color: var(--muted); max-width: 46ch; margin: 0; }
.form__note a { color: inherit; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: var(--brown-deep); color: #e9d9cf; padding: 80px 0 28px; font-size: 15px; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: var(--yellow-soft); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { color: var(--yellow-soft); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; font-weight: 600; }
.footer__logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; }
.footer__logo img { height: 48px; width: auto; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__bottom { margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: #c7b3a7; }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp float (esiste già sul sito) ---------- */
.wa {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center; box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out);
}
.wa:hover { transform: scale(1.06); }
.wa svg { width: 28px; height: 28px; fill: #fff; }

/* ==========================================================================
   INTRO – animazioni di apertura pagina
   ========================================================================== */
.intro { position: fixed; inset: 0; z-index: 1000; pointer-events: none; overflow: hidden; }
.intro.is-contained { position: absolute; }
.intro__badge {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  transform: translate(-50%, -50%); background: #fff; border-radius: 16px;
  padding: 18px 26px; box-shadow: 0 20px 60px -20px rgba(0,0,0,.5);
  animation: badgeOut .5s var(--ease-inout) .55s forwards;
}
.intro__badge img { height: 64px; width: auto; }
.is-contained .intro__badge { padding: 10px 14px; border-radius: 10px; }
.is-contained .intro__badge img { height: 34px; }
@keyframes badgeOut { to { opacity: 0; transform: translate(-50%, -50%) scale(.92); } }

/* 1. Sipario – evoluzione di quello attuale: tessuto con pieghe, apertura con "raccolta" laterale */
.intro--sipario .panel {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background:
    linear-gradient(180deg, rgba(0,0,0,.15), transparent 20%, transparent 80%, rgba(0,0,0,.25)),
    repeating-linear-gradient(90deg, #5a220c 0, #7a3417 22px, #8a3e1c 30px, #6b2b11 44px, #551f0b 60px);
}
.intro--sipario .panel--l { left: 0; transform-origin: left center; animation: sipL 1.5s var(--ease-inout) .8s forwards; }
.intro--sipario .panel--r { right: 0; transform-origin: right center; animation: sipR 1.5s var(--ease-inout) .8s forwards; }
@keyframes sipL { 60% { transform: scaleX(.18); } 100% { transform: scaleX(.001); } }
@keyframes sipR { 60% { transform: scaleX(.18); } 100% { transform: scaleX(.001); } }

/* 2. Tenda da sole – telo a righe giallo/crema con mantovana, si riavvolge verso l'alto */
.intro--tenda .cloth {
  position: absolute; inset: 0 0 -40px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.18), transparent 25%, transparent 80%, rgba(0,0,0,.12)),
    repeating-linear-gradient(90deg, var(--yellow) 0 70px, #fff7e3 70px 140px);
  animation: rollUp 1.25s var(--ease-inout) .85s forwards;
}
.is-contained.intro--tenda .cloth { background:
    linear-gradient(180deg, rgba(0,0,0,.18), transparent 25%, transparent 80%, rgba(0,0,0,.12)),
    repeating-linear-gradient(90deg, var(--yellow) 0 34px, #fff7e3 34px 68px); }
.intro--tenda .cloth::after { /* mantovana smerlata */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: inherit;
  -webkit-mask: radial-gradient(circle at 35px 0, #000 34px, transparent 35px) 0 0 / 70px 40px repeat-x;
          mask: radial-gradient(circle at 35px 0, #000 34px, transparent 35px) 0 0 / 70px 40px repeat-x;
}
.intro--tenda .roller {
  position: absolute; left: 0; right: 0; top: 0; height: 18px; z-index: 3;
  background: linear-gradient(180deg, #8a8a8a, #d9d9d9 40%, #7a7a7a); box-shadow: 0 4px 10px rgba(0,0,0,.3);
  animation: fadeOut .4s ease 2s forwards;
}
@keyframes rollUp { to { transform: translateY(calc(-100% - 10px)); } }
@keyframes fadeOut { to { opacity: 0; } }

/* 3. Veneziana – lamelle che si orientano e poi si raccolgono */
.intro--veneziana { perspective: 1400px; display: flex; flex-direction: column; }
.intro--veneziana .slat {
  flex: 1; transform-origin: center; backface-visibility: hidden;
  background: linear-gradient(180deg, #fff 0%, #efe8de 55%, #d8cdbf 100%);
  border-bottom: 1px solid rgba(0,0,0,.08);
  animation: slatTilt .7s var(--ease-inout) calc(.75s + var(--i) * 35ms) forwards;
}
@keyframes slatTilt { 100% { transform: rotateX(88deg); } }
.intro--veneziana .slats-lift { position: absolute; inset: 0; display: flex; flex-direction: column; perspective: 1400px; animation: liftUp .8s var(--ease-inout) 1.55s forwards; }
@keyframes liftUp { to { transform: translateY(-100%); } }
.intro--veneziana .cord { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(107,43,17,.35); z-index: 2; animation: fadeOut .3s ease 1.2s forwards; }

/* 4. Persiane – due ante a lamelle che si aprono verso l'esterno */
.intro--persiana { perspective: 1800px; }
.intro--persiana .leaf {
  position: absolute; top: 0; bottom: 0; width: 50%;
  border: 14px solid #5a220c;
  background:
    repeating-linear-gradient(180deg, #7a3417 0 6px, #8e4320 6px 16px, #5a220c 16px 22px);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25);
}
.is-contained.intro--persiana .leaf { border-width: 7px; background: repeating-linear-gradient(180deg, #7a3417 0 3px, #8e4320 3px 8px, #5a220c 8px 11px); }
.intro--persiana .leaf--l { left: 0; transform-origin: left center; animation: leafL 1.4s var(--ease-inout) .8s forwards; }
.intro--persiana .leaf--r { right: 0; transform-origin: right center; animation: leafR 1.4s var(--ease-inout) .8s forwards; }
@keyframes leafL { 80% { opacity: 1; } to { transform: rotateY(-100deg); opacity: 0; } }
@keyframes leafR { 80% { opacity: 1; } to { transform: rotateY(100deg); opacity: 0; } }

/* 5. Tendina a rullo – telo crema con fondale marrone e logo, sale e si arrotola */
.intro--rullo .blind {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.018) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #f6efe4, #efe5d6);
  animation: rollUp 1.1s var(--ease-inout) .9s forwards;
}
.intro--rullo .blind__bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: linear-gradient(180deg, var(--brown), var(--brown-deep)); box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.intro--rullo .blind__pull { position: absolute; left: 50%; bottom: -34px; width: 2px; height: 34px; background: var(--brown); }
.intro--rullo .blind__pull::after { content: ""; position: absolute; left: -6px; bottom: -6px; width: 14px; height: 14px; border-radius: 50%; background: var(--yellow); }
.intro--rullo .intro__badge { animation: none; background: transparent; box-shadow: none; }
.intro--rullo .blind .intro__badge { animation: none; }

/* 6. Plissé – zanzariera plissettata che si ripiega verso l'alto */
.intro--plisse .pleats {
  position: absolute; left: 0; right: 0; top: 0; height: 100%;
  background:
    repeating-linear-gradient(180deg, #fff 0 0, #fbf7f1 0 calc(var(--ph) / 2), #d9cdbd calc(var(--ph) / 2) var(--ph));
  background-size: 100% var(--ph);
  --ph: 48px;
  animation: pleatUp 1.3s var(--ease-inout) .85s forwards;
  box-shadow: 0 10px 20px rgba(0,0,0,.15);
}
.is-contained.intro--plisse .pleats { --ph: 22px; }
.intro--plisse .pleats::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: linear-gradient(180deg, #7a7a7a, #bdbdbd); }
@keyframes pleatUp { to { height: 12px; background-size: 100% 2px; } }

/* 7. Lamelle orientabili (pergola bioclimatica) – lame verticali che ruotano */
.intro--lamelle { perspective: 1600px; display: flex; }
.intro--lamelle .blade {
  flex: 1; background: linear-gradient(90deg, #e9e2d8, #fff 45%, #cfc3b4);
  border-right: 1px solid rgba(0,0,0,.08);
  animation: bladeTurn .8s var(--ease-inout) calc(.8s + var(--i) * 40ms) forwards;
}
@keyframes bladeTurn { 90% { opacity: 1; } to { transform: rotateY(90deg); opacity: 0; } }

/* ---------- Pannello demo (solo per la presentazione, non parte del design) ---------- */
.demo {
  position: fixed; left: 16px; bottom: 16px; z-index: 900; width: 300px; max-width: calc(100vw - 32px);
  background: #1f1712; color: #f3e7de; border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.6);
  font: 13px/1.4 "Poppins", sans-serif; overflow: hidden;
}
.demo summary { list-style: none; cursor: pointer; padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.demo summary::-webkit-details-marker { display: none; }
.demo summary small { color: #b9a79b; font-weight: 400; }
.demo__body { padding: 4px 16px 16px; display: grid; gap: 12px; }
.demo label { display: grid; gap: 6px; color: #b9a79b; font-size: 12px; }
.demo select { width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid #4a3a30; background: #2b211b; color: #fff; font: inherit; }
.demo button { padding: 10px; border-radius: 8px; border: 0; background: var(--yellow); color: #1f1712; font: 600 13px "Poppins", sans-serif; cursor: pointer; }
.demo a { color: var(--yellow-soft); }
.demo:not([open]) { width: auto; }
.demo:not([open]) summary small { display: none; }

/* ---------- Ingresso contenuti hero (parte a fine intro) ---------- */
.hero-in { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0s); }
.is-ready .hero-in { opacity: 1; transform: none; }
.hero-zoom { transform: scale(1.08); transition: transform 2.6s var(--ease-out); }
.is-ready .hero-zoom { transform: scale(1); }

/* ---------- Icone ---------- */
.ico { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.chips li, .chips a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; text-decoration: none; background: #fff; color: var(--brown-ink); border: 1px solid var(--line);
  transition: background .25s, border-color .25s;
}
.chips a:hover { background: var(--yellow-tint); border-color: var(--yellow); }

/* ---------- Mega menu Prodotti ---------- */
.nav { align-items: center; }
.nav__drop {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; background: none; cursor: pointer;
  font: 500 14px "Poppins", sans-serif; color: var(--brown-ink); letter-spacing: .02em; position: relative;
}
.nav__drop svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform .35s var(--ease-out); }
.nav__drop::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.mega-open .nav__drop::after, .nav__drop:hover::after { transform: scaleX(1); }
.mega-open .nav__drop svg { transform: rotate(180deg); }
.nav__drop:focus-visible { outline: 2px solid var(--brown); outline-offset: 2px; border-radius: 6px; }

.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(43,26,18,.45);
  /* apertura "a tendina": il pannello scende dall'header */
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .55s var(--ease-inout), visibility 0s linear .55s;
}
.mega-open .mega { clip-path: inset(0 0 -60px 0); visibility: visible; transition: clip-path .6s var(--ease-inout), visibility 0s; }
.mega__inner { display: grid; grid-template-columns: 1fr 280px; gap: 40px; padding-top: 36px; padding-bottom: 40px; }
.mega__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 36px; }
.mega__col { opacity: 0; transform: translateY(-8px); transition: opacity .4s, transform .5s var(--ease-out); }
.mega-open .mega__col { opacity: 1; transform: none; transition-delay: calc(.12s + var(--i, 0) * 40ms); }
.mega__col:nth-child(2) { --i: 1; } .mega__col:nth-child(3) { --i: 2; } .mega__col:nth-child(4) { --i: 3; } .mega__col:nth-child(5) { --i: 4; } .mega__col:nth-child(6) { --i: 5; }
.mega__title {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--brown); text-decoration: none;
}
.mega__title::before { content: ""; width: 20px; height: 8px; background: repeating-linear-gradient(-60deg, var(--yellow) 0 3px, transparent 3px 6px); }
.mega ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega ul a { display: block; padding: 5px 0; font-size: 14.5px; line-height: 1.4; color: var(--text); text-decoration: none; transition: color .2s, transform .3s var(--ease-out); }
.mega ul a:hover { color: var(--brown); transform: translateX(4px); }
.tag { font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--yellow); color: var(--brown-ink); padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.mega__feature { position: relative; display: block; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: #fff; min-height: 300px; }
.mega__img { position: absolute; inset: 0; }
.mega__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.mega__feature:hover img { transform: scale(1.05); }
.mega__feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(43,26,18,.88), transparent 65%); }
.mega__ftxt { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; display: grid; gap: 4px; }
.mega__ftxt small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--yellow-soft); }
.mega__ftxt b { font-size: 19px; line-height: 1.25; }
.mega__ftxt span { font-size: 14px; font-weight: 600; color: var(--yellow-soft); margin-top: 6px; }
@media (max-width: 1240px) { .mega__inner { grid-template-columns: 1fr; } .mega__feature { display: none; } }
@media (max-width: 1080px) { .mega { display: none; } }

/* ---------- Drawer mobile ---------- */
.drawer {
  position: fixed; inset: var(--header-h) 0 0; z-index: 49; background: #fff; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: space-between;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .5s var(--ease-inout), visibility 0s linear .5s;
}
.drawer-open .drawer { clip-path: inset(0); visibility: visible; transition: clip-path .55s var(--ease-inout), visibility 0s; }
.drawer-open { overflow: hidden; }
.drawer__nav { padding: 12px var(--gutter); display: grid; }
.drawer__nav > a, .drawer__acc > summary {
  display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line);
  font-size: 18px; font-weight: 500; color: var(--brown-ink); text-decoration: none; cursor: pointer; list-style: none;
}
.drawer summary::-webkit-details-marker { display: none; }
.drawer__acc > summary::after, .drawer__sub > summary::after { content: "+"; font-size: 22px; color: var(--brown); transition: transform .3s; }
.drawer__acc[open] > summary::after, .drawer__sub[open] > summary::after { transform: rotate(45deg); }
.drawer__acc { border-bottom: 1px solid var(--line); }
.drawer__acc > summary { border-bottom: 0; }
.drawer__sub { margin-left: 4px; }
.drawer__sub > summary { display: flex; justify-content: space-between; padding: 12px 0; font-size: 15px; font-weight: 600; color: var(--brown); cursor: pointer; list-style: none; }
.drawer__sub ul { list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; border-left: 2px solid var(--yellow); }
.drawer__sub ul a { display: block; padding: 8px 0; font-size: 15px; color: var(--text); text-decoration: none; }
.drawer__foot { padding: 20px var(--gutter) 28px; display: grid; gap: 10px; background: var(--cream); }
.drawer__foot .btn { font-size: 14px; }
@media (min-width: 1081px) { .drawer { display: none; } }
.burger span { transition: transform .35s var(--ease-out), opacity .2s; }
.drawer-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.drawer-open .burger span:nth-child(2) { opacity: 0; }
.drawer-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.drawer-open .demo, .drawer-open .wa { display: none; }

/* ---------- Uscita pagina: la stessa intro al contrario ---------- */
.intro.is-closing, .intro.is-closing * { animation-delay: 0s !important; animation-duration: .7s !important; animation-direction: reverse !important; animation-fill-mode: both !important; }
.intro.is-closing .intro__badge { animation: none !important; opacity: 0; }
.mega ul a[aria-current] { color: var(--brown); font-weight: 600; }
