/* =========================================================
   VERSIONE 6 — FABLE
   Il sito come un racconto in tre capitoli: dalla notte
   (la luce della fibra) al crepuscolo (lo sguardo delle
   telecamere) fino all'alba (il sole del fotovoltaico).
   Dettaglio memorabile: il "filo rosso" che si srotola lungo
   la pagina mentre si scorre.
   Titoli in serif di sistema, forme ad arco, animazioni solo
   CSS + js/fable.js (nessuna libreria, nessun font esterno).
   Si applica sopra style.css.

   Regola di sicurezza: ogni stato "nascosto in attesa di
   animazione" vale solo con JavaScript attivo (classe .js su
   <html>, messa da js/boot.js) e solo se l'utente non ha
   chiesto di ridurre il movimento. Senza JS, o con movimento
   ridotto, tutto è visibile e fermo.
   ========================================================= */

@property --charge { syntax: "<number>"; inherits: false; initial-value: 0; }

:root {
  /* Notte, crepuscolo, carta */
  --night: #0a1114;
  --night-2: #101a1f;
  --night-3: #18252b;
  --night-line: #25353c;
  --dusk: #1c0e17;
  --paper: #f8f3e9;
  --paper-2: #f1e9da;
  --white: #fffdf8;

  --ink: #131a1d;
  --ink-2: #1e282d;
  --slate: #465055;
  --muted: #666e72;
  --line: #e2d8c5;

  /* Marchio */
  --brand: #de184b;
  --brand-ink: #c2103f;       /* rosso per testi piccoli su carta (contrasto AA) */
  --brand-deep: #a80d36;
  --brand-light: #ff7092;     /* rosso leggibile su fondo scuro */

  /* Le tre luci dei capitoli */
  --glow-fiber: #6fdcf0;
  --glow-cctv: #ff7092;
  --glow-sun: #ffc531;

  --fiber: var(--brand-ink);  --fiber-soft: #fbe6ea;
  --cctv: var(--brand-ink);   --cctv-soft: #fbe6ea;
  --solar: var(--brand-ink);  --solar-soft: #fbe6ea;
  --accent: var(--brand-ink); --accent-soft: #fbe6ea;
  --glow: var(--glow-cctv);

  --radius: 12px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(19, 26, 29, .05), 0 18px 40px -18px rgba(19, 26, 29, .28);

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", P052, Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
.theme-fiber { --accent: var(--brand-ink); --accent-soft: #fbe6ea; --glow: var(--glow-fiber); }
.theme-cctv  { --accent: var(--brand-ink); --accent-soft: #fbe6ea; --glow: var(--glow-cctv); }
.theme-solar { --accent: var(--brand-ink); --accent-soft: #fbe6ea; --glow: var(--glow-sun); }

html { scroll-padding-top: 5.5rem; }
body { background: var(--white); color: var(--ink); }
::selection { background: var(--brand); color: #fff; }
[hidden] { display: none !important; }

/* ---------- Tipografia ---------- */
h1, h2 {
  font-family: var(--font-display); font-weight: 400;
  letter-spacing: -0.022em; line-height: 1.04; text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.95rem, 4vw, 3.1rem); }
h1 em, h2 em { font-style: italic; color: var(--brand-ink); }
h3 { font-weight: 650; letter-spacing: -0.012em; }
h1, h2, h3 { overflow-wrap: break-word; }
.lead { color: var(--slate); text-wrap: pretty; }
.eyebrow { font-size: .75rem; letter-spacing: .18em; }
.eyebrow::before { width: 34px; height: 1px; }
.section--paper { background: var(--paper); }
.section-head { max-width: 800px; }
.prose h1 { margin-bottom: .5em; }

/* ---------- Pulsanti e link ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 999px; padding: .8rem 1.5rem; font-weight: 650;
  translate: var(--tx, 0) var(--ty, 0);
  transition: transform .3s var(--ease), translate .4s var(--spring), box-shadow .3s var(--ease),
              background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn svg { transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary, .btn--accent {
  background: var(--brand); color: #fff;
  box-shadow: 0 10px 26px -12px rgba(222, 24, 75, .75);
}
.btn--primary::before, .btn--accent::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--brand-deep); transform: translateX(-101%);
  transition: transform .5s var(--ease);
}
.btn--primary:hover, .btn--accent:hover { background: var(--brand); filter: none; box-shadow: 0 16px 34px -14px rgba(222, 24, 75, .9); }
.btn--primary:hover::before, .btn--accent:hover::before { transform: none; }
.btn--ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.btn[disabled] { opacity: .7; cursor: progress; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 650; color: inherit; text-decoration: none; padding: .35rem 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat;
  transition: background-size .45s var(--ease), color .2s;
}
.link-arrow svg { width: 18px; height: 18px; flex: none; transition: transform .35s var(--ease); }
.link-arrow:hover { background-size: 0% 1.5px; background-position: 100% 100%; }
.link-arrow:hover svg { transform: translateX(6px); }

/* ---------- Topbar + header ---------- */
.topbar { background: #060b0d; color: #9aa6aa; border-bottom: 1px solid var(--night-line); }
.topbar a { color: #efe9dc; }
.site-header {
  background: rgba(10, 17, 20, .82);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  transition: box-shadow .3s, background-color .3s;
  view-transition-name: site-header;
}
.site-header .container { min-height: 76px; transition: min-height .35s var(--ease); }
.site-header.is-scrolled { background: rgba(10, 17, 20, .95); box-shadow: 0 14px 34px -22px #000; }
.site-header.is-scrolled .container { min-height: 62px; }
.brand { color: #f4efe4; }
.brand__mark { transition: transform .6s var(--spring); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.07); }
.brand__name { font-family: var(--font-display); font-weight: 400; font-size: 1.32rem; letter-spacing: 0; }
.brand__fav { color: var(--brand-light); font-family: var(--font-head); font-weight: 700; font-size: .78em; letter-spacing: .14em; }
.nav a { color: #e6e1d5; position: relative; }
.nav a:hover { background: transparent; color: #fff; }
.nav a[aria-current="page"] { color: #fff; box-shadow: none; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .32rem; height: 1.5px;
  background: var(--brand-light); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); transform-origin: left; }
.nav .btn { color: #fff; }
.nav .btn:hover { background: var(--brand); }
.nav .btn[aria-current="page"] { background: #f4efe4; color: var(--ink); box-shadow: none; border-radius: 999px; }
.nav .btn[aria-current="page"]::before { display: none; }
.nav .btn[aria-current="page"]:hover { background: #fff; color: var(--ink); }
.nav-toggle { background: var(--night-2); border-color: var(--night-line); color: #fff; border-radius: 12px; transition: background-color .2s, rotate .4s var(--spring); }
.nav-toggle[aria-expanded="true"] { rotate: 90deg; background: var(--brand); border-color: var(--brand); }
@media (max-width: 1100px) {
  .nav { background: var(--night); border-bottom-color: var(--night-line); }
  .nav a { border-bottom-color: var(--night-line); }
  .nav a:not(.btn)::after { display: none; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--brand); }
}

/* Barra di avanzamento della lettura (creata da fable.js) */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 70; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%; transform-origin: left; transform: scaleX(var(--scroll, 0));
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  box-shadow: 0 0 10px rgba(222, 24, 75, .8);
}

/* =========================================================
   ANIMAZIONI DI BASE
   ========================================================= */
@keyframes rise       { from { opacity: 0; transform: translateY(28px); } }
@keyframes rise-left  { from { opacity: 0; transform: translateX(-56px); } }
@keyframes rise-right { from { opacity: 0; transform: translateX(56px); } }
@keyframes zoom-in    { from { opacity: 0; transform: scale(.9); } }
@keyframes pop-in     { from { opacity: 0; transform: scale(.94) translateY(10px); } }
@keyframes word-rise  { from { transform: translateY(118%) rotate(5deg); } }
@keyframes turn       { to { transform: rotate(360deg); } }
@keyframes bob        { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes blink      { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .15; } }
@keyframes draw       { from { stroke-dasharray: 100; stroke-dashoffset: 100; } to { stroke-dasharray: 100; stroke-dashoffset: 0; } }
@keyframes kenburns   { from { scale: 1.14; translate: 0 0; } to { scale: 1.3; translate: -2% -3%; } }
@keyframes kenburns-bg { from { transform: scale(1.02); } to { transform: scale(1.14) translate(-1.5%, -2%); } }
@keyframes shine      { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes ripple     { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  /* Elementi che entrano quando arrivano a schermo. Stesso elenco in js/fable.js (REVEAL). */
  .js :where(
    .rv, .section-head, .tile, .product, .steps li, .panel, .faq details, .cta-band, .method li,
    .chapter__media, .chapter__text > :not(h2), .prose > *, .contact-card, .summary, .form, .wizard-steps, .filters,
    .fable-hero .eyebrow, .fable-hero .lead, .fable-hero .hero__actions, .fable-hero__place, .fable-hero__art,
    .page-hero .breadcrumb, .page-hero .eyebrow, .page-hero .lead, .page-hero .hero__actions, .page-hero__art,
    .section .grid-2 > div, .footer-grid > div
  ):not(.is-in) { opacity: 0; }
  .js :where(
    .rv, .section-head, .tile, .product, .steps li, .panel, .faq details, .cta-band, .method li,
    .chapter__media, .chapter__text > :not(h2), .prose > *, .contact-card, .summary, .form, .wizard-steps, .filters,
    .fable-hero .eyebrow, .fable-hero .lead, .fable-hero .hero__actions, .fable-hero__place, .fable-hero__art,
    .page-hero .breadcrumb, .page-hero .eyebrow, .page-hero .lead, .page-hero .hero__actions, .page-hero__art,
    .section .grid-2 > div, .footer-grid > div
  ).is-in { animation: rise .9s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 80ms); }
  .js [data-rv="left"].is-in  { animation-name: rise-left; animation-duration: 1.1s; }
  .js [data-rv="right"].is-in { animation-name: rise-right; animation-duration: 1.1s; }
  .js [data-rv="zoom"].is-in, .js .fable-hero__art.is-in, .js .page-hero__art.is-in { animation-name: zoom-in; animation-duration: 1.2s; }
  .js .product.pop { animation: pop-in .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }

  /* Titoli spezzati in parole (fable.js): salgono una dopo l'altra */
  .js :is([data-split], .page-hero h1):not(.is-split) { visibility: hidden; }
  .js .is-split:not(.is-in) .w > * { transform: translateY(118%); }
  .js .is-split.is-in .w > * {
    animation: word-rise .95s var(--ease) backwards;
    animation-delay: calc(var(--i, 0) * 80ms + var(--w, 0) * 55ms);
  }

  /* Icone a tratto che si disegnano */
  .js .tile:not(.is-in) svg :is(path, circle, rect) { stroke-dasharray: 100; stroke-dashoffset: 100; }
  .js .tile.is-in svg :is(path, circle, rect) { animation: draw 1.5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 80ms + .25s); }

  /* Linee che crescono */
  .js .steps li:not(.is-in)::after { transform: scaleY(0); }
  .js .steps li.is-in::after { transition: transform .9s var(--ease) .4s; }
  .js .method:not(.is-in)::after { transform: scale(0); }
  .js .method.is-in::after { transition: transform 1.9s var(--ease) .25s; }
}
.w { display: inline-block; clip-path: inset(-.12em -.14em -.2em -.14em); }
.w > * { display: inline-block; }

/* =========================================================
   HOME — APERTURA
   ========================================================= */
.fable-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  min-height: min(92vh, 900px);
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(5rem, 9vw, 7rem);
  color: #d9d4c8;
  background:
    radial-gradient(60% 50% at 88% 8%, rgba(111, 220, 240, .11), transparent 70%),
    radial-gradient(55% 50% at 6% 96%, rgba(222, 24, 75, .2), transparent 70%),
    var(--night);
}
.motes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.fable-hero__grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center;
}
.fable-hero .eyebrow { color: #f4efe4; }
.fable-hero .eyebrow::before { background: var(--brand-light); }
.fable-hero h1 { color: #fff; font-size: clamp(2.7rem, 6.4vw, 5.5rem); line-height: 1; margin: .12em 0 .36em; text-wrap: normal; }
.fable-hero h1 em, .page-hero h1 em { color: var(--brand-light); }
.fable-hero .lead { color: #c6c1b5; max-width: 54ch; }
.fable-hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.fable-hero__place {
  display: flex; align-items: center; gap: .5rem; margin: 2rem 0 0;
  font-size: .9rem; color: #9aa6aa;
}
.fable-hero__place svg { width: 18px; height: 18px; flex: none; color: var(--brand-light); }

.fable-hero__art { position: relative; justify-self: center; width: min(100%, 430px); }
.arch {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  background: var(--night-3);
  box-shadow: 0 34px 80px -34px rgba(0, 0, 0, .85);
}
.arch img { width: 100%; height: 100%; object-fit: cover; scale: 1.14; }
.arch::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  background: linear-gradient(180deg, transparent 55%, rgba(10, 17, 20, .5));
}
.arch--hero img { object-position: 30% 50%; animation: kenburns 26s ease-in-out infinite alternate; }

.orbit { position: absolute; left: 50%; top: 55%; width: 128%; max-width: none; translate: -50% -50%; z-index: -1; overflow: visible; }
.orbit__ring { fill: none; stroke: rgba(255, 255, 255, .17); stroke-width: 1; stroke-dasharray: 2 9; }
.orbit__sat { transform-box: view-box; transform-origin: center; animation: turn 30s linear infinite; }
.orbit__sat circle { fill: var(--brand-light); filter: drop-shadow(0 0 6px var(--brand)); }
.orbit__sat--2 { animation-duration: 46s; animation-direction: reverse; }
.orbit__sat--2 circle { fill: var(--glow-fiber); filter: drop-shadow(0 0 6px var(--glow-fiber)); }

.chip {
  position: absolute; display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .9rem .5rem .6rem; border-radius: 999px; white-space: nowrap;
  background: rgba(16, 26, 31, .74); border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; font: 600 .8125rem/1 var(--font-head); letter-spacing: .04em;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .8);
  animation: bob 6s ease-in-out infinite;
}
.chip svg { width: 20px; height: 20px; color: var(--c); }
.chip--fiber { --c: var(--glow-fiber); left: -13%; top: 24%; }
.chip--cctv  { --c: var(--glow-cctv); right: -9%; top: 47%; animation-delay: -2s; }
@media (max-width: 1240px) { .chip--fiber { left: -8%; } .chip--cctv { right: -2%; } }
.chip--solar { --c: var(--glow-sun); left: -5%; bottom: 9%; animation-delay: -4s; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 1.5rem; translate: -50% 0;
  width: 26px; height: 42px; border: 1.5px solid rgba(255, 255, 255, .4); border-radius: 999px;
}
.scroll-cue i { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.9s var(--ease) infinite; }
@keyframes cue { 0% { translate: 0 0; opacity: 1; } 70%, 100% { translate: 0 15px; opacity: 0; } }

@media (max-width: 900px) {
  .fable-hero { min-height: 0; }
  .fable-hero__grid { grid-template-columns: 1fr; }
  .fable-hero__art { width: min(74%, 320px); margin-top: 1rem; }
  .chip--fiber { left: -14%; } .chip--cctv { right: -14%; } .chip--solar { left: -9%; }
  .chip { font-size: .75rem; padding: .42rem .7rem .42rem .5rem; }
  .scroll-cue { display: none; }
}

/* ---------- Nastro scorrevole ---------- */
.marquee { overflow: hidden; background: var(--night-2); border-block: 1px solid var(--night-line); padding: 1.05rem 0; color: #efe9dc; }
.marquee__track { display: flex; width: max-content; animation: marquee 46s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee ul { display: flex; flex: none; list-style: none; margin: 0; padding: 0; }
.marquee li {
  display: flex; align-items: center; gap: 2.6rem; padding-left: 2.6rem; white-space: nowrap;
  font: italic 400 clamp(1.2rem, 2.3vw, 1.85rem)/1.2 var(--font-display);
}
.marquee li::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 12px var(--brand); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { width: auto; }
  .marquee ul { flex-wrap: wrap; justify-content: center; row-gap: .6rem; flex: 1; }
  .marquee ul[aria-hidden] { display: none; }
}

/* =========================================================
   HOME — IL RACCONTO (tre capitoli + filo rosso)
   ========================================================= */
.story { position: relative; background: var(--night); color: #d9d4c8; --p: 1; }
.js .story { --p: 0; }

.thread {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px;
  z-index: 3; pointer-events: none; background: rgba(255, 255, 255, .1);
}
.thread__fill {
  position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--p));
  background: linear-gradient(180deg, var(--brand-light), var(--brand));
  box-shadow: 0 0 12px rgba(222, 24, 75, .95);
}
.thread__head {
  position: absolute; left: 50%; top: calc(var(--p) * 100%);
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 4px rgba(222, 24, 75, .38), 0 0 24px 7px rgba(222, 24, 75, .95);
}
.thread__head::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--brand-light); animation: ripple 1.8s ease-out infinite; }

.chapter { position: relative; padding: clamp(4.5rem, 10vw, 8rem) 0; overflow: clip; --g: var(--glow-fiber); }
.chapter--sguardo { --g: var(--glow-cctv); background: linear-gradient(180deg, var(--night) 0%, var(--dusk) 38%, var(--dusk) 100%); }
.chapter--sole { --g: #8a5a00; padding-top: 0; background: var(--paper); color: var(--slate); }

.chapter__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3.5rem, 10vw, 9rem); align-items: center;
}
.chapter--flip .chapter__media { order: 2; }
.chapter__media { position: relative; }
.chapter__media .arch, .lens-wrap { width: min(100%, 400px); margin-inline: auto; }

.chapter__node {
  position: absolute; left: 50%; top: 50%; z-index: 4;
  width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--night); border: 2px solid rgba(255, 255, 255, .32);
  transition: background-color .4s, border-color .4s, box-shadow .6s, scale .55s var(--spring);
}
.chapter--sole .chapter__node { background: var(--paper); border-color: rgba(19, 26, 29, .3); }
.chapter.is-lit .chapter__node, html:not(.js) .chapter__node {
  background: var(--brand); border-color: #fff; scale: 1.2;
  box-shadow: 0 0 0 6px rgba(222, 24, 75, .25), 0 0 26px rgba(222, 24, 75, .9);
}

.chapter__numeral {
  position: absolute; z-index: 0; right: 3%; top: 4%;
  font: italic 400 clamp(11rem, 30vw, 25rem)/.8 var(--font-display);
  color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .08);
  user-select: none; pointer-events: none;
}
.chapter--flip .chapter__numeral { right: auto; left: 3%; }
.chapter--sole .chapter__numeral { top: auto; bottom: 2%; -webkit-text-stroke-color: rgba(19, 26, 29, .09); }

.chapter__label {
  display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem;
  font: 600 .78rem var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--g);
}
.chapter__label::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.chapter h2 { color: #fff; font-size: clamp(2.5rem, 5.6vw, 4.5rem); margin-bottom: .28em; }
.chapter__kicker { font: italic 400 clamp(1.2rem, 2vw, 1.5rem)/1.35 var(--font-display); color: #f4efe4; margin-bottom: 1rem; }
.chapter p { max-width: 46ch; }
.chapter__text > p:not([class]) { color: #c2bdb1; }
.chapter__list { list-style: none; margin: 1.5rem 0 2rem; padding: 0; max-width: 30rem; counter-reset: c; }
.chapter__list li {
  counter-increment: c; display: flex; align-items: baseline; gap: 1rem;
  padding: .8rem 0; border-top: 1px solid rgba(255, 255, 255, .13); color: #eee9dd;
  transition: padding-left .4s var(--ease), color .2s;
}
.chapter__list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .13); }
.chapter__list li::before { content: counter(c, decimal-leading-zero); font: 600 .75rem var(--font-head); letter-spacing: .1em; color: var(--g); }
.chapter__list li:hover { padding-left: .6rem; color: #fff; }
.chapter__links { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; }
.chapter .link-arrow { color: #fff; }

.chapter--sole h2 { color: var(--ink); }
.chapter--sole .chapter__kicker { color: var(--ink); }
.chapter--sole .chapter__text > p:not([class]) { color: var(--slate); }
.chapter--sole .chapter__list li { color: var(--ink); border-color: rgba(19, 26, 29, .14); }
.chapter--sole .chapter__list li:hover { color: var(--brand-ink); }
.chapter--sole .link-arrow { color: var(--ink); }
.chapter--sole .link-arrow:hover { color: var(--brand-ink); }
.chapter--sole .arch { box-shadow: 0 34px 70px -34px rgba(90, 50, 10, .55); }

/* Capitolo I — il percorso della luce */
.chapter--luce .arch img { object-position: 68% 50%; }
.route {
  position: relative; z-index: 2; width: min(100%, 440px); margin: -2.4rem auto 0; padding: 1rem 1.15rem .85rem;
  border-radius: 18px; background: rgba(16, 26, 31, .8); border: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px -20px #000;
}
.route svg { width: 100%; height: auto; overflow: visible; }
.route__line { stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; }
.route__pulse {
  stroke: var(--glow-fiber); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: .12 .88; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 5px var(--glow-fiber));
  animation: pulse-run 3.6s linear infinite;
}
@keyframes pulse-run { to { stroke-dashoffset: 0; } }
.route__stop { fill: var(--night-2); stroke: rgba(255, 255, 255, .45); stroke-width: 1.5; animation: stop-lit 3.6s linear infinite; }
.route__stop:nth-of-type(2) { animation-delay: 1.2s; }
.route__stop:nth-of-type(3) { animation-delay: 2.4s; }
.route__stop:nth-of-type(4) { animation-delay: -.15s; }
@keyframes stop-lit { 0%, 3% { fill: var(--glow-fiber); stroke: #fff; } 30%, 100% { fill: var(--night-2); stroke: rgba(255, 255, 255, .45); } }
.route ol {
  list-style: none; margin: .35rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  font: 600 .72rem var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: #cfd8da;
}
.route li:nth-child(2), .route li:nth-child(3) { text-align: center; }
.route li:last-child { text-align: right; }

/* Capitolo II — l'obiettivo */
.lens-wrap { position: relative; }
.lens {
  position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 50%; background: var(--night-3);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 0 0 14px rgba(255, 255, 255, .035), 0 34px 80px -30px #000;
}
.lens img { width: 100%; height: 100%; object-fit: cover; object-position: 10% 40%; scale: 1.1; filter: saturate(.85) contrast(1.05); }
.lens__sweep {
  position: absolute; inset: 0; mix-blend-mode: screen;
  background: conic-gradient(from 0deg, rgba(255, 112, 146, 0) 0deg 290deg, rgba(255, 112, 146, .42) 358deg, rgba(255, 112, 146, 0) 360deg);
  animation: turn 6s linear infinite;
}
.lens__scan {
  position: absolute; left: 0; right: 0; top: 0; height: 22%; translate: 0 -100%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .13) 80%, rgba(255, 255, 255, .5) 98%, transparent);
  animation: scan 4.6s linear infinite;
}
@keyframes scan { to { translate: 0 460%; } }
.lens__frame { position: absolute; inset: 15%; width: 70%; height: 70%; color: rgba(255, 255, 255, .8); overflow: visible; animation: focus 5s var(--ease) infinite; }
.lens__frame path { fill: none; stroke: currentColor; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
@keyframes focus { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(.93); } 90% { transform: scale(1.02); } }
.lens__rec {
  position: absolute; left: 50%; top: 12%; translate: -50% 0;
  display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .6rem; border-radius: 6px;
  background: rgba(10, 17, 20, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 700 .7rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .14em; color: #fff;
}
.lens__rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--brand); animation: blink 1.3s linear infinite; }
.lens__rec b { font-weight: 400; color: #d5dcde; font-variant-numeric: tabular-nums; }
.lens__ring { position: absolute; inset: -8%; width: 116%; height: 116%; max-width: none; animation: turn 90s linear infinite reverse; }
.lens__ring circle { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 1; stroke-dasharray: 1 6; }

/* Capitolo III — l'alba */
.sunrise {
  position: relative; overflow: hidden; height: clamp(230px, 34vw, 420px); margin-bottom: clamp(3rem, 7vw, 5rem); --sun: 1;
  background: linear-gradient(180deg, var(--dusk) 0%, #3a1426 16%, #7c2138 36%, #c9434c 56%, #f29a63 76%, #fbd9a0 100%);
}
.js .sunrise { --sun: 0; }
.sunrise__sun {
  position: absolute; left: 73%; bottom: 14%; width: clamp(110px, 16vw, 210px); aspect-ratio: 1; border-radius: 50%;
  translate: -50% 0; transform: translateY(calc((1 - var(--sun)) * 135%));
  background: radial-gradient(circle at 50% 45%, #fff6d6 0%, #ffd766 45%, #ffb52e 100%);
  box-shadow: 0 0 60px 20px rgba(255, 197, 49, .55), 0 0 160px 60px rgba(255, 160, 60, .35);
}
.sunrise__rays {
  position: absolute; inset: -42%; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 236, 170, .55) 0 4deg, transparent 4deg 15deg);
  -webkit-mask: radial-gradient(closest-side, transparent 60%, #000 62%, transparent 100%);
          mask: radial-gradient(closest-side, transparent 60%, #000 62%, transparent 100%);
  animation: turn 70s linear infinite;
}
.sunrise__hills { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 40%; }
.sunrise__hills path:first-child { fill: #e8b98c; opacity: .75; }
.sunrise__hills path:last-child { fill: var(--paper); }

.chapter--sole .arch img { object-position: 12% 50%; }
.flow {
  position: relative; z-index: 2; display: flex; align-items: center; gap: .45rem;
  width: fit-content; max-width: 100%; margin: -2.2rem auto 0; padding: .7rem .9rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.flow__node { position: relative; width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #fdf1cf; color: #8a5a00; }
.flow__node svg { width: 24px; height: 24px; }
.flow__wire {
  width: clamp(26px, 6vw, 62px); height: 2px;
  background: repeating-linear-gradient(90deg, #e0a100 0 6px, transparent 6px 12px);
  animation: wire .6s linear infinite;
}
@keyframes wire { to { background-position: 12px 0; } }
.flow__node--battery { background: #e4f4ea; color: #1c6b3d; }
.flow__node--battery::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; --charge: 100;
  background: conic-gradient(#2e9b5b calc(var(--charge) * 1%), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2.5px));
  animation: charge 5s var(--ease) infinite;
}
@keyframes charge { 0% { --charge: 0; } 75%, 100% { --charge: 100; } }

@media (max-width: 900px) {
  .thread { left: 1.15rem; }
  .chapter__grid { grid-template-columns: 1fr; gap: 3rem; padding-left: 1.6rem; }
  .chapter--flip .chapter__media { order: 0; }
  .chapter__node { left: 1.15rem; top: clamp(4.5rem, 10vw, 8rem); }
  .chapter--sole .chapter__node { top: calc(clamp(230px, 34vw, 420px) + clamp(3rem, 7vw, 5rem)); }
  .chapter__media .arch, .lens-wrap { width: min(86%, 340px); }
  .chapter__numeral { right: 2%; top: 1.5%; font-size: clamp(8rem, 36vw, 14rem); }
  .chapter--flip .chapter__numeral { left: auto; right: 2%; }
  .sunrise__sun { left: 68%; }
}

/* ---------- Home: metodo in quattro tappe ---------- */
.method {
  position: relative; list-style: none; margin: 3rem 0 0; padding: 0; counter-reset: m;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
}
.method::before, .method::after { content: ""; position: absolute; left: 0; right: 0; top: 27px; height: 2px; }
.method::before { background: var(--line); }
.method::after { background: linear-gradient(90deg, var(--brand), var(--brand-light)); transform-origin: left top; }
.method li { counter-increment: m; position: relative; z-index: 1; }
.method li::before {
  content: counter(m); display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 1.25rem;
  border-radius: 50%; background: var(--white); border: 2px solid var(--brand); color: var(--brand-ink);
  font: italic 400 1.5rem/1 var(--font-display); box-shadow: 0 0 0 7px var(--white);
  transition: background-color .3s, color .3s, scale .45s var(--spring);
}
.method li:hover::before { background: var(--brand); color: #fff; scale: 1.1; }
.method h3 { margin-bottom: .3rem; }
.method p { color: var(--slate); margin: 0; font-size: .975rem; }
@media (max-width: 860px) {
  .method { grid-template-columns: 1fr; gap: 1.75rem; }
  .method::before, .method::after { left: 27px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .method::after { background: linear-gradient(180deg, var(--brand), var(--brand-light)); }
  .method li { padding-left: 5rem; min-height: 56px; }
  .method li::before { position: absolute; left: 0; top: 0; margin: 0; }
}

/* =========================================================
   PAGINE INTERNE
   ========================================================= */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden; border-bottom: 0;
  padding: clamp(4.5rem, 11vw, 8rem) 0 clamp(3rem, 6vw, 4.5rem);
  background:
    radial-gradient(60% 70% at 90% 0%, rgba(111, 220, 240, .1), transparent 70%),
    radial-gradient(50% 70% at 0% 100%, rgba(222, 24, 75, .2), transparent 70%),
    var(--night);
  color: #d9d4c8;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--hero-img, none) center / cover no-repeat;
  animation: kenburns-bg 30s ease-in-out infinite alternate;
}
.theme-fiber .page-hero { --hero-img: url("../img/foto/fibra.jpg"); }
.theme-cctv  .page-hero { --hero-img: url("../img/foto/tvcc.jpg"); }
.theme-solar .page-hero { --hero-img: url("../img/foto/fotovoltaico.jpg"); }
:is(.theme-fiber, .theme-cctv, .theme-solar) .page-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 17, 20, .9) 0%, rgba(10, 17, 20, .66) 55%, rgba(10, 17, 20, .4) 100%),
    linear-gradient(180deg, rgba(10, 17, 20, .15), rgba(10, 17, 20, .85));
}
.page-hero h1 { color: #fff; max-width: 17ch; font-size: clamp(2.5rem, 6vw, 4.8rem); }
.page-hero .lead { color: #d0cbbf; }
.page-hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.breadcrumb { color: #9aa6aa; }
.breadcrumb a { color: #e6e1d5; }
.breadcrumb li + li::before { color: #5d6b70; }
.hero-lines { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62%; z-index: -1; opacity: .55; pointer-events: none; }
.hero-lines path { fill: none; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.page-hero__art {
  padding: .6rem; border-radius: 26px; background: rgba(10, 17, 20, .55); border: 1px solid rgba(255, 255, 255, .13);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px -30px #000;
}
.page-hero__art svg { animation: bob 7s ease-in-out infinite; }
@media (max-width: 860px) { .page-hero__art { display: none; } }

/* ---------- Schede ---------- */
.tile, .product, .cta-band, .contact-card { --mx: 50%; --my: 0%; }
.tile {
  position: relative; overflow: hidden; border-radius: 18px; padding: 1.6rem 1.5rem;
  background: var(--white); border: 1px solid var(--line);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.tile::after, .product::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(222, 24, 75, .1), transparent 70%);
  transition: opacity .35s;
}
.tile:hover, .product:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.tile:hover::after, .product:hover::after { opacity: 1; }
.tile__icon {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--brand-ink); margin-bottom: 1rem;
  transition: transform .55s var(--spring), background-color .3s, color .3s;
}
.tile__icon svg { width: 26px; height: 26px; }
.tile:hover .tile__icon { transform: rotate(-7deg) scale(1.1); background: var(--brand); color: #fff !important; }

.product {
  position: relative; border-radius: 18px; background: var(--white); border: 1px solid var(--line);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.product__media { overflow: hidden; color: var(--brand-ink); background: radial-gradient(120% 130% at 15% 0%, #fff 0%, var(--paper) 55%, var(--paper-2) 100%); }
.product__media svg { transition: transform .6s var(--spring); }
.product:hover .product__media svg { transform: scale(1.2) rotate(-5deg); }
.product__cta { color: var(--brand-ink); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1.5px no-repeat; transition: background-size .4s var(--ease); width: fit-content; padding-bottom: 2px; }
.product__cta:hover, .product:hover .product__cta { background-size: 100% 1.5px; }
.product__specs li { background: var(--paper); }
.filters button { font-weight: 600; transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--spring); }
.filters button:hover { transform: translateY(-2px); border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }

/* ---------- Fasi, pannelli, FAQ ---------- */
.steps li::before {
  background: var(--white); color: var(--brand-ink); border-color: var(--brand);
  font: italic 400 1.2rem/1 var(--font-display);
  transition: background-color .3s, color .3s, scale .45s var(--spring);
}
.steps li:hover::before { background: var(--brand); color: #fff; scale: 1.1; }
.steps li::after { transform-origin: top; background: repeating-linear-gradient(var(--brand) 0 5px, transparent 5px 11px); }

.panel {
  position: relative; overflow: hidden; border: 0; border-radius: var(--radius-lg);
  background: radial-gradient(90% 120% at 100% 0%, rgba(222, 24, 75, .28), transparent 60%), var(--night);
  color: #c9c4b8;
}
.panel h3 { color: #fff; }
.panel .text-muted, .panel p { color: #c9c4b8 !important; }
.panel .checklist li::before { background-color: #fff; border-color: #fff; }
.panel a { color: var(--brand-light); }

.faq summary { transition: color .2s, padding-left .35s var(--ease); }
.faq summary:hover { color: var(--brand-ink); padding-left: .4rem; }
.faq summary::after { content: "+"; color: var(--brand); transition: rotate .4s var(--ease); }
.faq details[open] summary::after { content: "+"; rotate: 45deg; }
@keyframes faq-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: no-preference) { .faq details[open] > p { animation: faq-in .45s var(--ease); } }

/* ---------- Fascia finale ---------- */
.cta-band {
  isolation: isolate; border-radius: 28px; padding: clamp(2.25rem, 6vw, 3.75rem);
  background: linear-gradient(120deg, var(--brand-deep), var(--brand) 55%, #f0356a);
  color: #fff; box-shadow: 0 30px 60px -30px rgba(222, 24, 75, .7);
}
.cta-band::before {
  left: 0; right: 0; top: 0; bottom: 0; height: auto; z-index: -1;
  background: radial-gradient(380px circle at var(--mx) var(--my), rgba(255, 255, 255, .24), transparent 65%);
}
.cta-band::after {
  content: ""; position: absolute; right: -90px; top: 50%; width: 320px; aspect-ratio: 1; margin-top: -160px; z-index: -1;
  border-radius: 50%; border: 1px dashed rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 38px rgba(255, 255, 255, .06), 0 0 0 80px rgba(255, 255, 255, .04);
  animation: turn 60s linear infinite;
}
.cta-band h2 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); }
.cta-band h2 em { color: inherit; }
.cta-band p { color: #ffe3ea; }
.cta-band .btn--primary, .cta-band .btn--accent { background: #fff; color: var(--brand-ink); box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .55); }
.cta-band .btn--primary::before, .cta-band .btn--accent::before { display: none; }
.cta-band .btn--primary:hover, .cta-band .btn--accent:hover { background: #ffe9ee; color: var(--brand-deep); }
.cta-band .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }

/* ---------- Moduli ---------- */
.field input, .field select, .field textarea {
  border-radius: 12px; border-color: #d3c8b3; background: #fff;
  transition: border-color .2s, box-shadow .25s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--accent-soft); }
.check input { accent-color: var(--brand); }
.form-status { border-radius: 14px; }
.form-status--ok { position: relative; padding-left: 3.4rem; }
.form-status--ok::before {
  content: ""; position: absolute; left: 1rem; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
  background: #1c7a44 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.2 3L15 7'/%3E%3C/svg%3E") center / 16px no-repeat;
  animation: pop-in .5s var(--spring);
}

/* Preventivo a passi */
.wizard-steps { list-style: none; margin: 0 0 1.75rem; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; counter-reset: w; }
.wizard-steps li {
  counter-increment: w; position: relative; padding-top: .8rem;
  font-size: .875rem; font-weight: 600; color: var(--muted); transition: color .3s;
}
.wizard-steps li::before { content: counter(w) ". "; }
.wizard-steps li::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light)) 0 0 / 0% 100% no-repeat, var(--line);
  transition: background-size .7s var(--ease);
}
.wizard-steps li[aria-current="step"] { color: var(--ink); }
.wizard-steps li[aria-current="step"]::after { background-size: 55% 100%, auto; }
.wizard-steps li.is-done { color: var(--ink); }
.wizard-steps li.is-done::after { background-size: 100% 100%, auto; }
.wizard-nav { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.wizard-nav .btn--ghost { color: var(--ink); border-color: #d3c8b3; }
.wizard-nav .btn--ghost:hover { border-color: var(--ink); }
.js-wizard fieldset[data-step]:not(.is-active) { display: none; }
fieldset[data-step] { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 1.1rem; }
fieldset[data-step] legend { font: 400 1.6rem/1.2 var(--font-display); letter-spacing: -0.01em; margin-bottom: 1rem; padding: 0; }
@keyframes step-in { from { opacity: 0; transform: translateX(28px); } }
@media (prefers-reduced-motion: no-preference) { .js-wizard fieldset[data-step].is-active { animation: step-in .5s var(--ease); } }

.service-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; }
.service-pick label {
  position: relative; display: flex; flex-direction: column; gap: .6rem; min-height: 112px;
  padding: 1rem; border: 1.5px solid var(--line); border-radius: 16px; background: #fff;
  cursor: pointer; font-weight: 600;
  transition: border-color .2s, box-shadow .3s var(--ease), transform .35s var(--ease);
}
.service-pick label:hover { border-color: var(--ink); transform: translateY(-3px); }
.service-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.service-pick svg { width: 28px; height: 28px; color: var(--brand); transition: transform .5s var(--spring); }
.service-pick label:hover svg { transform: scale(1.15) rotate(-6deg); }
.service-pick small { font-weight: 400; color: var(--muted); font-size: .85rem; }
.service-pick label:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 4px var(--accent-soft); }
.service-pick label:has(input:checked)::after {
  content: ""; position: absolute; right: .7rem; top: .7rem; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.2 3L15 7'/%3E%3C/svg%3E") center / 13px no-repeat;
  animation: pop-in .4s var(--spring);
}
.service-pick label:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }

.summary { margin-top: 1.5rem; padding: 1.5rem; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.summary h3 { margin-bottom: .75rem; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .9375rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary dd:empty::before { content: "—"; color: var(--muted); font-weight: 400; }

/* Contatti */
.contact-card {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 24px;
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(222, 24, 75, .22), transparent 70%), var(--night);
  color: #d9d4c8;
}
.contact-list svg { color: var(--brand-light); }
.contact-list small { color: #9aa6aa; }
.contact-card p a[style] { color: var(--brand-light) !important; }
.map-consent { background: var(--night-2); border-radius: 16px; }
.map-consent p { color: #c2bdb1; }
.map-frame { border-radius: 16px; }
.legal-table th { background: var(--paper); }

/* ---------- Footer ---------- */
.site-footer { background: #060b0d; color: #9aa6aa; padding-top: 0; }
.site-footer a { color: #d8d3c7; background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat; transition: background-size .35s var(--ease), color .2s; padding-bottom: 1px; }
.site-footer a:hover { color: #fff; text-decoration: none; background-size: 100% 1px; }
.site-footer .footer-logo { background: none; }
.footer-signal { height: 3px; background: linear-gradient(90deg, var(--glow-fiber), var(--brand) 50%, var(--glow-sun)); }
.footer-legal, .site-footer .brand__name small { color: #9aa6aa; }
.footer-legal a { color: #d8d3c7; }
.wordmark-xl {
  margin: 0; padding: 1.5rem 0 0; white-space: nowrap; overflow: hidden; user-select: none;
  font: italic 400 clamp(3rem, 13vw, 11.5rem)/.9 var(--font-display); letter-spacing: -0.04em;
  color: transparent;
  background: linear-gradient(100deg, #16242a 0%, #16242a 40%, #4b6068 50%, #16242a 60%, #16242a 100%) 0 0 / 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: shine 9s linear infinite;
}
.wordmark-xl span { color: var(--brand); -webkit-text-fill-color: var(--brand); }

/* ---------- Passaggio animato tra le pagine (dove supportato) ---------- */
@view-transition { navigation: auto; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: vt-out .22s ease-in both; }
  ::view-transition-new(root) { animation: vt-in .45s var(--ease) both; }
}

@media print {
  .js * { opacity: 1 !important; transform: none !important; animation: none !important; visibility: visible !important; }
  .scroll-progress, .thread, .motes, .marquee { display: none !important; }
}

/* ---------- Rifiniture ---------- */
/* Messa a fuoco da tastiera ben visibile anche sui fondi scuri e sulla fascia rossa */
:is(.topbar, .site-header, .fable-hero, .page-hero, .story, .panel, .contact-card, .site-footer) :focus-visible { outline-color: var(--brand-light); }
.chapter--sole :focus-visible { outline-color: var(--brand-ink); }
.cta-band :focus-visible { outline-color: #fff; }
/* Videosorveglianza: nella testata si inquadra la telecamera, non il volto */
.theme-cctv .page-hero::after { background-position: 12% 35%; }
@media (max-width: 480px) {
  .route { padding-inline: .85rem; }
  .route ol { font-size: .64rem; letter-spacing: .05em; }
}
