/* CEStructure – sito di presentazione.
   Stessa impostazione di cethermosoft.it (suite di Soluzioni Consulenza): carattere Familjen
   Grotesk, menu centrato, hero centrato con finestra dell'app, schede con schermate, fascia
   scura, prezzi, domande, chiusura scura. Cambia solo l'accento: l'azzurro di CEStructure
   (#1E9BE6) al posto dell'arancio di CE-ThermoSoft. Testo scuro sull'azzurro: 5,9:1. */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("/assets/fonts/familjen-grotesk.woff") format("woff");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f4f6f9;
  --ink: #001736;
  --muted: #4a596e;
  --line: rgba(0, 23, 54, .11);
  --accent: #1e9be6;
  --accent-hover: #46b0ef;
  --accent-ink: #001736;
  --inv-bg: #001736;
  --inv-surface: #0d2543;
  --inv-ink: #ffffff;
  --inv-muted: #b4bdc9;
  --steel-1: #dfe9f5;
  --steel-2: #8ccef5;
  --steel-3: #8fa3c2;
  --font: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r: 20px;
  --r-s: 8px;
  --gutter: clamp(20px, 5.6vw, 80px);
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
.muted { color: var(--muted); }
.ground-inverse .muted, .footer .muted { color: var(--inv-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Titoli: grandi, leggeri, stretti come in CE-ThermoSoft */
h1, h2, .t-stat { font-weight: 400; letter-spacing: -.04em; }
h1 { font-size: clamp(42px, 6vw, 72px); line-height: 1.02; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.1; letter-spacing: -.03em; }
h3 { font-size: 18px; font-weight: 560; line-height: 26px; letter-spacing: -.012em; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 24px; border-radius: var(--r-s); border: 1px solid transparent;
  font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: transparent; color: var(--ink); padding: 0 8px; font-size: 16px; }
.btn--secondary span { border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.btn--secondary:hover span { border-color: var(--accent); }
.btn--outline { border-color: var(--line); background: var(--bg); }
.btn--outline:hover { border-color: var(--ink); }
.btn .freccia { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn:hover .freccia { transform: translateX(3px); }
.btn--xl { height: auto; padding: 26px 48px; font-size: clamp(22px, 2.6vw, 32px); font-weight: 400; letter-spacing: -.03em; }
.btn--xl .freccia { width: 20px; height: 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Menu ---------- */
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-s); z-index: 100; }
.skip-link:focus { top: 12px; }
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__bar { position: relative; display: flex; align-items: center; gap: 32px; height: 72px; }
.nav__logo img { width: 142px; height: 40px; }
.nav__links { display: flex; gap: 4px; margin-inline: auto; }
.nav__link { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border-radius: var(--r-s); font-size: 15px; font-weight: 500; text-decoration: none; }
.nav__link:hover { background: var(--surface); }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.lingue { display: inline-flex; gap: 2px; }
.lingue a { display: inline-flex; align-items: center; height: 32px; padding: 0 9px; border-radius: 999px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--muted); }
.lingue a[aria-current] { background: var(--surface); color: var(--ink); }
.nav__toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.nav__panel { display: none; }

@media (max-width: 1023px) {
  .nav__links, .nav__actions { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__panel { border-top: 1px solid var(--line); padding: 12px 0 24px; }
  .nav.is-open .nav__panel { display: block; }
  .nav__panel a:not(.btn) { display: block; padding: 12px 0; font-size: 18px; text-decoration: none; border-bottom: 1px solid var(--line); }
  .nav__panel .btn { width: 100%; margin-top: 20px; }
  .nav__panel .lingue { margin-top: 16px; }
  .nav__panel .lingue a { border: 0; padding: 0 12px; display: inline-flex; font-size: 14px; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 9vw, 120px) 0 64px; text-align: center; }
.hero__c { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; text-decoration: none; }
.pill:hover { border-color: var(--steel-3); }
.hero h1 { max-width: 15ch; }
.hero__lead { max-width: 600px; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.5; color: var(--muted); }
.hero__window {
  position: relative; margin-top: 56px; border-radius: var(--r); overflow: hidden;
  padding: clamp(20px, 4vw, 56px) clamp(16px, 4vw, 56px) 0;
  background: radial-gradient(90% 70% at 50% 0%, #1d4f8f 0%, transparent 70%), linear-gradient(#0a2a55, #001736);
}
.hero__window::before { /* travi stilizzate sullo sfondo */
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: linear-gradient(rgba(140, 206, 245, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(140, 206, 245, .08) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(#000, transparent 75%);
}
.hero__window img { position: relative; border-radius: 12px 12px 0 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 30px 70px -30px rgba(0, 0, 0, .7); }
@media (max-width: 639px) {
  .hero__window img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 0; }
  .pill { height: auto; min-height: 32px; padding: 6px 14px; }
  .pill .muted { display: none; }
}

/* ---------- Sezioni e griglia ---------- */
.section { padding: clamp(80px, 9vw, 120px) 0 clamp(56px, 6vw, 72px); }
.section-head { max-width: 820px; margin-bottom: 48px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.grid + .grid { margin-top: 24px; }
.grid--top { align-items: start; }
.span-2 { --s: 2; grid-column: span 2; } .span-4 { --s: 4; grid-column: span 4; } .span-5 { --s: 5; grid-column: span 5; } .span-6 { --s: 6; grid-column: span 6; } .span-12 { --s: 12; grid-column: span 12; }
.start-5 { grid-column: 5 / span var(--s); } .start-7 { grid-column: 7 / span var(--s); } .start-9 { grid-column: 9 / span var(--s); }
.stack-4 > * + * { margin-top: 16px; }
@media (max-width: 1023px) {
  .grid > [class*="span-"] { grid-column: 1 / -1; }
}

/* ---------- Schede con schermata ---------- */
.card { border-radius: var(--r); }
.card--open p { margin-top: 8px; max-width: 46ch; color: #2c3d55; }
.panel--shot {
  position: relative; margin-top: 24px; border-radius: var(--r); overflow: hidden; aspect-ratio: 604 / 448;
  background-color: #b8c9de;
  background-image:
    radial-gradient(70% 90% at 12% 0%, var(--steel-1), transparent 70%),
    radial-gradient(60% 80% at 100% 100%, #7f9cc4, transparent 72%),
    radial-gradient(50% 60% at 85% 10%, rgba(140, 206, 245, .55), transparent 70%);
}
.panel--shot .shot {
  position: absolute; left: 32px; top: 32px; width: calc(100% + 120px); max-width: none;
  border-radius: 10px 0 0 0; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 23, 54, .08), 0 20px 40px -24px rgba(0, 23, 54, .45);
}
@media (max-width: 639px) { .panel--shot .shot { left: 20px; top: 20px; width: calc(100% + 180px); } }

/* ---------- Fascia scura ---------- */
.ground-inverse { background: var(--inv-bg); color: var(--inv-ink); }
.ground-inverse .link { color: #fff; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.ground-inverse p { font-size: 18px; line-height: 1.55; }
.app-frame { margin-top: 48px; border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 30px 70px -30px rgba(0, 0, 0, .7); }
.cifre-fascia { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 32px; }
.cifre-fascia strong { display: block; font-size: 40px; font-weight: 400; letter-spacing: -.04em; color: var(--accent); }
.cifre-fascia span { color: var(--inv-muted); font-size: 15px; }
@media (max-width: 639px) { .cifre-fascia { grid-template-columns: 1fr; } .app-frame img { aspect-ratio: 1 / 1; object-fit: cover; object-position: 0 0; } }

/* ---------- Prezzi ---------- */
.checks li { position: relative; padding-left: 28px; }
.checks li + li { margin-top: 12px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%23001736' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.card--plan { display: flex; flex-direction: column; gap: 16px; padding: 32px; background: var(--surface); border: 1px solid rgba(0, 23, 54, .08); }
.card--plan.is-featured { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.card--plan .btn { align-self: flex-start; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.t-stat { font-size: 38px; line-height: 1; color: #2c3d55; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 500; }
.estensione { margin-top: 24px; padding: 20px 24px; border-radius: var(--r); border: 1px dashed var(--steel-3); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.estensione strong { font-weight: 560; }

/* ---------- Domande ---------- */
#domande { margin-top: clamp(80px, 9vw, 120px); }
.domande__titolo { font-size: clamp(28px, 3vw, 36px); font-weight: 400; letter-spacing: -.03em; }
.domande__testa p { margin-top: 12px; }
.faq__item { padding: 24px 0; border-top: 1px solid var(--line); }
.faq__item h4 { font-size: 20px; font-weight: 500; line-height: 28px; margin-bottom: 8px; }
.faq__item p { max-width: 58ch; }
.link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-color: var(--accent); }

/* ---------- Chiusura e piè di pagina ---------- */
.footer { background: var(--inv-bg); color: var(--inv-ink); padding: clamp(80px, 9vw, 120px) 0 40px; }
.closing__cta { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; padding-bottom: 80px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.closing__cta h2 { max-width: 560px; }
.closing__cta p { margin-top: 16px; font-size: 14px; }
.closing__cta a:not(.btn) { color: #fff; }
.closing__links { padding-top: 56px; }
.footer__col h3 { font-size: 14px; font-weight: 500; color: var(--inv-muted); margin-bottom: 16px; }
.footer__col li + li { margin-top: 8px; }
.footer__col a { text-decoration: none; font-size: 15px; }
.footer__col a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.footer .span-4 img { width: 142px; height: 40px; }
.footer__suite { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--inv-muted); }
.footer__suite img { width: 78px !important; height: 30px !important; }
.footer__legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: var(--inv-muted); display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
@media (max-width: 1023px) { .footer__col { grid-column: span 6 !important; } }

/* Barra in basso sul telefono */
.actionbar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: none; }
.actionbar .btn { width: 100%; box-shadow: 0 10px 30px -10px rgba(0, 23, 54, .5); }
@media (max-width: 1023px) { .actionbar { display: block; transform: translateY(120%); transition: transform .25s; } .actionbar.is-visible { transform: none; } }

/* Comparsa morbida delle sezioni */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* ---------- Guide e pagine di testo ---------- */
.articolo { padding: clamp(56px, 7vw, 96px) 0 96px; }
.contenitore { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.sentiero { font-size: 14px; color: var(--muted); }
.sentiero a { text-decoration: none; }
.sentiero a:hover { text-decoration: underline; }
.etichetta { display: inline-flex; margin-top: 32px; height: 28px; align-items: center; padding: 0 12px; border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 500; }
.articolo h1 { margin-top: 16px; font-size: clamp(36px, 5vw, 56px); }
.articolo .lead { margin-top: 20px; font-size: 20px; color: var(--muted); }
.articolo .aggiornato { margin-top: 16px; font-size: 14px; color: var(--muted); }
.testo { margin-top: 48px; font-size: 17.5px; line-height: 1.7; }
.testo h2 { font-size: clamp(26px, 3vw, 32px); margin: 56px 0 16px; }
.testo h3 { margin: 32px 0 8px; font-size: 20px; }
.testo p + p, .testo p + ul, .testo ul + p, .testo ol + p, .testo p + ol, .testo table + p { margin-top: 16px; }
.testo ul, .testo ol { padding-left: 22px; list-style: revert; }
.testo li + li { margin-top: 8px; }
.testo a { text-decoration-color: var(--accent); text-underline-offset: 3px; }
.testo table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 16px; }
.testo th, .testo td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.testo th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 500; }
.nota { margin-top: 32px; padding: 20px 24px; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 var(--r-s) var(--r-s) 0; font-size: 16px; }
.riquadro-app { margin-top: 64px; padding: 32px; border-radius: var(--r); background: var(--inv-bg); color: #fff; display: grid; gap: 16px; }
.riquadro-app p { color: var(--inv-muted); }
.riquadro-app .btn { justify-self: start; }
.elenco-guide { margin-top: 48px; display: grid; gap: 16px; }
.voce-guida { display: block; padding: 28px 32px; border-radius: var(--r); background: var(--surface); text-decoration: none; border: 1px solid transparent; transition: border-color .15s; }
.voce-guida:hover { border-color: var(--accent); }
.voce-guida h2 { font-size: 24px; letter-spacing: -.02em; }
.voce-guida p { margin-top: 8px; color: var(--muted); }
.faq-pagina .faq__item:first-child { border-top: 0; }

/* Barra semplice delle pagine interne */
.nav--semplice .nav__bar { justify-content: space-between; }
