/* Group Glarix O&M – foglio di stile del nuovo sito (2026) */

:root {
	--ink: #1c2a35;        /* testo e testata: ardesia scura, come il telaio dei moduli */
	--ink-soft: #4a5964;
	--paper: #f4f6f7;      /* fondo chiaro, freddo */
	--white: #ffffff;
	--cell: #006078;       /* blu petrolio del logo: pulsanti, link, fasce */
	--cell-dark: #004a5d;
	--blue: #0091cf;       /* blu del logo: curva di produzione, dettagli */
	--sun: #9bc23c;        /* verde del logo: pulsante telefono, evidenze */
	--leaf: #9bc23c;       /* verde del logo: stato "tutto ok" */
	--alarm: #f07406;      /* arancio del logo: allarme */
	--line: #d3dbe0;
	--wrap: 1160px;
	--radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
	margin: 0;
	font-family: 'Roboto', Arial, sans-serif;
	font-size: 17px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--white);
	font-variant-numeric: tabular-nums;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cell); text-underline-offset: 3px; }
a:hover { color: var(--cell-dark); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 900; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: 1.2rem; color: var(--ink-soft); font-weight: 300; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 1000; background: var(--white); padding: 8px 12px; }

/* ---------- Testata ---------- */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.brand img { height: 76px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: #d7e0e6; text-decoration: none; font-weight: 500; font-size: .95rem; padding: 10px 12px; border-radius: var(--radius); }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 var(--sun); border-radius: 0; }
.nav .tel { margin-left: 12px; color: var(--ink); background: var(--sun); font-weight: 700; border-radius: var(--radius); }
.nav .tel:hover { background: #aed257; color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: var(--radius); padding: 8px 12px; font: inherit; cursor: pointer; }

@media (max-width: 900px) {
	.site-header .wrap { min-height: 76px; }
	.brand img { height: 60px; }
	.nav-toggle { display: block; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 76px; background: var(--ink); flex-direction: column; align-items: stretch; padding: 8px 16px 20px; }
	.nav.open { display: flex; }
	.nav a { padding: 14px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
	.nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--sun); padding-left: 16px; }
	.nav .tel { margin: 12px 0 0; text-align: center; }
}

/* ---------- Pulsanti ---------- */
.btn { display: inline-block; padding: 14px 24px; border-radius: var(--radius); font-weight: 700; text-decoration: none; border: 2px solid transparent; font-size: 1rem; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--cell); color: #fff; }
.btn-primary:hover { background: var(--cell-dark); color: #fff; }
.btn-ghost { border-color: var(--cell); color: var(--cell); background: transparent; }
.btn-ghost:hover { background: var(--cell); color: #fff; }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #aed257; color: var(--ink); }

/* ---------- Hero con curva di produzione ---------- */
.hero { background: var(--paper); padding: 64px 0 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.hero-text { max-width: 760px; }
.hero-text .lead { margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.curve { margin: 48px 0 0; background: var(--white); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; padding: 22px 24px 8px; }
.curve-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .9rem; color: var(--ink-soft); margin-bottom: 6px; }
.curve-head strong { color: var(--ink); font-weight: 700; font-size: 1rem; }
.curve-legend { display: flex; gap: 18px; flex-wrap: wrap; }
.curve-legend span::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--blue); }
.curve-legend .exp::before { background: none; border-top: 2px dashed #8796a0; height: 0; }
.curve-legend .irr::before { background: #e8b10c; height: 2px; }
.curve svg { width: 100%; height: auto; display: block; }
.curve-scroll { overflow-x: auto; }
@media (max-width: 700px) { .curve { padding: 18px 16px 8px; } .curve-scroll svg { min-width: 680px; } .curve .note::after { content: " Scorri il grafico per vederlo tutto."; } }
.curve .note { font-size: .78rem; color: #7b8a94; margin: 4px 0 10px; }

/* disegno della curva: un solo momento animato, al caricamento */
.prod { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 2.4s ease-out .3s forwards; }
.prod-fill { opacity: 0; animation: show .8s ease-out 2.2s forwards; }
.ev { opacity: 0; animation: show .5s ease-out forwards; }
.ev-1 { animation-delay: 1.3s; } .ev-2 { animation-delay: 2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes show { to { opacity: 1; } }

/* ---------- Fatti chiave ---------- */
.facts { background: var(--ink); color: #fff; }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 28px 24px; border-left: 1px solid rgba(255,255,255,.12); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts b { display: block; font-size: 1.9rem; font-weight: 900; line-height: 1.1; color: #fff; }
.facts span { color: #b9c6cf; font-size: .95rem; }
.facts b span { color: inherit; font-size: inherit; }
@media (max-width: 900px) { .facts ul { grid-template-columns: 1fr 1fr; } .facts li:nth-child(3) { border-left: 0; padding-left: 0; } .facts li { border-top: 1px solid rgba(255,255,255,.12); } .facts li:nth-child(-n+2) { border-top: 0; } }

/* ---------- Sezioni ---------- */
.section { padding: 88px 0; }
.section-paper { background: var(--paper); }
.section-head { max-width: 720px; margin-bottom: 40px; }

/* Servizi: O&M in primo piano, impiantistica di lato */
.services { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: start; }
.om-box { border-top: 6px solid var(--blue); background: var(--paper); padding: 32px; border-radius: 0 0 var(--radius) var(--radius); }
.om-box h3 { font-size: 1.5rem; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { padding: 9px 0 9px 30px; border-bottom: 1px solid var(--line); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 17px; width: 12px; height: 7px; border-left: 3px solid var(--leaf); border-bottom: 3px solid var(--leaf); transform: rotate(-45deg); }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.plain-list li b { display: block; }
.plain-list li span { color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 900px) { .services { grid-template-columns: 1fr; } }

/* Come interveniamo: è una sequenza reale, quindi numerata */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; }
.steps li { counter-increment: step; padding: 0 24px 0 0; position: relative; }
.steps li::before { content: counter(step); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--white); border: 2px solid var(--blue); color: var(--cell); font-weight: 900; margin-bottom: 16px; position: relative; z-index: 1; }
.steps li::after { content: ""; position: absolute; top: 22px; left: 44px; right: 0; height: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps p { font-size: .97rem; color: var(--ink-soft); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; gap: 32px 0; } .steps li:nth-child(2)::after { display: none; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .steps li::after { display: none; } }

/* Galleria lavori */
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gallery a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter .35s ease, transform .35s ease; }
.gallery a:hover img, .gallery a:focus-visible img { filter: none; transform: scale(1.04); }
@media (hover: none) { .gallery img { filter: none; } }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.lightbox { position: fixed; inset: 0; background: rgba(15,22,28,.92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 86vh; width: auto; border-radius: 4px; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; padding: 8px 16px; font-family: inherit; }
.lb-close { top: 12px; right: 12px; } .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); } .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Dove operiamo */
.areas { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.regions { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.regions li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.regions b { display: block; }
.regions span { font-size: .9rem; color: var(--ink-soft); }
@media (max-width: 900px) { .areas { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .regions { grid-template-columns: 1fr; } }

/* Invito al contatto */
.cta { background: var(--cell); color: #fff; padding: 64px 0; }
.cta .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { margin: 0; color: #d6e7f1; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn-ghost { border-color: #fff; color: #fff; }
.cta .btn-ghost:hover { background: #fff; color: var(--cell); }

/* ---------- Piè di pagina ---------- */
.site-footer { background: var(--ink); color: #b9c6cf; padding: 56px 0 24px; font-size: .95rem; }
.site-footer a { color: #e3eaee; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.footer-logo { height: 64px; width: auto; margin-bottom: 16px; }
.legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; font-size: .85rem; display: flex; flex-wrap: wrap; gap: 8px 20px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Pagine interne ---------- */
.page-head { background: var(--paper); padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-head p { margin: 0; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; max-width: 68ch; }
.prose li { margin-bottom: .4em; }

@media (max-width: 900px) {
	body { font-size: 16px; }
	.section { padding: 64px 0; }
	.hero { padding-top: 40px; }
}

/* ---------- Pagine interne: componenti ---------- */
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.split-img { border-radius: var(--radius); overflow: hidden; background: var(--line); }
.split-img img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.cols-list { columns: 2; column-gap: 40px; list-style: none; padding: 0; margin: 0; }
.cols-list li { break-inside: avoid; padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); position: relative; }
.cols-list li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 12px; height: 7px; border-left: 3px solid var(--leaf); border-bottom: 3px solid var(--leaf); transform: rotate(-45deg); }
@media (max-width: 700px) { .cols-list { columns: 1; } }

.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.groups > div { border-top: 4px solid var(--blue); padding-top: 18px; }
.groups h2 { font-size: 1.4rem; }
.groups > div:nth-child(2) { border-top-color: var(--leaf); }
.groups > div:nth-child(3) { border-top-color: var(--alarm); }
@media (max-width: 900px) { .groups { grid-template-columns: 1fr; } }

.svc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px 40px; margin: 0; }
.svc dt { font-weight: 700; padding: 18px 0 0; border-top: 1px solid var(--line); }
.svc dd { margin: 0; padding: 18px 0 18px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.svc dd p { margin: 0 0 .5em; }
@media (max-width: 700px) { .svc { grid-template-columns: 1fr; gap: 0; } .svc dd { border-top: 0; padding-top: 6px; } }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.plans > div { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.plans b { display: block; font-size: 1.6rem; font-weight: 900; color: var(--cell); }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* Moduli */
.form { display: grid; gap: 18px; max-width: 640px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form .row2 { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 500; margin-bottom: 6px; }
.form .req { color: var(--alarm); }
.form input[type=text], .form input[type=email], .form input[type=tel], .form select, .form textarea {
	width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid #b9c5cd; border-radius: var(--radius); background: var(--white); color: var(--ink); min-height: 48px; }
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.form input[type=file] { font: inherit; font-size: .95rem; }
.form .hint { font-size: .85rem; color: var(--ink-soft); margin-top: 4px; }
.form .small { font-size: .85rem; color: var(--ink-soft); margin: 0; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { padding: 14px 16px; border-radius: var(--radius); font-weight: 500; display: none; }
.msg.ok { display: block; background: #eef7e0; color: #33461a; border-left: 4px solid var(--leaf); }
.msg.err { display: block; background: #fdeee4; color: #7a3204; border-left: 4px solid var(--alarm); }
.btn[disabled] { opacity: .6; cursor: wait; }

.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: start; }
.contact-card { background: var(--paper); border-radius: var(--radius); padding: 28px; }
.contact-card h2 { font-size: 1.3rem; }
.contact-card ul { list-style: none; padding: 0; margin: 0 0 8px; }
.contact-card li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.contact-card li:last-child { border-bottom: 0; }
.contact-card b { display: block; font-size: .9rem; color: var(--ink-soft); font-weight: 500; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }
.map-box { height: 380px; background: var(--paper); }
.map-box > div { height: 380px !important; }
.map-box iframe { display: block; }

/* Anelli con i numeri (pagina Azienda) */
.section-rings { padding: 72px 0; border-bottom: 1px solid var(--line); }
.rings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; text-align: center; }
.rings p { margin: 14px auto 0; max-width: 20ch; color: var(--ink-soft); }
.ring { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #e6ecef; stroke-width: 9; }
.ring-fg { fill: none; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 0; }
.ring.ready .ring-fg { stroke-dashoffset: 327; }
.ring.go .ring-fg { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s cubic-bezier(.33,1,.68,1); }
.ring-val { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; gap: 4px; padding-top: 58px; }
.ring-val b { font-size: 2.6rem; font-weight: 900; line-height: 1; color: var(--ink); }
.ring-val span { font-size: 1.05rem; font-weight: 700; color: var(--ink-soft); }
@media (max-width: 900px) { .rings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .ring { width: 140px; height: 140px; } .ring-val { padding-top: 46px; } .ring-val b { font-size: 2.1rem; } }
