/* ==========================================================================
   GESET SRLS - stile del sito pubblico
   Materiali: inchiostro di cianotipia (sezioni strumentali), carta da lucido
   (contenuti), terra delle curve di livello, arancio picchetto come segnale,
   verde laser solo per scansioni e nuvole di punti.
   Pesi tipografici: 300-500, mai oltre.
   ========================================================================== */

@view-transition {
  navigation: auto;
}

:root {
  /* Inchiostro */
  --ink: #0e2130;
  --ink-2: #132a3b;
  --ink-3: #1b3649;
  --on-ink: #e7eef1;
  --on-ink-2: #a3b6c2;
  --on-ink-3: #6f8797;
  --ink-line: rgba(163, 196, 214, 0.16);

  /* Carta */
  --film: #e6eae5;
  /* Stesso tono di --film sopra la carta, ma lascia vedere la trama di sfondo */
  --film-tint: rgba(217, 223, 217, 0.5);
  --paper: #f3f5f1;
  --white: #fbfcfa;
  --text: #15222b;
  --text-2: #4c5c65;
  --text-3: #6f7d84;
  --rule: rgba(21, 34, 43, 0.14);
  --rule-strong: rgba(21, 34, 43, 0.28);

  /* Segnali */
  --signal: #ff5b14;
  --signal-hover: #ff7333;
  --signal-ink: #b93a05;
  --laser: #4de8c2;
  --terra: #a06f45;
  --terra-soft: rgba(160, 111, 69, 0.32);
  --ok: #1f8a5b;
  --error: #c2361b;

  /* Tipografia */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.3125rem;
  --fs-lg: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --fs-xl: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  --fs-2xl: clamp(2.5rem, 1.5rem + 4.6vw, 5.75rem);

  /* Spazi e forme */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --header-h: 68px;
  --radius: 4px;
  --radius-lg: 10px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  /* Livelli */
  --z-content: 1;
  --z-overlay: 5;
  --z-header: 50;
  --z-menu: 60;

  color-scheme: light;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Carta da lucido sopra una tavola: curve di livello color terra e griglia millimetrata,
   appena percettibili. Fissa dietro le sezioni chiare, che restano trasparenti. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(21, 34, 43, 0.028) 1px, transparent 1px) 0 0 / 100% 24px,
    linear-gradient(90deg, rgba(21, 34, 43, 0.028) 1px, transparent 1px) 0 0 / 24px 100%,
    url("/img/contours-paper.svg") center / cover no-repeat,
    radial-gradient(120% 90% at 70% 10%, #f6f7f3 0%, var(--paper) 55%, #eceee8 100%);
}

img,
svg,
canvas,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
figure,
dl,
dd,
ol,
ul {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}

b,
strong {
  font-weight: 500;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

::selection {
  background: var(--signal);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

/* ---------- Utilità ---------- */
.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--mono);
  font-weight: 300;
  font-size: var(--fs-xs);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--signal);
  color: var(--ink);
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: none;
}

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

.section-title {
  font-size: var(--fs-xl);
  font-weight: 300;
  font-stretch: 110%;
  letter-spacing: -0.02em;
  line-height: 1.02;
}

.empty {
  padding: 48px 0;
  color: var(--text-2);
}

/* ---------- Bottoni e link ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.btn .icon {
  transition: transform 0.25s var(--ease);
}

.btn:hover .icon {
  transform: translateX(3px);
}

.btn--signal {
  background: var(--signal);
  color: var(--ink);
}

.btn--signal:hover {
  background: var(--signal-hover);
}

.btn--line {
  border-color: rgba(231, 238, 241, 0.32);
  color: var(--on-ink);
}

.btn--line:hover {
  border-color: var(--on-ink);
}

.btn--line:hover .icon {
  transform: translateY(3px);
}

.btn--line-dark {
  border-color: var(--rule-strong);
  color: var(--text);
}

.btn--line-dark:hover {
  border-color: var(--text);
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  color: inherit;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.icon-btn:hover {
  border-color: currentColor;
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--signal-ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  min-height: 32px;
}

.link-arrow .icon {
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover .icon:last-child {
  transform: translateX(3px);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--signal-ink);
}

.link-btn .icon {
  transition: transform 0.25s var(--ease);
}

.link-btn:hover .icon {
  transform: rotate(90deg);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  font-size: var(--fs-sm);
  color: var(--text-2);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--text);
  color: var(--text);
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.chip__n {
  opacity: 0.7;
}

.chip--signal {
  border-color: rgba(255, 91, 20, 0.5);
  color: var(--signal);
  min-height: 30px;
  font-size: var(--fs-xs);
}

/* ==========================================================================
   Header
   Stesse misure su tutte le pagine. In home lo sfondo è trasparente
   sopra l'hero e diventa solido allo scroll; cambia solo lo sfondo.
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-header);
  color: var(--on-ink);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 33, 48, 0.9);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--ink-line);
  transition: opacity 0.4s var(--ease);
}

.page-home .site-header:not(.is-scrolled):not(.is-open)::before {
  opacity: 0;
}

.site-header__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  transition: height 0.35s var(--ease);
}

/* Marchio: simbolo chiaro + nome in testo vivo. Grande in cima alla home, compatto allo scroll */
.brand {
  --mark-w: 52px;
  --name-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--mark-w) * 0.24);
  min-height: 44px;
  margin-right: auto;
  color: var(--on-ink);
}

.brand__mark {
  width: var(--mark-w);
  height: auto;
  aspect-ratio: 730 / 548;
  flex: none;
  transition: width 0.35s var(--ease), transform 0.5s var(--ease);
}

.brand:hover .brand__mark {
  transform: translateY(-1px);
}

.brand__text {
  display: grid;
  gap: calc(var(--name-size) * 0.32);
  line-height: 1;
}

.brand__name {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-size: var(--name-size);
  font-weight: 500;
  font-stretch: 118%;
  letter-spacing: 0.22em;
  transition: font-size 0.35s var(--ease);
}

.brand__legal {
  font-family: var(--mono);
  font-size: 0.58em;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: var(--on-ink-2);
}

.brand__sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: calc(var(--name-size) * 0.62);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--on-ink-2);
  white-space: nowrap;
  transition: font-size 0.35s var(--ease);
}

.brand__dash {
  width: 14px;
  height: 1.5px;
  background: var(--signal);
  transition: width 0.35s var(--ease);
}

.brand:hover .brand__dash {
  width: 22px;
}

.brand--footer {
  --mark-w: 76px;
  --name-size: 20px;
}

/* Navigazione: la pagina attiva è una pillola con il punto di stazione */
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--ink-line);
  background: rgba(14, 33, 48, 0.35);
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--on-ink-2);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav__link:hover {
  color: var(--on-ink);
  background: rgba(163, 196, 214, 0.08);
}

.nav__link[aria-current="page"] {
  color: var(--on-ink);
  background: rgba(163, 196, 214, 0.14);
}

.nav__link[aria-current="page"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 91, 20, 0.22);
}

.site-header__cta {
  min-height: 44px;
  padding: 0 18px;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 6px 0 16px;
  border-radius: 999px;
  border: 1px solid var(--ink-line);
  font-size: var(--fs-sm);
}

.menu-toggle__lines {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--signal);
  color: var(--ink);
}

.menu-toggle__lines span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.site-header.is-open .menu-toggle__lines span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.site-header.is-open .menu-toggle__lines span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* Menu mobile: pannello a tutta altezza con curve di livello */
.menu-mobile {
  position: fixed;
  inset: var(--header-h) 0 0;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 28px;
  padding: 24px var(--gutter) max(24px, env(safe-area-inset-bottom));
  background: var(--ink);
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.35s var(--ease);
}

.menu-mobile.is-open {
  opacity: 1;
  transform: none;
}

.menu-mobile__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.menu-mobile__bg canvas {
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

.menu-mobile__nav {
  display: grid;
  align-content: start;
}

.menu-mobile__link {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--ink-line);
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 300;
  font-stretch: 112%;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--on-ink);
}

.menu-mobile__num {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 300;
  color: var(--on-ink-3);
}

.menu-mobile__arrow {
  width: 22px;
  height: 22px;
  color: var(--on-ink-3);
}

.menu-mobile__link[aria-current="page"] .menu-mobile__label,
.menu-mobile__link[aria-current="page"] .menu-mobile__num {
  color: var(--signal);
}

.menu-mobile__foot {
  display: grid;
  gap: 18px;
}

.menu-mobile__contacts {
  display: grid;
  gap: 6px;
}

.menu-mobile__contacts a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  color: var(--on-ink-2);
  overflow-wrap: anywhere;
}

.menu-mobile__coords {
  color: var(--on-ink-3);
}

@media (prefers-reduced-motion: no-preference) {
  .menu-mobile .menu-mobile__link,
  .menu-mobile .menu-mobile__foot {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
    transition-delay: calc(var(--i) * 50ms + 60ms);
  }

  .menu-mobile.is-open .menu-mobile__link,
  .menu-mobile.is-open .menu-mobile__foot {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .nav,
  .site-header__cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }


}

@media (max-width: 380px) {
  .site-header .brand__sub,
  .menu-toggle__label {
    display: none;
  }

  .menu-toggle {
    padding: 0 6px;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: var(--on-ink-2);
  font-size: var(--fs-sm);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 72px var(--gutter) 48px;
}

.site-footer__brand {
  display: grid;
  gap: 20px;
  align-content: start;
  justify-items: start;
}

.brand--footer {
  color: var(--on-ink);
}

.site-footer__claim {
  max-width: 30ch;
}

.site-footer__col {
  display: grid;
  gap: 10px;
  align-content: start;
}

.site-footer__col a {
  width: fit-content;
  color: var(--on-ink);
  transition: color 0.2s var(--ease);
}

.site-footer__col a:hover {
  color: var(--signal);
}

.site-footer__label {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 300;
  color: var(--on-ink-3);
  margin-bottom: 4px;
}

.site-footer__coords {
  color: var(--on-ink-3);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 20px var(--gutter) 28px;
  border-top: 1px solid var(--ink-line);
  font-size: var(--fs-xs);
  color: var(--on-ink-3);
}

@media (max-width: 900px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    padding-top: 56px;
  }
}

/* ==========================================================================
   Hero (home)
   ========================================================================== */
.hero {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: max(620px, 100svh);
  background: var(--ink);
  color: var(--on-ink);
  overflow: hidden;
  isolation: isolate;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

/* Velo per la leggibilità del testo sopra le curve */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(14, 33, 48, 0.92) 0%, rgba(14, 33, 48, 0.55) 42%, rgba(14, 33, 48, 0) 70%),
    linear-gradient(0deg, rgba(14, 33, 48, 0.9) 0%, rgba(14, 33, 48, 0) 30%);
  pointer-events: none;
}

.hero__reticle {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  fill: none;
  stroke: var(--signal);
  stroke-width: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  will-change: transform;
}

.hero__reticle-stadia {
  stroke: rgba(255, 91, 20, 0.6);
}

.hero__reticle-dot {
  fill: var(--signal);
  stroke: none;
}

.hero.is-live .hero__reticle {
  opacity: 1;
}

.hero__inner {
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: clamp(40px, 7vh, 88px);
}

.hero__copy {
  max-width: 820px;
}

.hero__title {
  font-size: var(--fs-2xl);
  font-weight: 300;
  font-stretch: 112%;
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 13ch;
}

.hero__lead {
  margin-top: 28px;
  max-width: 44ch;
  font-size: var(--fs-md);
  font-weight: 300;
  line-height: 1.45;
  color: var(--on-ink-2);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero__readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  padding: 14px var(--gutter);
  border-top: 1px solid var(--ink-line);
  background: rgba(14, 33, 48, 0.72);
  color: var(--on-ink-2);
}

.hero__readout > div {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.hero__readout dt {
  color: var(--on-ink-3);
}

.hero__readout dd {
  color: var(--on-ink);
  white-space: nowrap;
}

.hero__readout-mode {
  min-width: 13ch;
}

.hero__readout-mode dd {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--signal);
}

.hero__readout-mode dd::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 91, 20, 0.2);
}

@media (max-width: 720px) {
  .hero__veil {
    background: linear-gradient(0deg, rgba(14, 33, 48, 0.96) 0%, rgba(14, 33, 48, 0.7) 45%, rgba(14, 33, 48, 0.15) 100%);
  }

  .hero__readout {
    gap: 4px 18px;
  }

  .hero__readout-utm {
    display: none !important;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
  }
}

/* ==========================================================================
   Servizi: poligonale
   ========================================================================== */
.survey {
  position: relative;
  padding: clamp(80px, 12vw, 140px) 0 0;
  background: var(--film-tint);
  isolation: isolate;
}

.survey__head {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 28px;
  align-items: end;
}

.survey__origin {
  grid-row: span 2;
  align-self: start;
  width: 40px;
  height: 40px;
  margin-top: 6px;
}

.survey__origin svg {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.survey__origin circle {
  fill: var(--signal);
  stroke: none;
}

.survey__intro {
  max-width: 54ch;
  color: var(--text-2);
  font-size: var(--fs-md);
  font-weight: 300;
  line-height: 1.45;
}

.survey__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}

.survey__track {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.survey__path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.survey__legs text {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 300;
  fill: var(--text-2);
  paint-order: stroke;
  stroke: var(--film);
  stroke-width: 5px;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.survey__legs text.is-on {
  opacity: 1;
}

.survey__prism {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.25;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.survey__prism.is-on {
  opacity: 1;
}

.survey__prism-core {
  fill: var(--signal);
  stroke: none;
}

.survey__stations {
  position: relative;
  display: grid;
  gap: clamp(96px, 16vh, 180px);
  padding-top: clamp(72px, 10vw, 120px);
  padding-bottom: clamp(80px, 10vw, 120px);
}

.station {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0 24px;
  align-items: start;
}

.station__media {
  grid-column: 1 / span 6;
  grid-row: 1;
}

.station__body {
  position: relative;
  z-index: 3;
  /* Niente fondo: la poligonale corre fra le colonne e non incrocia mai il testo,
     così sotto si vede la trama della carta */
  padding-bottom: 8px;
  grid-column: 8 / span 5;
  grid-row: 1;
  padding-left: 68px;
  padding-top: 4px;
}

.station--alt .station__media {
  grid-column: 7 / span 6;
}

.station--alt .station__body {
  grid-column: 1 / span 5;
  padding-left: 0;
  padding-right: 68px;
  background: linear-gradient(270deg, transparent 56px, var(--film) 56px);
}

/* Nelle stazioni alternate il caposaldo sta sul lato interno: la poligonale corre al centro */
.station--alt .station__marker {
  left: auto;
  right: 0;
}

.station__marker {
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
}

.station__marker svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
  overflow: visible;
}

.station__marker svg > circle:nth-child(2) {
  fill: var(--film);
}

.station__ring {
  stroke: var(--signal);
  opacity: 0;
  transform-origin: 24px 24px;
}

.station__core {
  fill: var(--ink);
  stroke: none;
  transition: fill 0.3s var(--ease);
}

.station.is-occupied .station__core {
  fill: var(--signal);
}

.station.is-occupied .station__ring {
  animation: station-ping 1.1s var(--ease) 1;
}

@keyframes station-ping {
  0% {
    opacity: 0.9;
    transform: scale(0.55);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.station__id {
  color: var(--signal-ink);
  margin-bottom: 10px;
}

.station__title {
  font-size: var(--fs-lg);
  font-weight: 400;
  font-stretch: 108%;
  letter-spacing: -0.015em;
}

.station__desc {
  margin-top: 16px;
  color: var(--text-2);
  max-width: 46ch;
}

.specs {
  margin-top: 24px;
  border-top: 1px solid var(--rule);
}

.specs__row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--fs-sm);
}

.specs__row dt {
  color: var(--text-3);
}

.specs__row dd {
  color: var(--text);
}

.station .link-btn {
  margin-top: 16px;
}

/* Foto "scansionata": nuvola di punti, poi il fascio laser rivela la foto */
.scan {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  --p: 1;
}

.scan__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.scan__cloud {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0;
}

.scan__beam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 2px;
  background: var(--laser);
  box-shadow: 0 0 12px 2px rgba(77, 232, 194, 0.65), 0 0 48px 10px rgba(77, 232, 194, 0.18);
  opacity: 0;
  transform: translateX(calc(var(--p) * var(--scan-w, 600px)));
  pointer-events: none;
}

.scan__corners {
  position: absolute;
  inset: 14px;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(var(--white), var(--white)) top left / 18px 1px,
    linear-gradient(var(--white), var(--white)) top left / 1px 18px,
    linear-gradient(var(--white), var(--white)) top right / 18px 1px,
    linear-gradient(var(--white), var(--white)) top right / 1px 18px,
    linear-gradient(var(--white), var(--white)) bottom left / 18px 1px,
    linear-gradient(var(--white), var(--white)) bottom left / 1px 18px,
    linear-gradient(var(--white), var(--white)) bottom right / 18px 1px,
    linear-gradient(var(--white), var(--white)) bottom right / 1px 18px;
  background-repeat: no-repeat;
  opacity: 0.8;
}

/* Stato iniziale con JS attivo: solo la nuvola di punti */
.js .scan.is-armed .scan__cloud {
  opacity: 1;
}

.js .scan.is-armed .scan__img {
  clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0);
}

.js .scan.is-scanning .scan__beam {
  opacity: 1;
}

@media (max-width: 999px) {
  .survey__head {
    grid-template-columns: 1fr;
    padding-left: calc(var(--gutter) + 52px);
  }

  .survey__origin {
    position: absolute;
    left: calc(var(--gutter) + 4px);
    top: 0;
  }

  .station,
  .station--alt {
    grid-template-columns: 1fr;
    padding-left: 52px;
    gap: 22px;
  }

  .station__media,
  .station--alt .station__media,
  .station__body,
  .station--alt .station__body {
    grid-column: 1;
  }

  .station__body,
  .station--alt .station__body {
    grid-row: 1;
    padding-left: 0;
    padding-right: 0;
    padding-top: 6px;
  }

  .station__media {
    grid-row: 2;
    aspect-ratio: 4 / 3;
  }

  .station__marker,
  .station--alt .station__marker {
    right: auto;
    left: -52px;
    width: 40px;
    height: 40px;
  }

  .station__marker svg {
    width: 40px;
    height: 40px;
  }

  .survey__stations {
    gap: 88px;
  }

}

/* ==========================================================================
   Territorio: basi dalla sede
   ========================================================================== */
.territory {
  background: var(--ink);
  color: var(--on-ink);
  padding: clamp(80px, 11vw, 140px) 0;
}

.territory__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.territory__copy p {
  margin-top: 22px;
  max-width: 50ch;
  color: var(--on-ink-2);
}

.values {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.values li {
  padding: 8px 14px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  font-size: var(--fs-sm);
  color: var(--on-ink);
}

.baselines {
  position: relative;
}

.baselines svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.baselines__grid path {
  stroke: var(--ink-line);
  stroke-width: 1;
}

.baselines__leg line {
  stroke: var(--on-ink-2);
  stroke-width: 1.25;
  stroke-dasharray: var(--len) var(--len);
  stroke-dashoffset: 0;
}

.baselines__leg--far line {
  stroke-dasharray: 4 5;
}

.baselines__pt circle:first-child {
  fill: var(--ink);
  stroke: var(--on-ink);
  stroke-width: 1.25;
}

.baselines__dot {
  fill: var(--on-ink);
}

.baselines text {
  font-family: var(--mono);
  font-weight: 300;
  font-size: 13px;
  fill: var(--on-ink);
}

.baselines__km,
.baselines__far,
.baselines__scale text,
.baselines__north text {
  fill: var(--on-ink-2);
  font-size: 11px !important;
}

.baselines__arrow {
  fill: none;
  stroke: var(--on-ink-2);
  stroke-width: 1.25;
}

.baselines__base path {
  fill: var(--signal);
}

.baselines__base circle {
  fill: var(--ink);
}

.baselines__base text {
  fill: var(--signal);
}

.baselines__scale path,
.baselines__north path {
  fill: none;
  stroke: var(--on-ink-2);
  stroke-width: 1;
}

.baselines__north path {
  fill: var(--on-ink-3);
}

.baselines figcaption {
  margin-top: 12px;
  color: var(--on-ink-3);
}

/* Animazione: le basi si tracciano dalla sede quando entrano in vista */
.js .baselines .baselines__leg line {
  stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 1.4s var(--ease-io) var(--d);
}

.js .baselines .baselines__leg--far line {
  stroke-dasharray: 4 5;
  stroke-dashoffset: 0;
  opacity: 0;
  transition: opacity 0.8s var(--ease) var(--d);
}

.js .baselines .baselines__leg :is(text, .baselines__pt, g) {
  opacity: 0;
  transition: opacity 0.6s var(--ease) calc(var(--d) + 1.1s);
}

.js .baselines.is-in .baselines__leg line {
  stroke-dashoffset: 0;
}

.js .baselines.is-in .baselines__leg :is(text, .baselines__pt, g) {
  opacity: 1;
}

.js .baselines.is-in .baselines__leg--far line {
  opacity: 1;
}

@media (max-width: 900px) {
  .territory__inner {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Team: striscia scorrevole
   ========================================================================== */
.team {
  padding: clamp(80px, 11vw, 140px) 0 clamp(64px, 8vw, 100px);
  background: transparent;
}

.team__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
}

.team__lead {
  margin-top: 18px;
  max-width: 52ch;
  color: var(--text-2);
}

.team__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.team__controls .link-arrow {
  margin-left: 12px;
}

/* Base (senza JS o con movimento ridotto): striscia scorrevole a mano */
.strip {
  position: relative;
  margin-top: 40px;
  outline: none;
}

.strip__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--strip-w);
  gap: 16px;
  padding: 0 var(--gutter) 12px;
  padding-inline-start: max(var(--gutter), calc((100vw - var(--max)) / 2));
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-strong) transparent;
}

.strip {
  --strip-w: clamp(220px, 24vw, 340px);
}

.strip:focus-visible .strip__track {
  outline: 2px solid var(--signal);
  outline-offset: -2px;
}

.strip__item {
  position: relative;
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--film);
}

.strip__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip__cap {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(8, 20, 30, 0.78));
  color: var(--on-ink);
  font-size: var(--fs-sm);
  line-height: 1.35;
}

.strip__no {
  font-size: var(--fs-xs);
  color: var(--signal);
  letter-spacing: 0.06em;
}

.strip__laser {
  display: none;
}

.strip__reticle {
  display: none;
}

/* ---------- Carosello automatico ----------
   Nastro continuo leggermente curvo, come la panoramica di una stazione robotica.
   La foto che passa nel mirino centrale si "aggancia": a fuoco, didascalia e passata laser.
   --f (0..1) = quanto la foto è vicina al centro, scritto dal JS a ogni fotogramma. */
.strip.is-live {
  height: calc(var(--strip-w) * 4 / 3 + 56px);
  overflow: hidden;
  perspective: 1400px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.strip.is-live.is-dragging {
  cursor: grabbing;
}

.strip.is-live .strip__track {
  position: absolute;
  inset: 28px auto auto 0;
  width: max-content;
  display: flex;
  gap: 18px;
  padding: 0;
  overflow: visible;
  scroll-snap-type: none;
  transform-style: preserve-3d;
  will-change: transform;
}

.strip.is-live .strip__item {
  --f: 0;
  flex: 0 0 var(--strip-w);
  transform-origin: 50% 50%;
  will-change: transform;
  box-shadow: 0 30px 50px -36px rgba(8, 20, 30, calc(0.25 + var(--f) * 0.45));
}

.strip.is-live .strip__item img {
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Velatura delle foto fuori mirino */
.strip.is-live .strip__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  opacity: calc((1 - var(--f)) * 0.42);
  pointer-events: none;
}

.strip.is-live .strip__cap {
  z-index: 1;
  opacity: calc(var(--f) * var(--f));
  transform: translateY(calc((1 - var(--f)) * 14px));
}

.strip.is-live .strip__laser {
  display: block;
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--laser);
  box-shadow: 0 0 12px 2px rgba(77, 232, 194, 0.65), 0 0 40px 8px rgba(77, 232, 194, 0.18);
  opacity: 0;
  pointer-events: none;
}

.strip.is-live .strip__item.is-locked .strip__laser {
  animation: strip-laser 0.8s var(--ease-io) both;
}

@keyframes strip-laser {
  0% { transform: translateY(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateY(calc(var(--strip-w) * 4 / 3)); opacity: 0; }
}

/* Mirino fisso al centro: angoli di collimazione + tacche sopra e sotto */
.strip.is-live .strip__reticle {
  display: block;
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 50%;
  width: calc(var(--strip-w) + 24px);
  height: calc(var(--strip-w) * 4 / 3 + 24px);
  transform: translateX(-50%);
  pointer-events: none;
  --c: var(--signal);
  background:
    linear-gradient(var(--c), var(--c)) left top / 18px 1.5px,
    linear-gradient(var(--c), var(--c)) left top / 1.5px 18px,
    linear-gradient(var(--c), var(--c)) right top / 18px 1.5px,
    linear-gradient(var(--c), var(--c)) right top / 1.5px 18px,
    linear-gradient(var(--c), var(--c)) left bottom / 18px 1.5px,
    linear-gradient(var(--c), var(--c)) left bottom / 1.5px 18px,
    linear-gradient(var(--c), var(--c)) right bottom / 18px 1.5px,
    linear-gradient(var(--c), var(--c)) right bottom / 1.5px 18px;
  background-repeat: no-repeat;
  opacity: calc(0.35 + var(--lock, 0) * 0.65);
  transition: opacity 0.3s var(--ease);
}

.strip__tick {
  position: absolute;
  left: 50%;
  width: 1.5px;
  height: 14px;
  background: var(--signal);
  transform: translateX(-50%);
}

.strip__tick--t {
  top: -14px;
}

.strip__tick--b {
  bottom: -14px;
}

@media (max-width: 640px) {
  .strip {
    --strip-w: 72vw;
  }

  .team__controls .icon-btn {
    display: none;
  }

  .team__controls .link-arrow {
    margin-left: 0;
  }
}

/* ==========================================================================
   Articoli: card e griglie
   ========================================================================== */
.latest,
.related {
  padding: clamp(72px, 10vw, 120px) 0;
  background: var(--film-tint);
}

.latest__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 40px;
}

.post-grid {
  display: grid;
  gap: 40px 24px;
}

.post-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-grid--blog {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card__link {
  display: grid;
  gap: 18px;
  height: 100%;
  align-content: start;
}

.post-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), opacity 0.3s var(--ease);
}

.post-card__placeholder {
  position: absolute;
  inset: 0;
  background:
    repeating-radial-gradient(circle at 30% 60%, transparent 0 14px, var(--ink-line) 14px 15px),
    var(--ink);
}

.post-card__link:hover .post-card__media img {
  transform: scale(1.03);
}

.post-card__body {
  display: grid;
  gap: 10px;
  align-content: start;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  color: var(--text-3);
}

.post-card__tag {
  color: var(--signal-ink);
}

.post-card__title {
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}

.post-card__link:hover .post-card__title {
  color: var(--signal-ink);
}

.post-card__excerpt {
  color: var(--text-2);
  max-width: 58ch;
}

.post-card__read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
}

.post-card--featured {
  grid-column: 1 / -1;
}

.post-card--featured .post-card__link {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: center;
}

.post-card--featured .post-card__media {
  aspect-ratio: 16 / 10;
}

.post-card--featured .post-card__title {
  font-size: var(--fs-xl);
  font-weight: 300;
  font-stretch: 108%;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

@media (max-width: 1000px) {
  .post-grid--three,
  .post-grid--blog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-grid--three > :nth-child(3) {
    display: none;
  }

  .post-card--featured .post-card__link {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .post-grid--three,
  .post-grid--blog {
    grid-template-columns: 1fr;
  }

  .post-grid--three > :nth-child(3) {
    display: block;
  }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq {
  padding: clamp(80px, 11vw, 140px) 0;
  background: transparent;
}

.faq__inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 32px clamp(32px, 6vw, 96px);
}

.faq__list {
  border-top: 1px solid var(--rule-strong);
}

.faq__item {
  border-bottom: 1px solid var(--rule);
}

.faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 64px;
  padding: 18px 0;
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

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

.faq__icon {
  width: 22px;
  height: 22px;
  color: var(--signal-ink);
  transition: transform 0.3s var(--ease);
}

.faq__item[open] .faq__icon {
  transform: rotate(45deg);
}

.faq__item p {
  padding: 0 48px 24px 0;
  color: var(--text-2);
  max-width: 64ch;
}

.faq__item summary:hover span {
  color: var(--signal-ink);
}

@media (max-width: 800px) {
  .faq__inner {
    grid-template-columns: 1fr;
  }

  .faq__item p {
    padding-right: 0;
  }
}

/* ==========================================================================
   Sponsor
   ========================================================================== */
.sponsor {
  padding: 0 0 clamp(80px, 11vw, 140px);
  background: transparent;
}

.sponsor__inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}

.sponsor__media {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--film);
}

.sponsor__media img {
  width: 100%;
}

.sponsor__copy {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.sponsor__tag {
  color: var(--signal-ink);
}

.sponsor__title {
  font-size: var(--fs-lg);
  font-weight: 400;
  font-stretch: 108%;
}

.sponsor__copy p:not(.sponsor__tag) {
  color: var(--text-2);
  max-width: 48ch;
}

@media (max-width: 760px) {
  .sponsor__inner {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Banda preventivo + modulo
   ========================================================================== */
.cta-band {
  padding: clamp(80px, 11vw, 140px) 0;
  background: var(--ink);
  color: var(--on-ink);
}

.cta-band__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px clamp(32px, 6vw, 96px);
}

.cta-band__copy {
  display: grid;
  gap: 20px;
  align-content: start;
  justify-items: start;
}

.cta-band__copy p {
  color: var(--on-ink-2);
  max-width: 42ch;
}

.cta-band .link-arrow {
  color: var(--signal);
}

@media (max-width: 900px) {
  .cta-band__inner {
    grid-template-columns: 1fr;
  }
}

.quote-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  font-size: var(--fs-sm);
  color: var(--text-2);
}

.field__opt {
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 91, 20, 0.2);
}

.field :is(input, textarea)[aria-invalid="true"] {
  border-color: var(--error);
}

.select {
  position: relative;
}

.select select {
  appearance: none;
  padding-right: 40px;
}

.select::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  opacity: 0.6;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quote-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.quote-form__status {
  font-size: var(--fs-sm);
  color: var(--text-2);
  min-height: 1.5em;
  flex: 1 1 220px;
}

.quote-form__status.is-ok {
  color: var(--ok);
}

.quote-form__status.is-error {
  color: var(--error);
}

/* Modulo su fondo scuro (home) */
.cta-band .field label {
  color: var(--on-ink-2);
}

.cta-band .field__opt {
  color: var(--on-ink-3);
}

.cta-band .field :is(input, select, textarea) {
  background: var(--ink-2);
  border-color: var(--ink-line);
  color: var(--on-ink);
}

.cta-band .field :is(input, textarea)::placeholder {
  color: var(--on-ink-3);
}

.cta-band .quote-form__status {
  color: var(--on-ink-2);
}

.cta-band .quote-form__status.is-ok {
  color: var(--laser);
}

.cta-band .quote-form__status.is-error {
  color: #ff8a65;
}

@media (max-width: 560px) {
  .quote-form {
    grid-template-columns: 1fr;
  }

  .quote-form__foot .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Testata delle pagine interne
   ========================================================================== */
.page-head {
  position: relative;
  background: var(--ink);
  color: var(--on-ink);
  padding: calc(var(--header-h) + clamp(48px, 8vw, 104px)) 0 clamp(48px, 7vw, 88px);
  overflow: hidden;
  isolation: isolate;
}

.page-head canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.8;
}

.page-head__inner {
  display: grid;
  gap: 20px;
  justify-items: start;
}

.page-title {
  font-size: var(--fs-2xl);
  font-weight: 300;
  font-stretch: 112%;
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.page-head__lead {
  max-width: 52ch;
  font-size: var(--fs-md);
  font-weight: 300;
  line-height: 1.45;
  color: var(--on-ink-2);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--on-ink-3);
  min-width: 0;
  max-width: 100%;
}

.crumbs a {
  color: var(--on-ink-2);
  transition: color 0.2s var(--ease);
}

.crumbs a:hover {
  color: var(--signal);
}

.crumbs__current {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 42ch;
}

.chips--nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chips--nav .chip {
  border-color: var(--ink-line);
  color: var(--on-ink-2);
}

.chips--nav .chip:hover {
  border-color: var(--on-ink);
  color: var(--on-ink);
}

/* ==========================================================================
   Blog
   ========================================================================== */
.blog {
  padding: 40px 0 clamp(80px, 10vw, 120px);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding-bottom: 28px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 320px;
  min-width: 0;
}

.search .icon {
  position: absolute;
  left: 14px;
  color: var(--text-3);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px 10px 44px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--white);
}

.search input:focus {
  outline: none;
  border-color: var(--signal);
  box-shadow: 0 0 0 3px rgba(255, 91, 20, 0.2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filters__count {
  margin-left: auto;
  color: var(--text-3);
}

.post-card.is-hidden {
  display: none;
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery {
  padding: 40px 0 clamp(64px, 8vw, 104px);
}

.gallery-featured__grid {
  display: grid;
  gap: 16px;
}

.gallery-featured--2 .gallery-featured__grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
}

.gallery-featured--3 .gallery-featured__grid {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-auto-rows: 1fr;
}

.gallery-featured--3 .shot--featured:first-child {
  grid-row: span 2;
}

.shot--featured {
  aspect-ratio: auto;
  min-height: 280px;
}

.gallery-featured--1 .shot--featured {
  aspect-ratio: 21 / 9;
}

.gallery-featured--2 .shot--featured {
  aspect-ratio: auto;
  height: clamp(320px, 42vw, 560px);
}

.gallery-group {
  padding-top: clamp(56px, 7vw, 88px);
}

.gallery-group__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.gallery-group__title {
  font-size: var(--fs-lg);
  font-weight: 400;
  font-stretch: 108%;
}

.gallery-group__count {
  color: var(--text-3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(160px, 18vw, 260px);
  grid-auto-flow: dense;
  gap: 12px;
}

.shot {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  text-align: left;
  cursor: zoom-in;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease), filter 0.4s var(--ease);
}

.shot:hover img {
  transform: scale(1.035);
}

.shot--tall {
  grid-row: span 2;
}

.shot--wide {
  grid-column: span 2;
}

.shot--square {
  grid-column: span 2;
  grid-row: span 2;
}

.shot__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 2px;
  padding: 40px 16px 14px;
  background: linear-gradient(0deg, rgba(14, 33, 48, 0.86), rgba(14, 33, 48, 0));
  color: var(--on-ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.shot__title {
  font-size: var(--fs-sm);
}

.shot__meta {
  color: var(--on-ink-2);
}

.shot--featured .shot__caption {
  opacity: 1;
  transform: none;
  padding: 64px 20px 18px;
}

.shot--featured .shot__title {
  font-size: var(--fs-md);
}

/* Mirino agli angoli sulla foto attiva */
.shot__frame {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  background:
    linear-gradient(var(--signal), var(--signal)) top left / 16px 1.5px,
    linear-gradient(var(--signal), var(--signal)) top left / 1.5px 16px,
    linear-gradient(var(--signal), var(--signal)) top right / 16px 1.5px,
    linear-gradient(var(--signal), var(--signal)) top right / 1.5px 16px,
    linear-gradient(var(--signal), var(--signal)) bottom left / 16px 1.5px,
    linear-gradient(var(--signal), var(--signal)) bottom left / 1.5px 16px,
    linear-gradient(var(--signal), var(--signal)) bottom right / 16px 1.5px,
    linear-gradient(var(--signal), var(--signal)) bottom right / 1.5px 16px;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.25s var(--ease), transform 0.35s var(--ease);
}

.shot:hover .shot__frame,
.shot:focus-visible .shot__frame {
  opacity: 1;
  transform: none;
}

.shot:hover .shot__caption,
.shot:focus-visible .shot__caption {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .shot__caption {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 44vw;
  }

  .shot--square {
    grid-row: span 1;
  }

  .gallery-featured--2 .gallery-featured__grid,
  .gallery-featured--3 .gallery-featured__grid {
    grid-template-columns: 1fr;
  }

  .gallery-featured--3 .shot--featured:first-child {
    grid-row: auto;
  }

  .gallery-featured--2 .shot--featured,
  .gallery-featured--3 .shot--featured,
  .gallery-featured--1 .shot--featured {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

.cta-strip {
  background: var(--film-tint);
  padding: clamp(56px, 7vw, 88px) 0;
}

.cta-strip__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.cta-strip__title {
  font-size: var(--fs-lg);
  font-weight: 400;
  font-stretch: 108%;
}

/* Visore foto */
.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 20, 30, 0.97);
  color: var(--on-ink);
}

.viewer[open] {
  display: grid;
  grid-template-rows: 1fr auto;
}

.viewer::backdrop {
  background: rgba(8, 20, 30, 0.9);
}

.viewer__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 24px var(--gutter) 0;
}

.viewer__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  touch-action: pan-y;
}

.viewer__img.is-entering {
  animation: viewer-in 0.35s var(--ease);
}

@keyframes viewer-in {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
}

.viewer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding: 16px var(--gutter) max(16px, env(safe-area-inset-bottom));
}

.viewer__text {
  min-width: 0;
}

.viewer__meta {
  color: var(--on-ink-2);
}

.viewer__controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer .icon-btn {
  border-color: var(--ink-line);
}

.viewer__count {
  min-width: 7ch;
  text-align: center;
  color: var(--on-ink-2);
}

/* ==========================================================================
   Contatti
   ========================================================================== */
.contact {
  padding: clamp(56px, 8vw, 96px) 0;
}

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 48px clamp(32px, 6vw, 96px);
  align-items: start;
}

.contact__title {
  font-size: var(--fs-lg);
  font-weight: 400;
  font-stretch: 108%;
  margin-bottom: 28px;
}

.contact__aside {
  display: grid;
  gap: 40px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--film-tint);
}

.contact__facts {
  display: grid;
  gap: 18px;
}

.contact__facts dt {
  font-family: var(--mono);
  font-weight: 300;
  font-size: var(--fs-xs);
  color: var(--text-3);
  margin-bottom: 4px;
}

.contact__facts dd {
  overflow-wrap: anywhere;
}

.contact__facts dd.mono {
  font-size: var(--fs-sm);
}

.contact__facts a {
  color: var(--signal-ink);
  border-bottom: 1px solid currentColor;
}

.contact__subtitle {
  font-size: var(--fs-md);
  font-weight: 400;
  margin-bottom: 10px;
}

.contact__areas p {
  color: var(--text-2);
}

@media (max-width: 900px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

.map {
  padding-bottom: clamp(64px, 8vw, 104px);
}

.map__frame {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 320px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--film);
}

.map__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.85) contrast(1.05);
}

/* ==========================================================================
   Articolo
   ========================================================================== */
.read-ruler {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: calc(var(--z-header) - 1);
  height: 6px;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(163, 196, 214, 0.35) 0 1px, transparent 1px 10px) bottom / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, rgba(163, 196, 214, 0.5) 0 1px, transparent 1px 50px) bottom / 100% 6px no-repeat;
}

.read-ruler span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--signal);
  height: 2px;
  transform-origin: left;
  transform: scaleX(var(--read, 0));
}

.article__head {
  background: var(--ink);
  color: var(--on-ink);
  padding: calc(var(--header-h) + clamp(40px, 7vw, 88px)) 0 clamp(120px, 14vw, 200px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.article__head canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.7;
}

.article__head-inner {
  display: grid;
  gap: 20px;
  justify-items: start;
}

.article__title {
  font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4.25rem);
  font-weight: 300;
  font-stretch: 108%;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

.article__lead {
  max-width: 60ch;
  font-size: var(--fs-md);
  font-weight: 300;
  line-height: 1.5;
  color: var(--on-ink-2);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  color: var(--on-ink-2);
}

.article__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article__cover {
  margin-top: clamp(-160px, -11vw, -88px);
  position: relative;
}

.article__cover img {
  width: 100%;
  max-height: 620px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--film);
}

.article__body {
  display: grid;
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
  gap: 48px;
  padding-top: clamp(48px, 7vw, 88px);
  padding-bottom: clamp(72px, 10vw, 120px);
}

.article__body.has-toc {
  grid-template-columns: minmax(200px, 260px) minmax(0, 720px);
  justify-content: space-between;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
}

.toc__title {
  color: var(--text-3);
  margin-bottom: 14px;
}

.toc__list {
  display: grid;
  gap: 2px;
  border-left: 1px solid var(--rule);
  counter-reset: toc;
}

.toc__list a {
  position: relative;
  display: block;
  padding: 8px 0 8px 18px;
  font-size: var(--fs-sm);
  line-height: 1.4;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}

.toc__list a::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--signal);
  transform: scaleY(0);
  transition: transform 0.3s var(--ease);
}

.toc__list a:hover,
.toc__list a.is-current {
  color: var(--text);
}

.toc__list a.is-current::before {
  transform: scaleY(1);
}

@media (max-width: 1000px) {
  .article__body.has-toc {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
  }

  .toc {
    position: static;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--film);
  }
}

/* Contenuto degli articoli (HTML dall'editor) */
.prose {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text);
  min-width: 0;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: var(--fs-lg);
  font-weight: 400;
  font-stretch: 106%;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: var(--fs-md);
  font-weight: 500;
}

.prose strong,
.prose b {
  font-weight: 500;
  color: #7d4f2a;
}

.prose a {
  color: var(--signal-ink);
  border-bottom: 1px solid currentColor;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.5em;
  padding-left: 0;
}

.prose ul li,
.prose ol li {
  position: relative;
  padding-left: 1.6em;
}

.prose ul li::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.72em;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--signal);
  border-radius: 50%;
}

.prose ol {
  counter-reset: li;
}

.prose ol li::before {
  counter-increment: li;
  content: counter(li);
  position: absolute;
  left: 0;
  font-family: var(--mono);
  font-size: 0.75em;
  top: 0.35em;
  color: var(--signal-ink);
}

.prose img {
  border-radius: var(--radius);
  margin-block: 1.6em;
}

.prose blockquote {
  margin: 1.6em 0;
  padding-left: 20px;
  border-left: 2px solid var(--signal);
  color: var(--text-2);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}

.prose th {
  font-weight: 500;
}

.article-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px 32px;
  margin-top: 3em !important;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--on-ink);
  font-size: var(--fs-base);
  line-height: 1.5;
}

.article-cta__title {
  font-size: var(--fs-md);
  margin-bottom: 4px;
}

.article-cta p:not(.article-cta__title) {
  color: var(--on-ink-2);
}

/* ==========================================================================
   404
   ========================================================================== */
.lost {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 72px;
  background: var(--ink);
  color: var(--on-ink);
}

.lost__inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
}

.lost__reticle {
  width: 100%;
  max-width: 320px;
  fill: none;
  stroke: var(--on-ink-2);
  stroke-width: 1;
}

.lost__stadia {
  stroke: var(--on-ink-3);
}

.lost__ring {
  stroke-dasharray: 3 5;
  transform-origin: 100px 100px;
  animation: lost-spin 24s linear infinite;
}

.lost__miss {
  stroke: var(--signal);
  stroke-width: 1.5;
  animation: lost-drift 3.2s var(--ease-io) infinite alternate;
}

@keyframes lost-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes lost-drift {
  to {
    transform: translate(10px, -8px);
  }
}

.lost__copy {
  display: grid;
  gap: 20px;
  justify-items: start;
}

.lost__code {
  color: var(--signal);
  font-size: var(--fs-sm);
}

.lost__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.lost .btn--line-dark {
  border-color: var(--ink-line);
  color: var(--on-ink);
}

@media (max-width: 760px) {
  .lost__inner {
    grid-template-columns: 1fr;
  }

  .lost__reticle {
    max-width: 180px;
  }
}

/* ==========================================================================
   Schede tecniche (dialog)
   ========================================================================== */
.sheet {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 40px 80px -30px rgba(8, 20, 30, 0.6);
}

.sheet::backdrop {
  background: rgba(8, 20, 30, 0.72);
  backdrop-filter: blur(4px);
}

.sheet[open] {
  animation: sheet-in 0.35s var(--ease);
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.sheet__panel {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 40px);
}

.sheet__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--paper);
}

.sheet__title {
  font-size: var(--fs-lg);
  font-weight: 400;
  font-stretch: 108%;
  padding-right: 56px;
}

.sheet p {
  color: var(--text-2);
  max-width: 64ch;
}

.sheet__gallery {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.sheet__gallery--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sheet__gallery--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sheet__gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--film);
}

.sheet__gallery--1 img {
  aspect-ratio: 16 / 10;
}

@media (max-width: 520px) {
  .sheet__gallery--2,
  .sheet__gallery--3 {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   Movimento ridotto: stato statico curato
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  @view-transition {
    navigation: none;
  }

  .hero__reticle {
    display: none;
  }
}

/* Transizione di pagina: il contenuto scorre appena, l'header resta fermo */
.site-header {
  view-transition-name: site-header;
}

::view-transition-old(root) {
  animation: 0.18s var(--ease) both vt-out;
}

::view-transition-new(root) {
  animation: 0.32s var(--ease) both vt-in;
}

@keyframes vt-out {
  to {
    opacity: 0;
  }
}

@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

html.is-locked {
  overflow: hidden;
}
