/* Elettroluce S.r.l. — tavola di progetto */
:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6da;
  --ink: #1f2a44;
  --ink-2: #2d3a5c;
  --ink-soft: #4a5571;
  --yellow: #f2c230;
  --yellow-dk: #d9a90f;
  --line: #cdc6b5;
  --grid: rgba(31, 42, 68, .055);
  --grid-2: rgba(31, 42, 68, .09);
  --sans: "IBM Plex Sans Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1220px;
  --gutter: clamp(18px, 4vw, 44px);
  --ease: cubic-bezier(.25, .7, .25, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-2) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.05; }
p { margin: 0 0 1em; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 10px; top: -60px; z-index: 100; background: var(--yellow); color: var(--ink); padding: 10px 14px; font-weight: 600; }
.skip:focus { top: 34px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
section[id] { scroll-margin-top: 66px; }
.mono-tag { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }

.preview-bar { height: 28px; line-height: 28px; font-family: var(--mono); font-size: .7rem; letter-spacing: .04em; text-align: center; background: var(--ink); color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 2px solid var(--ink); transition: box-shadow .3s; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 70px; transition: height .3s var(--ease); }
.site-header.is-tight .header-inner { height: 56px; }
.site-header.is-tight { box-shadow: 0 4px 0 rgba(31, 42, 68, .08); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-lamp { width: 34px; height: 34px; flex: none; transition: transform .5s var(--ease); }
.brand:hover .brand-lamp { transform: rotate(90deg); }
.brand-name { font-weight: 700; font-size: 1.5rem; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.brand-name small { display: block; font-family: var(--mono); font-weight: 400; font-size: .64rem; letter-spacing: .1em; color: var(--ink-soft); margin-top: 3px; text-transform: none; }
.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav a { display: flex; align-items: baseline; gap: 5px; text-decoration: none; font-weight: 500; font-size: .98rem; padding: 7px 9px; border: 1px solid transparent; transition: border-color .2s, background .2s; }
.nav a span { font-family: var(--mono); font-size: .66rem; color: var(--ink-soft); }
.nav a:hover { border-color: var(--ink); background: rgba(242, 194, 48, .25); }
.header-call { font-family: var(--mono); font-weight: 600; font-size: .92rem; text-decoration: none; background: var(--yellow); padding: 9px 14px; border: 2px solid var(--ink); white-space: nowrap; box-shadow: 3px 3px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.header-call:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.menu-btn { display: none; }

@media (max-width: 1040px) {
  .header-call { display: none; }
  .menu-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--paper); border: 2px solid var(--ink); padding: 8px 12px; cursor: pointer; font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
  .menu-btn-icon { width: 18px; height: 12px; position: relative; background: linear-gradient(var(--ink), var(--ink)) 0 0 / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 5px / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) 0 10px / 100% 2px no-repeat; }
  .menu-btn[aria-expanded="true"] .menu-btn-icon { background: linear-gradient(var(--ink), var(--ink)) 0 5px / 100% 2px no-repeat; }
  .nav { position: fixed; left: 0; right: 0; top: var(--nav-top, 98px); bottom: 0; background-color: var(--paper); background-image: inherit; padding: 20px var(--gutter) 110px; overflow-y: auto; transform: translateX(100%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s .35s; border-top: 2px solid var(--ink); }
  .nav.is-open { transform: none; visibility: visible; transition: transform .35s var(--ease); }
  .nav ul { flex-direction: column; }
  .nav a { font-size: 1.9rem; font-weight: 600; padding: 12px 0; border: 0; border-bottom: 1px dashed var(--line); gap: 14px; }
  .nav a span { font-size: .85rem; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 20px; font-weight: 600; font-size: 1rem; letter-spacing: .02em; text-decoration: none; border: 2px solid var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s, background .2s; box-shadow: 4px 4px 0 var(--ink); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-full { width: 100%; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 6.6vw, 5.6rem); line-height: .96; letter-spacing: -.015em; margin: 16px 0 24px; max-width: 11em; }
.hero-lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 33em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-diagram { margin: 0; background: rgba(244, 241, 234, .75); border: 2px solid var(--ink); padding: 18px 18px 10px; position: relative; }
.hero-diagram::before, .hero-diagram::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--ink); background: var(--paper); }
.hero-diagram::before { top: -8px; left: -8px; }
.hero-diagram::after { bottom: -8px; right: -8px; }
.sld { width: 100%; height: auto; display: block; }
.sld-lines { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: square; }
.sld-bus { stroke-width: 6; }
.sld-sw, .sld-brk { stroke-width: 2.4; }
.sld-dash { stroke-dasharray: 6 5; stroke-width: 1.8; }
.sld-nodes circle { fill: var(--yellow); stroke: var(--ink); stroke-width: 2; }
.sld-text { font-family: var(--mono); font-size: 13px; fill: var(--ink); letter-spacing: .04em; }
.hero-diagram figcaption { margin-top: 6px; text-align: right; font-size: .66rem; }

.titleblock { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: clamp(40px, 5vw, 64px) 0 0; border: 2px solid var(--ink); background: var(--paper); }
.titleblock > div { padding: 10px 14px 12px; border-left: 1px solid var(--ink); }
.titleblock > div:first-child { border-left: 0; }
.titleblock dt { font-family: var(--mono); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.titleblock dd { margin: 2px 0 0; font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.tb-hi { background: var(--yellow); }

/* ---------- sezioni comuni ---------- */
.sec-num { font-family: var(--mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; display: inline-block; border-bottom: 2px solid var(--yellow); padding-bottom: 4px; margin-bottom: 18px; }
.sec-num--light { color: var(--paper); }
h2 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); letter-spacing: -.01em; line-height: 1; margin-bottom: 20px; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 30em; }
.photo { margin: 0; border: 2px solid var(--ink); background: var(--paper); padding: 8px; }
.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; filter: saturate(.85) contrast(1.02); }
.photo--tall img { aspect-ratio: 4 / 5; }
.photo figcaption { margin-top: 8px; }

/* ---------- impianti ---------- */
.impianti { padding: clamp(70px, 9vw, 120px) 0; border-top: 2px solid var(--ink); }
.impianti-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(30px, 5vw, 72px); align-items: start; }
.impianti-head .photo { margin-top: 32px; max-width: 380px; }
.legend { width: 100%; border-collapse: collapse; background: rgba(244, 241, 234, .85); border: 2px solid var(--ink); }
.legend thead th { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; text-align: left; font-weight: 500; color: var(--paper); background: var(--ink); padding: 8px 14px; }
.legend td, .legend tbody th { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; text-align: left; }
.legend td:first-child { width: 72px; border-right: 1px solid var(--line); color: var(--ink); }
.legend td:first-child svg { width: 38px; height: 38px; display: block; margin: 0 auto; transition: transform .3s var(--ease), color .3s; }
.legend tbody th { font-weight: 600; font-size: 1.12rem; width: 34%; }
.legend tbody td:last-child { color: var(--ink-soft); }
.legend tbody tr { transition: background .2s; }
.legend tbody tr:hover { background: rgba(242, 194, 48, .22); }
.legend tbody tr:hover svg { transform: scale(1.12); }

/* ---------- settori ---------- */
.settori { background: var(--ink); color: var(--paper); padding: clamp(70px, 9vw, 120px) 0; background-image: linear-gradient(rgba(244, 241, 234, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(244, 241, 234, .05) 1px, transparent 1px); background-size: 24px 24px; }
.settori h2 span { color: var(--yellow); }
.switches { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 64px); margin-top: 26px; }
.sw-list { display: flex; flex-direction: column; gap: 10px; }
.sw { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; background: transparent; border: 2px solid rgba(244, 241, 234, .35); padding: 12px 16px; cursor: pointer; font-size: 1.4rem; font-weight: 600; transition: border-color .2s, background .2s, color .2s; }
.sw svg { width: 80px; height: 30px; flex: none; }
.sw-wire { stroke: currentColor; stroke-width: 2.4; fill: none; }
.sw circle { fill: var(--ink); stroke: currentColor; stroke-width: 2; }
.sw-blade { stroke: currentColor; stroke-width: 3; stroke-linecap: round; transform-origin: 24px 22px; transform: rotate(-32deg); transition: transform .35s var(--ease); }
.sw:hover { border-color: var(--paper); }
.sw[aria-selected="true"] { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.sw[aria-selected="true"] circle { fill: var(--yellow); }
.sw[aria-selected="true"] .sw-blade { transform: rotate(0deg); }
.sw-panels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.sw-panel { border-left: 4px solid var(--yellow); padding: 4px 0 4px 20px; }
.sw-panel[hidden] { display: none; }
.sw-panel h3 { font-size: 2rem; margin-bottom: 14px; }
.sw-panel p { color: #dcd8cd; }
.sw-panel .mono-tag { color: var(--yellow); margin-top: 18px; }
.sw-panel.is-on { animation: power .5s var(--ease) both; }
@keyframes power { 0% { opacity: 0; } 20% { opacity: .6; } 30% { opacity: .2; } 100% { opacity: 1; } }
.sw-photo { margin: 0; border: 2px solid var(--paper); padding: 6px; }
.sw-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- storia (circuito) ---------- */
.storia { padding: clamp(70px, 9vw, 120px) 0; }
.storia-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(30px, 5vw, 72px); align-items: start; }
.storia-head { position: sticky; top: 110px; }
.storia-head h2 span { background: linear-gradient(transparent 62%, var(--yellow) 62%); white-space: nowrap; }
.circuit { position: relative; padding-left: 92px; }
.circuit-svg { position: absolute; left: 0; top: 0; width: 92px; height: 100%; overflow: visible; pointer-events: none; }
.circuit-svg path { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.circuit-base { stroke: rgba(31, 42, 68, .18); stroke-dasharray: 4 6; }
.circuit-live { stroke: var(--ink); }
.tl { list-style: none; margin: 0; padding: 0; }
.tl-item { position: relative; padding: 0 0 clamp(44px, 6vw, 70px); }
.tl-item:last-child { padding-bottom: 0; }
.tl-node { position: absolute; left: -62px; top: 12px; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper); transition: background .3s, transform .3s var(--ease); }
.tl-item.is-on .tl-node { background: var(--yellow); transform: scale(1.15); }
.tl-year { font-family: var(--mono); font-weight: 600; font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1; letter-spacing: -.03em; margin: 0 0 8px; color: rgba(31, 42, 68, .3); transition: color .4s; }
.tl-item.is-on .tl-year { color: var(--ink); }
.tl-item h3 { font-size: 1.5rem; margin-bottom: 6px; }
.tl-item p:not(.tl-year) { color: var(--ink-soft); max-width: 32em; }
.tl-lamp { position: absolute; left: -76px; top: 0; width: 50px; height: 50px; }
.tl-lamp svg { width: 100%; height: 100%; }
.tl-lamp circle { fill: var(--paper); stroke: var(--ink); stroke-width: 2.6; transition: fill .4s; }
.tl-lamp path { stroke: var(--ink); stroke-width: 2.6; }
.tl-item--end.is-on .tl-lamp circle { fill: var(--yellow); }
.tl-item--end.is-on .tl-lamp { filter: drop-shadow(0 0 10px rgba(242, 194, 48, .9)); }

/* ---------- azienda ---------- */
.azienda { padding: clamp(70px, 9vw, 120px) 0; border-top: 2px solid var(--ink); background: rgba(235, 230, 218, .6); }
.azienda-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 4fr); gap: clamp(24px, 3.5vw, 48px); align-items: start; margin-top: 18px; }
.bom-table { width: 100%; border-collapse: collapse; border: 2px solid var(--ink); background: var(--paper); font-variant-numeric: tabular-nums; }
.bom-table caption { text-align: left; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; background: var(--ink); color: var(--paper); padding: 8px 12px; caption-side: top; }
.bom-table th { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; text-align: left; font-weight: 500; padding: 8px 12px; border-bottom: 2px solid var(--ink); }
.bom-table td { padding: 10px 12px; border-top: 1px solid var(--line); font-size: 1.05rem; }
.bom-table td:first-child { font-family: var(--mono); font-weight: 600; width: 64px; border-right: 1px solid var(--line); text-align: center; }
.bom-note { font-size: .95rem; color: var(--ink-soft); margin-top: 16px; }
.azienda-col h3 { font-size: 1.35rem; margin: 26px 0 8px; }
.azienda-col p { color: var(--ink-2); }
.abil { border: 2px solid var(--ink); background: var(--paper); padding: 20px; }
.abil h3 { font-size: 1.5rem; margin-bottom: 6px; }
.abil-src { font-size: .85rem; color: var(--ink-soft); }
.abil ul { list-style: none; padding: 0; margin: 0 0 20px; }
.abil li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 9px 0; border-top: 1px dashed var(--line); line-height: 1.35; }
.abil b { font-family: var(--mono); font-size: 1.05rem; width: 30px; height: 30px; border: 2px solid var(--ink); display: grid; place-items: center; }
.reperibile { background: var(--yellow); margin: 0 -20px -20px; padding: 18px 20px; border-top: 2px solid var(--ink); }
.reperibile-h { font-family: var(--mono); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.reperibile p:last-child { margin: 0; }

/* ---------- sopralluogo ---------- */
.sopralluogo { padding: clamp(70px, 9vw, 120px) 0; border-top: 2px solid var(--ink); }
.sop-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(30px, 5vw, 72px); align-items: start; }
.big-call { display: inline-flex; flex-direction: column; margin-top: 18px; font-family: var(--mono); font-weight: 600; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.05; text-decoration: none; letter-spacing: -.02em; background: var(--yellow); border: 2px solid var(--ink); padding: 14px 20px 16px; box-shadow: 6px 6px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.big-call .mono-tag { color: var(--ink); letter-spacing: .1em; }
.big-call:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.sop-fax { font-family: var(--mono); font-size: .85rem; color: var(--ink-soft); margin-top: 18px; }
.sheet { border: 2px solid var(--ink); background: var(--paper); padding: 0 22px 22px; }
.sheet-head { display: flex; justify-content: space-between; gap: 10px; margin: 0 -22px 20px; padding: 10px 22px; background: var(--ink); color: var(--paper); }
.sheet-head output { color: var(--yellow); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.f { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
.f label, .f legend { display: block; font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin-bottom: 5px; padding: 0; }
.f input:not([type="radio"]), .f select, .f textarea { width: 100%; font: inherit; font-size: 1.02rem; color: var(--ink); background: #fffdf8; border: 2px solid var(--ink); border-radius: 0; padding: 10px 12px; min-height: 48px; }
.f textarea { resize: vertical; min-height: 110px; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--yellow); }
.f.bad input, .f.bad select, .f.bad textarea { border-color: #b3261e; }
.f-err { font-family: var(--mono); font-size: .76rem; color: #a3221a; margin: 5px 0 0; }
.f-err:empty { display: none; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.radio-row label { font-family: var(--sans); font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--ink); display: inline-flex; align-items: center; gap: 7px; cursor: pointer; margin: 0; }
.radio-row input { width: 18px; height: 18px; accent-color: var(--ink); }
.summary { border: 2px solid var(--ink); background: #fffdf8; padding: 20px; box-shadow: 8px 8px 0 var(--yellow); }
.summary:focus { outline: none; }
.summary-h { color: var(--ink); font-weight: 600; margin-bottom: 10px; }
.summary textarea { width: 100%; font-family: var(--mono); font-size: .86rem; line-height: 1.55; border: 1px dashed var(--ink-soft); background: var(--paper); padding: 12px; color: var(--ink); resize: vertical; min-height: 240px; }
.summary-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.btn-link { background: none; border: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-weight: 500; padding: 8px 4px; }
.copy-msg { font-family: var(--mono); font-size: .8rem; margin: 12px 0 0; }
.copy-msg:empty { display: none; }

/* ---------- contatti ---------- */
.contatti { border-top: 2px solid var(--ink); }
.contatti-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); padding: 0; max-width: none; }
.contatti-card { background: var(--ink); color: var(--paper); padding: clamp(44px, 6vw, 80px) var(--gutter) clamp(44px, 6vw, 80px) max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); }
.contatti-card h2 { color: var(--paper); }
.contatti-card address { font-size: 1.15rem; margin-bottom: 20px; color: #dcd8cd; }
.cdl { margin: 0; border-top: 1px solid rgba(244, 241, 234, .25); }
.cdl > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(244, 241, 234, .25); }
.cdl dt { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--yellow); padding-top: 4px; }
.cdl dd { margin: 0; }
.cdl a { color: var(--paper); font-weight: 600; }
.c-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 22px; }
.c-links a { color: var(--yellow); font-weight: 600; text-underline-offset: 4px; }
.map { position: relative; min-height: 420px; background: var(--paper-2); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.6) contrast(1.05); }

/* ---------- footer ---------- */
.site-footer { background: var(--paper); border-top: 2px solid var(--ink); padding: 26px 0; font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 26px; }
.footer-inner p { margin: 0; }
.f-brand { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.f-legal { font-family: var(--mono); font-size: .75rem; color: var(--ink-soft); margin-left: auto !important; }

/* ---------- action bar ---------- */
.action-bar { display: none; }
@media (max-width: 760px) {
  .action-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--paper); border-top: 2px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
  .action-bar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 7px; text-decoration: none; font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; border-left: 1px solid var(--ink); }
  .action-bar a:first-child { background: var(--yellow); border-left: 0; }
  .action-bar svg { width: 22px; height: 22px; fill: var(--ink); }
  body { padding-bottom: 60px; }
}

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--st, 0) * 60ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .impianti-grid, .storia-grid, .sop-grid, .switches { grid-template-columns: 1fr; }
  .hero-diagram { max-width: 560px; }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .titleblock > div { border-left: 0; border-top: 1px solid var(--ink); }
  .titleblock > div:nth-child(-n+2) { border-top: 0; }
  .titleblock > div:nth-child(even) { border-left: 1px solid var(--ink); }
  .titleblock .tb-hi { grid-column: 1 / -1; border-left: 0; }
  .storia-head { position: static; }
  .azienda-grid { grid-template-columns: 1fr 1fr; }
  .abil { grid-column: 1 / -1; }
  .contatti-grid { grid-template-columns: 1fr; }
  .contatti-card { padding-left: var(--gutter); }
  .map { min-height: 340px; }
  .sw-list { flex-direction: row; flex-wrap: wrap; }
  .sw { width: auto; flex: 1 1 calc(50% - 10px); }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .brand-name { font-size: 1.25rem; }
  .legend thead { display: none; }
  .legend td:first-child { width: 56px; padding: 12px 8px; }
  .legend td:first-child svg { width: 32px; height: 32px; }
  .legend tbody tr { display: grid; grid-template-columns: 56px 1fr; }
  .legend tbody th { width: auto; padding: 12px 12px 2px; border-top: 1px solid var(--line); }
  .legend tbody td:last-child { grid-column: 2; border-top: 0; padding: 0 12px 12px; font-size: .95rem; }
  .legend td:first-child { grid-row: span 2; }
  .sw { flex: 1 1 100%; font-size: 1.2rem; padding: 10px 12px; }
  .sw svg { width: 64px; }
  .sw-panels { grid-template-columns: 1fr; }
  .azienda-grid { grid-template-columns: 1fr; }
  .f-row { grid-template-columns: 1fr; gap: 0; }
  .circuit { padding-left: 64px; }
  .circuit-svg { width: 64px; }
  .tl-node { left: -48px; }
  .tl-lamp { left: -60px; width: 44px; height: 44px; }
  .f-legal { margin-left: 0 !important; }
  .hero-cta .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
