/* =========================================================
   D'Alesio Trivellazioni — foglio di stile
   Struttura: 1 token · 2 base · 3 layout · 4 componenti · 5 pagine · 6 utilità
   ========================================================= */

/* ---------- 1. Token ---------- */
:root {
  --ink: #1d252b;        /* basalto: testi e fondi scuri */
  --ink-2: #2a353c;
  --steel: #56636b;      /* testi secondari */
  --line: #d3d8d6;       /* filetti */
  --paper: #edf0ee;      /* fondo sezioni alterne */
  --white: #ffffff;
  --accent: #fa7600;     /* arancio del marchio: CTA e marcatori */
  --accent-hover: #ff8c26;
  --accent-ink: #b04f00; /* arancio scuro, leggibile su chiaro */
  --accent-soft: #ffb36b; /* arancio chiaro, leggibile su scuro */

  /* strati della colonna stratigrafica */
  --s1: #cbb27c;  /* sabbie */
  --s2: #a58c64;  /* limi */
  --s3: #7c7162;  /* argille */
  --s4: #5d7b88;  /* acquifero */
  --s5: #48525a;  /* substrato roccioso */

  --f-display: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --f-body: 'Source Sans 3', 'Segoe UI', Roboto, Arial, sans-serif;
  --f-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif; /* solo per dichiarazioni e citazioni */

  /* scala tipografica 1.25 su base 18px */
  --t-sm: .875rem; --t-base: 1.125rem; --t-md: 1.375rem; --t-lg: 1.75rem; --t-xl: 2.25rem; --t-2xl: clamp(2.25rem, 1.4rem + 3.2vw, 3.6rem);

  /* spaziatura su base 8 */
  --sp-1: .5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2rem; --sp-5: 3rem; --sp-6: 4.5rem; --sp-7: 6.5rem;
  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --hdr-h: 4.5rem;
  --radius: 2px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--f-body); font-size: var(--t-base); line-height: 1.6;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--f-display); font-stretch: 106%; font-weight: 650; line-height: 1.12; letter-spacing: -.012em; margin: 0 0 var(--sp-2); text-wrap: balance; }
p { margin: 0 0 var(--sp-2); max-width: 68ch; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
address { font-style: normal; }
ul, ol { padding: 0; margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--ink); }

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sec { padding-block: var(--sp-7); }
.sec--tight { padding-block: var(--sp-5) var(--sp-7); }
.sec--paper { background: var(--paper); }
.sec--ink { background: var(--ink); color: #e9ecea; }
.sec--ink .h2 { color: var(--white); }
.sec__head { margin-bottom: var(--sp-5); max-width: 44rem; }
.sec__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.sec__lead { font-size: var(--t-md); line-height: 1.5; color: var(--steel); }
.split { display: grid; gap: var(--sp-5); align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 7fr; gap: var(--sp-6); }
  .split--media { grid-template-columns: 5fr 6fr; }
}
.split__media { margin: 0; }
.split__media .ph { width: 100%; object-fit: cover; }
.cols3 { display: grid; gap: var(--sp-4); }
@media (min-width: 860px) { .cols3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- 4. Componenti ---------- */
.h2 { font-size: var(--t-xl); }
.h3 { font-size: var(--t-lg); }
.h4 { font-size: var(--t-md); }
.muted { color: var(--steel); font-size: var(--t-sm); }
.sec--ink .muted { color: #b9c1c4; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Pulsanti */
.btn { white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 3rem; padding: .7rem 1.4rem; border: 2px solid transparent; border-radius: var(--radius);
  font-family: var(--f-display); font-stretch: 105%; font-weight: 650; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
.btn--accent { background: var(--accent); color: var(--ink); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--ghost-light { border-color: rgba(255,255,255,.55); color: var(--white); }
.btn--ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--white); }
.btn--sm { min-height: 2.5rem; padding: .45rem 1rem; font-size: .9375rem; }
.btn--lg { min-height: 3.5rem; padding-inline: 2rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link-arrow { display: inline-flex; align-items: center; gap: .45em; font-family: var(--f-display); font-stretch: 105%; font-weight: 650; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: .15em; }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow--light { color: var(--white); }

/* Salta al contenuto */
.skip { position: absolute; left: var(--sp-2); top: -4rem; z-index: 100; background: var(--accent); color: var(--ink); padding: .6rem 1rem; font-weight: 700; }
.skip:focus { top: var(--sp-2); }

/* Logo */
.logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); flex: none; }
.logo img { height: 2.9rem; width: auto; }
@media (max-width: 400px) { .logo img { height: 2.2rem; } }
.ftr .logo img { height: 2.75rem; }
.logo__mark { width: 2rem; height: 2rem; flex: none; }
.logo__word { font-family: var(--f-display); font-stretch: 118%; font-weight: 800; font-size: 1.15rem; line-height: 1; letter-spacing: -.01em; display: flex; flex-direction: column; }
.logo__word span { font-weight: 500; font-stretch: 100%; font-size: .78rem; letter-spacing: .04em; color: var(--steel); margin-top: .2rem; }
.logo--light { color: var(--white); }
.logo--light .logo__word span { color: #aab4b8; }

/* Header */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.hdr__inner { display: flex; align-items: center; gap: var(--sp-3); min-height: var(--hdr-h); }
.hdr__nav { margin-left: auto; display: none; }
.hdr__nav ul { list-style: none; display: flex; gap: .25rem; }
.hdr__nav a { display: block; padding: .5rem .8rem; text-decoration: none; font-family: var(--f-display); font-stretch: 105%; font-weight: 600; font-size: 1rem; border-bottom: 2px solid transparent; }
.hdr__nav a:hover { border-bottom-color: var(--line); }
.hdr__nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.hdr__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.hdr__phone { display: none; align-items: center; gap: .4rem; text-decoration: none; font-weight: 600; white-space: nowrap; }
.hdr__toggle { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); cursor: pointer; }
.hdr__toggle .icon--close { display: none; }
.hdr__toggle[aria-expanded="true"] .icon--open { display: none; }
.hdr__toggle[aria-expanded="true"] .icon--close { display: block; }
.hdr__actions .btn { display: none; }
@media (min-width: 560px) { .hdr__actions .btn { display: inline-flex; } }
@media (min-width: 1080px) {
  .hdr__nav { display: block; }
  .hdr__actions { margin-left: 0; }
  .hdr__toggle { display: none; }
}
@media (min-width: 1360px) { .hdr__phone { display: inline-flex; } }
@media (min-width: 1080px) and (max-width: 1200px) { .hdr__nav a { padding-inline: .55rem; font-size: .9375rem; } }

/* Menu mobile */
.mmenu { position: fixed; inset: var(--hdr-h) 0 0 0; background: var(--white); overflow-y: auto; padding: var(--sp-3) var(--gutter) calc(var(--sp-6) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.mmenu[hidden] { display: none; }
.mmenu__list { list-style: none; }
.mmenu__list a { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); font-family: var(--f-display); font-stretch: 110%; font-weight: 700; font-size: var(--t-lg); text-decoration: none; }
.mmenu__list a[aria-current="page"] { color: var(--accent-ink); }
.mmenu__label { margin: var(--sp-4) 0 var(--sp-1); color: var(--steel); font-size: var(--t-sm); font-weight: 600; }
.mmenu__sub { list-style: none; }
.mmenu__sub a { display: block; padding: .6rem 0; text-decoration: none; font-size: 1.0625rem; }
.mmenu__contact { margin-top: var(--sp-4); display: grid; gap: var(--sp-2); }
.mmenu__contact a { display: flex; align-items: center; gap: .6rem; font-weight: 600; text-decoration: none; padding: .8rem 1rem; background: var(--paper); }
body.menu-open { overflow: hidden; }
@media (min-width: 1080px) { .mmenu { display: none !important; } }

/* Barra contatti fissa su smartphone */
.mbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 2fr; background: var(--ink); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -1px 0 rgba(255,255,255,.08); }
.mbar a { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.5rem; color: var(--white); text-decoration: none; font-family: var(--f-display); font-weight: 650; }
.mbar .mbar__main { background: var(--accent); color: var(--ink); }
body { padding-bottom: 3.5rem; }
@media (min-width: 760px) { .mbar { display: none; } body { padding-bottom: 0; } }

/* Percorso */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .5rem; font-size: var(--t-sm); color: var(--steel); margin-bottom: var(--sp-3); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--line); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Immagini */
.ph { width: 100%; height: auto; object-fit: cover; background: #cfd5d3; color: transparent; }

/* Elenchi con marcatore */
.ticks { list-style: none; display: grid; gap: .4rem; margin-bottom: var(--sp-3); }
.ticks li { position: relative; padding-left: 1.4rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .62em; width: .7rem; height: 2px; background: var(--accent-ink); }
.ticks--cols { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .6rem var(--sp-4); }

/* Specifiche (lista termine/descrizione) */
.specs { margin: 0 0 var(--sp-3); border-top: 2px solid var(--ink); }
.specs__row { display: grid; gap: .25rem var(--sp-4); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.specs dt { font-family: var(--f-display); font-stretch: 105%; font-weight: 650; }
.specs dd { margin: 0; color: var(--steel); }
@media (min-width: 720px) { .specs__row { grid-template-columns: 16rem 1fr; } }
.specs--compact dt { font-family: var(--f-body); font-weight: 600; }

/* Segnaposto dati mancanti — da eliminare compilando i file content/ e site.config.ts */
.todo { background: repeating-linear-gradient(-45deg, #fff6dc 0 8px, #ffefc2 8px 16px); color: #5d4200; border: 1px dashed #b9861b; padding: .05em .35em; font-size: .875em; font-family: var(--f-body); font-weight: 600; }
.todo--block { display: block; padding: .8rem 1rem; max-width: none; margin: var(--sp-3) 0; }
.sec--ink .todo, .ftr .todo { color: #5d4200; }

/* Fascia CTA */
.cta-band { background: var(--ink-2); color: var(--white); padding-block: var(--sp-6); border-top: 6px solid var(--accent); }
.cta-band__inner { display: grid; gap: var(--sp-4); align-items: center; }
@media (min-width: 900px) { .cta-band__inner { grid-template-columns: 1.3fr 1fr; } }
.cta-band__title { font-size: var(--t-xl); color: var(--white); }
.cta-band__text { color: #c7cfd2; font-size: var(--t-md); line-height: 1.5; }
.cta-band__actions { display: grid; gap: var(--sp-2); justify-items: start; }
.cta-band__line { display: inline-flex; align-items: center; gap: .6rem; color: var(--white); text-decoration: none; font-weight: 600; font-size: var(--t-md); }
.cta-band__line:hover span { text-decoration: underline; }

/* Footer */
.ftr { background: var(--ink); color: #c3cbce; padding-top: var(--sp-6); font-size: 1rem; }
.ftr a { color: #e9ecea; }
.ftr__grid { display: grid; gap: var(--sp-4); padding-bottom: var(--sp-5); }
@media (min-width: 720px) { .ftr__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .ftr__grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; } }
.ftr__brand p { margin-top: var(--sp-2); max-width: 30ch; }
.ftr__creds { font-size: var(--t-sm); color: #9aa6ab; }
.ftr__h { font-size: 1rem; color: var(--white); font-stretch: 105%; margin-bottom: var(--sp-2); }
.ftr ul { list-style: none; display: grid; gap: .45rem; }
.ftr ul a { text-decoration: none; }
.ftr ul a:hover { text-decoration: underline; }
.ftr__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-1) var(--sp-3); padding-block: var(--sp-3); border-top: 1px solid rgba(255,255,255,.12); font-size: var(--t-sm); }
.ftr__legal p { margin: 0; }

/* ---------- 5. Pagine ---------- */

/* Hero home: foto a tutta larghezza, testo in basso a sinistra */
.hero { position: relative; display: grid; align-items: end; min-height: clamp(30rem, calc(100svh - var(--hdr-h) - 3.5rem), 46rem); color: var(--white); background: var(--ink); isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media .ph { width: 100%; height: 100%; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,26,30,.15) 0%, rgba(20,26,30,.35) 45%, rgba(20,26,30,.88) 100%); }
.hero__inner { padding-block: var(--sp-7) var(--sp-6); }
.hero__kicker { color: var(--accent-soft); font-weight: 600; font-size: 1rem; margin-bottom: var(--sp-2); letter-spacing: .01em; }
.hero__title { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.4rem); font-stretch: 100%; font-weight: 600; letter-spacing: -.02em; line-height: 1.04; color: var(--white); max-width: 14ch; margin-bottom: var(--sp-3); }
.hero__lead { font-size: var(--t-md); line-height: 1.5; color: #dde3e5; max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }

/* Fascia qualificazioni */
.creds { background: var(--ink); color: #c9d1d4; border-top: 1px solid rgba(255,255,255,.12); }
.creds__list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem var(--sp-3); padding-block: var(--sp-3); font-size: .9375rem; }
.creds__list strong { display: block; color: var(--white); font-family: var(--f-display); font-weight: 650; font-size: 1.0625rem; }
@media (min-width: 760px) { .creds__list { grid-template-columns: repeat(4, auto); justify-content: space-between; } .creds__list strong { display: inline; margin-right: .35rem; } }

/* Presentazione dell'impresa */
.intro__grid { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 960px) { .intro__grid { grid-template-columns: 7fr 5fr; gap: var(--sp-7); } }
.intro__text .h2 { max-width: 18ch; margin-bottom: var(--sp-4); }
.statement { font-family: var(--f-serif); font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); line-height: 1.5; color: var(--ink); max-width: 36ch; margin-bottom: var(--sp-4); }
.intro__quote { margin: 0; display: grid; gap: var(--sp-3); }
.quote { margin: 0; padding-left: var(--sp-3); border-left: 3px solid var(--accent); }
.quote p { font-family: var(--f-serif); font-style: italic; font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); margin: 0; }
.quote__by { padding-left: calc(var(--sp-3) + 3px); font-weight: 600; display: grid; }
.quote__by span { font-weight: 400; color: var(--steel); font-size: var(--t-sm); }
.principles { list-style: none; display: grid; gap: var(--sp-4); margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
@media (min-width: 860px) { .principles { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); } }
.principles__t { font-size: var(--t-md); margin-bottom: .5rem; }
.principles p { color: var(--steel); margin: 0; }

/* Visione */
.vision { position: relative; isolation: isolate; color: var(--white); background: var(--ink); }
.vision__media { position: absolute; inset: 0; z-index: -1; }
.vision__media .ph { width: 100%; height: 100%; }
.vision__media::after { content: ""; position: absolute; inset: 0; background: rgba(22,29,33,.82); }
.vision__inner { padding-block: var(--sp-7); }
.vision__label { font-size: 1rem; font-weight: 600; color: var(--accent-soft); font-stretch: 100%; margin-bottom: var(--sp-3); }
.vision__text { font-family: var(--f-serif); font-size: clamp(1.4rem, 1.1rem + 1.3vw, 2.1rem); line-height: 1.45; max-width: 34ch; margin: 0; color: var(--white); }

/* Generazioni */
.gens { list-style: none; display: grid; gap: var(--sp-4); margin-top: var(--sp-4); }
@media (min-width: 860px) { .gens { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); } }
.gens__item { border-top: 2px solid var(--ink); padding-top: var(--sp-3); }
.gens__label { color: var(--accent-ink); font-weight: 600; font-size: var(--t-sm); margin-bottom: .25rem; }
.gens__name { font-size: var(--t-md); margin-bottom: .25rem; }
.gens__period { color: var(--steel); font-size: var(--t-sm); }

/* Colonna stratigrafica dei servizi (elemento distintivo) */
.log { list-style: none; border-top: 2px solid var(--ink); counter-reset: none; }
.log__row { position: relative; display: grid; grid-template-columns: 2.5rem 1fr; border-bottom: 1px solid var(--line); }
.log__band { background: var(--stratum); position: relative; }
.log__band::after { /* tratteggio da sezione geologica, appena accennato */
  content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(0,0,0,.35) 6px 7px);
}
.log__row:last-child .log__band::after { background-image: repeating-linear-gradient(0deg, transparent 0 10px, rgba(255,255,255,.35) 10px 11px), repeating-linear-gradient(90deg, transparent 0 18px, rgba(255,255,255,.25) 18px 19px); opacity: .5; }
.log__link { display: grid; gap: .35rem var(--sp-4); padding: var(--sp-3) var(--sp-3) var(--sp-3) var(--sp-3); text-decoration: none; color: inherit; transition: background-color .15s; }
.log__link:hover { background: var(--paper); }
.log__name { font-family: var(--f-display); font-stretch: 115%; font-weight: 750; font-size: var(--t-lg); line-height: 1.15; }
.log__summary { color: var(--steel); }
.log__items { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; font-size: var(--t-sm); font-weight: 600; }
.log__items span { position: relative; padding-left: .8rem; }
.log__items span::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; background: var(--stratum, var(--steel)); }
.log__go { display: none; }
@media (min-width: 860px) {
  .log__row { grid-template-columns: 5rem 1fr; }
  .log__link { grid-template-columns: 17rem 1fr 3rem; grid-template-areas: "name sum go" "name items go"; padding-block: var(--sp-4); }
  .log__name { grid-area: name; }
  .log__summary { grid-area: sum; margin: 0; }
  .log__items { grid-area: items; }
  .log__go { grid-area: go; display: flex; align-items: center; justify-content: flex-end; }
  .log__go .icon { width: 1.75rem; height: 1.75rem; transition: transform .15s; }
  .log__link:hover .log__go .icon { transform: translateX(4px); }
}

/* Settori */
.sectors { display: grid; gap: 0; margin: 0; border-top: 2px solid var(--ink); }
@media (min-width: 640px) { .sectors { grid-template-columns: 1fr 1fr; column-gap: var(--sp-4); } }
.sectors__item { padding: var(--sp-3) 0; border-bottom: 1px solid #c8cecb; }
.sectors dt { font-family: var(--f-display); font-stretch: 108%; font-weight: 700; font-size: var(--t-md); margin-bottom: .3rem; }
.sectors dd { margin: 0; color: var(--steel); }

/* Mosaico foto */
.mosaic { display: grid; gap: .5rem; grid-template-columns: 1fr 1fr; }
.mosaic__item { margin: 0; overflow: hidden; background: #cfd5d3; aspect-ratio: 1; }
.mosaic__item .ph { width: 100%; height: 100%; }
.mosaic__item--1 { grid-column: span 2; aspect-ratio: 16 / 10; }
@media (min-width: 960px) {
  .mosaic { grid-template-rows: 15rem 15rem; }
  .mosaic__item { aspect-ratio: auto; }
  .mosaic { grid-template-columns: 2fr 1fr 1fr; }
  .mosaic__item--1 { grid-column: 1; grid-row: 1 / span 2; }
}
@media (max-width: 959px) { .mosaic__item--5 { grid-column: span 2; aspect-ratio: 16 / 9; } }

/* Fasi (sequenza reale: numerazione giustificata) */
.steps { list-style: none; display: grid; gap: var(--sp-4); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps__item { border-top: 2px solid var(--ink); padding-top: var(--sp-3); }
.steps__n { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; background: var(--accent); font-family: var(--f-display); font-weight: 800; margin-bottom: var(--sp-2); }
.steps__t { font-size: var(--t-md); }
.steps p { color: var(--steel); }

/* Testata pagine interne */
.phead { padding-block: var(--sp-5) var(--sp-4); border-bottom: 1px solid var(--line); }
.phead__title { font-size: var(--t-2xl); font-stretch: 115%; max-width: 22ch; }
.phead__lead { font-size: var(--t-md); line-height: 1.5; color: var(--steel); max-width: 52ch; }

/* Testata servizio */
.shead { border-bottom: 1px solid var(--line); position: relative; }
.shead::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--stratum); }
.shead__grid { display: grid; gap: var(--sp-4); padding-block: var(--sp-5); align-items: center; }
@media (min-width: 960px) { .shead__grid { grid-template-columns: 1.1fr 1fr; gap: var(--sp-6); } }
.shead__media { margin: 0; }
.shead .phead__title { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); }

.sbody { display: grid; gap: var(--sp-4); padding-block: var(--sp-6); }
.sbody__main > section + section { margin-top: var(--sp-6); }
.sbody__label { font-size: var(--t-sm); color: var(--steel); font-weight: 600; margin-bottom: var(--sp-1); }
.toc { list-style: none; border-left: 2px solid var(--line); }
.toc a { display: block; padding: .4rem 0 .4rem 1rem; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; font-weight: 600; }
.toc a:hover { border-left-color: var(--accent); }
@media (max-width: 959px) { .sbody__aside { display: none; } }
@media (min-width: 960px) {
  .sbody { grid-template-columns: 14rem 1fr; gap: var(--sp-6); }
  .sbody__aside { position: sticky; top: calc(var(--hdr-h) + var(--sp-4)); align-self: start; }
}

.mini-log { list-style: none; display: grid; gap: 0; border-top: 2px solid var(--ink); margin-top: var(--sp-3); }
@media (min-width: 760px) { .mini-log { grid-template-columns: repeat(2, 1fr); column-gap: var(--sp-4); } }
.mini-log a { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: var(--sp-2) 0 var(--sp-2) var(--sp-2); border-bottom: 1px solid #c8cecb; border-left: 6px solid var(--stratum); text-decoration: none; font-family: var(--f-display); font-stretch: 108%; font-weight: 700; font-size: var(--t-md); }
.mini-log a:hover { background: rgba(255,255,255,.6); }

/* Indice servizi */
.svc-list { list-style: none; display: grid; gap: var(--sp-6); }
.svc { display: grid; gap: var(--sp-3); padding-top: var(--sp-4); border-top: 6px solid var(--stratum); }
@media (min-width: 860px) { .svc { grid-template-columns: 5fr 7fr; gap: var(--sp-5); align-items: start; } }
.svc__title { font-size: var(--t-lg); }
.svc__title a { text-decoration: none; }
.svc__title a:hover { text-decoration: underline; }

/* Galleria */
.gal { display: grid; gap: .5rem; margin-bottom: var(--sp-3); }
.gal--2 { grid-template-columns: 1fr 1fr; }
.gal--masonry { columns: 1; column-gap: .5rem; display: block; }
@media (min-width: 640px) { .gal--masonry { columns: 2; } }
@media (min-width: 1100px) { .gal--masonry { columns: 3; } }
.gal--masonry .gal__item { margin-bottom: .5rem; break-inside: avoid; }
.gal__item { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #cfd5d3; cursor: zoom-in; overflow: hidden; }
.gal__item .ph { transition: transform .3s; min-height: 10rem; }
.gal__item:hover .ph { transform: scale(1.02); }
.gal__item[hidden] { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--sp-3); }
.chip { min-height: 2.75rem; padding: .4rem 1rem; border: 1px solid var(--ink); background: var(--white); cursor: pointer; font-weight: 600; border-radius: var(--radius); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); }

/* Lightbox */
.lb { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(16, 21, 25, .96); color: var(--white); }
.lb::backdrop { background: rgba(16, 21, 25, .9); }
.lb__fig { margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 4rem 1rem 1rem; }
.lb__img { max-width: 100%; max-height: calc(100vh - 8rem); width: auto; height: auto; object-fit: contain; }
.lb__cap { padding: .75rem 1rem; font-size: var(--t-sm); color: #c3cbce; }
.lb__btn { position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.35); color: var(--white); cursor: pointer; border-radius: var(--radius); }
.lb__btn:hover { background: rgba(0,0,0,.6); }
.lb__close { top: 1rem; right: 1rem; }
.lb__prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lb__next { right: 1rem; top: 50%; translate: 0 -50%; }

/* Azienda */
.prose p { max-width: 64ch; }
.prose--narrow { max-width: 46rem; }
.prose .h3 { margin-top: var(--sp-4); }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 1rem; }
.tbl th { text-align: left; font-family: var(--f-display); font-stretch: 105%; padding: .75rem 1rem .75rem 0; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.tbl td { padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); }

/* Certificazioni */
.cert { padding: var(--sp-4) 0; border-top: 2px solid var(--ink); }
.cert__code { font-size: var(--t-lg); font-stretch: 115%; margin-bottom: .25rem; }
.cert--big .cert__code { font-size: var(--t-xl); }
.cert__name { font-weight: 600; color: var(--accent-ink); }
.cert__meta { display: grid; gap: .25rem var(--sp-4); margin: var(--sp-2) 0; font-size: 1rem; }
@media (min-width: 640px) { .cert__meta { grid-template-columns: repeat(3, auto); justify-content: start; } }
.cert__meta dt { color: var(--steel); font-size: var(--t-sm); }
.cert__meta dd { margin: 0; font-weight: 600; }
.cert-grid { display: grid; gap: 0 var(--sp-4); margin-bottom: var(--sp-4); }
@media (min-width: 960px) { .cert-grid { grid-template-columns: repeat(3, 1fr); } .cert-grid .cert__meta { grid-template-columns: 1fr; } }

/* Contatti */
.contact { display: grid; gap: var(--sp-5); }
@media (min-width: 960px) { .contact { grid-template-columns: 5fr 7fr; gap: var(--sp-6); align-items: start; } }
.contact__info { display: grid; gap: var(--sp-3); align-content: start; }
.contact__big { display: flex; align-items: center; gap: var(--sp-2); text-decoration: none; padding: var(--sp-3); background: var(--paper); border-left: 6px solid var(--accent); }
.contact__big:hover { background: #e3e7e5; }
.contact__big .icon { width: 1.75rem; height: 1.75rem; }
.contact__big span { display: grid; font-family: var(--f-display); font-stretch: 105%; font-weight: 700; font-size: clamp(1.1rem, 1rem + .8vw, 1.45rem); word-break: break-word; }
.contact__big small, .contact__addr small { font-family: var(--f-body); font-weight: 400; font-size: var(--t-sm); color: var(--steel); display: block; }
.contact__addr { display: flex; gap: var(--sp-2); padding-inline: var(--sp-3); }
.contact__addr .icon { width: 1.75rem; height: 1.75rem; }
.contact__hours { margin: 0; padding-inline: var(--sp-3); font-weight: 600; }
.contact__hours small { display: block; font-weight: 400; font-size: var(--t-sm); color: var(--steel); }
.contact__map { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 22rem; border: 0; border-radius: 4px; filter: grayscale(.2); }

/* Modulo */
.form { padding: var(--sp-4); border: 1px solid var(--line); border-top: 6px solid var(--ink); background: var(--white); }
@media (max-width: 559px) { .form { padding: var(--sp-3) 0 0; border: 0; border-top: 6px solid var(--ink); } }
.form__note { font-size: var(--t-sm); color: var(--steel); }
.form__grid { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-3); }
@media (min-width: 640px) { .form__grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: 1rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: .7rem .85rem; font: inherit; font-size: 1.0625rem; color: var(--ink);
  background: var(--white); border: 1px solid #8d989e; border-radius: var(--radius);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--accent); outline-offset: 0; border-color: var(--ink); }
.field [aria-invalid="true"] { border-color: #b3261e; border-width: 2px; }
.field__err { color: #b3261e; font-size: var(--t-sm); font-weight: 600; margin: .35rem 0 0; }
.field__hint { font-size: var(--t-sm); color: var(--steel); margin: .35rem 0 0; }
.check { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: var(--sp-3); font-size: 1rem; }
.check input { width: 1.4rem; height: 1.4rem; margin-top: .15rem; flex: none; accent-color: var(--ink); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__status:empty { display: none; }
.form__status { padding: .9rem 1rem; margin-bottom: var(--sp-3); font-weight: 600; border-left: 6px solid; }
.form__status.is-ok { background: #e6f2ea; border-color: #2e7d4f; color: #1d5134; }
.form__status.is-err { background: #fbeaea; border-color: #b3261e; color: #7c1a14; }

/* ---------- 6. Utilità ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .hdr, .mbar, .cta-band, .ftr__grid { display: none; } body { padding: 0; } }

/* ---------- Aggiornamento: fasce fotografiche e colore ---------- */

/* Testate fotografiche delle pagine interne */
.phead--photo { position: relative; isolation: isolate; color: var(--white); background: var(--ink); border-bottom: 0; padding-block: 0; }
.phead--photo .phead__media { position: absolute; inset: 0; z-index: -1; }
.phead--photo .phead__media .ph { width: 100%; height: 100%; }
.phead--photo .phead__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,26,30,.35) 0%, rgba(20,26,30,.82) 100%); }
.phead--photo .phead__inner { min-height: clamp(17rem, 34vw, 25rem); display: flex; flex-direction: column; justify-content: flex-end; padding-block: var(--sp-6) var(--sp-5); }
.phead--photo .phead__title { color: var(--white); }
.phead--photo .phead__lead { color: #dfe5e7; }
.phead--photo .crumbs ol { color: #c9d1d4; }
.phead--photo .crumbs li + li::before { color: rgba(255,255,255,.4); }
.shead { border-bottom: 6px solid var(--stratum); }
.shead::before { content: none; }

/* Introduzione servizio sotto la testata */
.sintro { border-bottom: 1px solid var(--line); }
.sintro__grid { display: grid; gap: var(--sp-4); padding-block: var(--sp-5); align-items: start; }
@media (min-width: 960px) { .sintro__grid { grid-template-columns: 1fr auto; gap: var(--sp-6); } }
.sintro__text p { font-size: var(--t-md); line-height: 1.55; color: var(--ink-2); }
.sintro__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
@media (min-width: 960px) { .sintro__actions { flex-direction: column; align-items: stretch; } }

/* Fascia fotografica a tutta larghezza (effetto parallasse su desktop) */
.band { position: relative; isolation: isolate; color: var(--white); background: var(--ink); }
.band__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.band__media .ph { width: 100%; height: 100%; }
.band__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,26,30,.85) 0%, rgba(20,26,30,.45) 70%, rgba(20,26,30,.3) 100%); }
.band__inner { min-height: clamp(18rem, 38vw, 30rem); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: var(--sp-4); padding-block: var(--sp-6); }
.band__text { font-family: var(--f-serif); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem); line-height: 1.3; max-width: 22ch; margin: 0; color: var(--white); }

/* Sezioni scure: colori dei componenti */
.sec--ink .sec__lead { color: #c3cbce; }
.sec--ink .sectors { border-top-color: var(--accent); }
.sec--ink .sectors__item { border-bottom-color: rgba(255,255,255,.14); }
.sec--ink .sectors dt { color: var(--white); }
.sec--ink .sectors dd { color: #b9c2c6; }

/* Mappa nella pagina Contatti */
.map { line-height: 0; background: var(--paper); }
.map__frame { display: block; width: 100%; height: clamp(20rem, 40vw, 28rem); border: 0; filter: grayscale(.25); }

/* Effetto "foto ferma" durante lo scorrimento, solo su schermi grandi e se il movimento non è ridotto */
@media (min-width: 960px) and (prefers-reduced-motion: no-preference) {
  .band__media, .vision__media { clip-path: inset(0); }
  .band__media .ph, .vision__media .ph { position: fixed; inset: 0; width: 100vw; height: 100vh; }
}

/* Logo: versione chiara usata solo sopra le foto (temi con intestazione trasparente) */
.hdr .logo__light { display: none; }

/* Riquadro "In parole semplici" nelle pagine servizio */
.plain { margin: 0 0 var(--sp-6); padding: var(--sp-3) var(--sp-4); background: var(--paper); border-left: 6px solid var(--accent); }
.plain__t { font-size: 1rem; font-family: var(--f-body); font-weight: 700; margin-bottom: .4rem; letter-spacing: 0; }
.plain p { margin: 0; font-size: var(--t-md); line-height: 1.55; max-width: 62ch; }

/* Domande frequenti */
.faq { display: grid; gap: var(--sp-4); }
@media (min-width: 960px) { .faq { grid-template-columns: 1fr 2fr; gap: var(--sp-6); } }
.faq__list { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--sp-2); padding: var(--sp-3) 0; font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 var(--sp-3); max-width: 64ch; }
.faq details p { margin: 0; }

/* WhatsApp */
.wa-float { position: fixed; z-index: 45; right: 24px; bottom: 24px; display: none; align-items: center; gap: .55rem; min-height: 3.25rem; padding: .7rem 1.25rem .7rem 1rem; background: #1f9d55; color: #fff; text-decoration: none; font-family: var(--f-display); font-weight: 650; border-radius: 999px; box-shadow: 0 6px 20px rgba(29,37,43,.28); transition: background .15s ease, transform .15s ease; }
.wa-float:hover { background: #18834a; transform: translateY(-2px); }
.wa-float:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (min-width: 760px) { .wa-float { display: inline-flex; } }
.mbar.mbar--3 { grid-template-columns: 1fr 1fr 1fr; }
.mbar.mbar--3 a { text-align: center; }
.mbar .mbar__wa { background: #1f9d55; color: #fff; }
@media (max-width: 359px) { .mbar.mbar--3 a { font-size: .9rem; gap: .35rem; } }
@media print { .wa-float { display: none !important; } }
