@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('font/Barlow-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url('font/Barlow-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('font/Barlow-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url('font/BarlowCondensed-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('font/BarlowCondensed-Bold.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-style: normal; font-display: swap; src: url('font/IBMPlexMono-Regular.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-style: normal; font-display: swap; src: url('font/IBMPlexMono-Medium.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --ink: #0e1a24; --notte: #132a33; --carta: #f3f4f2; --bianco: #ffffff;
  --testo-s: #e3ecee; --grigio-s: #8ea5aa; --grigio-c: #4a5c61;
  --filo-s: rgba(200,225,228,.2); --filo-c: rgba(14,26,36,.18);
  --acc: #a8842e; --acc-pr: #7a5b17; --acc-ch: #d4a94f;
  --segnale: #ff3b1f; --segnale-pr: #c42a12;
  --ee: #5aa9e6; --gas: #d9a648; --prod: #d4a94f;
  /* un colore per societa' (domanda 30): il segno sulla placca e, in -t, l'anno scritto sul chiaro */
  --c-eka: #008ea7; --c-eka-t: #006f83;
  --c-clas: #208898; --c-clas-t: #17656f;
  --c-tpi: #d4a94f; --c-tpi-t: #7a5b17;
  --c-fenice: #8e1b2c; --c-fenice-t: #8e1b2c;
  --c-mercurion: #70e0d8; --c-mercurion-t: #1d6b69;
  --hc: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --b: 'Barlow', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --m: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 5vw, 56px);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--carta); color: var(--ink); font-family: var(--b); font-size: 18px; line-height: 1.5; }
img, svg { max-width: 100%; }
a { color: var(--acc-pr); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
.scura a, .notte a { color: var(--testo-s); }
.scura a:hover, .notte a:hover { color: #ffffff; }
:focus-visible { outline: 3px solid var(--segnale); outline-offset: 3px; }
.salta { position: absolute; left: -9999px; top: 0; background: var(--segnale); color: #07171c; padding: 12px 16px; z-index: 50; }
.salta:focus { left: 8px; top: 8px; }
.w { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
h1, h2, h3, h4 { font-family: var(--hc); font-weight: 700; text-transform: uppercase; margin: 0; letter-spacing: .01em; text-wrap: balance; }
h1 { font-size: clamp(44px, 7.4vw, 88px); line-height: .94; }
h2 { font-size: clamp(34px, 4.6vw, 56px); line-height: .96; }
h3 { font-size: clamp(26px, 3vw, 36px); line-height: 1; }
h4 { font-size: 22px; line-height: 1.05; letter-spacing: .02em; }
h1:focus { outline: none; }
p { margin: 0; }
.lead { font-size: clamp(19px, 2vw, 22px); line-height: 1.5; max-width: 40em; }
.g { color: var(--grigio-c); } .scura .g, .notte .g { color: var(--grigio-s); }
.m { font-family: var(--m); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--grigio-c); }
.scura .m, .notte .m { color: var(--grigio-s); }
.m.s { color: var(--segnale-pr); } .scura .m.s, .notte .m.s { color: var(--segnale); }
.m.a { color: var(--acc-pr); } .scura .m.a, .notte .m.a { color: var(--acc-ch); }
.occ { display: flex; align-items: center; gap: 12px; font-family: var(--m); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--grigio-c); }
.scura .occ, .notte .occ { color: var(--grigio-s); }
.cro path { stroke: var(--segnale-pr); stroke-width: 1.5; fill: none; } .scura .cro path, .notte .cro path { stroke: var(--segnale); }
.fr path { stroke: currentColor; stroke-width: 1.5; fill: none; }
.seg { display: inline-block; font-family: var(--m); font-size: .72em; line-height: 1.35; letter-spacing: .02em; text-transform: none; font-weight: 400; padding: 1px 6px; border: 1px dashed var(--segnale-pr); color: #8f1e0c; background: #fff2ef; vertical-align: .08em; }
.scura .seg, .notte .seg { border-color: #ff8a75; color: #ffc2b7; background: rgba(255,59,31,.12); }

/* fascia di bozza */
.bozza { background: var(--segnale); color: #07171c; font-family: var(--m); font-size: 12px; letter-spacing: .04em; padding: 7px 0; }
.bozza .w { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; }

/* testata */
.testata { background: var(--ink); color: var(--testo-s); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--filo-s); }
.testata .w { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.testata .marchio { display: inline-flex; align-items: center; min-height: 44px; }
.menu { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 26px); }
.menu a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--testo-s); text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; }
.menu a:hover { border-bottom-color: var(--grigio-s); }
.menu a[aria-current="page"] { border-bottom-color: var(--segnale); color: #ffffff; }
.menu .btn { border-bottom: 0; color: #07171c; }
.apri { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; background: transparent; color: var(--testo-s); border: 1px solid var(--grigio-s); border-radius: 0; font-family: var(--m); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
@media (max-width: 1060px) {
  .apri { display: inline-flex; }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); border-bottom: 1px solid var(--filo-s); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 20px; max-height: calc(100vh - 72px); overflow-y: auto; }
  .menu.aperto { display: flex; }
  .menu a { min-height: 48px; font-size: 18px; border-bottom: 1px solid var(--filo-s); }
  .menu .btn { margin-top: 16px; justify-content: center; }
}

/* bottoni e rimandi */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; background: var(--segnale); color: #07171c; font-family: var(--hc); font-weight: 600; font-size: 19px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border: 0; border-radius: 0; cursor: pointer; }
.btn:hover { background: #ff5a42; color: #07171c; }
.scura .btn, .notte .btn, .scura .btn:hover, .notte .btn:hover { color: #07171c; }
.btn.filo { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.filo:hover { background: var(--ink); color: #ffffff; }
.rim { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 18px; font-weight: 600; color: var(--acc-pr); text-decoration: none; }
.rim:hover { text-decoration: underline; }
.scura .rim, .notte .rim { color: var(--testo-s); }

/* sezioni */
.sez { padding: clamp(48px, 7vw, 88px) 0; }
.sez.scura { background: var(--ink); color: var(--testo-s); }
.sez.notte { background: var(--notte); color: var(--testo-s); }
.sez.bianca { background: var(--bianco); }
.pila { display: flex; flex-direction: column; } .g8 { gap: 8px; } .g12 { gap: 12px; } .g16 { gap: 16px; } .g20 { gap: 20px; } .g28 { gap: 28px; } .g40 { gap: 40px; } .g56 { gap: 56px; }
.fila { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.gr2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: clamp(36px, 4vw, 56px); }
.gr3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(20px, 2.6vw, 36px); }
.gr4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: clamp(20px, 2.4vw, 32px); }
.eroe { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .eroe { grid-template-columns: minmax(0, 1fr); } }
.quadro { border: 1px solid var(--filo-s); padding: clamp(14px, 2vw, 24px); display: flex; flex-direction: column; gap: 12px; background: var(--ink); }
.figura { width: 100%; height: auto; display: block; }
.figura text { font-family: var(--m); }
.testa-sez { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 40px; }

/* carte */
.carta-b { background: var(--bianco); border: 1px solid var(--filo-c); padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px; }
a.carta-b { text-decoration: none; color: var(--ink); min-height: 220px; }
a.carta-b:hover { border-color: var(--ink); color: var(--ink); }
a.carta-b .rim { margin-top: auto; }
.riga { border-top: 1px solid var(--filo-c); padding-top: 14px; }
.scura .riga, .notte .riga { border-top-color: var(--filo-s); }
.riga.forte { border-top-color: var(--ink); } .scura .riga.forte, .notte .riga.forte { border-top-color: var(--grigio-s); }
.riga.acc { border-top: 2px solid var(--acc); }
.voce { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.cifra { font-family: var(--m); font-size: clamp(38px, 4.6vw, 54px); line-height: 1; letter-spacing: -.03em; }
.cifra.s { color: var(--segnale); }
.passi { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 20px; counter-reset: passo; }
.passo { border-top: 1px solid var(--ink); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.scura .passo, .notte .passo { border-top-color: var(--grigio-s); }
.placca { background: var(--bianco); border: 1px solid var(--filo-c); min-height: 116px; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 16px; }
.vuoto { border: 1px dashed var(--grigio-s); padding: 28px; display: flex; align-items: center; justify-content: center; text-align: center; }

.dati { border-collapse: collapse; width: 100%; max-width: 520px; margin-top: 12px; font-family: var(--m); font-size: 14px; }
.dati th, .dati td { text-align: right; padding: 8px 12px; border-bottom: 1px solid var(--filo-c); font-weight: 400; }
.dati th:first-child { text-align: left; } .dati thead th { color: var(--grigio-c); border-bottom-color: var(--ink); text-transform: uppercase; font-size: 12px; letter-spacing: .08em; }
summary { min-height: 44px; }

.ere { display: flex; flex-wrap: wrap; gap: 2px; }
.ere > div { flex: var(--g) 1 0; min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 760px) { .ere > div { flex: 1 1 calc(50% - 2px); } }

/* moduli */
form { margin: 0; }
label { font-size: 16px; font-weight: 500; }
.campo { display: flex; flex-direction: column; gap: 6px; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea { width: 100%; min-height: 52px; padding: 12px 16px; font-family: var(--b); font-size: 18px; color: var(--ink); background: var(--bianco); border: 1px solid var(--grigio-c); border-radius: 0; }
textarea { min-height: 132px; resize: vertical; }
.scura input, .notte input { color: var(--testo-s); background: #0f2029; border-color: var(--grigio-s); }
.scura input::placeholder, .notte input::placeholder { color: var(--grigio-s); }
.spunta { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 15px; font-weight: 400; }
.spunta input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--acc); }
.esito { font-family: var(--m); font-size: 13px; line-height: 1.5; padding: 12px 14px; border: 1px dashed var(--segnale-pr); color: #8f1e0c; background: #fff2ef; }
.scura .esito, .notte .esito { border-color: #ff8a75; color: #ffc2b7; background: rgba(255,59,31,.12); }
.esito[hidden] { display: none; }

/* piede */
.piede { background: var(--ink); color: var(--testo-s); border-top: 1px solid var(--filo-s); padding: 56px 0 28px; }
.piede .colonne { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 36px; }
.piede ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.piede li a, .piede li span { display: inline-flex; align-items: center; min-height: 32px; font-size: 16px; color: var(--testo-s); text-decoration: none; }
.piede li a:hover { text-decoration: underline; }
.piede .fondo { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--filo-s); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
[data-pagina][hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .testata { position: static; } .bozza, .apri { display: none; } }

/* la sigla RdO resta scritta così anche nei titoli e nelle etichette in maiuscolo */
.sigla { text-transform: none; }

/* il colore della societa': una fascia sopra la placca del logo */
.placca.soc { border-top: 4px solid var(--soc); }
/* le ere della storia, nell'ottone di TPI (dal piu' scuro al piu' chiaro) */
.era1 { background: #3b2e12; } .era2 { background: #5e4818; } .era3 { background: #8c6a1f; } .era4 { background: #d4a94f; }

/* 5/10/2026: la scheda di una societa' si clicca tutta (tpi_v07.py, CARTE) */
.carta-soc { position: relative; }
.carta-soc a.carta-l { color: inherit; text-decoration: none; }
.carta-soc a.carta-l::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.carta-soc a.carta-l:focus-visible { outline: none; }
.carta-soc a.carta-l:focus-visible::after { outline: 3px solid var(--segnale); outline-offset: 3px; }
.carta-soc a:not(.carta-l) { position: relative; z-index: 1; }
.carta-soc:hover a.carta-l { text-decoration: underline; text-underline-offset: 4px; }
.carta-soc:hover .placca { border-left-color: var(--ink); border-right-color: var(--ink); border-bottom-color: var(--ink); }
