/* ═══════════════════════════════════════════════════════════
   LAB0121 — foglio di stile condiviso
   Usato da: index, about, community, privacy, admin.
   Per cambiare colori, font o spaziature basta modificare
   le variabili qui sotto: la modifica vale per tutto il sito.
   ═══════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  /* colori */
  --ink:    #111110;
  --paper:  #F7F6F1;
  --soft:   #EEECEA;
  --giallo: #F5A800;          /* giallo di marca: titoli grandi, sfondi, elementi su nero */
  --giallo-testo: #8F6200;    /* giallo scuro per testi piccoli su carta (contrasto 4.9:1) */
  --muted:  #6B6963;
  --border: rgba(17,17,16,.1);
  --bianco: #F4F3EE;
  --bianco-muted: rgba(244,243,238,.62);
  --bianco-line:  rgba(244,243,238,.12);
  --errore: #B3261E;

  /* font */
  --f-display: 'Bebas Neue', sans-serif;
  --f-body:    'DM Sans', sans-serif;
  --f-mono:    'DM Mono', monospace;

  /* layout */
  --pad: 48px;
  --max: 1344px;
  --nav-h: 66px;

  /* campi dei moduli (chiari di default, scuri dentro .band-dark) */
  --field-bg:     #fff;
  --field-border: rgba(17,17,16,.2);
  --field-ink:    var(--ink);
  --field-hint:   rgba(17,17,16,.45);
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-weight: 300; line-height: 1.6;
  overflow-x: hidden;
}

/* grana di fondo */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9000; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--giallo); outline-offset: 3px; }
.band-giallo :focus-visible { outline-color: var(--ink); }

.skip {
  position: fixed; top: -100px; left: 16px; z-index: 10000;
  background: var(--ink); color: var(--bianco); padding: 12px 18px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ── MARCHIO ─────────────────────────────────────────────── */
.n { color: var(--giallo); }                 /* "0121" nel logo e nei titoli */
.band-giallo .n { color: var(--ink); }
.brand { font-weight: 500; color: var(--ink); }   /* LAB0121 nel testo corrente */
.band-dark .brand { color: var(--bianco); }

/* ── NAVIGAZIONE ─────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  background: rgba(247,246,241,.94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav.static { position: sticky; }
.logo {
  font-family: var(--f-display); font-size: 26px; letter-spacing: .06em;
  color: var(--ink); text-decoration: none; line-height: 1;
}
.nav-links { display: flex; gap: 12px; align-items: center; }
.nav-link, .nav-cta {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; padding: 10px 20px; border: 1px solid transparent;
  transition: border-color .2s, color .2s, background .2s;
}
.nav-link { color: var(--ink); border-color: rgba(17,17,16,.3); }
.nav-link:hover, .nav-link[aria-current="page"] { border-color: var(--giallo); color: var(--giallo-testo); }
.nav-cta { color: var(--paper); background: var(--ink); }
.nav-cta:hover { background: var(--giallo); color: var(--ink); }

.burger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  padding: 10px; margin-right: -10px; background: none; border: none; position: relative; z-index: 200;
}
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform .3s, opacity .3s, background .3s; }
.burger[aria-expanded="true"] span { background: var(--bianco); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.menu {
  display: none; position: fixed; inset: 0; z-index: 150;
  background: rgba(17,17,16,.98);
  flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 80px 40px 40px;
}
.menu.open { display: flex; }
.menu a {
  font-family: var(--f-display); font-size: 46px; letter-spacing: .02em; line-height: 1;
  color: var(--bianco); text-decoration: none; transition: color .2s;
}
.menu a:hover, .menu a[aria-current="page"], .menu a.cta { color: var(--giallo); }
.menu-divider { width: 40px; height: 1px; background: var(--bianco-line); }

/* ── TIPOGRAFIA ──────────────────────────────────────────── */
.eyebrow {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--giallo-testo); margin-bottom: 24px; display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.band-dark .eyebrow { color: var(--giallo); }
.band-giallo .eyebrow { color: rgba(17,17,16,.62); }

.display { font-family: var(--f-display); font-weight: 400; line-height: .95; letter-spacing: .01em; overflow-wrap: break-word; }
.display .a { color: var(--giallo); }
.band-giallo .display .a { color: var(--ink); }
.d-xl { font-size: clamp(36px, 6vw, 92px); }
.d-lg { font-size: clamp(44px, 6vw, 80px); }
.d-md { font-size: clamp(40px, 5vw, 64px); }
.d-sm { font-size: 28px; line-height: 1; letter-spacing: .02em; }

.lead { font-size: 18px; line-height: 1.75; color: var(--muted); }
.lead strong, .lead .brand { color: var(--ink); font-weight: 500; }
.lead p + p { margin-top: 20px; }
.band-dark .lead { color: var(--bianco-muted); }
.band-dark .lead strong { color: var(--bianco); }
.body { font-size: 15px; line-height: 1.7; color: var(--muted); }
.band-dark .body { color: var(--bianco-muted); }
.band-giallo .body { color: rgba(17,17,16,.72); }
.body strong { color: var(--ink); font-weight: 500; }
.band-dark .body strong { color: var(--bianco); }

.mono {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.band-dark .mono { color: var(--bianco-muted); }

.tag {
  display: inline-block; align-self: flex-start;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--giallo-testo); border: 1px solid rgba(143,98,0,.35); padding: 5px 10px; margin-bottom: 20px;
}
.band-dark .tag { color: var(--giallo); border-color: rgba(245,168,0,.3); }

/* ── BOTTONI ─────────────────────────────────────────────── */
.btn {
  display: inline-block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; font-weight: 500; text-decoration: none; white-space: nowrap;
  padding: 16px 28px; border: 1px solid transparent; cursor: pointer;
  transition: opacity .2s, border-color .2s, color .2s, transform .15s, box-shadow .15s;
}
.btn-giallo { background: var(--giallo); color: var(--ink); }
.btn-giallo:hover { opacity: .88; }
.btn-ink { background: var(--ink); color: var(--giallo); }
.btn-ink:hover { opacity: .85; }
.btn-line { color: var(--ink); border-color: rgba(17,17,16,.3); background: transparent; }
.btn-line:hover { border-color: var(--giallo); color: var(--giallo-testo); }
.band-dark .btn-line { color: var(--bianco); border-color: rgba(244,243,238,.3); }
.band-dark .btn-line:hover { border-color: var(--giallo); color: var(--giallo); }
.btn-lg { padding: 20px 40px; font-size: 12px; letter-spacing: .16em; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── STRUTTURA ───────────────────────────────────────────── */
.section { padding: 88px var(--pad); }
.inner { max-width: var(--max); margin: 0; }   /* allineato a sinistra come menu, hero e footer */
.rule-b { border-bottom: 1px solid var(--border); }
.band-dark { background: var(--ink); color: var(--bianco);
  --field-bg: rgba(244,243,238,.04); --field-border: rgba(244,243,238,.14);
  --field-ink: var(--bianco); --field-hint: rgba(244,243,238,.4); }
.band-giallo { background: var(--giallo); color: var(--ink); }

/* parola gigante di sfondo (testo in data-ghost) */
.has-ghost { position: relative; overflow: hidden; }
.has-ghost::after {
  content: attr(data-ghost); position: absolute; right: -20px; bottom: -50px; pointer-events: none;
  font-family: var(--f-display); font-size: 24vw; line-height: 1; color: rgba(17,17,16,.04);
}
.band-giallo.has-ghost::after { color: rgba(17,17,16,.045); }
.band-dark.has-ghost::after { color: rgba(244,243,238,.04); }
.has-ghost > * { position: relative; z-index: 1; }

/* apertura pagina: titolo a sinistra, testo a destra */
.hero {
  padding: calc(var(--nav-h) + 72px) var(--pad) 80px;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 80px; align-items: end;
  border-bottom: 1px solid var(--border);
}

/* griglia a filetti */
.rule-grid { display: grid; gap: 1px; background: var(--border); }
.rule-grid > * { background: var(--paper); }
.band-dark .rule-grid { background: var(--bianco-line); }
.band-dark .rule-grid > * { background: var(--ink); }
.rule-grid > .band-giallo { background: var(--giallo); }
.rule-grid > .band-dark { background: var(--ink); }

/* fascia numeri */
.numeri { display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); border-bottom: 1px solid var(--border); }
.num { padding: 48px 40px; border-right: 1px solid var(--border); }
.num:last-child { border-right: none; }
.num-val { font-family: var(--f-display); font-size: 64px; line-height: 1; margin-bottom: 8px; }
.num-val span { color: var(--giallo); }

/* colonna scura a sinistra + contenuto a destra */
.split { display: grid; grid-template-columns: 1fr 2fr; border-bottom: 1px solid var(--border); }
.split-side { padding: 80px var(--pad); background: var(--ink); color: var(--bianco); position: relative; overflow: hidden; }
.split-side.has-ghost::after { content: attr(data-ghost); font-size: 14vw; right: auto; left: -10px; bottom: -20px; color: rgba(244,243,238,.04); }
.split-main { padding: 80px 56px; }

/* elenco a righe con filetti */
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: var(--row-col, 48px) 1fr; gap: 24px;
  padding: 28px 0; border-top: 1px solid var(--border); align-items: baseline;
}
.row:last-child { border-bottom: 1px solid var(--border); }
.row-num { font-family: var(--f-display); font-size: 32px; line-height: 1; color: rgba(17,17,16,.2); }
.row h3 { margin-bottom: 8px; }

/* elenco con trattino giallo */
.dash { list-style: none; }
.dash li { position: relative; padding: 8px 0 8px 18px; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.55; }
.dash li::before { content: ''; position: absolute; left: 0; top: 17px; width: 8px; height: 2px; background: var(--giallo); }
.band-dark .dash li, .dash.on-dark li { border-top-color: var(--bianco-line); }

/* riquadri semitrasparenti su fondo giallo */
.cards { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 24px; }
.card-tint { background: rgba(17,17,16,.06); padding: 32px 28px; }

/* blocco di chiusura con titolo e azione */
.cta-band { padding: 80px var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-side { display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
.cta-side .mono { text-align: right; }

/* ── MODULI ──────────────────────────────────────────────── */
form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, select, textarea {
  width: 100%; appearance: none; border-radius: 0; padding: 17px 18px;
  background: var(--field-bg); border: 1px solid var(--field-border); color: var(--field-ink);
  font-family: var(--f-body); font-size: 15px; font-weight: 300;
  transition: border-color .2s, background .2s;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--field-hint); }
input:focus, select:focus, textarea:focus { border-color: var(--giallo); outline: none; box-shadow: 0 0 0 1px var(--giallo); }
select { cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 44px; }
select:invalid, select:has(option:checked:disabled) { color: var(--field-hint); }
select option { background: #fff; color: var(--ink); }
.band-dark select option { background: #1b1b19; color: var(--bianco); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 13px; line-height: 1.5; color: var(--bianco-muted); }
.check input { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; padding: 0; appearance: auto; accent-color: var(--giallo); cursor: pointer; }
.check a { color: var(--giallo); text-decoration: none; border-bottom: 1px solid rgba(245,168,0,.4); }
.band-dark button[type=submit] { margin-top: 4px; }
button[type=submit] {
  width: 100%; padding: 20px; border: none; cursor: pointer;
  background: var(--giallo); color: var(--ink);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
  transition: transform .15s, box-shadow .15s, opacity .2s;
}
button[type=submit]:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(245,168,0,.25); }
button[type=submit]:disabled { opacity: .5; cursor: wait; transform: none; box-shadow: none; }
.form-note { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-align: center; margin-top: 4px; color: var(--bianco-muted); }
.form-error { font-size: 14px; line-height: 1.5; color: #FF8A80; border-left: 2px solid #FF8A80; padding: 4px 0 4px 12px; }
.form-error a { color: inherit; }
.hp { position: absolute; left: -9999px; }
.thanks { text-align: center; padding: 48px 0; }
.thanks-title { font-family: var(--f-display); font-size: 52px; line-height: 1; color: var(--giallo); margin-bottom: 10px; }

/* ── PIÈ DI PAGINA ───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border); padding: 24px var(--pad);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px;
}
.footer-logo { font-family: var(--f-mono); font-size: 14px; font-weight: 500; color: rgba(17,17,16,.4); }
.footer-logo span { color: var(--giallo-testo); }
.footer a {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .2s;
}
.footer a:hover { color: var(--giallo-testo); }
.footer-copy { font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em; color: var(--muted); }

/* ── MOVIMENTO ───────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .8s cubic-bezier(.16,1,.3,1) both; animation-delay: var(--d, 0s); }
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero { gap: 48px; }
}

@media (max-width: 900px) {
  :root { --pad: 20px; --nav-h: 58px; }
  .nav-links { display: none; }
  .burger { display: flex; }
  .section { padding: 56px var(--pad); }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 48px; }
  .lead { font-size: 16px; }
  .numeri { grid-template-columns: 1fr 1fr; }
  .numeri[style*="--cols:3"] { grid-template-columns: 1fr; }
  .num { padding: 28px 20px; border-right: none; border-bottom: 1px solid var(--border); }
  .num-val { font-size: 46px; }
  .split { grid-template-columns: 1fr; }
  .split-side { padding: 48px var(--pad); }
  .split-main { padding: 40px var(--pad); }
  .row { grid-template-columns: 36px 1fr; gap: 16px; }
  .row.stack { grid-template-columns: 1fr; gap: 6px; }
  .cards { grid-template-columns: 1fr; gap: 16px; }
  .cta-band { padding: 56px var(--pad); flex-direction: column; align-items: flex-start; }
  .cta-side { align-items: flex-start; }
  .cta-side .mono { text-align: left; }
  .form-row { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; text-align: center; }
  .footer { padding: 20px var(--pad); flex-direction: column; align-items: flex-start; }
}

/* evita che titoli lunghi allarghino le colonne delle griglie */
.hero > *, .split > *, .numeri > *, .cards > *, .team > * { min-width: 0; }
