/* =========================================================
   DA.MA. SRL — Foglio di stile condiviso (v3)
   Palette: blu acciaio profondo + accento verde acqua del logo
   Tipografia: Oswald (titoli) / Open Sans (testo), ospitati in fonts/

   Design system di riferimento: design-system/dama-srl/MASTER.md
   Pattern "Trust & Authority + Conversion", stile "Accessible & Ethical":
   contrasto AA su tutti i testi, focus sempre visibile, motion riducibile.
   ========================================================= */

/* =========================================================
   0. CARATTERI (ospitati sul sito)
   Oswald e Open Sans sono serviti da fonts/ e non da Google:
   nessun dato del visitatore parte verso terzi al caricamento.
   Un file variabile per alfabeto copre tutti i pesi 400-700;
   il browser scarica "latin-ext" solo se la pagina lo richiede.
   ========================================================= */
@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/oswald-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/oswald-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/open-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/open-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* =========================================================
   1. TOKEN
   ========================================================= */
:root {
  /* --- Superfici e testo --- */
  --color-bg: #ffffff;
  --color-surface: #f5f7f9;
  --color-surface-2: #eef2f6;
  --color-text: #22303c;          /* 13.5:1 su bianco */
  --color-muted: #546678;         /* 5.9:1 su bianco, 5.5:1 su --color-surface */
  --color-dark: #0e1c28;          /* blu acciaio profondo */
  --color-dark-2: #16283a;
  --color-dark-3: #1e3348;
  --color-border: #e2e7ec;

  /* --- Accento verde acqua (il colore del logo): ruoli e contrasti ---
     accent        -> #12a29b del logo, solo elementi grafici (bordi, icone,
                      filetti): 3.2:1 su bianco, ok per UI
     accent-text   -> testo e link su fondo chiaro: 5.6:1, AA (4.9:1 su accent-soft)
     accent-strong -> fondo dei bottoni con testo bianco: 5.1:1, AA
     accent-deep   -> fine gradiente / hover: 7.1:1, AA
     accent-bright -> testo e accenti su fondo scuro: 9.3:1 su --color-dark   */
  --color-accent: #12a29b;
  --color-accent-text: #0a756e;
  --color-accent-strong: #0b7b74;
  --color-accent-deep: #08635d;
  --color-accent-bright: #4fd1c7;
  --color-accent-soft: #e1f4f2;

  /* --- Testo su fondo scuro --- */
  --color-on-dark: #e6edf3;
  --color-on-dark-muted: #b9c6d1;

  /* --- Ombre --- */
  --shadow-sm: 0 1px 4px rgba(14, 28, 40, 0.06);
  --shadow: 0 6px 24px rgba(14, 28, 40, 0.09);
  --shadow-lg: 0 14px 40px rgba(14, 28, 40, 0.16);

  /* --- Forma --- */
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  /* --- Spaziatura (scala standard, density 5/10) --- */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;

  /* --- Layout --- */
  --maxw: 1180px;
  --maxw-text: 70ch;
  --navh: 72px;
  --section-y: clamp(56px, 7vw, 92px);

  /* --- Tipografia fluida --- */
  --font-head: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  --fs-hero: clamp(2rem, 1.2rem + 3.6vw, 3.4rem);
  --fs-h1: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem);
  --fs-h2: clamp(1.5rem, 1.15rem + 1.6vw, 2.3rem);
  --fs-h3: clamp(1.15rem, 1.08rem + 0.35vw, 1.3rem);
  --fs-lead: clamp(1.02rem, 0.99rem + 0.2vw, 1.12rem);

  /* --- Motion --- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 150ms;
  --t: 220ms;
  --t-slow: 400ms;
}

/* =========================================================
   2. RESET
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  /* evita che le ancore finiscano sotto la navbar fissa */
  scroll-padding-top: calc(var(--navh) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  padding-top: var(--navh); /* compensa la navbar fissa */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.18;
  color: var(--color-dark);
  letter-spacing: 0.3px;
  text-wrap: balance; /* evita titoli con una parola orfana */
}

p {
  text-wrap: pretty;
}

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

a:hover {
  color: var(--color-accent-deep);
  text-decoration: underline;
}

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

svg {
  display: block;
}

ul, ol {
  list-style-position: outside;
}

strong {
  font-weight: 700;
}

/* --- Focus visibile ovunque (mai rimosso, solo sostituito) --- */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Sul fondo scuro serve un anello chiaro per restare leggibile */
:where(.navbar, .hero, .footer, .cta-band)
  :where(a, button, input, textarea, summary):focus-visible {
  outline-color: var(--color-accent-bright);
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

/* --- Solo per screen reader --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --- Skip link: primo elemento raggiungibile da tastiera --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 2000;
  padding: 12px 20px;
  background: var(--color-accent-strong);
  color: #fff;
  font-family: var(--font-head);
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top var(--t) var(--ease);
}

.skip-link:focus {
  top: 0;
  color: #fff;
  text-decoration: none;
}

/* =========================================================
   3. LAYOUT
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--section-y) 0;
}

.section--alt {
  background: var(--color-surface);
}

.section--tight {
  padding: clamp(36px, 4vw, 56px) 0;
}

.center {
  text-align: center;
}

.mt-lg {
  margin-top: var(--space-lg);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--color-accent-text);
  margin-bottom: 10px;
}

.section-title {
  font-size: var(--fs-h2);
  margin-bottom: 14px;
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-bright));
  margin-top: 16px;
  border-radius: 2px;
}

.section-title--center {
  text-align: center;
}

.section-title--center::after {
  margin-left: auto;
  margin-right: auto;
}

.lead {
  font-size: var(--fs-lead);
  color: var(--color-muted);
  max-width: var(--maxw-text);
  margin-bottom: var(--space-md);
}

.lead--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lead:last-child {
  margin-bottom: 0;
}

/* =========================================================
   4. NAVBAR
   ========================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--navh);
  background: rgba(14, 28, 40, 0.97);
  border-bottom: 3px solid var(--color-accent);
  z-index: 1000;
  transition: box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}

@supports (backdrop-filter: blur(8px)) {
  .navbar {
    background: rgba(14, 28, 40, 0.9);
    backdrop-filter: blur(10px);
  }
}

/* Classe aggiunta da main.js dopo lo scroll: stacca la barra dal contenuto */
.navbar.is-scrolled {
  background: rgba(10, 20, 29, 0.98);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.navbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

/* Logo in versione negativa (scritta bianca) per il fondo scuro della navbar */
.navbar__brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar__brand img {
  display: block;
  height: 48px;
  width: auto;
}

.navbar__links {
  list-style: none;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-left: auto;
}

.navbar__links a {
  display: block;
  color: var(--color-on-dark);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.navbar__links a:hover {
  color: #fff;
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

/* La pagina corrente è marcata con aria-current, non con una classe */
.navbar__links a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--color-accent);
}

/* --- Hamburger: <button> vero, non una label --- */
.navbar__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}

.navbar__bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.navbar__bars span {
  display: block;
  height: 3px;
  width: 24px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--t) var(--ease), opacity var(--t-fast);
}

.navbar__hamburger[aria-expanded="true"] .navbar__bars span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.navbar__hamburger[aria-expanded="true"] .navbar__bars span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger[aria-expanded="true"] .navbar__bars span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Sfondo scuro dietro al menu mobile aperto */
.nav-backdrop {
  position: fixed;
  inset: var(--navh) 0 0;
  background: rgba(6, 12, 18, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility 0s linear var(--t);
  z-index: 998;
}

.nav-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--t) var(--ease), visibility 0s linear 0s;
}

/* =========================================================
   5. HERO
   ========================================================= */
.hero {
  position: relative;
  color: #fff;
  background: var(--color-dark);
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Il gradiente garantisce il contrasto del testo su qualsiasi foto */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(10, 20, 29, 0.95) 28%,
    rgba(14, 28, 40, 0.78) 62%,
    rgba(14, 28, 40, 0.55) 100%
  );
}

.hero__content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) var(--space-md);
  min-height: clamp(420px, 56vh, 540px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero .eyebrow {
  color: var(--color-accent-bright);
}

.hero h1 {
  color: #fff;
  font-size: var(--fs-hero);
  font-weight: 700;
  max-width: 17ch;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero__subtitle {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.22rem);
  color: #ccd7e0;
  margin: 18px 0 var(--space-lg);
  max-width: 58ch;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* --- Intestazione delle pagine interne --- */
.page-head {
  background:
    linear-gradient(105deg, rgba(14, 28, 40, 0.97), rgba(22, 40, 58, 0.93)),
    var(--color-dark-2);
  color: #fff;
  padding: clamp(48px, 6vw, 72px) 0 clamp(44px, 5vw, 64px);
  border-bottom: 4px solid var(--color-accent);
}

/* Su fondo scuro il titoletto usa la variante chiara: 8:1 invece di 2.7:1 */
.page-head .eyebrow {
  color: var(--color-accent-bright);
}

.page-head h1 {
  color: #fff;
  font-size: var(--fs-h1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-head p {
  color: var(--color-on-dark-muted);
  max-width: 62ch;
  margin-top: 12px;
  font-size: var(--fs-lead);
}

/* --- Breadcrumb --- */
.breadcrumb {
  margin-bottom: 14px;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  font-size: 0.85rem;
  color: #9fb0c0;
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 8px;
  color: #6c8093;
}

.breadcrumb a {
  color: #bdcbd7;
}

.breadcrumb a:hover {
  color: var(--color-accent-bright);
}

.breadcrumb [aria-current="page"] {
  color: #fff;
}

/* =========================================================
   6. BOTTONI
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  /* 44px di altezza minima: bersaglio tattile conforme */
  min-height: 48px;
  font-family: var(--font-head);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 13px 30px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 0.95rem;
  text-align: center;
  transition: background var(--t-fast), color var(--t-fast),
    border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t);
}

.btn:hover {
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Verde acqua scuro: bianco su questo fondo raggiunge 5.1:1 (AA) */
.btn--primary {
  background: linear-gradient(120deg, var(--color-accent-strong), var(--color-accent-deep));
  color: #fff;
  box-shadow: 0 6px 18px rgba(8, 99, 93, 0.32);
}

.btn--primary:hover {
  background: linear-gradient(120deg, var(--color-accent-deep), #064e49);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(8, 99, 93, 0.42);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn--ghost:hover {
  background: #fff;
  color: var(--color-dark);
  border-color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--color-accent-text);
  border-color: currentColor;
}

.btn--outline:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-deep);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* =========================================================
   7. GRIGLIE E CARD
   ========================================================= */
.grid {
  display: grid;
  gap: var(--space-md);
}

/* auto-fit: le colonne si riducono da sole, senza media query dedicate */
.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 4px solid transparent;
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-top-color: var(--color-accent);
}

.card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-text);
  background: var(--color-accent-soft);
  border-radius: 12px;
  margin-bottom: 18px;
}

.card__icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  font-size: var(--fs-h3);
  margin-bottom: 10px;
}

.card p {
  color: var(--color-muted);
  font-size: 0.98rem;
}

/* --- Blocco testo + immagine --- */
.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}

.split img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* =========================================================
   8. BANDA DI CREDIBILITÀ + NUMERI
   ========================================================= */
.proof {
  background: var(--color-dark-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
}

.proof__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px clamp(20px, 4vw, 46px);
  list-style: none;
}

.proof__item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-on-dark);
  font-family: var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.proof__item svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent-bright);
  flex-shrink: 0;
}

.proof__item a {
  color: var(--color-on-dark);
}

.proof__item a:hover {
  color: var(--color-accent-bright);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--space-md);
  text-align: center;
}

.stat {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 30px 18px;
  box-shadow: var(--shadow-sm);
}

.stat__number {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 700;
  color: var(--color-accent-text);
  line-height: 1.1;
}

.stat__label {
  color: var(--color-muted);
  margin-top: 8px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-head);
  font-weight: 400;
}

/* =========================================================
   9. SERVIZI IN DETTAGLIO
   ========================================================= */
.service-detail {
  display: flex;
  gap: var(--space-md);
  padding: 30px 28px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.service-detail:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
}

.service-detail__num {
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--color-accent);   /* 3.2:1 su bianco: basta per testo di questa dimensione */
  min-width: 56px;
  line-height: 1;
}

.service-detail h3 {
  font-size: var(--fs-h3);
  margin-bottom: 8px;
}

.service-detail p {
  color: var(--color-muted);
}

/* Etichette dei materiali / applicazioni sotto ogni servizio */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-top: 14px;
}

.tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  white-space: nowrap;
}

/* =========================================================
   10. LISTA CON SPUNTE
   ========================================================= */
.check-list {
  list-style: none;
  margin-top: 8px;
}

.check-list li {
  position: relative;
  padding: 12px 0 12px 38px;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
}

.check-list li:last-child {
  border-bottom: none;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-accent-strong);
  /* La spunta è disegnata in SVG: nessuna emoji, nessun carattere tipografico */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

.check-list strong {
  color: var(--color-dark);
}

/* =========================================================
   11. GALLERIA + LIGHTBOX
   ========================================================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--space-md);
}

.gallery figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--color-dark-2);
  margin: 0;
}

/* Il bottone avvolge l'immagine: apribile da mouse, tastiera e touch */
.gallery__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.gallery figure:hover img,
.gallery__btn:focus-visible img {
  transform: scale(1.06);
}

.gallery figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 46px 22px 18px;
  background: linear-gradient(to top, rgba(8, 16, 24, 0.92), rgba(8, 16, 24, 0.55) 55%, transparent);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-align: left;
  pointer-events: none;
}

.gallery figcaption small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: #d3dce4;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.5;
}

/* --- Lightbox (dialog nativo) --- */
.lightbox {
  border: 0;
  padding: 0;
  max-width: min(94vw, 1200px);
  max-height: 94vh;
  background: transparent;
  overflow: visible;
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(6, 12, 18, 0.9);
}

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lightbox__img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #0a141d;
}

.lightbox__caption {
  font-family: var(--font-head);
  letter-spacing: 0.6px;
  text-align: center;
  color: #fff;
}

.lightbox__caption small {
  display: block;
  font-family: var(--font-body);
  color: #c3cdd6;
  letter-spacing: 0;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(14, 28, 40, 0.85);
  color: #fff;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}

.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
}

.lightbox__close {
  top: -14px;
  right: -14px;
}

.lightbox__nav--prev { left: -16px; top: calc(50% - 24px); }
.lightbox__nav--next { right: -16px; top: calc(50% - 24px); }

.lightbox__close svg,
.lightbox__nav svg {
  width: 22px;
  height: 22px;
}

/* =========================================================
   12. CONTATTI
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

/* Le colonne possono restringersi sotto la larghezza del loro contenuto */
.contact-grid > * {
  min-width: 0;
}

.contact-list {
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t);
}

.contact-list li:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow);
}

.contact-list__icon {
  width: 46px;
  height: 46px;
  min-width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-text);
  background: var(--color-accent-soft);
  border-radius: 10px;
}

.contact-list__icon svg {
  width: 22px;
  height: 22px;
}

.contact-list strong {
  display: block;
  color: var(--color-dark);
  font-family: var(--font-head);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 0.88rem;
  margin-bottom: 2px;
  font-weight: 500;
}

.contact-list a,
.contact-list span {
  font-size: 1.05rem;
  font-weight: 600;
  overflow-wrap: anywhere;   /* l'indirizzo email puo andare a capo sui telefoni stretti */
}

.contact-list .contact-list__note {
  display: block;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--color-muted);
}

.map-embed {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
  /* spazio riservato: la mappa non fa saltare il layout mentre carica */
  aspect-ratio: 4 / 3;
  background: var(--color-surface-2);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Senza consenso: al posto della mappa, spiegazione + pulsante + link esterno */
/* Niente 4:3 qui: con l'altezza minima il browser ricaverebbe la larghezza
   dalle proporzioni (320 x 4/3 = 427px) e il riquadro uscirebbe dalla colonna */
.map-embed--consent {
  aspect-ratio: auto;
  min-height: 320px;
  display: flex;
}

.map-consent {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px 24px;
  text-align: center;
  line-height: 1.5;
  background:
    radial-gradient(circle at 50% 38%, rgba(18, 162, 155, 0.08), transparent 60%),
    var(--color-surface-2);
}

.map-consent[hidden] {
  display: none;
}

.map-consent svg {
  width: 40px;
  height: 40px;
  color: var(--color-accent-text);
}

.map-consent__title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.map-consent__text {
  max-width: 42ch;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.map-consent__link {
  font-weight: 600;
  color: var(--color-accent-text);
  text-decoration: underline;
}

.no-js .map-consent__text,
.no-js .map-consent__btn {
  display: none;
}

/* =========================================================
   13. FASCIA CTA
   ========================================================= */
.cta-band {
  background:
    linear-gradient(105deg, rgba(14, 28, 40, 0.96), rgba(30, 51, 72, 0.92)),
    var(--color-dark-2);
  color: #fff;
  text-align: center;
  padding: clamp(48px, 6vw, 68px) 0;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.4rem, 1.15rem + 1.1vw, 2rem);
  margin-bottom: 10px;
}

.cta-band p {
  color: var(--color-on-dark-muted);
  margin-bottom: var(--space-md);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   14. PARTNER
   ========================================================= */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--space-md);
}

.partner {
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-top: 4px solid transparent;
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.partner:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-top-color: var(--color-accent);
}

/* Sigla o icona del partner: usata quando non c'è un logo da inserire */
.partner__logo {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 1px;
  overflow: hidden;
}

.partner__logo svg {
  width: 26px;
  height: 26px;
}

/* Se al posto della sigla si mette un logo vero: <img> dentro .partner__logo */
.partner__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

/* Logo vero in formato libero: i loghi hanno proporzioni molto diverse
   (quadrati, 3:1, 4:1), quindi altezza fissa e larghezza massima */
.partner__logo--img {
  width: auto;
  height: 64px;
  justify-content: flex-start;
  margin-bottom: 20px;
  background: none;
  border-radius: 0;
  overflow: visible;
}

.partner__logo--img img {
  width: auto;
  height: 100%;
  max-width: 200px;
  object-position: left center;
  background: none;
}

.partner__name {
  font-size: var(--fs-h3);
  margin-bottom: 8px;
}

.partner__role {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-head);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  margin-bottom: 14px;
}

.partner p {
  color: var(--color-muted);
  font-size: 0.98rem;
}

.partner__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--font-head);
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: var(--color-accent-text);
  font-weight: 600;
}

.partner__link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-fast) var(--ease);
}

.partner__link:hover svg {
  transform: translateX(3px);
}

/* =========================================================
   15. FAQ
   ========================================================= */
.faq {
  max-width: 820px;
  margin: 0 auto;
}

.faq details {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq details[open] {
  border-color: var(--color-accent);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  min-height: 48px;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-dark);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4470a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--t) var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.faq summary:hover {
  background: var(--color-surface);
}

.faq__answer {
  padding: 0 22px 20px;
  color: var(--color-muted);
}

/* =========================================================
   16. FOOTER
   ========================================================= */
.footer {
  background: #0a141d;
  color: #c4ccd4;
  padding: clamp(40px, 5vw, 56px) 0 24px;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer h2 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  position: relative;
  padding-bottom: 10px;
}

.footer h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

/* Il primo "titolo" del footer e il logo: niente filetto colorato sotto */
.footer .footer__brand {
  padding-bottom: 0;
  margin-bottom: 18px;
}

.footer .footer__brand::after {
  display: none;
}

.footer__brand img {
  display: block;
  height: 56px;
  width: auto;
}

.footer p,
.footer a,
.footer li,
.footer address {
  color: #aeb9c4;   /* 8.9:1 su #0a141d */
  font-size: 0.95rem;
  font-style: normal;
}

.footer a:hover {
  color: var(--color-accent-bright);
}

.footer ul {
  list-style: none;
}

.footer ul li a {
  display: inline-block;
  padding: 6px 0;
}

.footer__bottom {
  border-top: 1px solid #1c2b3a;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #8e9aa6;   /* 5.9:1 su #0a141d */
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.footer__legal span {
  color: #aeb9c4;
  font-size: 0.95rem;   /* stesso corpo dei link del footer */
}

.footer__link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  color: #aeb9c4;   /* come i link del footer: 8.9:1 */
  cursor: pointer;
}

.footer__link-btn:hover {
  color: var(--color-accent-bright);
  text-decoration: underline;
}

/* Senza JavaScript il pannello delle preferenze non esiste: niente pulsante */
.no-js [data-cookie-settings] {
  display: none;
}

/* =========================================================
   17. TORNA SU
   ========================================================= */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--color-accent-strong);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease),
    visibility 0s linear var(--t), background var(--t-fast);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease),
    visibility 0s linear 0s, background var(--t-fast);
}

.to-top:hover {
  background: var(--color-accent-deep);
}

.to-top svg {
  width: 22px;
  height: 22px;
}

/* =========================================================
   18. COMPARSA AL SCROLL
   Lo stato iniziale si applica solo se il JS è attivo (classe .js
   su <html>): senza JS il contenuto resta visibile.
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Effetto a cascata sugli elementi di una griglia */
.js .reveal[data-delay="1"] { transition-delay: 70ms; }
.js .reveal[data-delay="2"] { transition-delay: 140ms; }
.js .reveal[data-delay="3"] { transition-delay: 210ms; }
.js .reveal[data-delay="4"] { transition-delay: 280ms; }

/* =========================================================
   19. BANNER DEI COOKIE
   Compare alla prima visita (lo crea main.js). Sopra il "torna su"
   ma sotto il menu mobile, cosi non ne copre le voci.
   ========================================================= */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 950;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 20px 24px;
  background: var(--color-dark-2);
  color: var(--color-on-dark);
  border: 1px solid var(--color-dark-3);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner__text {
  flex: 1 1 340px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.cookie-banner__title {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #fff;
}

.cookie-banner__text a {
  color: var(--color-accent-bright);
  text-decoration: underline;
}

/* Accetta e Rifiuta hanno la stessa dimensione: nessuna scelta "nascosta" */
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie-banner__actions .btn {
  min-width: 132px;
  padding: 11px 22px;
}

@media (max-width: 480px) {
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 18px;
  }

  .cookie-banner__actions,
  .cookie-banner__actions .btn {
    flex: 1 1 auto;
  }
}

@media print {
  .cookie-banner {
    display: none !important;
  }
}

/* =========================================================
   20. RESPONSIVE
   ========================================================= */

/* Sotto i 1024px la navigazione passa al menu a scomparsa */
@media (max-width: 1024px) {
  .navbar__hamburger {
    display: flex;
    order: 3;
  }

  .navbar__links {
    position: fixed;
    top: var(--navh);
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(300px, 80vw);
    height: calc(100dvh - var(--navh));
    overflow-y: auto;
    background: var(--color-dark-2);
    padding: 12px 0 32px;
    transform: translateX(100%);
    /* visibility toglie i link dall'ordine di tabulazione mentre il menu è
       chiuso: senza questo si può arrivare con Tab a voci fuori schermo */
    visibility: hidden;
    /* visibility è una proprietà discreta: senza ritardo esplicito scatterebbe
       a metà transizione. In apertura cambia subito, in chiusura attende la
       fine dello scorrimento. */
    transition: transform var(--t-slow) var(--ease), visibility 0s linear var(--t-slow);
    box-shadow: -6px 0 22px rgba(0, 0, 0, 0.34);
    z-index: 999;
  }

  .navbar__links.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform var(--t-slow) var(--ease), visibility 0s linear 0s;
  }

  .navbar__links a {
    padding: 15px 26px;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .navbar__links a:hover,
  .navbar__links a[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.05);
  }

  /* Blocca lo scroll del corpo mentre il menu è aperto */
  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  .service-detail {
    flex-direction: column;
    gap: 8px;
    padding: 24px 20px;
  }

  .service-detail:hover {
    transform: none;
  }

  .lightbox__close { top: 8px; right: 8px; }
  .lightbox__nav--prev { left: 6px; }
  .lightbox__nav--next { right: 6px; }

  .footer__bottom {
    justify-content: center;
    text-align: center;
  }

  .footer__legal {
    justify-content: center;   /* come il copyright sopra */
  }

  .to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .navbar__brand img {
    height: 42px;
  }
}

/* =========================================================
   21. PREFERENZE UTENTE E STAMPA
   ========================================================= */

/* Chi ha ridotto le animazioni di sistema vede subito lo stato finale */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .card:hover,
  .partner:hover,
  .service-detail:hover,
  .btn--primary:hover {
    transform: none;
  }
}

/* Modalità a contrasto elevato di Windows / forced colors */
@media (forced-colors: active) {
  .btn,
  .card,
  .partner,
  .stat {
    border: 1px solid ButtonText;
  }

  .navbar__links a[aria-current="page"] {
    border-bottom-color: Highlight;
  }
}

@media print {
  .navbar,
  .to-top,
  .cta-band,
  .nav-backdrop,
  .skip-link,
  .map-embed {
    display: none !important;
  }

  body {
    padding-top: 0;
    color: #000;
    background: #fff;
  }

  .page-head,
  .hero {
    background: #fff !important;
    color: #000;
  }

  .page-head h1,
  .hero h1,
  .page-head p {
    color: #000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }
}
