/* CMM Automazioni Industriali — foglio di stile unico */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #14171b;
  --steel: #1c2126;
  --steel-2: #262c33;
  --paper: #f3f2ee;
  --paper-2: #e9e7e1;
  --white: #ffffff;
  --muted: #5d656d;
  --muted-dark: #9aa3ab;
  --line: #d6d3cb;
  --line-dark: #333a42;
  --accent: #8cc63f;
  --accent-ink: #4c7a17;
  --logo-accent: var(--accent);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 2px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-weight: 700;
  font-stretch: 78%;
  line-height: 1.02;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); font-weight: 750; text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); text-transform: uppercase; }
h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); font-stretch: 85%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--ink); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 16px; top: 16px; }

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

/* ---------- etichette tecniche ---------- */
.label {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: .6em;
  margin-bottom: 1.2rem;
}
.label::before { content: ""; width: 22px; height: 2px; background: var(--accent); }
.dark .label { color: var(--muted-dark); }

.lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 44ch; }
.dark .lead { color: #c3c9cf; }
.prose { max-width: 62ch; }
.prose p { color: #353b41; }
.dark .prose p { color: #c3c9cf; }
strong { font-weight: 650; }

/* ---------- bottoni ---------- */
.btn {
  --b: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: .7em;
  padding: 15px 22px;
  border: 1.5px solid var(--b);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  transition: background .18s, color .18s, border-color .18s;
}
.btn svg { width: 16px; height: 16px; transition: transform .18s; }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.btn--primary:hover { background: #a1d659; border-color: #a1d659; }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.dark .btn--ghost { color: var(--paper); border-color: #59626b; }
.dark .btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.topbar {
  background: var(--ink);
  color: #b9c0c6;
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .04em;
}
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { text-decoration: none; color: #e5e8ea; }
.topbar a:hover { color: var(--accent); }
.topbar__contacts { display: flex; gap: 22px; }
@media (max-width: 720px) { .topbar__where { display: none; } .topbar .wrap { justify-content: center; } }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 242, 238, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand svg, .brand img { width: 44px; height: 44px; flex: none; }
.brand__name { display: flex; flex-direction: column; line-height: 1; }
.brand__name b { font-size: 1.55rem; font-weight: 800; font-stretch: 75%; letter-spacing: .02em; }
.brand__name span { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 10px 12px;
  font-size: .95rem;
  font-weight: 550;
  text-decoration: none;
  color: #2b3137;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav .btn { margin-left: 14px; padding: 12px 18px; }
.nav .btn::after { display: none; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav a::after { display: none; }
  .nav .btn { margin: 18px 0 0; justify-content: center; }
}

/* ---------- sezioni ---------- */
.section { padding: clamp(72px, 10vw, 130px) 0; }
.section--tight { padding: clamp(56px, 7vw, 90px) 0; }
.section--alt { background: var(--paper-2); }
.dark { background: var(--steel); color: var(--paper); }
.dark h1, .dark h2, .dark h3 { color: var(--white); }

.blueprint {
  background-color: var(--steel);
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}

.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--muted); max-width: 52ch; }
.dark .section-head p { color: #b9c0c6; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 9vw, 120px) 0 0; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-bottom: 2rem; }
.hero__media { position: relative; }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(.85) contrast(1.05); }
.hero__media { margin: 0; }
.hero__frame { position: relative; }
.hero__frame::before {
  content: "";
  position: absolute;
  inset: -14px 14px 14px -14px;
  border: 1px solid #4a535c;
}
.hero__frame img { position: relative; }
.hero__media figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 0;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .05em;
  color: var(--muted-dark);
  text-transform: uppercase;
}
.corner { position: absolute; width: 18px; height: 18px; border-color: var(--accent); border-style: solid; z-index: 2; }
.corner--tl { top: -6px; left: -6px; border-width: 2px 0 0 2px; }
.corner--br { bottom: -6px; right: -6px; border-width: 0 2px 2px 0; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } .hero__media { max-width: 560px; } }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(56px, 8vw, 100px);
  border-top: 1px solid var(--line-dark);
}
.fact { padding: 28px 24px 32px 0; border-right: 1px solid var(--line-dark); }
.fact + .fact { padding-left: 24px; }
.fact:last-child { border-right: 0; }
.fact b { display: block; font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 750; font-stretch: 75%; line-height: 1.05; color: var(--white); text-transform: uppercase; }
.fact span { display: block; margin-top: 6px; font-size: .92rem; color: var(--muted-dark); }
@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact { padding: 22px 16px 24px 0; border-bottom: 1px solid var(--line-dark); }
  .fact + .fact { padding-left: 0; }
  .fact:nth-child(2n) { border-right: 0; padding-left: 16px; }
}

/* ---------- page hero (pagine interne) ---------- */
.page-hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); }
.page-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); max-width: 16ch; }
.crumbs { font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-dark); margin-bottom: 1.6rem; }
.crumbs a { text-decoration: none; color: #c9cfd4; }
.crumbs a:hover { color: var(--accent); }
.page-hero__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px 64px; align-items: end; }
.page-hero__grid .lead { margin: 0; }
@media (max-width: 860px) { .page-hero__grid { grid-template-columns: 1fr; } }

/* ---------- divisioni ---------- */
.divisions { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); border: 1px solid var(--line); }
.division {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 48px);
  background: var(--paper);
  text-decoration: none;
  transition: background .2s;
  min-height: 420px;
}
.division:hover { background: var(--white); }
.division__num { font-family: var(--mono); font-size: .8rem; color: var(--muted); letter-spacing: .08em; }
.division h3 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-stretch: 75%; text-transform: uppercase; margin: 1.2em 0 .5em; }
.division p { color: var(--muted); max-width: 44ch; }
.division ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 32px; }
.division li { font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; padding: 6px 10px; border: 1px solid var(--line); background: var(--paper-2); }
.division .more { margin-top: auto; display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.division .more svg { width: 18px; transition: transform .2s; }
.division:hover .more svg { transform: translateX(4px); }
.division__icon { position: absolute; top: clamp(28px, 4vw, 48px); right: clamp(28px, 4vw, 48px); width: 56px; height: 56px; color: var(--accent-ink); }
@media (max-width: 820px) { .divisions { grid-template-columns: 1fr; } .division { min-height: 0; } }

/* ---------- processo ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: s; border-top: 1px solid var(--line-dark); }
.step { position: relative; padding: 32px 28px 8px 0; counter-increment: s; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line-dark); }
.step::before {
  content: "0" counter(s);
  display: block;
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .08em;
  color: var(--accent);
  margin-bottom: 40px;
}
.step h3 { color: var(--white); font-size: 1.45rem; text-transform: uppercase; font-stretch: 75%; }
.step p { color: #b3bac1; font-size: .97rem; }
.section--alt .steps, .steps--light { border-color: var(--line); }
.steps--light .step + .step { border-color: var(--line); }
.steps--light .step h3 { color: var(--ink); }
.steps--light .step p { color: var(--muted); }
.steps--light .step::before { color: var(--accent-ink); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
  .steps--light .step:nth-child(n+3) { border-color: var(--line); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-dark); }
  .steps--light .step + .step { border-color: var(--line); }
  .step::before { margin-bottom: 16px; }
}

/* ---------- settori ---------- */
.sectors { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sector { border: 1px solid var(--line); background: var(--white); padding: 26px 24px 28px; }
.sector svg { width: 40px; height: 40px; color: var(--accent-ink); margin-bottom: 36px; }
.sector h3 { font-size: 1.3rem; text-transform: uppercase; font-stretch: 75%; margin-bottom: .35em; }
.sector p { color: var(--muted); font-size: .94rem; margin: 0; }
@media (max-width: 900px) { .sectors { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .sectors { grid-template-columns: 1fr; } }

/* ---------- split testo / immagine ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.split--top { align-items: start; }
.split figure { margin: 0; }
.split img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split figcaption { font-family: var(--mono); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding-top: 10px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.checklist { list-style: none; margin: 1.6em 0 2em; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: .5em;
  width: 14px; height: 8px;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(-45deg);
}
.dark .checklist li::before { border-color: var(--accent); }

/* ---------- banda immagine ---------- */
.band { position: relative; min-height: clamp(320px, 42vw, 560px); display: flex; align-items: flex-end; color: var(--white); overflow: hidden; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,23,27,0) 30%, rgba(20,23,27,.85) 100%); }
.band .wrap { position: relative; z-index: 1; padding-bottom: clamp(32px, 5vw, 64px); }
.band blockquote { margin: 0; max-width: 30ch; font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 650; font-stretch: 80%; line-height: 1.12; }

/* ---------- partner ---------- */
.partners { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.partners li { list-style: none; display: grid; place-items: center; padding: clamp(8px, 2vw, 18px); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.partners img { width: 100%; max-width: 170px; aspect-ratio: 400 / 167; object-fit: contain; filter: grayscale(1) contrast(1.05); opacity: .78; mix-blend-mode: multiply; transition: filter .2s, opacity .2s; }
.partners li:hover img { filter: none; opacity: 1; }

/* ---------- CTA ---------- */
.cta { display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px 64px; align-items: end; }
.cta h2 { margin: 0; max-width: 18ch; }
.cta p { color: #b9c0c6; margin-bottom: 1.6rem; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; } }

/* ---------- lavorazioni (meccanica) ---------- */
.anchors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2rem; }
.anchors a { font-family: var(--mono); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; padding: 8px 12px; border: 1px solid #47505a; color: #dfe3e6; }
.anchors a:hover { border-color: var(--accent); color: var(--accent); }

.ops { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); }
.op { background: var(--paper); padding: clamp(28px, 4vw, 44px); scroll-margin-top: 100px; }
.op__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 1.2rem; }
.op__head span { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.op svg { width: 48px; height: 48px; color: var(--accent-ink); flex: none; }
.op h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); text-transform: uppercase; font-stretch: 75%; margin: 0 0 .4em; }
.op p { color: var(--muted); margin: 0; max-width: 46ch; }
@media (max-width: 760px) { .ops { grid-template-columns: 1fr; } }

.spec { width: 100%; border-collapse: collapse; font-size: .98rem; }
.spec th, .spec td { text-align: left; vertical-align: top; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
.spec th { width: 34%; font-family: var(--mono); font-size: .78rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 21px; }
.spec tr:first-child th, .spec tr:first-child td { border-top: 2px solid var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { padding: 4px 10px; border: 1px solid var(--line); background: var(--white); font-size: .92rem; }
@media (max-width: 600px) { .spec th, .spec td { display: block; width: 100%; padding-right: 0; } .spec th { border-bottom: 0; padding-bottom: 4px; } .spec td { padding-top: 6px; } .spec tr:first-child td { border-top: 0; } }

/* ---------- capacità (pagina lavorazioni) ---------- */
.capabilities { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.capability { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); padding: 24px; min-height: 250px; }
.capability span { font-family: var(--mono); font-size: .75rem; color: var(--muted); letter-spacing: .06em; }
.capability svg { width: 44px; height: 44px; color: var(--accent-ink); margin: 26px 0 auto; }
.capability h3 { font-size: 1.3rem; text-transform: uppercase; font-stretch: 75%; margin: 28px 0 .35em; }
.capability p { font-size: .93rem; color: var(--muted); margin: 0; }
@media (max-width: 980px) { .capabilities { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .capabilities { grid-template-columns: 1fr; } .capability { min-height: 0; } }

/* ---------- contatti ---------- */
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact-list { list-style: none; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.contact-list li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-list small { display: block; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-list a, .contact-list address { font-style: normal; font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.contact-list a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.social { display: flex; gap: 10px; margin-top: 24px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--white); }
.social a:hover { border-color: var(--ink); }
.social svg { width: 18px; height: 18px; }

.form { background: var(--white); border: 1px solid var(--line); padding: clamp(24px, 4vw, 44px); }
.form h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.form > p { color: var(--muted); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; margin: 28px 0; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: #3b4248; }
.field label i { font-style: normal; color: var(--accent-ink); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #c9c5bc;
  border-radius: var(--radius);
  padding: 13px 14px;
  transition: border-color .15s, background .15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: var(--white); box-shadow: 0 0 0 3px rgba(140,198,63,.35); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2314171b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field .hint { font-size: .82rem; color: var(--muted); }
.field input:user-invalid, .field textarea:user-invalid, .field select:user-invalid { border-color: #b4321f; }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-group label { text-transform: none; letter-spacing: 0; font-family: var(--font); font-size: .95rem; font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #c9c5bc; background: var(--paper); color: var(--ink); }
.radio-group input { accent-color: var(--accent-ink); margin: 0; }
.radio-group label:has(input:checked) { border-color: var(--ink); background: var(--white); box-shadow: inset 0 0 0 1px var(--ink); }
.only-mecc[hidden] { display: none; }
@media (max-width: 620px) { .fields { grid-template-columns: 1fr; } }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form__foot p { margin: 0; font-size: .85rem; color: var(--muted); max-width: 46ch; }
.form__fallback { margin-top: 24px; padding: 18px 20px; background: var(--paper-2); border-left: 3px solid var(--accent); font-size: .93rem; }
.form__fallback[hidden] { display: none; }
.form__fallback button { font: inherit; font-weight: 600; background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--ink); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #aab2b9; font-size: .93rem; padding: clamp(56px, 7vw, 88px) 0 28px; }
.site-footer a { color: #e3e7ea; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid #2c3238; }
.footer-grid h4 { font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: #7d868e; margin-bottom: 16px; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; }
.site-footer .brand { color: var(--white); margin-bottom: 18px; }
.site-footer .brand__name span { color: #8a939b; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; font-family: var(--mono); font-size: .72rem; letter-spacing: .03em; color: #7d868e; }
.footer-legal nav { display: flex; gap: 20px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: flex; align-items: center; }

/* ---------- utilità ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* comparsa leggera allo scroll */
@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; }
}
.field-legend { padding: 0; margin-bottom: 8px; font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: #3b4248; }
.field-legend i { font-style: normal; color: var(--accent-ink); }
.radio-group input { width: auto; padding: 0; background: none; border: 0; }
.radio-group input:focus { box-shadow: none; }
