/* =============================================================
   Pegasus Services — Ispezioni Termografiche Industriali
   Design system "Thermal Journey" · Royaletiger
   ============================================================= */

:root {
  /* --- palette brand --- */
  --brand:        #2f9df7;
  --brand-dark:   #1265b4;
  --brand-soft:   #7fd2ff;
  --accent:       #ff6a1a;
  --accent-warm:  #ffbe2e;

  /* --- superfici --- */
  --ink:          #04070d;
  --ink-2:        #070c15;
  --panel:        #0b1220;
  --panel-2:      #101a2b;
  --line:         rgba(127, 200, 255, .14);
  --line-strong:  rgba(127, 200, 255, .30);

  /* --- testo --- */
  --white:        #eaf3ff;
  --text:         #b9c8db;
  --muted:        #7a8ba3;

  /* --- scala termica (usata ovunque: barre, gradienti, bordi) --- */
  --t0: #061034;
  --t1: #1a52d6;
  --t2: #12b9b0;
  --t3: #b6e534;
  --t4: #ffb400;
  --t5: #ff4d1a;
  --t6: #fff2cf;
  --thermal: linear-gradient(90deg, var(--t0), var(--t1), var(--t2), var(--t3), var(--t4), var(--t5), var(--t6));

  /* --- tipografia --- */
  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* --- sistema --- */
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6);
  --glow:      0 0 0 1px rgba(127, 200, 255, .18), 0 0 40px rgba(47, 157, 247, .18);
  --radius:    12px;
  --radius-lg: 20px;
  --container: 1260px;
  --nav-h:     74px;
  --ease:      cubic-bezier(.22, 1, .36, 1);
}

/* ============================ reset ============================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--brand); color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--white);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(2.5rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.4rem); }
h4 { font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; }

/* ============================ layout ============================ */
.container {
  width: min(100% - 2.6rem, var(--container));
  margin-inline: auto;
}

.section { padding: clamp(5rem, 10vw, 9rem) 0; position: relative; }
.section-alt { background: var(--ink-2); }
.section-panel {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(47, 157, 247, .10), transparent 60%),
    var(--ink-2);
}

.section-head { max-width: 760px; margin-bottom: clamp(2.6rem, 5vw, 4rem); }
.section-head.is-center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 1.1rem; font-size: 1.06rem; }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.24rem); color: #cddcee; }

/* eyebrow con led termico */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand-soft);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: led 2.4s ease-in-out infinite;
}
@keyframes led { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* riga termica decorativa */
.thermal-rule {
  height: 3px;
  width: 220px;
  border-radius: 3px;
  background: var(--thermal);
  margin-bottom: 1.6rem;
}

/* ============================ bottoni ============================ */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-warm));
  color: #14090a;
  box-shadow: 0 10px 30px rgba(255, 106, 26, .28);
}
.btn-primary:hover { box-shadow: 0 16px 44px rgba(255, 106, 26, .42); }

.btn-outline {
  border-color: var(--line-strong);
  color: var(--white);
  background: rgba(11, 18, 32, .55);
  backdrop-filter: blur(8px);
}
.btn-outline:hover { border-color: var(--brand); background: rgba(47, 157, 247, .14); }

.btn-ghost { color: var(--brand-soft); padding-inline: 0; }
.btn-ghost:hover { color: var(--white); }

.btn-sm { padding: .68rem 1.25rem; font-size: .88rem; }

/* link "scopri" con freccia */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-soft);
  transition: gap .3s var(--ease), color .3s var(--ease);
}
.arrow-link::after { content: "→"; transition: transform .3s var(--ease); }
.arrow-link:hover { color: var(--white); gap: .85rem; }

/* ============================ header ============================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(4, 7, 13, .82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
}

.brand { display: flex; align-items: center; gap: .7rem; }
.brand img { width: 42px; height: 39px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .14em;
  color: var(--white);
  text-transform: uppercase;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: .58rem;
  letter-spacing: .2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: .28rem;
}

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links > .btn { display: none; }
.nav-links a {
  font-size: .93rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding: .3rem 0;
  transition: color .3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--thermal);
  transition: width .35s var(--ease);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--white); }

.nav-cta { display: flex; align-items: center; gap: .9rem; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(11, 18, 32, .6);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 13px;
  width: 20px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .35s var(--ease), opacity .25s;
}
.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ============================ scena 3D ============================ */
#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#gl.is-ready { opacity: 1; }

/* grading: vignette + scanline + rumore */
.gl-grade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
  background:
    radial-gradient(130% 100% at 50% 50%, transparent 42%, rgba(2, 4, 9, .82) 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 3px);
  mix-blend-mode: normal;
}
.gl-grade.is-ready { opacity: 1; }

/* fallback statico quando WebGL non è disponibile (o JS è disattivato) */
.gl-fallback {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #04070d url("../img/hero-trasformatore.webp") center/cover no-repeat;
  filter: saturate(1.1);
}
html.no-webgl .gl-fallback { display: block; }
@media (max-width: 860px) {
  .gl-fallback { background-image: url("../img/hero-trasformatore-sm.webp"); }
}
.gl-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 13, .72), rgba(4, 7, 13, .92));
}

/* ============================ HUD termocamera ============================ */
.hud {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  color: rgba(159, 214, 255, .78);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .8s ease;
}
.hud.is-ready { opacity: 1; }

.hud-corner {
  position: absolute;
  width: 34px; height: 34px;
  border: 1px solid rgba(127, 200, 255, .4);
}
.hud-corner.tl { top: 92px; left: 26px; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 92px; right: 26px; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 26px; left: 26px; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 26px; right: 26px; border-left: 0; border-top: 0; }

.hud-topleft  { position: absolute; top: 96px; left: 70px; display: grid; gap: .32rem; }
.hud-topright { position: absolute; top: 96px; right: 70px; text-align: right; display: grid; gap: .32rem; }
.hud-botleft  { position: absolute; bottom: 30px; left: 70px; display: grid; gap: .45rem; }
.hud-botright { position: absolute; bottom: 30px; right: 70px; text-align: right; display: grid; gap: .45rem; }

.hud-rec { display: inline-flex; align-items: center; gap: .45rem; color: var(--accent); }
.hud-rec::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: led 1.6s steps(1) infinite;
}

.hud-temp {
  font-size: 1.35rem;
  letter-spacing: .02em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 106, 26, .75);
}

/* barra scala termica verticale */
.hud-scale {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.hud-scale-bar {
  width: 9px;
  height: 190px;
  border-radius: 6px;
  background: linear-gradient(0deg, var(--t0), var(--t1), var(--t2), var(--t3), var(--t4), var(--t5), var(--t6));
  border: 1px solid rgba(127, 200, 255, .3);
}
.hud-scale-labels { display: flex; flex-direction: column; justify-content: space-between; height: 190px; font-size: .6rem; }

/* mirino centrale */
.hud-reticle {
  position: absolute;
  left: 50%; top: 50%;
  width: 118px; height: 118px;
  transform: translate(-50%, -50%);
  opacity: .55;
}
.hud-reticle::before,
.hud-reticle::after {
  content: "";
  position: absolute;
  background: rgba(159, 214, 255, .6);
}
.hud-reticle::before { left: 50%; top: 0; width: 1px; height: 100%; }
.hud-reticle::after { top: 50%; left: 0; height: 1px; width: 100%; }
.hud-reticle span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(159, 214, 255, .35);
  border-radius: 50%;
  animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(.9); opacity: .5; } 50% { transform: scale(1.06); opacity: .95; } }

/* barra di avanzamento del viaggio */
.hud-progress {
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 190px;
  background: rgba(127, 200, 255, .18);
  border-radius: 2px;
  overflow: hidden;
}
.hud-progress i {
  position: absolute;
  inset: auto 0 auto 0;
  top: 0;
  height: 0%;
  background: var(--thermal);
  background-size: 100% 400px;
  display: block;
}

/* ============================ il viaggio (stage) ============================ */
.stage { position: relative; z-index: 3; }
.stage-layer {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.chapter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s ease, visibility .55s;
}
.chapter.is-active { opacity: 1; visibility: visible; }
.chapter-inner {
  position: relative;
  transform: translateY(46px);
  transition: transform 1s var(--ease);
  max-width: 680px;
}
/* velo scuro dietro al testo: la scena resta leggibile senza coprirla */
.chapter-inner::before {
  content: "";
  position: absolute;
  inset: -14% -22% -18% -22%;
  z-index: -1;
  background: radial-gradient(60% 58% at 42% 50%, rgba(3, 6, 12, .88) 0%, rgba(3, 6, 12, .62) 45%, rgba(3, 6, 12, 0) 78%);
}
.chapter.align-right .chapter-inner::before { background: radial-gradient(60% 58% at 58% 50%, rgba(3, 6, 12, .88) 0%, rgba(3, 6, 12, .62) 45%, rgba(3, 6, 12, 0) 78%); }
.chapter.align-center .chapter-inner::before { background: radial-gradient(62% 60% at 50% 50%, rgba(3, 6, 12, .88) 0%, rgba(3, 6, 12, .6) 46%, rgba(3, 6, 12, 0) 78%); }
.chapter.is-active .chapter-inner { transform: translateY(0); }
.chapter.align-right { justify-content: flex-end; }
.chapter.align-right .chapter-inner { text-align: right; margin-left: auto; }
.chapter.align-center { justify-content: center; text-align: center; }
.chapter.align-center .chapter-inner { margin-inline: auto; }

.chapter h1, .chapter h2 { margin-bottom: 1.3rem; }
.chapter p { font-size: clamp(1rem, 1.5vw, 1.18rem); color: #cbdaeb; max-width: 56ch; }
.chapter.align-right p { margin-left: auto; }
.chapter.align-center p { margin-inline: auto; }
.chapter-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.1rem; }
.chapter.align-right .chapter-actions { justify-content: flex-end; }
.chapter.align-center .chapter-actions { justify-content: center; }

.chapter-index {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .3em;
  color: var(--accent-warm);
  margin-bottom: .9rem;
  display: block;
}

/* riga dati sotto al capitolo */
.chapter-data {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.chapter-data b { display: block; color: var(--white); font-size: 1.5rem; letter-spacing: 0; margin-bottom: .1rem; font-weight: 600; }

/* hint di scroll */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity .5s ease;
}
.scroll-hint i {
  width: 1px; height: 42px;
  background: linear-gradient(180deg, var(--brand-soft), transparent);
  animation: drop 2s ease-in-out infinite;
}
@keyframes drop { 0% { transform: scaleY(.2); transform-origin: top; opacity: 0; } 40% { opacity: 1; } 100% { transform: scaleY(1); transform-origin: top; opacity: 0; } }
.scroll-hint.is-hidden { opacity: 0; }

/* il resto della pagina scorre sopra la scena */
.after-stage {
  position: relative;
  z-index: 3;
  background: linear-gradient(180deg, rgba(4, 7, 13, 0) 0%, var(--ink) 12%, var(--ink) 100%);
}

/* ============================ hero pagine interne ============================ */
.page-hero {
  position: relative;
  padding: calc(var(--nav-h) + clamp(5rem, 11vw, 8.5rem)) 0 clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--ink-2);
}
.page-hero canvas.scan-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .55;
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 130% at 15% 0%, rgba(47, 157, 247, .16), transparent 55%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero p { max-width: 62ch; margin-top: 1.2rem; }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.breadcrumb a:hover { color: var(--brand-soft); }
.breadcrumb span { margin: 0 .5rem; opacity: .5; }

/* ============================ griglie e card ============================ */
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(16, 26, 43, .9), rgba(8, 13, 22, .9));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.1rem;
  overflow: hidden;
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--thermal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card:hover::before { transform: scaleX(1); }
.card h3 { margin-bottom: .7rem; }
.card p { font-size: .97rem; }

.card-icon {
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(47, 157, 247, .12);
  border: 1px solid var(--line-strong);
  margin-bottom: 1.4rem;
  color: var(--brand-soft);
}
.card-icon svg { width: 26px; height: 26px; }

.card-num {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .2em;
  color: var(--accent-warm);
  margin-bottom: 1rem;
  display: block;
}

/* card servizio con immagine */
.service-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.service-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.service-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.service-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter .6s ease;
}
.service-card:hover .service-media img { transform: scale(1.07); }
.service-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 7, 13, .1), rgba(4, 7, 13, .82));
}
.service-body { padding: 1.7rem 1.8rem 1.9rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.service-body p { font-size: .97rem; flex: 1; }

/* split immagine + testo */
.split {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split.is-reverse .split-media { order: 2; }
.split-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.split-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(47, 157, 247, .12), transparent 45%);
  pointer-events: none;
}
.split-badge {
  position: absolute;
  left: 1.2rem; bottom: 1.2rem;
  background: rgba(4, 7, 13, .82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: .8rem 1.1rem;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-soft);
}

/* numeri */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.9rem 1.6rem;
  background: rgba(11, 18, 32, .6);
  position: relative;
  overflow: hidden;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(120deg, var(--accent-warm), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: .55rem;
}
.stat span {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
}

/* lista check */
.check-list { list-style: none; padding: 0; display: grid; gap: .9rem; }
.check-list li { display: flex; gap: .8rem; align-items: flex-start; font-size: 1rem; }
.check-list li::before {
  content: "";
  flex: none;
  margin-top: .48rem;
  width: 9px; height: 9px;
  border-radius: 2px;
  background: var(--thermal);
}

/* accordion */
.acc { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-btn {
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 1.5rem 3rem 1.5rem 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  cursor: pointer;
  position: relative;
}
.acc-btn::after {
  content: "+";
  position: absolute;
  right: .4rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--brand-soft);
  transition: transform .4s var(--ease);
}
.acc-btn[aria-expanded="true"]::after { transform: translateY(-50%) rotate(45deg); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height .5s var(--ease); }
.acc-panel > div { padding: 0 2rem 1.7rem 0; }

/* ============================ galleria ============================ */
.filter-bar { display: flex; flex-wrap: wrap; gap: .7rem; margin-bottom: 2.5rem; }
.filter-btn {
  padding: .6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 32, .6);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all .3s var(--ease);
}
.filter-btn:hover { color: var(--white); border-color: var(--line-strong); }
.filter-btn.is-active { background: var(--brand); border-color: var(--brand); color: #001427; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: zoom-in;
  background: #000;
  aspect-ratio: 1;
  transition: opacity .4s ease, transform .5s var(--ease), border-color .4s;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery-item:hover { border-color: var(--line-strong); }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.6rem 1rem .9rem;
  background: linear-gradient(180deg, transparent, rgba(4, 7, 13, .9));
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-soft);
}
.gallery-item.is-hidden { display: none; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(2, 4, 9, .95);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(94vw, 1000px); max-height: 82vh; border-radius: var(--radius); border: 1px solid var(--line-strong); }
.lightbox-close {
  position: absolute;
  top: 1.6rem; right: 1.6rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(11, 18, 32, .7);
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
}
.lightbox-cap {
  position: absolute;
  left: 50%; bottom: 1.8rem;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-soft);
  text-align: center;
}

/* ============================ blog ============================ */
.post-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.post-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.post-media { aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.post-card:hover .post-media img { transform: scale(1.06); }
.post-body { padding: 1.6rem 1.7rem 1.8rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.post-tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-warm);
}
.post-body h3 { font-size: 1.16rem; line-height: 1.3; }
.post-body p { font-size: .95rem; flex: 1; }

/* articolo */
.prose { max-width: 74ch; }
.prose > * + * { margin-top: 1.4rem; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin-top: 3rem; }
.prose h3 { font-size: 1.22rem; margin-top: 2.2rem; color: var(--brand-soft); }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: .6rem; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--white); }
.prose a { color: var(--brand-soft); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--white); }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: .4rem 0 .4rem 1.4rem;
  color: var(--white);
  font-size: 1.1rem;
  font-style: italic;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.4rem;
}

/* ============================ contatti / form ============================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }

.contact-item {
  display: flex;
  gap: 1.1rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-item:first-child { padding-top: 0; }
.contact-item .card-icon { width: 44px; height: 44px; margin: 0; border-radius: 11px; }
.contact-item .card-icon svg { width: 20px; height: 20px; }
.contact-item h4 { color: var(--muted); font-size: .7rem; letter-spacing: .16em; margin-bottom: .3rem; font-family: var(--font-mono); }
.contact-item a, .contact-item p { color: var(--white); font-size: 1.05rem; }
.contact-item a:hover { color: var(--brand-soft); }

.form {
  background: linear-gradient(180deg, rgba(16, 26, 43, .95), rgba(8, 13, 22, .95));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.6rem);
}
.field { display: grid; gap: .45rem; margin-bottom: 1.1rem; }
.field label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea, .field select {
  width: 100%;
  background: rgba(4, 7, 13, .7);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .85rem 1rem;
  color: var(--white);
  font-size: .98rem;
  transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 157, 247, .16);
}
.field textarea { resize: vertical; min-height: 130px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .86rem; color: var(--muted); margin: 1.2rem 0 1.5rem; }
.consent input { margin-top: .35rem; accent-color: var(--brand); width: 17px; height: 17px; flex: none; }
.consent a { color: var(--brand-soft); text-decoration: underline; }

.form-status {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--accent-warm);
  min-height: 1.2em;
}

.map-link {
  display: block;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  padding: 2.2rem;
  background:
    linear-gradient(120deg, rgba(47, 157, 247, .1), transparent 60%),
    repeating-linear-gradient(0deg, rgba(127, 200, 255, .07) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(90deg, rgba(127, 200, 255, .07) 0 1px, transparent 1px 34px),
    var(--panel);
  transition: border-color .4s;
}
.map-link:hover { border-color: var(--brand); }

/* ============================ CTA banner ============================ */
.cta {
  position: relative;
  z-index: 3;
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  overflow: hidden;
  background: linear-gradient(120deg, #0a1526, #05090f 60%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: var(--thermal);
  opacity: .8;
}
.cta::after {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  right: -180px; top: -280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 26, .17), transparent 65%);
  pointer-events: none;
}
.cta .container { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; justify-content: space-between; }
.cta h2 { max-width: 18ch; }
.cta p { margin-top: 1rem; max-width: 52ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ============================ footer ============================ */
.site-footer {
  position: relative;
  z-index: 3;
  background: var(--ink);
  padding: clamp(3.5rem, 6vw, 5rem) 0 0;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.4rem;
  padding-bottom: 3rem;
}
.footer-grid h4 { color: var(--white); margin-bottom: 1.2rem; font-size: .74rem; letter-spacing: .16em; font-family: var(--font-mono); }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .7rem; }
.footer-grid a { font-size: .94rem; color: var(--text); transition: color .3s; }
.footer-grid a:hover { color: var(--brand-soft); }
.footer-about p { font-size: .94rem; margin: 1.2rem 0 1.5rem; max-width: 34ch; }
.socials { display: flex; gap: .7rem; }
.socials a {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--brand-soft);
  transition: all .3s var(--ease);
}
.socials a:hover { border-color: var(--brand); background: rgba(47, 157, 247, .14); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: var(--muted);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 1.3rem; }
.footer-bottom a:hover { color: var(--brand-soft); }
.footer-bottom button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: .82rem;
}
.footer-bottom button:hover { color: var(--brand-soft); }

/* ============================ cookie banner ============================ */
.cookie {
  position: fixed;
  left: 1.2rem; right: 1.2rem; bottom: 1.2rem;
  z-index: 300;
  max-width: 560px;
  background: rgba(8, 13, 22, .96);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: none;
}
.cookie.is-open { display: block; }
.cookie p { font-size: .88rem; margin-bottom: 1.1rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ============================ reveal ============================ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

/* testo che si "scalda" in vista */
.heat-text {
  background: linear-gradient(100deg, var(--white) 0%, var(--white) 40%, var(--accent-warm) 60%, var(--accent) 100%);
  background-size: 260% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: background-position 1.4s var(--ease);
}
.reveal.is-visible .heat-text { background-position: 100% 0; }

/* skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--brand);
  color: #001427;
  padding: .8rem 1.2rem;
  border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 3px; border-radius: 4px; }

/* ============================ 404 ============================ */
.err {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem;
  position: relative;
  z-index: 3;
}
.err-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 22vw, 14rem);
  font-weight: 700;
  line-height: .9;
  background: var(--thermal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================ responsive ============================ */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.2rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hud-topleft, .hud-topright, .hud-botleft, .hud-botright { display: none; }
  .hud-scale { right: 20px; }
  .hud-progress { left: 20px; }
}

@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split.is-reverse .split-media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-cta .btn { display: none; }
  .nav-links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.9rem;
    background: rgba(4, 7, 13, .97);
    backdrop-filter: blur(18px);
    transform: translateY(-100%);
    transition: transform .55s var(--ease);
    z-index: 90;
  }
  .nav-links.is-open { transform: none; }
  .nav-links a { font-size: 1.5rem; font-family: var(--font-display); }
  .nav-links .btn { display: inline-flex; margin-top: 1rem; }
  .hud-reticle { width: 84px; height: 84px; }
  .hud-scale { display: none; }
  .hud-progress { height: 130px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .chapter.align-right .chapter-inner { text-align: left; }
  .chapter.align-right .chapter-actions { justify-content: flex-start; }
  .cta .container { flex-direction: column; align-items: flex-start; }
  .chapter-data { gap: 1.1rem 1.6rem; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
  .hud-progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .chapter { position: relative; opacity: 1; visibility: visible; height: auto; padding: 4rem 0; }
  .chapter-inner { transform: none; }
  .stage-layer { position: static; height: auto; display: block; }
  .stage { height: auto !important; }
  .hud, .scroll-hint { display: none; }
}
