/* ============================================================
   SB SPORT — sbsportsrl.com
   Foglio di stile unico — standard Royaletiger
   ============================================================ */

/* ---------- Font self-hosted (niente terzi, niente banner) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/spacegrotesk-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-var.woff2') format('woff2');
}

/* ---------- Design system ---------- */
:root {
  /* palette: verde campo + verde fluo del logo su neutri caldi */
  --brand: #1b7f3c;
  --brand-dark: #0e2415;
  --brand-deep: #122d1b;
  --accent: #3ee05a;
  --accent-ink: #114d22;
  --ink: #101d14;
  --text: #2e3b33;
  --muted: #5f7066;
  --bg: #fbfdfa;
  --bg-alt: #f0f6ef;
  --line: #dfe9de;
  --white: #ffffff;
  /* tipografia */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  /* sistema */
  --shadow-sm: 0 2px 10px rgba(16, 29, 20, .07);
  --shadow-md: 0 10px 32px rgba(16, 29, 20, .12);
  --shadow-lg: 0 24px 60px rgba(16, 29, 20, .18);
  --radius: 14px;
  --radius-lg: 22px;
  --container: 1240px;
  --nav-h: 80px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
::selection { background: var(--accent); color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--accent-ink); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); letter-spacing: -.02em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-dark { background: var(--brand-dark); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: #c8d6cc; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .82rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 26px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  opacity: .8;
}
.section-dark .eyebrow { color: var(--accent); }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 52px;
}
.section-head .eyebrow { justify-content: center; }
.section-head .eyebrow::after {
  content: '';
  width: 26px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  opacity: .8;
}
.section-head p { color: var(--muted); }
.section-dark .section-head p { color: #c8d6cc; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--accent-ink); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--accent); color: var(--brand-dark); }
.btn-accent { box-shadow: 0 0 0 0 rgba(62, 224, 90, 0); }
.btn-accent:hover { background: #5cf276; color: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 12px 36px rgba(62, 224, 90, .4); }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-outline { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.section-dark .btn-outline, .hero .btn-outline { border-color: rgba(255,255,255,.4); color: var(--white); }
.section-dark .btn-outline:hover, .hero .btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: var(--nav-h);
  background: rgba(14, 36, 21, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header { border-bottom: 1px solid rgba(255,255,255,.06); }
.site-header.scrolled { background: rgba(14, 36, 21, .96); box-shadow: var(--shadow-md); border-bottom-color: rgba(62,224,90,.14); }
.nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .06em;
  color: var(--white);
}
.brand:hover { color: var(--white); }
.brand img { width: 46px; height: auto; }
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: .62rem;
  letter-spacing: .14em;
  color: #9fb8a6;
  text-transform: uppercase;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  display: block;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .98rem;
  color: #d7e4da;
}
.nav-menu a:hover { color: var(--accent); }
.nav-menu a { position: relative; }
.nav-menu a[aria-current="page"] { color: var(--accent); }
.nav-menu a:not(.btn)::after {
  content: '';
  position: absolute; left: 16px; right: 16px; bottom: 4px;
  height: 2px; border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-menu a:not(.btn):hover::after,
.nav-menu a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); }
.nav-cta { margin-left: 8px; }
.nav-cta .btn { padding: 11px 24px; font-size: .92rem; }

/* ---------- Menu mobile (pattern collaudato Royaletiger) ---------- */
body.is-locked {
  position: fixed;
  width: 100%;
  overflow: hidden;
  top: var(--scroll-lock-top, 0);
  overflow-anchor: none;
}
.nav-overlay { display: none; }
.site-header.has-menu-open {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--brand-dark);
}
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.6px;
  background: var(--white);
  transition: transform .3s var(--ease), opacity .25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-overlay {
    display: block;
    position: fixed; inset: 0; z-index: 89;
    background: rgba(0, 0, 0, .45);
    border: 0; padding: 0; cursor: pointer;
    opacity: 0; visibility: hidden;
    transition: opacity .38s var(--ease), visibility 0s linear .38s;
  }
  .nav-overlay.is-open {
    opacity: 1; visibility: visible;
    transition: opacity .38s var(--ease), visibility 0s linear 0s;
  }
  .nav-menu {
    position: fixed; inset: 0 0 0 auto;
    z-index: 95;
    width: min(86vw, 360px);
    background: var(--brand-dark);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 4px; padding: 100px 26px 40px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .38s var(--ease), visibility 0s linear .38s;
  }
  .nav-menu.is-open {
    transform: none;
    visibility: visible;
    transition: transform .38s var(--ease), visibility 0s linear 0s;
  }
  .nav-menu a { padding: 14px 16px; font-size: 1.05rem; border-radius: 12px; }
  .nav-cta { margin: 14px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
}

/* ---------- Hero home ---------- */
.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  color: var(--white);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 72%; }
.hero::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 0%, transparent 18%),
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(62, 224, 90, .12), transparent 55%),
    linear-gradient(100deg, rgba(10, 26, 15, .92) 0%, rgba(10, 26, 15, .66) 48%, rgba(10, 26, 15, .28) 100%);
}
.hero h1 { color: var(--white); max-width: 15ch; }
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}
.hero h1 em::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: .04em;
  height: .12em;
  background: var(--accent);
  opacity: .28;
  border-radius: 999px;
}
.hero .lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #d9e6dc;
  max-width: 52ch;
  margin-bottom: 30px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-stats .stat {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero-stats .stat strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--accent);
}
.hero-stats .stat span { font-size: .84rem; color: #c3d4c8; }
.hero-scroll {
  position: absolute; left: 50%; bottom: 26px;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.6px solid rgba(255,255,255,.4);
  border-radius: 999px;
  display: block;
}
.hero-scroll::before {
  content: '';
  position: absolute; left: 50%; top: 8px;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 999px;
  background: var(--accent);
  animation: scrollcue 1.8s var(--ease) infinite;
}
@media (max-height: 700px) { .hero-scroll { display: none; } }
@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ---------- Marquee ---------- */
.marquee {
  background: var(--brand-dark);
  border-block: 1px solid rgba(62, 224, 90, .18);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #9fb8a6;
  padding: 0 18px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 36px;
}
.marquee-track span::after { content: '◆'; color: var(--accent); font-size: .7em; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* Hero pagine interne */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(56px, 9vw, 96px)) 0 clamp(48px, 7vw, 72px);
  background: var(--brand-dark);
  color: var(--white);
  overflow: hidden;
}
.page-hero-media {
  position: absolute; inset: 0;
  z-index: 0;
}
.page-hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .35;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, var(--brand-dark) 0%, transparent 40%),
    linear-gradient(100deg, rgba(14, 36, 21, .96) 0%, rgba(14, 36, 21, .78) 55%, rgba(14, 36, 21, .45) 100%),
    radial-gradient(ellipse 60% 80% at 85% 20%, rgba(62, 224, 90, .14), transparent 60%);
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); }
.page-hero p { color: #c8d6cc; max-width: 62ch; }
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none; margin: 0 0 18px; padding: 0;
  font-size: .88rem;
}
.breadcrumb a { color: #9fb8a6; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 8px; color: #5c7263; }
.breadcrumb [aria-current] { color: var(--accent); }

/* ---------- Griglie e card ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.feature-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.feature-card::before {
  content: '';
  position: absolute; inset: 0 auto auto 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card .icon {
  box-shadow: 0 8px 20px rgba(27, 127, 60, .25);
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--accent-ink));
  color: var(--accent);
  margin-bottom: 20px;
}
.feature-card .icon svg { width: 26px; height: 26px; }
.feature-card p { color: var(--muted); margin: 0; }

/* split immagine + testo */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.split-media { position: relative; }
.split-media > img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; object-fit: cover; }
.split-media .badge-float {
  position: absolute;
  left: -18px; bottom: 26px;
  background: var(--brand-dark);
  color: var(--white);
  border-radius: var(--radius);
  padding: 16px 22px;
  box-shadow: var(--shadow-lg);
  font-family: var(--font-display);
}
.split-media .badge-float strong { color: var(--accent); font-size: 1.5rem; display: block; line-height: 1.1; }
.split-media .badge-float span { font-size: .82rem; color: #b9cbbe; }
.split-body .checklist { list-style: none; margin: 20px 0 28px; padding: 0; display: grid; gap: 12px; }
.split-body .checklist li { display: flex; gap: 12px; align-items: flex-start; }
.split-body .checklist svg { flex: none; width: 22px; height: 22px; color: var(--brand); margin-top: 3px; }

/* card servizio */
.service-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-card { isolation: isolate; }
.service-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .6s var(--ease); }
.service-card:hover img { transform: scale(1.05); }
.service-card > img, .service-card picture { overflow: hidden; }
.service-card .body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.service-card h3 { margin-bottom: 8px; }
.service-card p { color: var(--muted); flex: 1; }
.service-card .link {
  font-family: var(--font-display);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.service-card .link svg { width: 17px; height: 17px; transition: transform .25s var(--ease); }
.service-card .link:hover svg { transform: translateX(4px); }

/* blocco servizio esteso (pagina servizi) */
.service-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.service-row:not(:first-child) { margin-top: clamp(56px, 8vw, 90px); }
.service-row.is-flipped .service-row-media { order: 2; }
.service-row-media { position: relative; }
.service-row-media::before {
  content: '';
  position: absolute; inset: 18px -18px -18px 18px;
  border: 2px solid rgba(27, 127, 60, .22);
  border-radius: var(--radius-lg);
  z-index: 0;
}
.service-row.is-flipped .service-row-media::before { inset: 18px 18px -18px -18px; }
@media (max-width: 900px) { .service-row-media::before { display: none; } }
.service-row-media img { position: relative; z-index: 1; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.service-row h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.service-row .tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 24px; padding: 0; list-style: none; }
.service-row .tags li {
  font-size: .84rem;
  font-family: var(--font-display);
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  color: var(--accent-ink);
}

.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.feature-card.on-dark .step-num { background: linear-gradient(135deg, var(--accent), #8ff5a0); -webkit-background-clip: text; background-clip: text; }

/* passi "come lavoriamo" */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.feature-card.on-dark { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.feature-card.on-dark h3 { color: var(--white); }
.feature-card.on-dark p { color: #c8d6cc; }
@media (max-width: 1024px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .steps-grid { grid-template-columns: 1fr; } }

/* ---------- Galleria lavori ---------- */
.masonry { columns: 3; column-gap: 20px; }
.masonry figure {
  margin: 0 0 20px;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.masonry figure { cursor: zoom-in; }
.masonry img { width: 100%; transition: transform .45s var(--ease), filter .45s var(--ease); }
.masonry figure:hover img { transform: scale(1.05); filter: brightness(1.06); }
.masonry figcaption { opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.masonry figure:hover figcaption, .masonry figure:focus-visible figcaption { opacity: 1; transform: none; }
@media (hover: none) { .masonry figcaption { opacity: 1; transform: none; } }
.masonry figcaption {
  position: absolute; inset: auto 0 0;
  padding: 36px 16px 14px;
  background: linear-gradient(transparent, rgba(10, 26, 15, .85));
  color: var(--white);
  font-size: .85rem;
  font-family: var(--font-display);
}
.gallery-note { color: var(--muted); font-size: .92rem; margin-top: 26px; }

/* progetto in evidenza */
.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.project-card { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.project-card .media { overflow: hidden; }
.project-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .6s var(--ease); }
.project-card:hover img { transform: scale(1.05); }
.project-card .body { padding: 24px 26px 28px; }
.project-card .meta { font-size: .82rem; color: var(--brand); font-family: var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.project-card p { color: var(--muted); margin: 0; font-size: .95rem; }

/* ---------- Lightbox galleria ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 28px;
  background: rgba(8, 18, 11, .94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.lightbox.is-open {
  opacity: 1; visibility: visible;
  transition: opacity .3s var(--ease), visibility 0s linear 0s;
}
.lightbox figure { margin: 0; max-width: min(1100px, 92vw); text-align: center; }
.lightbox img {
  max-width: 100%; max-height: 82vh;
  width: auto; height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
}
.lightbox figcaption { color: #c8d6cc; font-family: var(--font-display); margin-top: 14px; font-size: .95rem; }
.lightbox .lb-btn {
  position: absolute;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.lightbox .lb-btn:hover { background: rgba(62, 224, 90, .25); border-color: var(--accent); }
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox .lb-prev { left: 8px; } .lightbox .lb-next { right: 8px; }
}
body.lb-locked { overflow: hidden; }

/* ---------- Numeri / counter ---------- */
.stats-band { text-align: center; }
.stats-band .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.stats-band .stat strong {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  color: var(--accent);
  display: block;
}
.stats-band .stat span { color: #b9cbbe; font-size: .92rem; }

/* ---------- Testimonianze ---------- */
.quote-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.quote-card blockquote { margin: 0 0 18px; font-size: 1.02rem; color: var(--text); }
.quote-card .who { display: flex; align-items: center; gap: 12px; }
.quote-card .who .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-alt);
  color: var(--brand);
  font-family: var(--font-display);
  font-weight: 700;
}
.quote-card .who strong { display: block; font-size: .95rem; color: var(--ink); }
.quote-card .who span { font-size: .82rem; color: var(--muted); }
.stars { color: #eab308; letter-spacing: 2px; font-size: .9rem; margin-bottom: 10px; }

/* ---------- Blog ---------- */
.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.post-card .media { overflow: hidden; }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .6s var(--ease); }
.post-card:hover img { transform: scale(1.05); }
.post-card .body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.post-card time { font-size: .82rem; color: var(--muted); }
.post-card h3 { margin: 8px 0 10px; font-size: 1.15rem; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--brand); }
.post-card p { color: var(--muted); font-size: .95rem; flex: 1; }

/* articolo */
.article { max-width: 760px; margin: 0 auto; }
.article h2 { font-size: 1.6rem; margin-top: 1.8em; }
.article h3 { font-size: 1.2rem; margin-top: 1.4em; }
.article img { border-radius: var(--radius-lg); margin: 28px 0; }
.article .intro { font-size: 1.12rem; color: var(--text); }
.article ul { padding-left: 22px; }
.article li { margin-bottom: 8px; }
.article .box {
  background: var(--bg-alt);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 26px 0;
}

/* FAQ */
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 22px;
  margin-bottom: 12px;
}
.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  padding: 18px 0;
  color: var(--ink);
  list-style: none;
  position: relative;
  padding-right: 34px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--brand);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-dark);
  color: var(--white);
  padding: clamp(44px, 7vw, 80px) clamp(26px, 6vw, 80px);
  text-align: center;
}
.cta-banner { border: 1px solid rgba(62, 224, 90, .2); }
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 2px 2px, rgba(255,255,255,.05) 1px, transparent 0),
    radial-gradient(ellipse 55% 90% at 90% 10%, rgba(62, 224, 90, .18), transparent 60%),
    radial-gradient(ellipse 50% 80% at 5% 95%, rgba(27, 127, 60, .3), transparent 60%);
  background-size: 26px 26px, auto, auto;
}
.cta-banner > * { position: relative; }
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: #c8d6cc; max-width: 56ch; margin-inline: auto; }
.cta-banner .hero-ctas { justify-content: center; margin-bottom: 0; margin-top: 28px; }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.contact-info .item {
  display: flex; gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.contact-info .item:last-child { border-bottom: 0; }
.contact-info .icon {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--bg-alt);
  color: var(--brand);
}
.contact-info .icon svg { width: 22px; height: 22px; }
.contact-info h3 { font-size: 1.02rem; margin-bottom: 4px; }
.contact-info p { margin: 0; color: var(--muted); }
.contact-info a { font-weight: 600; }

.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow-md);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.field input, .field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(27, 127, 60, .14);
}
.field textarea { min-height: 140px; resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 6px 0 20px; }
.consent input { margin-top: 4px; }
.form-status { margin-top: 14px; font-size: .95rem; min-height: 1.4em; }
.form-status.is-error { color: #b4232a; }
.form-status.is-ok { color: var(--brand); font-weight: 600; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.map-link {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 26px;
  box-shadow: var(--shadow-sm);
}
.map-link img { width: 100%; object-fit: cover; }
.map-link span {
  position: absolute; inset: auto 16px 16px auto;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .88rem;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--brand-dark);
  color: #c8d6cc;
}
.site-footer::before {
  content: '';
  position: absolute; inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .6;
}
.footer-claim {
  font-family: var(--font-display);
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 6px;
}
.site-footer .top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: clamp(50px, 7vw, 80px) 0 40px;
}
.site-footer h4 {
  color: var(--white);
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #c8d6cc; transition: color .25s var(--ease), padding-left .25s var(--ease); }
.site-footer .top nav a:hover, .site-footer .top div > ul > li > a:hover { padding-left: 6px; }
.site-footer a:hover { color: var(--accent); }
.footer-brand img { width: 150px; height: auto; margin-bottom: 16px; }
.footer-brand p { font-size: .92rem; color: #9fb8a6; max-width: 34ch; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: 4px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 22px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
  color: #9fb8a6;
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }
.footer-bottom a { color: #9fb8a6; }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- Pagina 404 / legali ---------- */
.legal { max-width: 820px; margin: 0 auto; }
.legal h2 { font-size: 1.45rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.1rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 18px 0; }
.legal th, .legal td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.legal th { background: var(--bg-alt); font-family: var(--font-display); }

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--nav-h) + 60px) 22px 80px;
}
.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(5rem, 16vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--brand);
  opacity: .25;
}

/* ---------- Reveal (il contenuto parte VISIBILE: il JS aggiunge l'animazione) ---------- */
.reveal { opacity: 1; transform: none; }
.js-anim .reveal { opacity: 0; transform: translateY(16px); transition: opacity .4s ease-out, transform .4s ease-out; }
.js-anim .reveal.is-visible { opacity: 1; transform: none; }
.js-anim .grid-2 > .reveal:nth-child(2), .js-anim .grid-3 > .reveal:nth-child(2), .js-anim .steps-grid > .reveal:nth-child(2) { transition-delay: .06s; }
.js-anim .grid-3 > .reveal:nth-child(3), .js-anim .steps-grid > .reveal:nth-child(3) { transition-delay: .12s; }
.js-anim .steps-grid > .reveal:nth-child(4) { transition-delay: .18s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .masonry { columns: 2; }
  .stats-band .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .split, .service-row, .contact-grid { grid-template-columns: 1fr; }
  .service-row.is-flipped .service-row-media { order: 0; }
  .site-footer .top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .form-row { grid-template-columns: 1fr; }
  .site-footer .top { grid-template-columns: 1fr; }
  .split-media .badge-float { left: 12px; }
}
@media (max-width: 480px) {
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .stats-band .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
