/* Napan Group — foglio di stile
   Font e video ospitati in locale (nessuna chiamata a servizi esterni, nessun cookie di terze parti). */

@font-face { font-family: "Lora"; src: url("../fonts/lora-var.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-italic-var.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }

/* Home: notte blu e ottone in apertura (video), poi fasce alternate chiare e scure; un solo motivo grafico ricorrente, l'asse verticale del palindromo. */
:root {
  --navy: #0F1E33;      /* blu notte: colore istituzionale */
  --navy-2: #1B2E48;    /* blu ardesia: superfici secondarie su scuro */
  --navy-3: #0A1527;    /* blu profondo: fasce scure */
  --brass: #A9824A;     /* ottone: filetti e dettagli, mai per testo piccolo su bianco */
  --brass-light: #C9A876; /* ottone chiaro: testo e linee su fondo scuro */
  --brass-ink: #7A5C30; /* ottone scuro: testo piccolo su chiaro */
  --stone: #EDF0F3;     /* pietra: sezioni chiare alternate */
  --ink: #1E2733;       /* testo */
  --muted: #566170;     /* testo secondario */
  --rule: #D3D9E0;      /* filetti su chiaro */
  --white: #FFFFFF;
  --on-dark: #C3CEDB;   /* testo su scuro */

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1200px;
  --gutter: max(16px, min(4vw, 40px));
  --section: clamp(80px, 11vw, 140px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--navy); margin: 0; letter-spacing: -0.005em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.6rem); line-height: 1.04; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; }
h3 { font-size: 1.3rem; line-height: 1.3; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--brass-ink); }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: var(--white); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.kicker { display: inline-flex; align-items: center; gap: 12px; font: 600 0.78rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass-ink); margin: 0 0 22px; }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.dark .kicker, .hero .kicker { color: var(--brass-light); }

/* ---------- Testata ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--rule);
  transition: background-color .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { position: relative; display: block; }
.brand img { height: 40px; width: auto; }
.brand .neg { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
.brand .pos { transition: opacity .35s ease; }
.nav ul { list-style: none; display: flex; gap: 36px; margin: 0; padding: 0; align-items: center; }
.nav a {
  font-size: 0.95rem; font-weight: 500; text-decoration: none; color: var(--ink);
  padding: 6px 0; border-bottom: 1px solid transparent; transition: color .35s ease, border-color .2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--brass); }
.nav .nav-cta a { border: 1px solid var(--brass); padding: 10px 18px; border-radius: 3px; }
.nav .nav-cta a:hover { background: var(--brass-light); color: var(--navy); }
.menu-toggle {
  display: none; font: 500 0.95rem var(--sans); color: var(--navy);
  background: none; border: 1px solid var(--rule); border-radius: 4px; padding: 8px 14px; cursor: pointer;
  transition: color .35s ease, border-color .35s ease;
}

/* Home: testata trasparente sopra l'apertura, diventa bianca scorrendo */
.is-home .site-header { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; }
.is-home .site-header:not(.scrolled) .nav > ul > li > a { color: var(--white); }
.is-home .site-header:not(.scrolled) .menu-toggle { color: var(--white); border-color: rgba(255, 255, 255, .35); }
.is-home .site-header:not(.scrolled) .brand .neg { opacity: 1; }
.is-home .site-header:not(.scrolled) .brand .pos { opacity: 0; }
.is-home .site-header.scrolled { background: rgba(255, 255, 255, 0.97); border-bottom-color: var(--rule); box-shadow: 0 10px 30px -24px rgba(15, 30, 51, .5); }

@media (max-width: 760px) {
  .brand img { height: 34px; }
  .menu-toggle { display: inline-block; }
  .nav { position: absolute; top: 76px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--rule); display: none; box-shadow: 0 20px 30px -20px rgba(15, 30, 51, .35); }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px; }
  .nav a, .is-home .site-header:not(.scrolled) .nav > ul > li > a { display: block; padding: 12px 0; border-bottom: 1px solid var(--stone); color: var(--ink); }
  .nav .nav-cta a { border: 0; border-bottom: 1px solid var(--stone); padding: 12px 0; border-radius: 0; }
  .no-js .nav { display: block; position: static; border: 0; }
}

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: 500 1rem/1 var(--sans); text-decoration: none;
  padding: 17px 28px; border-radius: 3px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s ease, transform .2s var(--ease), color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-brass { background: var(--brass-light); color: var(--navy); }
.btn-brass:hover { background: #D8BC90; }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-2); }
.btn-line { border-color: rgba(255, 255, 255, .45); color: var(--white); background: transparent; }
.btn-line:hover { border-color: var(--brass-light); color: var(--brass-light); }
.btn .play { width: 22px; height: 22px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; }
.btn .play::before { content: ""; border-left: 7px solid currentColor; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; margin-left: 2px; }
.link-quiet { color: var(--white); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 5px; font-weight: 500; }

/* ---------- Apertura con video ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-dark);
  background: var(--navy-3) url("../video/napan-apertura.jpg") center / cover no-repeat;
  min-height: min(100svh, 980px); display: flex; flex-direction: column; justify-content: flex-end;
  padding: 140px 0 0;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, rgba(10, 21, 39, .85)); pointer-events: none; }
.hero > .wrap { position: relative; z-index: 2; width: 100%; }
.hero-copy { max-width: 760px; padding-bottom: clamp(48px, 7vw, 88px); }
.hero h1 { color: var(--white); }
.hero h1 em { color: var(--brass-light); }
.hero .lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.65; max-width: 50ch; margin: 28px 0 38px; color: var(--on-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: center; }

.hero-brands { position: relative; z-index: 2; border-top: 1px solid rgba(201, 168, 118, .28); background: rgba(10, 21, 39, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero-brands .wrap { display: flex; align-items: center; gap: clamp(20px, 5vw, 64px); min-height: 104px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.hero-brands p { margin: 0; font-size: 0.8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass-light); flex: 0 0 auto; }
.hero-brands ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(24px, 5vw, 64px); flex-wrap: wrap; }
.hero-brands a { display: block; opacity: .82; transition: opacity .2s ease, transform .2s var(--ease); }
.hero-brands a:hover { opacity: 1; transform: translateY(-2px); }
.hero-brands img { height: 34px; width: auto; }
.hero-brands .b-maka img { height: 40px; }
.scroll-cue { position: absolute; right: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); bottom: 150px; z-index: 2; width: 1px; height: 90px; background: rgba(201, 168, 118, .3); overflow: hidden; }
.scroll-cue::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--brass-light); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { to { top: 100%; } }

@media (max-width: 760px) {
  .hero { min-height: 100svh; padding-top: 120px; }
  .hero-video { object-position: 68% 50%; }
  .hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(9, 19, 37, .35), rgba(9, 19, 37, .7) 45%, rgba(9, 19, 37, .55)); z-index: 1; pointer-events: none; }
  .hero-brands .wrap { gap: 14px 28px; min-height: 0; }
  .hero-brands p { width: 100%; }
  .hero-brands img { height: 26px; }
  .hero-brands .b-maka img { height: 32px; }
  .scroll-cue { display: none; }
}

/* ---------- Fascia scorrevole dei settori ---------- */
.ribbon { background: var(--stone); overflow: hidden; border-bottom: 1px solid var(--rule); }
.ribbon-track { display: flex; width: max-content; animation: ribbon 46s linear infinite; }
.ribbon ul { list-style: none; margin: 0; padding: 26px 0; display: flex; align-items: center; }
.ribbon li { font: italic 500 clamp(1.5rem, 3vw, 2.4rem)/1 var(--serif); color: var(--navy); white-space: nowrap; display: flex; align-items: center; }
.ribbon li::after { content: ""; width: 9px; height: 9px; background: var(--brass); transform: rotate(45deg); margin: 0 clamp(28px, 4vw, 52px); }
@keyframes ribbon { to { transform: translateX(-50%); } }

/* ---------- Sezioni ---------- */
.section { padding: var(--section) 0; position: relative; }
.section--stone { background: var(--stone); }
.dark { background: var(--navy); color: var(--on-dark); }
.dark h2, .dark h3 { color: var(--white); }
.dark h2 em { color: var(--brass-light); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px 48px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head > div { max-width: 640px; }
.section-head p.side { max-width: 44ch; color: var(--muted); margin: 0; }
.dark .section-head p.side { color: var(--on-dark); }
@media (max-width: 860px) { .section-head { flex-direction: column; align-items: start; } }

/* Chi siamo */
.about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 110px); align-items: start; }
.about .statement { font: 500 clamp(1.6rem, 3vw, 2.45rem)/1.25 var(--serif); color: var(--navy); margin: 0; letter-spacing: -0.01em; text-wrap: pretty; }
.about .statement mark { background: linear-gradient(transparent 62%, rgba(201, 168, 118, .45) 62%); color: inherit; padding: 0 .05em; }
.about .prose p { color: var(--muted); }
.facts { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.facts li { padding: 22px 16px 0 0; }
.facts b { display: block; font: 600 clamp(2.4rem, 4vw, 3.4rem)/1 var(--serif); color: var(--navy); }
.facts span { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 8px; line-height: 1.4; }

.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); margin: clamp(64px, 8vw, 104px) 0 0; padding: 0; list-style: none; }
.roles li { position: relative; background: var(--white); border: 1px solid var(--rule); border-radius: 10px; padding: 34px 30px 32px; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s ease; }
.roles li::before { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--brass); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.roles li:hover { transform: translateY(-6px); box-shadow: 0 28px 50px -32px rgba(15, 30, 51, .45); border-color: transparent; }
.roles li:hover::before { transform: scaleX(1); }
.roles .n { font: 500 0.85rem/1 var(--sans); letter-spacing: .14em; color: var(--brass-ink); }
.roles svg { width: 52px; height: 52px; margin: 22px 0 22px; }
.roles h3 { margin-bottom: 10px; }
.roles p { color: var(--muted); margin: 0; }
.ico { fill: none; stroke: var(--brass); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .roles { grid-template-columns: 1fr; }
}
@media (max-width: 480px) { .facts b { font-size: 2.2rem; } .facts span { font-size: .8rem; } }

/* Struttura del gruppo: organigramma animato */
.org { --line: rgba(201, 168, 118, .75); text-align: center; }
.org-top { display: inline-block; padding: 26px 40px; border: 1px solid rgba(201, 168, 118, .45); border-radius: 10px; background: rgba(255, 255, 255, .03); }
.org-top img { height: 64px; width: auto; }
.org-top small { display: block; margin-top: 10px; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--brass-light); }
.org-trunk { width: 1px; height: 56px; margin: 0 auto; background: var(--line); transform-origin: top; }
.org-row { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; text-align: left; }
.org-row::before { content: ""; position: absolute; top: 0; height: 1px; background: var(--line); left: calc((100% - 48px) / 6); right: calc((100% - 48px) / 6); transform: scaleX(1); }
.org-item { position: relative; padding-top: 48px; }
.org-item::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 48px; background: var(--line); transform-origin: top; }
.org-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; background: var(--white); border-radius: 10px; padding: 26px 20px; min-height: 150px; text-decoration: none; color: var(--muted); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
a.org-card:hover { transform: translateY(-5px); box-shadow: 0 26px 40px -26px rgba(0, 0, 0, .6); }
.org-card img { height: 46px; width: auto; max-width: 80%; }
.org-card .maka-logo { height: 52px; }
.org-card span { font-size: .9rem; line-height: 1.35; }
.org-branch { position: relative; margin: 34px 0 0; }
.org-branch .org-card { min-height: 0; padding: 18px 20px; flex-direction: row; justify-content: center; text-align: left; gap: 14px; background: rgba(255, 255, 255, .06); border: 1px dashed rgba(201, 168, 118, .6); color: var(--on-dark); }
.org-branch .org-card b { display: block; font: 600 1.05rem/1.2 var(--serif); color: var(--white); }
.org-branch .org-card svg { width: 34px; height: 34px; flex: 0 0 auto; }
.org-branch .org-card .ico { stroke: var(--brass-light); }
.org-branch::after { content: ""; position: absolute; top: -34px; left: 50%; width: 1px; height: 34px; border-left: 1px dashed rgba(201, 168, 118, .7); }
.org-item.has-branch { padding-bottom: 0; }
.org-note { margin: 44px auto 0; max-width: 60ch; color: var(--on-dark); font-size: .95rem; }

@media (max-width: 860px) {
  .org { text-align: left; }
  .org-top { display: block; }
  .org-trunk { margin: 0 0 0 30px; height: 32px; }
  .org-row { grid-template-columns: 1fr; gap: 18px; padding-left: 60px; }
  .org-row::before { left: 30px; right: auto; top: 0; bottom: 75px; width: 1px; height: auto; }
  .org-item { padding-top: 0; }
  .org-item::before { top: 75px; left: -30px; width: 30px; height: 1px; }
  .org-card { min-height: 150px; }
}

/* Le società */
.companies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.company { --c: var(--brass); position: relative; background: var(--white); border-radius: 14px; padding: clamp(28px, 3.4vw, 44px); display: flex; flex-direction: column; min-height: 360px; overflow: hidden; border: 1px solid var(--rule); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .3s ease; transform-style: preserve-3d; }
.company::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--c); transform: scaleX(.12); transform-origin: left; transition: transform .6s var(--ease); }
.company:hover { box-shadow: 0 40px 60px -40px rgba(15, 30, 51, .55); border-color: transparent; }
.company:hover::before { transform: scaleX(1); }
.company .logo { height: 64px; display: flex; align-items: center; margin-bottom: 30px; }
.company .logo img { height: 52px; width: auto; }
.company .logo .maka-logo { height: 60px; }
.company .logo .wordmark { font: 600 1.9rem/1 var(--serif); color: var(--navy); display: flex; align-items: center; gap: 12px; }
.company .logo .wordmark svg { width: 40px; height: 40px; }
.company .sector { font: 600 .76rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-ink); margin: 0 0 12px; }
.company h3 { font-size: clamp(1.5rem, 2.2vw, 1.85rem); margin-bottom: 12px; }
.company p.desc { color: var(--muted); margin: 0 0 26px; max-width: 46ch; position: relative; z-index: 1; }
.company .visit { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; font-weight: 500; color: var(--navy); text-decoration: none; position: relative; z-index: 1; }
.company .visit::after { content: "→"; transition: transform .3s var(--ease); }
.company .visit:hover::after { transform: translateX(5px); }
.company .visit span { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.company .branch-of { display: inline-block; font-size: .85rem; color: var(--muted); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; margin: 0 0 14px; }
.company .watermark { position: absolute; right: -18px; bottom: -18px; width: 190px; height: 190px; opacity: .1; pointer-events: none; }
.company .watermark * { fill: none; stroke: var(--c); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.company:hover .watermark { opacity: .18; }
.c-sirent { --c: #255684; }
.c-sirent::before { background: linear-gradient(90deg, #255684 50%, #87A44E 50%); }
.c-maka { --c: #9C2B22; }
.c-energy { --c: #A9824A; }
.c-naren { --c: #B8913F; }
@media (max-width: 860px) { .companies { grid-template-columns: 1fr; } .company { min-height: 0; } }

/* Video del gruppo */
.film { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.film p { color: var(--on-dark); max-width: 42ch; }
.film h2 + p { margin-top: 20px; }
.player { position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 50px 80px -40px rgba(0, 0, 0, .7), 0 0 0 1px rgba(201, 168, 118, .3); background: #000; aspect-ratio: 16 / 9; }
.player video { width: 100%; height: 100%; object-fit: cover; }
.player .play-btn { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(rgba(10, 21, 39, .1), rgba(10, 21, 39, .35)); border: 0; cursor: pointer; color: var(--navy); }
.player .play-btn span { width: 92px; height: 92px; border-radius: 50%; background: var(--brass-light); display: grid; place-items: center; box-shadow: 0 0 0 0 rgba(201, 168, 118, .5); animation: pulse 2.4s ease-out infinite; transition: transform .25s var(--ease); }
.player .play-btn:hover span { transform: scale(1.06); }
.player .play-btn span::before { content: ""; border-left: 22px solid var(--navy); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
.player.playing .play-btn { display: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201, 168, 118, .55); } 100% { box-shadow: 0 0 0 28px rgba(201, 168, 118, 0); } }
@media (max-width: 860px) { .film { grid-template-columns: 1fr; } .player .play-btn span { width: 72px; height: 72px; } }

/* Contatti */
.contact-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); border-radius: 18px; overflow: hidden; background: var(--white); border: 1px solid var(--rule); }
.contact-card .intro { background: var(--navy); color: var(--on-dark); padding: clamp(36px, 5vw, 64px); position: relative; overflow: hidden; }
.contact-card .intro h2 { color: var(--white); }
.contact-card .intro p { margin: 18px 0 32px; max-width: 38ch; }
.contact-card dl { margin: 0; padding: clamp(36px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: center; }
.contact-card dt { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.contact-card dt svg { width: 20px; height: 20px; }
.contact-card dd { margin: 0; font-weight: 500; font-size: 1.1rem; color: var(--navy); overflow-wrap: break-word; }
.contact-card dd a { text-decoration-color: var(--brass); text-underline-offset: 4px; }
.contact-card dd .map { display: inline-block; margin-top: 8px; font-size: .9rem; font-weight: 500; color: var(--brass-ink); }
@media (max-width: 860px) { .contact-card { grid-template-columns: 1fr; } }

/* ---------- Comparsa allo scorrimento (solo con JS e senza riduzione del movimento) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .anim .rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
  .anim .rv.in { opacity: 1; transform: none; }
  .anim .hero .rv { transition-duration: 1.1s; }
  .anim .org .org-trunk { transform: scaleY(0); transition: transform .6s var(--ease) .2s; }
  .anim .org .org-row::before { transform: scaleX(0); transition: transform .8s var(--ease) .7s; }
  .anim .org .org-item::before { transform: scaleY(0); transition: transform .5s var(--ease) 1.3s; }
  .anim .org .org-card { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s var(--ease), box-shadow .3s var(--ease); }
  .anim .org .org-item:nth-child(1) .org-card { transition-delay: 1.6s, 1.6s, 0s; }
  .anim .org .org-item:nth-child(2) .org-card { transition-delay: 1.75s, 1.75s, 0s; }
  .anim .org .org-item:nth-child(3) .org-card { transition-delay: 1.9s, 1.9s, 0s; }
  .anim .org .org-branch .org-card { transition-delay: 2.3s, 2.3s, 0s; }
  .anim .org.in .org-trunk, .anim .org.in .org-item::before { transform: none; }
  .anim .org.in .org-row::before { transform: scaleX(1); }
  .anim .org.in .org-card { opacity: 1; transform: none; }
  @media (max-width: 860px) {
    .anim .org .org-row::before { transform: scaleY(0); transform-origin: top; }
    .anim .org.in .org-row::before { transform: scaleY(1); }
    .anim .org .org-item::before { transform: scaleX(0); transform-origin: left; }
  }
  .ico-draw * { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .anim .in .ico-draw *, .anim .ico-draw.in * { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s ease-in-out .3s; }
}
@media (prefers-reduced-motion: reduce) {
  .ribbon-track, .scroll-cue::after, .player .play-btn span { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Pie di pagina ---------- */
.site-footer { background: var(--navy-3); color: #AEBBCB; padding: 72px 0 40px; font-size: 0.92rem; }
.site-footer .top { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.site-footer .top img { height: 92px; width: auto; }
.site-footer h2 { font: 600 .78rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-light); margin: 6px 0 18px; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #DCE3EC; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--brass-light); text-underline-offset: 4px; }
.legal-data { margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 4px 28px; line-height: 1.7; }
.legal-data > span { white-space: nowrap; }
@media (max-width: 760px) { .site-footer .top { grid-template-columns: 1fr 1fr; } .site-footer .top > :first-child { grid-column: span 2; } }
@media (max-width: 520px) { .legal-data { flex-direction: column; } .legal-data > span { white-space: normal; } }
.copyright { margin-top: 18px; color: #7F8DA0; }

/* ---------- Pagine legali ---------- */
.page-head { background: var(--navy); padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); }
.page-head h1 { color: var(--white); font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
.page-head p { color: #AEBBCB; margin: 14px 0 0; }
.legal { padding: clamp(48px, 7vw, 88px) 0 var(--section); }
.legal .wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
.legal .toc { position: sticky; top: 104px; align-self: start; font-size: 0.92rem; }
.legal .toc p { color: var(--muted); margin-bottom: 10px; }
.legal .toc ol { margin: 0; padding-left: 1.2em; }
.legal .toc li { margin-bottom: 8px; }
.legal .toc a { text-decoration: none; color: var(--navy); }
.legal .toc a:hover { text-decoration: underline; text-decoration-color: var(--brass); }
.legal article { max-width: 70ch; }
.legal article h2 { font-size: 1.5rem; margin: 0 0 14px; }
.legal article section + section { margin-top: 52px; }
.legal article h3 { font-size: 1.12rem; margin: 28px 0 8px; }
.legal article ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal article li { margin-bottom: 6px; }
.legal article a { color: var(--navy); text-decoration-color: var(--brass); text-underline-offset: 3px; }
.legal table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--rule); }
.legal th { font-weight: 600; color: var(--navy); }
@media (max-width: 860px) {
  .legal .wrap { grid-template-columns: 1fr; }
  .legal .toc { position: static; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal thead { display: none; }
  .legal td { border: 0; padding: 4px 0; }
  .legal tr { border-bottom: 1px solid var(--rule); padding: 10px 0; }
  .legal td::before { content: attr(data-label); display: block; font-size: 0.85rem; color: var(--muted); }
}

/* Dati ancora da inserire: evidenziati per non dimenticarli prima della pubblicazione */
.todo { background: #FFF3C4; color: #6B4E00; padding: 0 4px; border-radius: 2px; }
.hero .todo, .site-footer .todo, .page-head .todo { background: rgba(255, 220, 120, 0.18); color: #FFE29A; }

/* 404 */
.notfound { min-height: 60vh; display: flex; align-items: center; }
.notfound h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
.notfound p { color: var(--muted); max-width: 46ch; margin: 18px 0 30px; }

@media print {
  .site-header, .nav, .menu-toggle, .hero-actions, .hero-video, .ribbon, .player { display: none; }
  .hero, .site-footer, .page-head, .dark { background: none; color: #000; }
  .hero h1, .page-head h1, .dark h2 { color: #000; }
}
