/* Tuttedile — il catalogo della rivendita.
   Carta, inchiostro nero e i tre colori del logo: azzurro, blu e grigio.
   Un solo carattere: Archivo variabile (OFL), stretto per i nomi, normale per i testi. */

@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F1F1EF;
  --sheet: #FFFFFF;
  --concrete: #E3E6E8;
  --concrete-2: #CDD2D5;
  --ink: #111314;
  --ink-2: #1E2326;
  --ink-soft: #55595B;
  --grey: #55595B;
  --blue: #058CBA;
  --blue-ink: #00619A;
  --blue-pale: #E1F0F7;
  --navy: #00619A;
  --navy-2: #0B6EA8;
  --deep: #0A2E45;
  --on-navy: #E3F0F7;
  --wa: #25D366;

  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --cond: 64%;
  --step-small: 0.9375rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.05rem + 0.7vw, 1.625rem);
  --step-h2: clamp(2.25rem, 1.2rem + 3.4vw, 4.25rem);
  --step-name: clamp(3.75rem, 1rem + 9.5vw, 10.5rem);

  --margin: clamp(16px, 2.4vw, 36px);
  --gap: clamp(12px, 1.6vw, 24px);
  --pad: clamp(80px, 9vw, 160px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; scrollbar-color: var(--ink-soft) var(--paper); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-body);
  font-stretch: 100%;
  line-height: 1.55;
  background: var(--paper);
  color: var(--ink);
  caret-color: var(--blue);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
picture { display: contents; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
p { text-wrap: pretty; }
::selection { background: var(--blue); color: var(--sheet); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
/* Sui fondi blu e neri il contorno blu non si vede: lì diventa bianco. */
.field-navy :focus-visible, .field-black :focus-visible, .ink :focus-visible, .site-footer :focus-visible, .brand-strip :focus-visible, .call-bar :focus-visible { outline-color: var(--sheet); }
.ico { width: 1.15em; height: 1.15em; flex: 0 0 auto; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--margin); top: -100px; z-index: 100; background: var(--ink); color: var(--sheet); padding: 12px 16px; }
.skip:focus { top: 12px; }
.wrap { padding-inline: var(--margin); max-width: 1760px; margin-inline: auto; }

/* ---------- Tipografia ---------- */
.h2, .h-head {
  font-size: var(--step-h2); font-weight: 800; font-stretch: var(--cond);
  line-height: 0.95; letter-spacing: -0.02em; text-wrap: balance; max-width: 16ch;
}
.lead { font-size: var(--step-lead); line-height: 1.3; max-width: 36ch; }
.note { font-size: var(--step-small); line-height: 1.5; max-width: 62ch; color: var(--ink-soft); }
p + p { margin-top: 0.8em; }

/* ---------- Pulsanti e link ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px;
  background: var(--navy); color: var(--sheet);
  font-weight: 700; font-size: var(--step-body); line-height: 1.1; text-decoration: none;
  border: 0; border-radius: 0; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-small { min-height: 44px; padding: 8px 16px; font-size: var(--step-small); }
.btn-blue { background: var(--blue); color: var(--ink); }
.btn-ink { background: var(--navy); color: var(--sheet); }
.link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer; transition: text-underline-offset 160ms var(--ease-out); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 32px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover, .btn-ink:hover { background: #004E7D; }
  .btn-blue:hover { background: #2AA3D0; }
  .link:hover { text-underline-offset: 8px; }
}

/* ---------- Intestazione ---------- */
.site-header { background: var(--paper); }
.bar { display: flex; align-items: center; gap: 24px; padding: 14px var(--margin); max-width: 1760px; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .mark { width: 44px; height: 37px; }
.brand-name { font-weight: 800; font-stretch: var(--cond); font-size: var(--step-lead); letter-spacing: -0.01em; line-height: 1; }
.brand-name span { font-weight: 500; color: var(--grey); }
.open-now { max-width: 36ch; font-size: var(--step-small); line-height: 1.3; color: var(--ink-soft); }
.open-now::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--concrete-2); margin-right: 8px; vertical-align: 1px; }
.open-now.is-open { color: var(--ink); }
/* Con JavaScript il testo fisso degli orari resta nascosto finché lo stato vero non è pronto: niente cambio di scritta al caricamento. */
.js .open-now:not(.is-ready) { visibility: hidden; }
.open-now.is-open::before { background: var(--wa); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 26px; }
.site-nav a:not(.btn) { font-weight: 500; text-decoration: underline 2px transparent; text-underline-offset: 6px; transition: text-decoration-color 200ms ease; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current='page'] { text-decoration-color: var(--blue); }
.nav-toggle { display: none; }
.nav-phone a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.nav-phone .ico { color: var(--navy); }
.call-bar { display: none; }

/* Linguette dei reparti, appiccicate in alto. */
.tabs { position: sticky; top: 0; z-index: 25; background: var(--paper); }
.tabs ul { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px var(--margin); max-width: 1760px; margin-inline: auto; }
.tabs a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  background: var(--concrete); text-decoration: none; white-space: nowrap;
  font-weight: 700; font-stretch: 85%; transition: background-color 200ms ease, color 200ms ease;
}
.tabs a[aria-current='page'] { background: var(--navy); color: var(--sheet); }
@media (hover: hover) and (pointer: fine) { .tabs a:not([aria-current]):hover { background: var(--concrete-2); } }

/* ---------- Copertina (home) ---------- */
.cover { padding-top: clamp(32px, 4vw, 64px); padding-bottom: var(--pad); }
.cover-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: end; }
.cover-text { grid-column: 1 / 6; padding-bottom: 8px; }
.cover-h1 { font-size: clamp(3.25rem, 1rem + 5.4vw, 6.75rem); font-weight: 850; font-stretch: var(--cond); line-height: 0.9; letter-spacing: -0.025em; }
.cover-h1 .line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.cover-h1 .line-in { display: block; }
.cover-sub { margin-top: 28px; font-size: var(--step-lead); line-height: 1.3; max-width: 34ch; }
.notice { margin-top: 20px; display: inline-block; padding: 10px 16px; background: var(--blue); color: var(--ink); font-weight: 700; }
.notice a { text-decoration: none; }
.cover-plate { grid-column: 6 / 13; }
.cover-plate img { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 70svh; object-fit: cover; object-position: 55% 40%; }
.cover-plate figcaption { font-weight: 600; }


/* ---------- Righe del catalogo ---------- */
.rows { display: grid; gap: 4px; }
.row a {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; gap: 20px;
  min-height: 64px; padding: 12px 20px; background: var(--sheet); text-decoration: none;
  transition: background-color 200ms ease;
}
.row a .ico { width: 22px; height: 22px; color: var(--blue); transition: transform 200ms var(--ease-out); }
.row-name { font-weight: 700; font-size: var(--step-body); line-height: 1.2; }
.row-spec { color: var(--ink-soft); font-size: var(--step-small); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) {
  .row a:hover { background: var(--blue-pale); }
  .row a:hover .ico { transform: translateX(4px); }
}

/* ---------- I nostri marchi: loghi in bianco su nero ---------- */
/* Correzioni ottiche: i loghi alti e stretti o con sottotitolo vanno ingranditi, quelli molto pesanti ridotti. */
.brand-item-logo { max-height: 44px; max-width: 60%; width: auto; margin-bottom: 12px; }
.brand-item-logo.is-darkened { filter: brightness(0); }

/* Loghi in apertura delle pagine di reparto */
.brand-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.brand-chip { display: grid; place-items: center; min-width: 168px; height: 88px; padding: 14px 24px; background: var(--sheet); text-decoration: none; transition: transform 160ms var(--ease-out); }
.brand-chip:active { transform: scale(0.97); }
.brand-chip img { height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.brand-chip img[src*='stabile'] { height: 64px; }
.brand-chip img[src*='fbm'] { height: 66px; }
.brand-chip img[src*='cofra'] { height: 48px; }
.brand-chip img[src*='sparco'] { height: 52px; }
.brand-chip img.is-darkened { filter: brightness(0); }
.brand-chip span { font-weight: 850; font-stretch: var(--cond); font-size: var(--step-lead); color: var(--ink); }
.field-paper .brand-chip, .field-blue .brand-chip { background: var(--concrete); }

/* ---------- Reparti ---------- */
.plate { overflow: hidden; }
.plate img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink); }

/* ---------- Campo scuro: il calcolo veloce ---------- */
/* I campi scuri prendono il blu del logo; i pannelli al loro interno un blu più chiaro. */
.ink { background: var(--navy); color: var(--sheet); padding-block: var(--pad); --ink-2: var(--navy-2); }
.ink .lead { color: var(--on-navy); }
.ink a { text-decoration-color: #7FC6E4; }
.ink .btn-blue { background: var(--sheet); color: var(--navy); }
@media (hover: hover) and (pointer: fine) { .ink .btn-blue:hover { background: var(--blue-pale); } }
.calc-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.calc-grid > div:first-child { grid-column: 1 / 6; }
.calc-grid .lead { margin-top: 20px; }
.more-tools { grid-column: 1 / 6; grid-row: 2; align-self: end; max-width: 40ch; color: var(--on-navy); }
.calc-box { grid-row: 1 / 3; }
.more-tools a { font-weight: 700; }
.calc-box { grid-column: 7 / 13; display: grid; gap: 22px; padding: clamp(20px, 2.5vw, 36px); background: var(--ink-2); }
.calc-box label { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-weight: 500; }
.calc-box label input { grid-column: 1 / -1; }
.calc-box output { font-weight: 800; font-variant-numeric: tabular-nums; }
.calc-out { font-size: var(--step-lead); }
.calc-out b { font-size: var(--step-h2); font-weight: 850; font-stretch: var(--cond); line-height: 1; margin-right: 6px; font-variant-numeric: tabular-nums; }
.calc-box .btn { justify-self: start; }
.ink .note { color: var(--on-navy); }

input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; background: transparent; cursor: pointer; }
input[type='range']::-webkit-slider-runnable-track { height: 6px; background: var(--concrete-2); }
input[type='range']::-moz-range-track { height: 6px; background: var(--concrete-2); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; background: var(--blue); border-radius: 50%; transition: transform 140ms var(--ease-out); }
input[type='range']::-moz-range-thumb { width: 26px; height: 26px; border: 0; background: var(--blue); border-radius: 50%; }
input[type='range']:active::-webkit-slider-thumb { transform: scale(1.15); }
.ink input[type='range']::-webkit-slider-runnable-track, .field-navy input[type='range']::-webkit-slider-runnable-track, .field-black input[type='range']::-webkit-slider-runnable-track { background: rgba(255, 255, 255, 0.3); }
.ink input[type='range']::-moz-range-track, .field-navy input[type='range']::-moz-range-track { background: rgba(255, 255, 255, 0.3); }
.ink input[type='range']::-webkit-slider-thumb, .field-navy input[type='range']::-webkit-slider-thumb { background: var(--sheet); }
.ink input[type='range']::-moz-range-thumb, .field-navy input[type='range']::-moz-range-thumb { background: var(--sheet); }

/* ---------- Servizi ---------- */
.services { padding-block: var(--pad); }
.serv-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
.serv-side { grid-column: 1 / 5; display: grid; gap: 32px; align-content: start; }
.serv-side .h2 { max-width: 8ch; }
.serv-side .plate img { aspect-ratio: 4 / 5; }
.serv-list { grid-column: 5 / 13; display: grid; gap: 4px; }
.serv { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; padding: 22px 20px; background: var(--sheet); align-items: baseline; }
.serv dt { font-size: var(--step-lead); font-weight: 800; font-stretch: 75%; line-height: 1.1; }
.serv dd { max-width: 50ch; }

/* ---------- Ticino: il cartello stradale ---------- */
.ticino { background: var(--concrete); padding-block: var(--pad); }
.ticino-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.ticino-grid > div:first-child { grid-column: 1 / 7; }
.ticino .lead { margin-top: 20px; }
.origins { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.origins button { min-height: 48px; padding: 10px 16px; border: 0; background: var(--sheet); cursor: pointer; font-weight: 600; transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out); }
.origins button:active { transform: scale(0.97); }
.origins button[aria-checked='true'] { background: var(--navy); color: var(--sheet); }
.origins small { font-size: 0.75em; font-weight: 800; margin-left: 4px; }
@media (hover: hover) and (pointer: fine) { .origins button:not([aria-checked='true']):hover { background: var(--paper); } }
.route-via { margin-top: 20px; max-width: 52ch; }

/* ---------- Dal 1977 ---------- */
.since { padding-block: var(--pad); }
.since-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.since-grid .plate { grid-column: 1 / 6; }
.since-text { grid-column: 7 / 13; }
.since-text .lead { margin-top: 24px; }
.since-text p:not(.lead) { margin-top: 18px; max-width: 56ch; }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--deep); color: var(--sheet); padding: clamp(64px, 7vw, 112px) 0 120px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px var(--gap); }
.foot-name { font-size: var(--step-h2); font-weight: 850; font-stretch: var(--cond); line-height: 0.85; letter-spacing: -0.01em; margin-bottom: 20px; }
.foot-name span { display: block; font-weight: 500; }
.foot-h { font-size: var(--step-small); font-weight: 800; margin-bottom: 12px; color: #5BB8DE; }
.site-footer a { text-decoration-color: var(--blue); }
.site-footer ul { display: grid; gap: 4px; }
.site-footer ul a, .foot-grid p a { text-decoration: none; }
.site-footer ul a:hover, .foot-grid p a:hover { text-decoration: underline; text-decoration-color: var(--blue); }
.foot-hours b { font-weight: 700; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 64px; font-size: var(--step-small); color: var(--on-navy); }

/* ---------- Pagine interne: campi ---------- */
.chapter { position: relative; padding-block: var(--pad); }
.field-paper { background: var(--paper); color: var(--ink); --tone: var(--sheet); --tone-2: var(--concrete); --soft: var(--ink-soft); }
.field-concrete { background: var(--concrete); color: var(--ink); --tone: var(--paper); --tone-2: var(--sheet); --soft: var(--ink-soft); }
.field-blue { background: var(--sheet); color: var(--ink); --tone: var(--paper); --tone-2: var(--concrete); --soft: var(--ink-soft); }
.field-black { background: var(--ink); color: var(--sheet); --tone: var(--ink-2); --tone-2: #2B3236; --soft: #C9CED1; }
.field-navy { background: var(--navy); color: var(--sheet); --tone: var(--navy-2); --tone-2: #127CBA; --soft: var(--on-navy); }
.field-black .btn { background: var(--blue); color: var(--ink); }
.field-navy .btn { background: var(--sheet); color: var(--navy); }
.field-black .note { color: #C9CED1; }
.field-navy .note { color: var(--on-navy); }
.field-navy .choice input, .field-black .choice input, .field-navy .check input, .field-black .check input { accent-color: var(--blue); }

.page-hero { padding-top: clamp(40px, 5vw, 80px); padding-bottom: clamp(56px, 6vw, 96px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: end; padding-inline: var(--margin); }
.page-hero-text { grid-column: 1 / 8; }
.page-hero-pic { grid-column: 8 / 13; }
/* La foto parte in alto con il titolo e scende fino ai pulsanti. */
.page-hero-pic { align-self: stretch; position: relative; min-height: 340px; margin: 0; }
/* La foto riempie l'altezza del testo ma non la decide: un'immagine verticale non spinge più giù il titolo. */
.page-hero-pic img, .page-hero-pic svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero-pic img[src*='marchi/stabile'], .page-hero-pic img[src*='pellet-ruru'] { object-fit: contain; background: var(--sheet); padding: 24px; }
.page-h1 { font-size: clamp(3.25rem, 1rem + 7.2vw, 8.5rem); font-weight: 850; font-stretch: var(--cond); line-height: 0.86; letter-spacing: -0.015em; text-transform: uppercase; }
.page-h1 .line { display: block; overflow: hidden; padding-bottom: 0.04em; white-space: nowrap; }
.page-h1 .line-in { display: block; }
.page-hero .lead { margin-top: 28px; }
.page-hero .page-meta { margin-top: 16px; }

.items-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.items-head { grid-column: 1 / 5; position: sticky; top: 72px; }
.items-head .lead { margin-top: 20px; max-width: 32ch; }
.prod-rows { grid-column: 5 / 13; display: grid; gap: 4px; }
.prod { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 20px; padding: 18px 12px 18px 22px; background: var(--tone); }
.prod h3 { font-size: var(--step-lead); font-weight: 800; font-stretch: 75%; line-height: 1.1; }
.prod p { margin-top: 6px; color: var(--soft); max-width: 60ch; }

/* Miniature di prodotto nelle righe */
.prod.has-thumb { grid-template-columns: 112px minmax(0, 1fr); padding-left: 10px; }
.prod-thumb img { width: 112px; height: 84px; object-fit: cover; background: var(--sheet); }
.prod-thumb img[src*='stabile'] { object-fit: contain; }

/* Galleria del reparto */
.gallery-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: end; margin-bottom: clamp(28px, 3vw, 48px); }
.gallery-head .h-head { grid-column: 1 / 7; max-width: 20ch; }
.gallery-head .lead { grid-column: 7 / 13; }
.gallery-more { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: clamp(28px, 3vw, 44px); padding-top: 24px; border-top: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 25%, transparent); }
.gallery-more-h { font-weight: 800; }
.gallery-more ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.gallery-more .link { color: inherit; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gal-item { margin: 0; display: grid; grid-template-rows: auto auto; align-content: start; overflow: hidden; }
.gal-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sheet); transition: transform 700ms var(--ease-out); }
.gal-item.is-big { grid-column: span 2; grid-row: span 2; }
.gal-item.is-big img { aspect-ratio: 5 / 4; height: auto; }
.gal-item figcaption { margin-top: 8px; font-weight: 600; }
.gal-item figcaption span { font-weight: 400; opacity: 0.75; }
.is-cutout .gal-item img { object-fit: contain; padding: 18px; }
.is-even .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Con quattro foto, quattro colonne: nessuna resta da sola sulla seconda riga. */
@media (min-width: 861px) { .is-even .gallery-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.is-even .gal-item img { aspect-ratio: 1 / 1; }
.is-tall .gal-item img { aspect-ratio: 3 / 4; }
@media (max-width: 860px) { .is-even .gallery-grid { grid-template-columns: 1fr 1fr; } }
@media (hover: hover) and (pointer: fine) { .gal-item:hover img { transform: scale(1.03); } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-pic img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ink); }
.split-text p { margin-top: 18px; max-width: 52ch; }
.split-text .h-head + p { margin-top: 26px; }

.band-pics { padding-block: clamp(48px, 5vw, 80px); }
.pics-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pics-row img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
figcaption { margin-top: 10px; font-size: var(--step-small); max-width: 56ch; }

.brand-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: 40px; }
.brand-item { display: grid; gap: 8px; align-content: start; padding: 28px; min-height: 190px; background: var(--tone); text-decoration: none; transition: background-color 200ms ease; }
.brand-item:hover { background: var(--tone-2); }
.brand-item h3 { font-size: var(--step-lead); font-weight: 800; font-stretch: 75%; line-height: 1.1; }
.brand-item .go { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 700; }
.brand-item .go a { color: inherit; text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 5px; }
.brand-item .go .go-out { font-weight: 500; color: var(--ink-soft); }

.prose { max-width: 62ch; }
.prose h2, .prose h3 { font-size: var(--step-lead); font-weight: 800; font-stretch: 80%; margin-top: 48px; line-height: 1.15; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin-top: 14px; }
.prose ul { list-style: square; padding-left: 1.2em; }
.prose li + li { margin-top: 6px; }
.prose a { text-decoration-color: var(--blue); }
/* Fonti in fondo a guide e pagine con dati normativi: più piccole, separate dal testo. */
.prose p.sources { margin-top: 32px; padding-top: 14px; border-top: 1px solid currentColor; font-size: 0.875rem; }
.prose ul.sources { margin-top: 8px; font-size: 0.875rem; color: var(--soft, inherit); }
.prose-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 56px; }

/* Ticino e contatti nelle pagine interne */
.ticino-pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.ticino-text .lead { margin-top: 20px; }
.chapter.ticino .ticino-grid > div:first-child { grid-column: 1 / 7; }
.chapter.ticino .ticino-pic { grid-column: 8 / 13; }
.route { margin-top: 28px; padding: 24px; background: var(--navy); color: var(--sheet); border-radius: 14px; box-shadow: inset 0 0 0 6px var(--navy), inset 0 0 0 10px var(--sheet); }
.route-big { font-size: var(--step-h2); font-weight: 850; font-stretch: var(--cond); line-height: 1; font-variant-numeric: tabular-nums; }
.route-steps { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 12px; font-size: var(--step-small); font-weight: 600; }
ol.route-steps li:not(:last-child)::after { content: '›'; margin: 0 10px; font-weight: 800; }

/* Storia: foto del giornale a sinistra, le tappe a destra, la frase di Leonarda in chiusura */
.story-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.story-side { position: sticky; top: 72px; }
.story-pic { margin-top: 28px; }
.story-pic img { width: 100%; height: auto; aspect-ratio: 1050 / 770; object-fit: cover; }
.story-pic figcaption { margin-top: 10px; font-size: var(--step-small); color: var(--soft); }
.story-pic figcaption a { color: inherit; }
.story-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(28px, 3vw, 44px); }
.story-steps li { padding-left: 24px; border-left: 4px solid var(--blue); }
.story-steps h3 { font-size: var(--step-lead); font-weight: 850; font-stretch: var(--cond); line-height: 1.1; }
.story-steps p { margin-top: 8px; max-width: 58ch; color: var(--soft); }
.story-steps blockquote { margin: 16px 0 0; }
.story-steps blockquote p { color: var(--sheet); font-size: var(--step-lead); line-height: 1.3; font-weight: 500; }
.story-steps footer, .story-quote footer { margin-top: 8px; font-size: var(--step-small); font-weight: 700; color: var(--soft); }
.story-end { margin-top: clamp(56px, 7vw, 112px); }
.story-quote { margin: 0; max-width: 1100px; }
.story-quote p { font-size: var(--step-h2); font-weight: 850; font-stretch: var(--cond); line-height: 1; letter-spacing: -0.01em; }
.story-quote footer { margin-top: 20px; }

/* Strumenti */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.tool-form .lead { margin-top: 18px; }
.fields { display: grid; gap: 22px; margin-top: 36px; max-width: 560px; }
.fields > label:not(.check) { display: grid; grid-template-columns: 1fr auto; gap: 8px; font-weight: 500; }
.fields > label > input[type='range'] { grid-column: 1 / -1; }
.fields output { font-weight: 800; font-variant-numeric: tabular-nums; }
.num { grid-column: 1 / -1; width: 8ch; min-height: 48px; padding: 8px 12px; border: 2px solid var(--ink-soft); background: var(--tone); font-weight: 700; font-variant-numeric: tabular-nums; }
.choice { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.choice legend { font-weight: 500; margin-bottom: 10px; padding: 0; }
.choice label, .check { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; background: var(--tone); cursor: pointer; transition: background-color 200ms ease; }
.choice label:hover, .check:hover { background: var(--tone-2); }
.choice input, .check input { width: 20px; height: 20px; accent-color: var(--navy); flex: 0 0 auto; }
.tool-out { padding: 28px; background: var(--tone); display: grid; gap: 18px; position: sticky; top: 72px; }
.out-big { font-size: var(--step-lead); line-height: 1.1; }
.out-big b { display: block; font-size: var(--step-h2); font-weight: 850; font-stretch: var(--cond); line-height: 1; font-variant-numeric: tabular-nums; }
.out-save { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 16px; margin-top: 16px; padding: 14px 18px; background: var(--navy); color: var(--sheet); font-weight: 700; }
.out-save b { font-size: var(--step-lead); font-weight: 850; font-stretch: var(--cond); font-variant-numeric: tabular-nums; }
.out-save small { grid-column: 1 / -1; font-size: var(--step-small); font-weight: 500; color: var(--on-navy); }
.out-mid b { font-weight: 800; }
.out-list { display: grid; gap: 4px; }
.out-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; background: var(--tone-2); font-variant-numeric: tabular-nums; }
.out-list b { white-space: nowrap; }
.tool-out .btn { justify-self: start; }
.flue-draw { display: flex; justify-content: center; background: var(--tone-2); padding: 16px; }
.flue-draw svg { width: 100%; max-width: 360px; height: auto; }

/* FAQ: il segno + è disegnato con una maschera SVG */
.faq-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 56px; align-items: start; }
.faq-list { display: grid; gap: 4px; }
.faq-list details { background: var(--tone); }
.faq-list summary { cursor: pointer; padding: 20px 56px 20px 20px; font-weight: 700; list-style: none; position: relative; transition: background-color 200ms ease; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ''; position: absolute; right: 20px; top: 50%; width: 18px; height: 18px; margin-top: -9px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v16M4 12h16' stroke='black' stroke-width='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v16M4 12h16' stroke='black' stroke-width='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 200ms var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { background: var(--tone-2); }
.faq-a { padding: 0 20px 22px; max-width: 70ch; }

/* Invito finale */
.ask-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
.ask-text .lead { margin-top: 22px; }
.ask-pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Mappa e orari */
.map-box { position: relative; aspect-ratio: 4 / 3; background: var(--concrete); overflow: hidden; }
.map-box img { width: 100%; height: 100%; object-fit: cover; }
.map-load { position: absolute; right: 12px; bottom: 12px; }
.map-credit { position: absolute; left: 0; bottom: 0; padding: 2px 8px; background: rgba(255, 255, 255, 0.85); font-size: 12px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-rows { margin-top: 24px; }
/* Riquadro con l'icona del canale, a inizio riga. */
.row.has-badge a { grid-template-columns: 44px minmax(0, 0.8fr) minmax(0, 1fr) auto; padding-left: 10px; }
.row-badge { display: grid; place-items: center; width: 44px; height: 44px; background: var(--navy); color: var(--sheet); }
.row-badge.is-wa { background: var(--wa); color: var(--ink); }
.badge-ico { width: 22px; height: 22px; }
.map-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hours-table { width: 100%; border-collapse: collapse; margin-top: 24px; font-variant-numeric: tabular-nums; }
.hours-table th, .hours-table td { text-align: left; padding: 12px 14px; }
.hours-table tr:nth-child(odd) { background: var(--tone); }
.hours-table tr:nth-child(even) { background: var(--tone-2); }

/* ---------- Movimento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: var(--d, 0ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  /* Il titolo sale solo su schermi grandi: su telefono deve comparire subito (è l'elemento più grande della pagina). */
  @media (min-width: 861px) { .js .cover-h1 .line-in, .js .page-h1 .line-in { transform: translateY(102%); animation: rise 900ms var(--ease-out) forwards; } }
  .js .cover-h1 .line:nth-child(2) .line-in, .js .page-h1 .line:nth-child(2) .line-in { animation-delay: 90ms; }
  .js .cover-sub, .js .cover .actions, .js .page-hero .lead, .js .page-hero .page-meta, .js .page-hero .actions { opacity: 0; animation: fade-up 600ms var(--ease-out) 500ms forwards; }
  /* La foto di apertura si svela solo su schermi grandi: su telefono è l'elemento più grande e deve comparire subito. */
  @media (min-width: 861px) { .js .cover-plate img { clip-path: inset(0 0 100% 0); animation: unveil 1100ms var(--ease-out) 150ms forwards; } }
  .js .plate img { transform: scale(1.06); transition: transform 1400ms var(--ease-out); }
  .js .plate.is-in img { transform: none; }
}
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes unveil { to { clip-path: inset(0 0 0 0); } }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .open-now { display: none; }
  .site-nav ul { gap: 18px; }
  .tool-grid { grid-template-columns: 1fr; gap: 64px; }
  .tool-out { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Telefono ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; min-height: 44px; padding: 10px 16px; border: 0; background: var(--navy); color: var(--sheet); font-weight: 700; cursor: pointer; }
  .site-nav ul { display: none; }
  .site-nav.is-open ul {
    display: grid; gap: 4px; position: fixed; inset: 0; z-index: 60; align-content: center;
    padding: 80px var(--margin); background: var(--deep); color: var(--sheet);
    font-size: var(--step-h2); font-weight: 850; font-stretch: var(--cond); line-height: 1.1;
  }
  .site-nav.is-open .nav-toggle { position: fixed; top: 14px; right: var(--margin); z-index: 61; background: var(--blue); color: var(--ink); }
  .site-nav.is-open ul a:not(.btn) { display: block; padding-block: 6px; }
  .site-nav.is-open .btn { margin-top: 16px; background: var(--wa); color: var(--ink); font-size: var(--step-body); font-stretch: 100%; }

  .cover-grid, .calc-grid, .serv-grid, .ticino-grid, .since-grid, .page-hero { grid-template-columns: 1fr; }
  .cover-text, .cover-plate,
  .more-tools, .calc-grid > div:first-child, .calc-box, .serv-side, .serv-list, .ticino-grid > div:first-child, .since-grid .plate, .since-text,
  .page-hero-text, .page-hero-pic, .chapter.ticino .ticino-grid > div:first-child, .chapter.ticino .ticino-pic { grid-column: 1; grid-row: auto; }
  .page-hero-pic { min-height: 0; }
  .page-hero-pic img, .page-hero-pic svg { position: static; height: auto; aspect-ratio: 4 / 3; }
  .cover-plate { order: -1; }
  .cover-plate img { aspect-ratio: 4 / 3; max-height: none; }
  .cover-plate figcaption { display: none; }
  .cover-h1 { margin-top: 8px; }
  .row a { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; }
  /* Su telefono i reparti vanno a capo e restano tutti in vista: niente scorrimento orizzontale da indovinare. */
  .tabs { position: static; }
  .tabs ul { flex-wrap: wrap; gap: 6px; overflow: visible; padding-block: 4px 10px; }
  .tabs a { min-height: 40px; padding: 6px 12px; font-size: var(--step-small); }
  .row.has-badge a { grid-template-columns: 44px minmax(0, 1fr) auto; padding-left: 10px; }
  .row.has-badge .row-badge { grid-row: 1 / 3; }
  .row.has-badge .row-name, .row.has-badge .row-spec { grid-column: 2; }
  .row.has-badge a .ico { grid-column: 3; }
  .prod.has-thumb { grid-template-columns: 72px minmax(0, 1fr); }
  .prod-thumb img { width: 72px; height: 54px; }
  .row-spec { grid-column: 1; grid-row: 2; }
  .row a .ico { grid-column: 2; grid-row: 1 / 3; }
  .plate img { aspect-ratio: 16 / 10; }
  .serv { grid-template-columns: 1fr; gap: 6px; }
  .since-grid { gap: 32px; }

  .brand-chip { min-width: 0; height: 72px; padding: 10px 16px; }
  .brand-chip img { height: 34px; max-width: 150px; }
  .brand-chip img[src*='stabile'] { height: 50px; }
  .split, .faq-grid, .ask-grid, .prose-grid { grid-template-columns: 1fr; gap: 28px; }
  .items-grid, .gallery-head { grid-template-columns: 1fr; }
  .items-head, .prod-rows, .gallery-head .h-head, .gallery-head .lead { grid-column: 1; position: static; }
  .prod { padding: 14px 10px 14px 16px; gap: 12px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gal-item.is-big { grid-column: 1 / -1; grid-row: auto; }
  .gal-item.is-big img { aspect-ratio: 4 / 3; height: auto; }
  .brand-list { grid-template-columns: 1fr; }
  .pics-row { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .story-grid { grid-template-columns: 1fr; }
  .story-side { position: static; }
  .page-h1 { font-size: clamp(3rem, 15vw, 5.5rem); }

  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .foot-legal { margin-top: 40px; }
}

/* ---------- Scarpe: tabella delle sigle ---------- */
.classes-lead { margin-top: 20px; max-width: 58ch; }
.classes-wrap { margin-top: 32px; overflow-x: auto; }
.classes { width: 100%; min-width: 720px; border-collapse: collapse; background: var(--sheet); font-size: var(--step-small); }
.classes th, .classes td { padding: 14px 16px; text-align: center; border-bottom: 2px solid var(--concrete); }
.classes thead th { background: var(--navy); color: var(--sheet); font-weight: 700; line-height: 1.25; vertical-align: bottom; }
.classes tbody th { font-size: var(--step-lead); font-weight: 850; font-stretch: var(--cond); color: var(--navy); }
.classes td:last-child, .classes th:last-child { text-align: left; }
.classes .is-yes { color: var(--blue); font-size: 1.4em; font-weight: 800; }
.classes .is-no { color: var(--concrete-2); }
.classes tbody tr:last-child { background: var(--blue-pale); }
.classes-wrap + .note { margin-top: 16px; max-width: 60ch; }
/* Tabella dei modelli dei forni: righe di gruppo per le due linee, nessuna riga evidenziata. */
.models tbody tr:last-child { background: none; }
.models .models-group th { background: var(--blue-pale); color: var(--navy); text-align: left; font-size: var(--step-small); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-stretch: normal; }
.models td:last-child { text-align: center; }
/* Su telefono ogni sigla diventa una scheda: niente tabella da scorrere di lato. */
@media (max-width: 860px) {
  .classes { min-width: 0; background: none; }
  .classes thead { display: none; }
  .classes tbody { display: grid; gap: 8px; }
  .classes tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 16px; background: var(--sheet); }
  .classes tbody tr:last-child { background: var(--blue-pale); }
  .classes th, .classes td { padding: 0; border: 0; text-align: left; }
  .classes tbody th { width: 100%; }
  .classes .is-no { display: none; }
  .classes .is-yes { font-size: var(--step-small); color: var(--ink); font-weight: 600; }
  .classes .is-yes::before { content: '✓ ' attr(data-label); color: var(--ink); }
  .classes .is-yes span { display: none; }
  .classes-use { width: 100%; margin-top: 4px; color: var(--ink-soft); }
  .models tbody tr:last-child { background: var(--sheet); }
  .models td { font-size: var(--step-small); }
  .models td::before { content: attr(data-label) ': '; color: var(--ink-soft); }
  .models .models-group { background: none; padding: 16px 0 0; }
}

/* Telefono: barra fissa in basso con i tre modi per raggiungerci e lo stato del negozio. */
@media (max-width: 860px) {
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .call-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    padding-bottom: env(safe-area-inset-bottom); background: var(--deep);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.12);
  }
  .call-bar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 56px; padding: 6px 4px; background: var(--navy); color: var(--sheet);
    font-size: 0.8125rem; font-weight: 700; text-decoration: none;
  }
  .call-bar a:first-child { background: var(--wa); color: var(--ink); }
  .call-bar a:active { filter: brightness(0.92); }
  .call-bar .ico { width: 22px; height: 22px; }
  .call-bar-now { grid-column: 1 / -1; order: -1; margin: 0; padding: 3px 12px; background: var(--deep); color: var(--on-navy); font-size: 0.75rem; text-align: center; }
  .call-bar-now { min-height: 21px; }   /* spazio riservato: il testo arriva dallo script senza far crescere la barra */
  .js .call-bar-now:not(.is-ready) { visibility: hidden; }
  .call-bar-now.is-open { color: #9BE7B4; }
  .site-footer { padding-bottom: 48px; }
  .foot-grid p a, .site-footer ul a, .foot-legal a { display: inline-block; padding-block: 9px; }
  html { scroll-padding-bottom: 96px; }   /* ancore e focus non finiscono sotto la barra in basso */
  .foot-hours { line-height: 1.7; }
  .nav-phone .ico { color: currentColor; }
}

/* ---------- Home: apertura, reparti a schede, marchi, Ticino ---------- */
.cover-place .line-in { color: var(--navy); }
.cover-facts { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cover-facts li { padding: 6px 12px; background: var(--sheet); font-size: var(--step-small); font-weight: 700; }
.btn-line { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
@media (hover: hover) and (pointer: fine) { .btn-line:hover { background: var(--blue-pale); } }

.depts { padding-block: clamp(56px, 6vw, 96px); background: var(--concrete); }
.dept-cards { list-style: none; padding: 0; margin: clamp(24px, 3vw, 40px) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.dept-card { display: grid; gap: 4px; height: 100%; padding-bottom: 18px; background: var(--sheet); text-decoration: none; transition: transform 160ms var(--ease-out); }
.dept-card:active { transform: scale(0.98); }
.dept-card-pic img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.dept-card-pic img[src*='stabile'] { object-fit: contain; padding: 12px; background: var(--sheet); }
.dept-card-name { margin: 14px 18px 0; font-size: var(--step-lead); font-weight: 850; font-stretch: var(--cond); text-transform: uppercase; line-height: 1; }
.dept-card-brand { margin: 0 18px; font-weight: 700; color: var(--blue-ink); font-size: var(--step-small); }
.dept-card-items { margin: 4px 18px 0; color: var(--ink-soft); font-size: var(--step-small); }
@media (hover: hover) and (pointer: fine) { .dept-card:hover .dept-card-name { color: var(--navy); } }

.brand-strip { background: var(--navy); color: var(--sheet); padding-block: 28px; }
.brand-strip-in { display: grid; grid-template-columns: auto 1fr; gap: 16px 32px; align-items: center; }
.brand-strip-h { font-size: var(--step-small); font-weight: 800; color: var(--on-navy); max-width: 12ch; line-height: 1.2; }
.brand-strip-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.brand-strip-list a { display: grid; place-items: center; min-height: 48px; color: var(--sheet); text-decoration: none; }
.brand-strip-list img { height: 30px; width: auto; max-width: 140px; object-fit: contain; filter: brightness(0) invert(1); }
.brand-strip-list img.keep-colors { filter: none; }
.brand-strip-list img[src*='stabile'], .brand-strip-list img[src*='fbm'] { height: 42px; }
.brand-strip-list img[src*='ruru'], .brand-strip-list img[src*='dural'] { height: 40px; }
.brand-strip-list span { font-weight: 850; font-stretch: var(--cond); font-size: 1.15rem; }

.serv-more { grid-column: 1 / -1; margin-top: 8px; }
.ticino-line { background: var(--concrete); padding-block: clamp(48px, 5vw, 80px); }
.ticino-line-in { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 40px; align-items: center; }
.ticino-line .lead { max-width: 52ch; }

@media (max-width: 1100px) {
  .dept-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .cover-facts li { font-size: 0.8125rem; }
  .cover .actions .btn { flex: 1 1 100%; }
  .dept-cards { gap: 8px; }
  .dept-card { padding-bottom: 12px; }
  .dept-card-name { margin: 10px 10px 0; font-size: 1.25rem; }
  .dept-card-brand, .dept-card-items { margin-inline: 10px; font-size: 0.8125rem; }
  .dept-card-items { display: none; }
  .brand-strip-in, .ticino-line-in { grid-template-columns: 1fr; }
  .brand-strip-list { gap: 6px 22px; }
  .brand-strip-list img { height: 24px; }
  .brand-strip-list img[src*='stabile'], .brand-strip-list img[src*='fbm'] { height: 34px; }
}

/* Reparti in home: intestazione con la stagione, etichetta sulle schede */
.depts-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px 40px; align-items: end; }
.depts-head p { max-width: 56ch; }
.dept-card-pic { position: relative; display: block; }
.dept-card-tag { position: absolute; left: 10px; top: 10px; padding: 4px 10px; background: var(--navy); color: var(--sheet); font-size: 0.8125rem; font-weight: 800; }

/* Testo senza foto quando non ne abbiamo una adatta */
.split-solo { grid-template-columns: 1fr; }
.split-solo .split-text p { max-width: 60ch; }

/* Calcolatori: indice degli strumenti */
.tool-cards { list-style: none; padding: 0; margin: clamp(24px, 3vw, 40px) 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); }
.tool-card { display: grid; gap: 6px; height: 100%; padding-bottom: 18px; background: var(--sheet); text-decoration: none; }
.tool-card-pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tool-card-pic img[src*='stabile'] { object-fit: contain; padding: 10px; }
.tool-card-name { margin: 10px 16px 0; font-size: var(--step-lead); font-weight: 850; font-stretch: var(--cond); line-height: 1.05; }
.tool-card-text { margin: 0 16px; color: var(--ink-soft); font-size: var(--step-small); }
@media (hover: hover) and (pointer: fine) { .tool-card:hover .tool-card-name { color: var(--navy); } }

/* Contatti nella riga fissa dei reparti, solo su computer */
.tabs-contact { margin-left: auto; display: flex; align-items: center; }
.tabs-contact + .tabs-contact { margin-left: 0; }
.tabs-contact > a:not(.btn) { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tabs-contact .ico { color: var(--navy); }
.tabs .tabs-contact .btn { min-height: 40px; background: var(--wa); color: var(--ink); font-stretch: 100%; }
/* Portatili: telefono e WhatsApp diventano solo icona, così la barra sta su una riga. Il testo resta per lettori di schermo e agenti.
   Tra 861 e 1099 px anche le linguette si stringono; se ancora non basta, la barra va a capo invece di nascondere qualcosa. */
@media (min-width: 861px) and (max-width: 1365px) {
  .tabs-contact span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabs-contact > a:not(.btn), .tabs .tabs-contact .btn { justify-content: center; min-width: 44px; padding-inline: 10px; }
  .tabs a { padding-inline: 12px; }
}
@media (min-width: 861px) and (max-width: 1099px) {
  .tabs a { gap: 6px; padding-inline: 9px; font-size: var(--step-small); }
}
@media (hover: hover) and (pointer: fine) { .tabs .tabs-contact .btn:hover { background: #1FBF5B; } }

@media (max-width: 1100px) {
  .tool-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .depts-head { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .tabs-contact { display: none; }
  .tool-cards { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tool-card-name { margin-inline: 10px; font-size: 1.15rem; }
  .tool-card-text { margin-inline: 10px; }
  /* Gallerie: al massimo quattro foto su telefono */
  .gallery-grid .gal-item:nth-child(n+5) { display: none; }
}
/* Su computer telefono e WhatsApp stanno nella riga fissa dei reparti; nell'intestazione solo dentro il menu del telefono. */
@media (min-width: 861px) { .nav-phone, .nav-wa { display: none; } }
.address-link { font-weight: 700; color: inherit; text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Valutazione Google */
.g-rating { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: inherit; text-decoration: none; font-size: var(--step-small); }
.g-rating b { font-size: 1.15em; font-weight: 800; }
.g-rating span:last-child { text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; }
.g-stars { letter-spacing: 1px; font-size: 1.1em; background: linear-gradient(90deg, #F2A900 var(--fill, 100%), #C9CED1 var(--fill, 100%)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.g-rating-cover { margin-top: 14px; }
.row-badge.is-star { background: #F2A900; color: var(--ink); }
/* Riquadro "Fonti" in fondo alle pagine dei reparti: piccolo e attaccato alla sezione sopra */
.chapter.page-sources { padding-block: 0 48px; }
.page-sources .prose { max-width: 70ch; margin-inline: 0; }
.page-sources .prose p.sources { margin-top: 0; }
