/* GM Scrap - stile del sito
   Direzione: registro di pesa. Titoli stretti da segnaletica, righe invece di riquadri,
   lastre in RAL 6026 (#02695b, resa a schermo) per dati e chiusura, grigi intonati al verde, raggio unico di 4px.
   Chiaro/scuro automatico. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f3f5f4;
  --bg-tint: #e7ecea;
  --surface: #fbfcfb;
  --ink: #141a18;
  --muted: #4b5552;
  --line: #d2d9d6;
  --field: #727c79;
  --accent: #02695b;
  --accent-ink: #fbfcfb;
  --accent-soft: rgb(2 105 91 / .12);
  --error: #b42318;
  --logo: #02695b;
  --scrim: rgb(12 18 16 / .82);
  --shadow: 0 1px 0 rgb(20 26 24 / .04), 0 14px 32px -18px rgb(20 26 24 / .28);
  --display: "Barlow Condensed", "Arial Narrow", "Geist", sans-serif;
  --r: 4px;
  --wrap: 1240px;
  --gut: clamp(1rem, 4vw, 2rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --bar: 0px;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* RAL 6026 su fondo scuro non si leggerebbe: come accento si usa una sua tinta chiara */
    --bg: #101514;
    --bg-tint: #161c1a;
    --surface: #1b2220;
    --ink: #eaeeec;
    --muted: #a8b2af;
    --line: #2b3432;
    --field: #7d8885;
    --accent: #5cc4b2;
    --accent-ink: #0f1513;
    --accent-soft: rgb(92 196 178 / .14);
    --error: #ff9b8d;
    --logo: #5cc4b2;
    --shadow: 0 1px 0 rgb(255 255 255 / .03), 0 14px 32px -18px rgb(0 0 0 / .7);
  }
}

/* Monitor grandi: tutte le misure in rem crescono insieme e la pagina si allarga un po' */
@media (min-width: 1800px) {
  html { font-size: 106.25%; }
  :root { --wrap: 1320px; }
}

/* Lastra in RAL 6026: stessi nomi di colore, valori fissi in entrambi i temi */
.on-ink {
  color-scheme: dark;
  --bg: #02695b;
  --bg-tint: #0a7366;
  --surface: #02574c;
  --ink: #ffffff;
  --muted: #f1f8f6;
  --line: #2c8377;
  --field: #8fc4ba;
  --accent: #d6f2ea;
  --accent-ink: #0f1513;
  --accent-soft: rgb(214 242 234 / .18);
  --error: #ffd0c8;
  --logo: #f5f8f7;
  --shadow: none;
  background: var(--bg);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--accent-ink); }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; scroll-padding-bottom: calc(var(--bar) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--bar);
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
a, button, label, select { touch-action: manipulation; }
address { font-style: normal; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nowrap { white-space: nowrap; }

.ic { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--bg); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3rem; padding: .7rem 1.35rem; white-space: nowrap;
  font-family: inherit; font-size: 1.0625rem; font-weight: 600; line-height: 1; text-decoration: none; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent); border-radius: var(--r);
  transition: transform .2s var(--ease), filter .2s, background-color .2s, color .2s;
}
.btn .ic { transition: transform .25s var(--ease); }
@media (hover: hover) {
  .btn:hover { filter: brightness(1.08); }
  .btn:hover .ic { transform: translateX(3px); }
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
@media (hover: hover) { .btn--ghost:hover { background: var(--ink); color: var(--bg); filter: none; } }
.btn--sm { min-height: 2.5rem; padding: .5rem 1rem; font-size: 1rem; }

/* ---------- Navigazione ---------- */
.nav { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; }
.brand { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; }
.brand__mark { height: 3.25rem; width: calc(3.25rem * 4.183); flex: none; color: var(--logo); }
.nav__links { display: flex; align-items: center; gap: 1.5rem; font-size: 1rem; font-weight: 500; }
.nav__links a:not(.btn) { padding-block: .6rem; text-decoration: none; color: var(--muted); transition: color .2s; }
@media (hover: hover) { .nav__links a:not(.btn):hover { color: var(--ink); } }
.nav__links a.nav__tel { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.nav__links a[aria-current]:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav__bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.nav__toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); width: 2.75rem; height: 2.75rem; border-radius: var(--r); cursor: pointer; place-items: center; }
.nav__toggle .ic { width: 1.4rem; height: 1.4rem; }
.nav__toggle .i-close { display: none; }
.nav__toggle[aria-expanded="true"] .i-open { display: none; }
.nav__toggle[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 1000px) {
  .nav__toggle { display: grid; }
  .nav__links {
    position: absolute; inset: 4rem 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem var(--gut) 1.25rem;
    /* Telefono in orizzontale: il menu è più alto dello schermo e deve poter scorrere */
    max-height: calc(100vh - 4rem); max-height: calc(100dvh - 4rem); overflow-y: auto; overscroll-behavior: contain;
    transform-origin: top; transform: scaleY(.96); opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity .2s, transform .25s var(--ease), visibility .2s;
  }
  .nav__links.open { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
  .nav__links a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.125rem; }
  .nav__cta { margin-top: 1rem; min-height: 3rem; }
}

/* Barra contatti fissa, solo su telefono */
.callbar { display: none; }
@media (max-width: 640px) {
  :root { --bar: 4.25rem; }
  .callbar {
    position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem;
    padding: .625rem var(--gut); padding-bottom: max(.625rem, env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line);
  }
  .callbar .btn { padding-inline: .85rem; font-size: 1rem; }
  /* Le pagine legali e la 404 non hanno la barra: niente striscia chiara sotto il footer */
  body:not(:has(.callbar)) { padding-bottom: 0; }
}
@media (max-width: 360px) {
  .callbar .btn { padding-inline: .6rem; font-size: .9375rem; }
}

/* ---------- Hero: la foto arriva al bordo dello schermo ---------- */
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; padding-left: max(var(--gut), calc((100% - var(--wrap)) / 2 + var(--gut))); }
.hero__copy { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.hero__title { font-family: var(--display); font-size: clamp(3rem, 6vw, 5.75rem); line-height: .96; letter-spacing: -.012em; font-weight: 700; }
.hero__title span { display: block; }
.hero__title2 { color: var(--accent); }
/* Riga piccola dentro l'H1: dice a Google cosa e dove, senza cambiare il titolo grande */
.hero__title .hero__where { font-family: "Geist", sans-serif; font-size: clamp(.95rem, 1.2vw, 1.05rem); line-height: 1.3; letter-spacing: .02em; font-weight: 600; color: var(--muted); margin-bottom: .9rem; animation: none; }
.hero__sub { margin-top: 1.5rem; max-width: 32rem; font-size: 1.3125rem; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.hero__cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__place { margin-top: 1.5rem; display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 500; color: var(--muted); }
.hero__place .ic { color: var(--accent); }
.hero__media { align-self: stretch; min-height: min(76vh, 46rem); overflow: hidden; background: var(--bg-tint); }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 0; padding-left: 0; }
  .hero__copy { padding: 2rem var(--gut); }
  .hero__title { font-size: clamp(2.875rem, 14.2vw, 4.5rem); }
  .hero__media { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
  .hero__media img { object-position: 50% 50%; }
}

/* ---------- Fatti ---------- */
.facts__grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1fr; }
.fact { padding: 2rem 1.5rem; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: .35rem; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact__big { font-family: var(--display); font-size: clamp(3.25rem, 5.4vw, 4.75rem); line-height: .95; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fact__title { font-weight: 650; font-size: 1.1875rem; line-height: 1.3; }
.fact__txt { color: var(--muted); font-size: 1rem; font-weight: 450; line-height: 1.45; }
.fact--lead .fact__txt { margin-top: .5rem; }

/* Il punto sotto il mouse si accende: fondo più scuro, riga che si traccia, testo al massimo; gli altri si attenuano */
@media (hover: hover) {
  .fact { position: relative; isolation: isolate; transition: opacity .25s; }
  .fact::before, .fact::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
  .fact::before { background: var(--surface); opacity: 0; transition: opacity .25s; }
  .fact::after { bottom: auto; height: 3px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
  .fact:first-child::before, .fact:first-child::after { left: calc(var(--gut) * -1); }
  .fact__txt { transition: color .25s; }
  .fact:hover::before { opacity: 1; }
  .fact:hover::after { transform: none; }
  .fact:hover .fact__txt { color: var(--ink); }
  .facts__grid:hover .fact:not(:hover) { opacity: .72; }
}

@media (max-width: 1000px) {
  .facts__grid { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .fact:nth-child(3)::before, .fact:nth-child(3)::after { left: calc(var(--gut) * -1); }
}
@media (max-width: 560px) {
  .facts__grid { grid-template-columns: minmax(0, 1fr); }
  .fact, .fact:first-child, .fact:nth-child(3) { border-left: 0; padding: 1.25rem 0; border-top: 1px solid var(--line); }
  .fact:first-child { border-top: 0; }
}

/* ---------- Sezioni ---------- */
.sec { padding-block: clamp(4rem, 8vw, 6.5rem); }
.sec--tint { background: var(--bg-tint); }
.sec__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem clamp(1.5rem, 4vw, 3rem); align-items: end; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.sec__head h2:only-child { grid-column: 1 / -1; }
.sec__head p { color: var(--muted); max-width: 40rem; text-wrap: pretty; }
h1, h2 { font-family: var(--display); }
h2 { font-size: clamp(2.5rem, 5.2vw, 4.25rem); line-height: .98; letter-spacing: -.01em; font-weight: 700; text-wrap: balance; }
h3 { font-size: 1.625rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; }

@media (max-width: 860px) { .sec__head { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Materiali: un solo registro, gruppo a sinistra e righe con il codice a destra ---------- */
.mat-group, .excluded { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1rem clamp(1.5rem, 4vw, 3rem); padding-top: 1.25rem; border-top: 2px solid var(--ink); }
.mat-group { padding-bottom: clamp(2rem, 4vw, 3rem); }
.mat-group__head p { margin-top: .4rem; color: var(--muted); max-width: 26rem; text-wrap: pretty; }
.mats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 3vw, 2.5rem); align-content: start; }
.mats li { display: flex; flex-direction: column; padding-block: .7rem; border-bottom: 1px solid var(--line); font-weight: 550; line-height: 1.35; }
.eer { font-size: 1rem; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.note { margin-top: 2rem; font-size: 1rem; color: var(--muted); max-width: 48rem; }
.note a { color: var(--ink); text-underline-offset: 2px; }

.excluded__head { display: flex; gap: .85rem; align-items: flex-start; }
.excluded__head .ic { width: 1.75rem; height: 1.75rem; color: var(--accent); margin-top: .1rem; }
.excluded__head p { margin-top: .35rem; color: var(--muted); font-size: 1rem; }
.excluded ul { columns: 2; column-gap: clamp(1.5rem, 3vw, 2.5rem); }
.excluded li { break-inside: avoid; padding-block: .6rem; border-bottom: 1px solid var(--line); font-weight: 550; line-height: 1.35; }

@media (max-width: 860px) {
  .mat-group, .excluded { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .mats { grid-template-columns: minmax(0, 1fr); }
  .excluded ul { columns: 1; }
}

/* ---------- Impianto: foto larga, il testo la aggancia dal basso ---------- */
.plant { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); padding-bottom: 0; }
.plant__img { grid-column: 1 / -1; aspect-ratio: 2 / 1; overflow: hidden; border-radius: var(--r); background: var(--bg-tint); }
/* Il blocco ha le proporzioni della foto: le etichette restano sul punto giusto a ogni larghezza e si muovono con lei */
.plant__img { position: relative; }
.plant__volo { position: absolute; left: 0; top: -5%; width: 100%; aspect-ratio: 1360 / 907; }
.plant__volo img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; transform: scale(calc(1 / var(--scala, 1))); }
.tag { font-size: 1rem; font-weight: 600; line-height: 1; color: #fff; white-space: nowrap; }
.tag span { position: absolute; left: 0; bottom: 26px; transform: translate(var(--tx, -50%), var(--ty, 0px)); padding: .45rem .65rem; background: #02695b; border-radius: var(--r); box-shadow: 0 2px 10px rgb(12 18 16 / .35); }
.tag span::after { content: ""; position: absolute; left: calc(50% - 1px); top: 100%; width: 2px; height: 20px; background: #fff; }
/* Il pallino è il punto esatto, la riga lo collega al cartellino */
.tag::before { content: ""; position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #02695b; border: 2px solid #fff; box-shadow: 0 1px 4px rgb(12 18 16 / .45); }
.plant__card { grid-column: 6 / -1; grid-row: 2; z-index: 1; margin-top: clamp(-7rem, -8vw, -3rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.5rem, 3vw, 2.5rem); box-shadow: var(--shadow); }
.plant__card h2 { font-size: clamp(2.25rem, 4vw, 3.5rem); }
.plant__card p { margin-top: 1rem; color: var(--muted); text-wrap: pretty; }
.plant__stat { grid-column: 1 / 6; grid-row: 2; align-self: end; padding-right: 1.5rem; }
.plant__big { font-family: var(--display); font-size: clamp(3.25rem, 5.4vw, 4.75rem); line-height: .95; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.plant__stat p:last-child { margin-top: .5rem; color: var(--muted); }

@media (max-width: 860px) {
  .plant { display: block; }
  .plant__img { aspect-ratio: 3 / 2; }
  .plant__volo { top: 0; }
  .tag { font-size: .9375rem; }
  .plant__card { margin: -2rem .75rem 0; position: relative; }
  .plant__stat { margin-top: 2rem; padding-right: 0; }
}
@media (max-width: 560px) {
  /* Su telefono il capannone è troppo in alto per un cartellino sopra il punto: va di lato */
  .tag:first-child span { --tx: 0px; left: 14px; bottom: -14px; }
  .tag:first-child span::after { display: none; }
}

/* ---------- Autorizzazioni: un registro, non una pila di riquadri ---------- */
.docs { display: grid; border-top: 2px solid var(--ink); }
.doc { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 2.5fr) minmax(0, 3.5fr); gap: 1rem clamp(1.5rem, 3vw, 2.5rem); align-items: start; padding-block: clamp(1.25rem, 2.5vw, 1.75rem); border-bottom: 1px solid var(--line); }
.doc p { margin-top: .4rem; color: var(--muted); font-size: 1.0625rem; max-width: 40rem; }
.doc__valid { font-size: 1rem; color: var(--muted); }
.doc .doc__valid { margin-top: 0; }
.doc__valid strong { display: block; color: var(--ink); font-size: 1.375rem; line-height: 1.3; font-weight: 650; font-variant-numeric: tabular-nums; }
.doc__files { display: grid; gap: .25rem; font-size: 1rem; margin-top: -.5rem; }
.doc__files a { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; font-weight: 600; text-underline-offset: 3px; }
.doc__files .ic { color: var(--accent); }
.doc__files small { font-weight: 400; color: var(--muted); white-space: nowrap; }

@media (max-width: 860px) {
  .doc { grid-template-columns: minmax(0, 1fr); }
  .doc__files { margin-top: 0; }
}

/* ---------- Contatti ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact__info { position: sticky; top: 6rem; }
.contact__info > p { margin-top: 1rem; color: var(--muted); max-width: 28rem; }
.contact__list { margin-top: 1.75rem; display: grid; gap: .25rem; }
.contact__list li { display: flex; gap: .85rem; align-items: center; min-height: 2.75rem; font-size: clamp(1.1875rem, 1.6vw, 1.375rem); line-height: 1.3; }
.contact__list .ic { width: 1.5rem; height: 1.5rem; color: var(--accent); }
.contact__list a { display: inline-block; padding-block: .45rem; font-weight: 550; text-decoration-color: var(--field); text-underline-offset: 4px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .contact__list a:hover { text-decoration-color: var(--accent); } }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.25rem, 3.5vw, 2.25rem); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.field--wide, .form__foot { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 1rem; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); padding: .8rem .9rem; min-height: 3rem;
  border: 1px solid var(--field); border-radius: var(--r); transition: border-color .2s, box-shadow .2s;
}
.field input, .field textarea { caret-color: var(--accent); }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%, var(--ink) calc(50% + 1.5px), transparent calc(50% + 1.5px)), linear-gradient(-45deg, transparent 50%, var(--ink) 50%, var(--ink) calc(50% + 1.5px), transparent calc(50% + 1.5px));
  background-size: .5rem .5rem; background-repeat: no-repeat;
  background-position: right 1.35rem center, right .9rem center;
}
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid transparent; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.help { font-size: .9375rem; color: var(--muted); }
.err { font-size: .9375rem; font-weight: 500; color: var(--error); }
.err:empty { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__legal { grid-column: 1 / -1; font-size: .9375rem; color: var(--muted); }
.form__legal a { color: var(--ink); text-underline-offset: 2px; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.status { font-weight: 500; color: var(--muted); }
.status:empty { display: none; }
.status.is-ok { color: var(--ink); }
.status.is-err { color: var(--error); }
.form__nojs { grid-column: 1 / -1; font-size: 1rem; font-weight: 500; color: var(--error); }

@media (max-width: 860px) {
  .contact { grid-template-columns: minmax(0, 1fr); }
  .contact__info { position: static; }
}
@media (max-width: 560px) { .form { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding-top: clamp(3rem, 6vw, 4.5rem); }
.foot__grid { display: grid; grid-template-columns: 1.3fr .8fr 1.6fr; gap: 2.5rem; }
.foot__txt { margin-top: 1rem; color: var(--muted); max-width: 22rem; font-size: 1rem; }
.foot__nav { display: grid; gap: .1rem; font-size: 1rem; }
.foot__nav a { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; color: var(--muted); }
@media (hover: hover) { .foot__nav a:hover { color: var(--ink); } }
.foot__legal { display: grid; gap: 1rem; font-size: 1rem; color: var(--muted); align-content: start; }
.foot__legal strong { color: var(--ink); }
.foot__legal a { display: inline-block; padding-block: .35rem; text-underline-offset: 2px; overflow-wrap: anywhere; }
.foot__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1.5rem; margin-top: 2.5rem; padding-block: 1rem; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }
.foot__links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.foot__links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--muted); text-underline-offset: 3px; }
@media (hover: hover) { .foot__links a:hover { color: var(--ink); } }

@media (max-width: 860px) { .foot__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pagine legali e 404 ---------- */
.legal-top { border-bottom: 1px solid var(--line); }
.legal-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.legal-top .wrap > a:last-child { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1rem; font-weight: 500; text-underline-offset: 3px; }
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); max-width: 50rem; }
.legal h1 { font-size: clamp(2.75rem, 5.5vw, 4rem); line-height: 1; letter-spacing: -.01em; }
.legal h2 { font-family: inherit; font-size: 1.5rem; letter-spacing: -.02em; line-height: 1.25; margin-top: 2.25rem; }
.legal p, .legal ul, .legal table { margin-top: .85rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; }
.legal li + li { margin-top: .5rem; }
.legal a { text-underline-offset: 2px; overflow-wrap: anywhere; }
.legal__date { color: var(--muted); font-size: 1rem; }
.legal__box { margin-top: 1.5rem; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.legal__box p { margin-top: 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: .65rem .75rem .65rem 0; border-bottom: 1px solid var(--line); }
.legal__actions { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.legal .btn { text-decoration: none; }

@media (max-width: 560px) {
  .legal thead { position: absolute; left: -9999px; }
  .legal tr { display: block; padding-block: .5rem; border-bottom: 1px solid var(--line); }
  .legal td { display: block; padding: .25rem 0; border: 0; }
  .legal td::before { content: attr(data-th); display: block; font-size: .9375rem; font-weight: 600; color: var(--muted); }
}

/* ---------- Movimento: la foto dell'hero che si apre, il titolo che sale, il registro che si compila ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__media { animation: apri 1.1s var(--ease) both; }
  .hero__title span { animation: sale .9s var(--ease) both; }
  .hero__title .hero__title2 { animation-delay: .14s; }
  .hero__sub, .hero__cta, .hero__place { animation: entra .7s var(--ease) both; animation-delay: .36s; }
  .hero__cta { animation-delay: .44s; }
  .hero__place { animation-delay: .52s; }

  /* Logo che si disegna (solo nell'intestazione della home, una volta all'apertura):
     anello e linee si tracciano, le frecce ruotano attorno al centro dell'anello, poi entra la scritta */
  .brand__mark--disegna .logo__cerchio, .brand__mark--disegna .logo__linee { stroke-dasharray: 1; animation: traccia .9s cubic-bezier(.45, 0, .55, 1) .2s both; }
  .brand__mark--disegna .logo__linee { animation-duration: 1s; animation-delay: .3s; }
  .brand__mark--disegna .logo__freccia { transform-box: view-box; transform-origin: 598px 392px; animation: gira .8s cubic-bezier(.215, .61, .355, 1) .7s both; }
  .brand__mark--disegna .logo__freccia--2 { animation-delay: .8s; }
  .brand__mark--disegna .logo__scritta { animation: scorre .7s cubic-bezier(.215, .61, .355, 1) 1.05s both; }

  .js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
  .js .reveal.in { opacity: 1; transform: none; }

  /* Registro dei materiali: la riga si traccia, poi le voci una alla volta (--i viene da main.js) */
  .js .mat-group.reveal, .js .excluded.reveal { position: relative; opacity: 1; transform: none; border-top-color: transparent; }
  .js .mat-group::before, .js .excluded::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease); }
  .js .reveal.in::before { transform: none; }
  .js .mat-group__head, .js .excluded__head { opacity: 0; transition: opacity .6s .15s; }
  .js .reveal.in .mat-group__head, .js .reveal.in .excluded__head { opacity: 1; }
  .js .mats li, .js .excluded li { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i, 0) * 45ms + .2s); }
  .js .reveal.in .mats li, .js .excluded.in li { opacity: 1; transform: none; }

  /* Impianto: volo di drone legato allo scorrimento (--volo va da 0 a 1, viene da main.js; senza script resta a 1) */
  .plant__volo {
    --scala: calc(1.24 - .2 * var(--volo, 1));
    transform: scale(var(--scala)) translate(calc(-6% + 7.5% * var(--volo, 1)), calc(4% - 5.5% * var(--volo, 1)));
    will-change: transform;
  }
  /* Le etichette sfumano e salgono una dopo l'altra, con partenza e arrivo morbidi (--da è il punto di partenza) */
  .tag {
    --o: clamp(0, calc((var(--volo, 1) - var(--da)) * 6), 1);
    --f: calc(var(--o) * var(--o) * (3 - 2 * var(--o)));
    --ty: calc((1 - var(--f)) * 12px);
    opacity: var(--f);
  }
  /* Il riquadro rallenta avvicinandosi al suo posto */
  .js .plant__card.reveal {
    --resto: calc(1 - min(1, var(--volo, 1) * 2));
    opacity: 1; transform: translateY(calc(var(--resto) * var(--resto) * 70px)); transition: none;
  }
}
@keyframes sale { from { transform: translateY(.55em); clip-path: inset(0 0 100% 0); } to { transform: none; clip-path: inset(-10% 0 -15% 0); } }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes apri { from { clip-path: inset(0 0 0 14%); } to { clip-path: inset(0); } }
@keyframes traccia { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes gira { from { opacity: 0; transform: rotate(-140deg); } to { opacity: 1; transform: none; } }
@keyframes scorre { from { opacity: 0; transform: translateX(-80px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (forced-colors: active) {
  .btn { border: 1px solid ButtonText; }
  .field select { appearance: auto; -webkit-appearance: auto; background-image: none; }
  .field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid Highlight; }
}

@media print {
  .nav, .callbar, .form, .skip { display: none !important; }
  .js .reveal, .js .mats li, .js .excluded li, .js .mat-group__head, .js .excluded__head { opacity: 1 !important; transform: none !important; }
  .js .mat-group::before, .js .excluded::before { transform: none !important; }
  *, *::before, *::after { animation: none !important; }
  .nav__bar { display: none; }
  body { padding-bottom: 0; }
  .on-ink { color-scheme: light; --bg: #fff; --surface: #fff; --ink: #000; --muted: #333; --line: #999; --accent: #000; --accent-ink: #fff; --logo: #000; }
}
