/* Layout: "officina" — una fascia-forno scura in apertura, poi sezioni chiare in lamiera,
   con i dati tecnici presentati come targhette metalliche rivettate. */
:root {
  --bg: #ECEAE6;
  --surface: #F7F6F3;
  --ink: #1C1E21;
  --muted: #5D5F64;
  --line: #CDC9C2;
  --ember: #C2451A;
  --ember-hover: #A63A14;
  --on-ember: #FFFFFF;
  --flame: #F2A23A;
  --furnace: #15120F;
  --furnace-ink: #F4EEE6;
  --furnace-muted: #B9AFA4;
  --plate: #DCD8D1;
  --rivet: #A9A39A;

  /* Un solo carattere per tutto il sito: la gerarchia la danno dimensione e peso */
  --f-body: "Archivo", "Segoe UI", system-ui, sans-serif;
  --f-display: var(--f-body);
  --f-mono: var(--f-body);

  --step-5: clamp(2.9rem, 7vw + 1rem, 6.2rem);
  --step-4: clamp(2.1rem, 3.6vw + .8rem, 3.6rem);
  --step-3: clamp(1.5rem, 1.6vw + .9rem, 2.1rem);
  --step-1: 1.125rem;
  --step-0: 1rem;
  --step--1: .84rem;
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17181B; --surface: #202226; --ink: #ECEAE6; --muted: #A0A2A7; --line: #35373C;
    --ember: #EE6E38; --ember-hover: #F4865A; --on-ember: #1A0D06; --flame: #F5B04F;
    --plate: #2A2C31; --rivet: #55575D; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17181B; --surface: #202226; --ink: #ECEAE6; --muted: #A0A2A7; --line: #35373C;
  --ember: #EE6E38; --ember-hover: #F4865A; --on-ember: #1A0D06; --flame: #F5B04F;
  --plate: #2A2C31; --rivet: #55575D; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--furnace);
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: .98; letter-spacing: .005em; text-wrap: balance; margin: 0; text-transform: uppercase; }
p { margin: 0; max-width: 65ch; }

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font: 500 var(--step--1)/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ember);
}
.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: .85em 1.35em;
  font: 600 var(--step-0)/1 var(--f-body); text-decoration: none; border: 2px solid transparent;
  border-radius: 2px; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-ember { background: var(--ember); color: var(--on-ember); }
.btn-ember:hover { background: var(--ember-hover); }
.btn-line { border-color: currentColor; color: inherit; background: transparent; }
.btn-line:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- Testata ---------- */
.topbar { background: var(--furnace); color: var(--furnace-muted); font: 500 var(--step--1)/1 var(--f-mono); }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; padding-block: .6rem; justify-content: space-between; }
.topbar a { color: var(--furnace-ink); text-decoration: none; }
.topbar a:hover { color: var(--flame); }

.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 1rem 2rem; padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex-shrink: 0; }
.brand-mark { height: 3rem; width: auto; display: block; object-fit: contain; }
.brand-mark.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark.logo-light { display: none; }
  :root:not([data-theme="light"]) .brand-mark.logo-dark { display: block; }
}
:root[data-theme="dark"] .brand-mark.logo-light { display: none; }
:root[data-theme="dark"] .brand-mark.logo-dark { display: block; }
.brand-name { font: 800 1.55rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.brand-name small { display: block; font: 500 .62rem/1.2 var(--f-mono); letter-spacing: .16em; color: var(--muted); }
.nav { margin-left: auto; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  white-space: nowrap; text-decoration: none; padding: .55rem .75rem; font-weight: 500; font-size: .95rem;
  border-radius: 2px; color: var(--muted);
}
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a.cta { color: var(--on-ember); background: var(--ember); }
.nav a.cta:hover { background: var(--ember-hover); }
@media (max-width: 760px) {
  .site-head .wrap { flex-wrap: wrap; gap: .4rem; }
  .nav { margin-left: 0; width: 100%; margin-inline: -.75rem; width: calc(100% + 1.5rem); }
}

/* ---------- Fascia-forno ---------- */
.hero { position: relative; background: var(--furnace); color: var(--furnace-ink); overflow: hidden; isolation: isolate; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; height: 55%; z-index: -2;
  background: radial-gradient(ellipse 70% 100% at 70% 100%, rgba(226, 92, 30, .55), transparent 70%);
}
.hero .wrap { padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem); display: grid; gap: 1.6rem; }
.hero .eyebrow { color: var(--flame); }
.hero h1 { font-size: var(--step-5); max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--flame); }
.hero p { font-size: var(--step-1); color: var(--furnace-muted); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; padding-top: .4rem; }
.hero .btn-line { color: var(--furnace-ink); }
.hero .btn-line:hover { background: var(--furnace-ink); color: var(--furnace); border-color: var(--furnace-ink); }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: .6rem 2.4rem; margin-top: 1.6rem; padding-top: 1.4rem;
  border-top: 1px solid rgba(244, 238, 230, .18); font: 500 var(--step--1)/1.4 var(--f-mono); color: var(--furnace-muted);
}
.hero-facts b { display: block; font: 800 1.9rem/1 var(--f-display); color: var(--furnace-ink); letter-spacing: .02em; }

/* ---------- Sezioni ---------- */
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.sec-head { display: grid; gap: .9rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec-head h2 { font-size: var(--step-4); }
.sec-head p { color: var(--muted); font-size: var(--step-1); }
.alt { background: var(--surface); border-block: 1px solid var(--line); }

/* Prodotti + targhetta tecnica */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr)); gap: 1.5rem; }
.product { display: grid; gap: 1.3rem; align-content: start; min-width: 0; }
.product h3 { font-size: var(--step-3); }
.product .lead { color: var(--muted); }
.plate {
  position: relative; background: var(--plate); border: 1px solid var(--line); border-radius: 3px;
  padding: 1.4rem 1.6rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.plate::before, .plate::after {
  content: ""; position: absolute; top: .65rem; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--rivet);
}
.plate::before { left: .65rem; } .plate::after { right: .65rem; }
.plate-title {
  display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; margin-bottom: .4rem;
  border-bottom: 1px solid var(--rivet); font: 500 var(--step--1)/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.plate dl { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.plate dt, .plate dd { padding: .5rem 0; border-bottom: 1px dashed color-mix(in srgb, var(--rivet) 70%, transparent); }
.plate dt { font: 500 var(--step--1)/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-right: 1rem; }
.plate dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.plate dl > :nth-last-child(-n+2) { border-bottom: 0; }
.tag {
  display: inline-block; font: 500 .72rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  padding: .45em .7em; border: 1px solid var(--ember); color: var(--ember); border-radius: 2px;
}
.product-photo {
  width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block;
  border-radius: 3px; background: var(--plate);
}
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 1rem; margin-top: 2rem; }
.gallery figure { margin: 0; display: grid; gap: .5rem; min-width: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: 3px; background: var(--plate); }
.gallery figcaption { font: 500 var(--step--1)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.req { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.req li { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr; gap: .4rem 1.2rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.req b { font: 500 var(--step--1)/1.5 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.req span { font-size: .95rem; }
@media (max-width: 520px) { .req li { grid-template-columns: 1fr; } }
.source { margin-top: 1.2rem; font-size: var(--step--1); color: var(--muted); }
.product-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; }

/* Vetro ceramico */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split > * { min-width: 0; }
.checks { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .8rem; }
.checks li { display: grid; grid-template-columns: 1.4rem 1fr; gap: .6rem; }
.checks li::before { content: ""; width: .8rem; height: .8rem; margin-top: .4rem; background: var(--ember); clip-path: polygon(0 0, 100% 50%, 0 100%); }

.calc { background: var(--bg); border: 1px solid var(--line); border-radius: 3px; padding: clamp(1.2rem, 3vw, 2rem); display: grid; gap: 1.1rem; }
.alt .calc { background: var(--bg); }
.calc h3 { font-size: 1.6rem; }
.field { display: grid; gap: .35rem; min-width: 0; }
.field label { font: 500 var(--step--1)/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 500 1rem/1.4 var(--f-body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 2px; padding: .7rem .8rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ember); outline-offset: 0; border-color: var(--ember); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: .9rem; }
.unit { position: relative; }
.unit input { padding-right: 2.8rem; font-variant-numeric: tabular-nums; }
.unit span { position: absolute; right: .8rem; top: 50%; translate: 0 -50%; font: 500 .8rem/1 var(--f-mono); color: var(--muted); pointer-events: none; }
.readout {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .9rem 1rem;
  background: var(--furnace); color: var(--furnace-ink); border-radius: 2px; font: 500 .9rem/1.3 var(--f-mono);
  font-variant-numeric: tabular-nums;
}
.readout b { color: var(--flame); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.note { font-size: var(--step--1); color: var(--muted); }

/* Lamiere: processo */
.process { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); border-top: 2px solid var(--ink); }
.process li { padding: 1.4rem 1.4rem 1.6rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .5rem; align-content: start; }
.process h3 { font-size: 1.7rem; }
.process p { color: var(--muted); font-size: .95rem; }

/* Conto termico */
.incentive { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.incentive > * { min-width: 0; }
.big-figure { font: 800 clamp(5rem, 14vw, 9.5rem)/.85 var(--f-display); color: var(--ember); letter-spacing: -.01em; }
.big-figure small { display: block; font: 500 var(--step--1)/1.5 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 1rem; max-width: 28ch; }
.steps { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 1rem; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 2px solid var(--ink);
  font: 800 1.2rem/1 var(--f-display);
}
.steps strong { display: block; }
.steps span { color: var(--muted); font-size: .95rem; }

/* Valori */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.values div { background: var(--surface); padding: 1.6rem; display: grid; gap: .5rem; align-content: start; }
.values h3 { font-size: 1.5rem; }
.values p { color: var(--muted); font-size: .95rem; }

/* Contatti */
.contact-list { display: grid; gap: 1.3rem; margin-top: 2rem; }
.contact-list div { display: grid; gap: .2rem; }
.contact-list dt { font: 500 var(--step--1)/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-list dd { margin: 0; font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }
.contact-list a { text-decoration: none; border-bottom: 2px solid var(--ember); }
.contact-list a:hover { color: var(--ember); }

/* Footer */
.site-foot { background: var(--furnace); color: var(--furnace-muted); font-size: var(--step--1); }
.site-foot .wrap { padding-block: 2.2rem 5.5rem; display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between; }
.site-foot strong { color: var(--furnace-ink); font: 800 1.3rem/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; display: block; margin-bottom: .4rem; }
.site-foot a { color: var(--furnace-ink); }

/* WhatsApp fisso */
.wa {
  position: fixed; z-index: 30;
  right: calc(1rem + env(safe-area-inset-right, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.1rem; border-radius: 999px;
  background: #1FA855; color: #FFFFFF; text-decoration: none; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.wa:hover { background: #178F47; }
.wa svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Sito a più pagine ---------- */
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ember); }
.nav a.cta[aria-current="page"] { color: var(--on-ember); box-shadow: none; }
.hero.page .wrap { padding-block: clamp(2.6rem, 6vw, 4.5rem) clamp(2.4rem, 5vw, 3.8rem); gap: 1.1rem; }
.hero.page h1 { font-size: var(--step-4); max-width: 20ch; }
.crumbs { font: 500 var(--step--1)/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--furnace-muted); }
.crumbs a { color: var(--furnace-muted); text-decoration: none; }
.crumbs a:hover { color: var(--flame); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem; }
.tile { display: grid; grid-template-rows: auto auto 1fr auto; gap: .7rem; text-decoration: none; color: inherit; min-width: 0; }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; border-radius: 3px; background: var(--plate); transition: filter .2s; }
.tile h3 { font-size: 1.7rem; }
.tile p { color: var(--muted); font-size: .95rem; }
.tile .more { font: 500 var(--step--1)/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ember); }
.tile:hover h3 { color: var(--ember); }
.tile:hover img { filter: saturate(1.15) brightness(1.05); }
.tile-glass {
  width: 100%; aspect-ratio: 4 / 3; border-radius: 3px; background: var(--furnace); position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.tile-glass span {
  width: 62%; aspect-ratio: 45 / 32; border: 2px solid rgba(244, 238, 230, .55); border-radius: 2px;
  background: linear-gradient(160deg, rgba(255,255,255,.18), rgba(255,255,255,.02) 45%, rgba(242,162,58,.35));
  box-shadow: 0 0 40px rgba(226, 92, 30, .45) inset;
}

.cta-band { background: var(--furnace); color: var(--furnace-ink); }
.cta-band .wrap { display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; align-items: center; justify-content: space-between; }
.cta-band h2 { font-size: var(--step-3); max-width: 22ch; }
.cta-band p { color: var(--furnace-muted); margin-top: .6rem; }
.cta-band .btn-line { color: var(--furnace-ink); }
.cta-band .btn-line:hover { background: var(--furnace-ink); color: var(--furnace); border-color: var(--furnace-ink); }
.foot-nav { display: grid; gap: .3rem; }
.foot-nav a { text-decoration: none; }
.foot-nav a:hover { color: var(--flame); }
/* Chi siamo */
.story { display: grid; gap: 1.1rem; align-content: start; }
.story h2 { font-size: var(--step-4); margin-bottom: .4rem; }
.story p { font-size: 1.05rem; }
.story-photo { margin: 0; display: grid; gap: .6rem; position: sticky; top: 6rem; }
.story-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; border-radius: 3px; background: var(--plate); }
.story-photo figcaption { font: 500 var(--step--1)/1.3 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) { .story-photo { position: static; } .story-photo img { aspect-ratio: 4 / 3; } }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 0 2rem; position: relative; }
.timeline li { display: grid; gap: .5rem; align-content: start; padding-top: 1.6rem; border-top: 2px solid var(--ink); position: relative; padding-bottom: 1.4rem; }
.timeline li::before { content: ""; position: absolute; top: -.5rem; left: 0; width: .9rem; height: .9rem; border-radius: 50%; background: var(--ember); border: 3px solid var(--surface); }
.timeline .when { font: 500 var(--step--1)/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ember); }
.timeline h3 { font-size: 1.7rem; }
.timeline p { color: var(--muted); font-size: .95rem; }
/* ---------- Tipografia unificata ----------
   Titoli in grassetto con maiuscole normali; il maiuscoletto resta solo
   sulle piccole etichette sopra i titoli. */
h1, h2, h3 { font-weight: 700; text-transform: none; letter-spacing: -0.015em; line-height: 1.15; }
.hero h1 { line-height: 1.08; }
.brand-name { font-weight: 700; text-transform: none; letter-spacing: -0.01em; font-size: 1.4rem; }
.eyebrow { font-weight: 600; font-size: .78rem; letter-spacing: .12em; }
.hero-facts { font-size: .9rem; }
.hero-facts b { font-weight: 700; font-size: 1.6rem; letter-spacing: -0.01em; }
.big-figure { font-weight: 700; letter-spacing: -0.03em; }
.big-figure small, .plate-title, .plate dt, .tag, .field label, .unit span, .readout,
.process li::before, .crumbs, .gallery figcaption, .story-photo figcaption,
.timeline .when, .contact-list dt, .tile .more, .topbar {
  text-transform: none; letter-spacing: 0; font-weight: 500;
}
.plate dt, .contact-list dt, .field label, .gallery figcaption, .story-photo figcaption, .crumbs, .big-figure small { font-size: .9rem; }
.plate dt { color: var(--muted); }
.timeline .when, .tile .more { font-weight: 600; font-size: .95rem; }
.steps li::before { font-weight: 700; font-size: 1rem; }
.site-foot strong { font-weight: 700; text-transform: none; letter-spacing: 0; font-size: 1.1rem; }
.topbar { font-size: .85rem; }
/* Informativa privacy */
.legal { max-width: 46rem; display: grid; gap: 1rem; }
.legal h2 { font-size: 1.5rem; margin-top: 1.4rem; }
.legal h3 { font-size: 1.1rem; margin-top: .4rem; }
.legal ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; max-width: 65ch; }
.legal a { color: var(--ember); }