/* ==========================================================================
   Griani.Net — foglio di stile unico
   Palette: inchiostro grafite / cartoncino / petrolio / ottone
   Tipografia: Archivo (display, largo) · IBM Plex Sans (testo) · IBM Plex Mono (dati)
   ========================================================================== */

:root {
  /* Inchiostri */
  --ink:        #101820;
  --ink-soft:   #2c3a44;
  --muted:      #5c6b75;
  --muted-2:    #7d8991;

  /* Superfici */
  --paper:      #e7e5e0;
  --paper-2:    #efeeea;
  --card:       #f6f5f2;
  --line:       #cfccc5;
  --line-soft:  #ddd9d2;

  /* Marca */
  --petrol:     #0b4f53;
  --petrol-2:   #0e6b70;
  --petrol-ink: #073a3d;
  --brass:      #b4881b;
  --brass-2:    #d9ab3a;
  --live:       #2e7d52;

  /* Accenti prodotto */
  --acc-compilot:  #2a6f97;
  --acc-trophimax: #00695c;
  --acc-carte:     #a32c2c;

  /* Misure */
  --wrap: 1180px;
  --gut: clamp(1.25rem, 4vw, 3rem);
  --sec: clamp(4.5rem, 9vw, 8rem);
  --radius: 3px;

  /* Tipo */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* --------------------------------------------------------------- reset */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: "wdth" 112;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; text-wrap: pretty; }

/* Testo giustificato. La sillabazione e' obbligatoria: senza, la
   giustificazione apre buchi bianchi fra le parole nelle colonne strette.
   Funziona perche' ogni pagina dichiara lang="it" o lang="en". */
p,
.prose li {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

/* Etichette, stati e voci brevi restano a bandiera: giustificare due parole
   le stira. Anche i titoli restano allineati a sinistra. */
.eyebrow,
.livebar__label,
.record__meta,
.step__num,
.mono,
.phero__badge,
.contact__facts li,
.foot li,
.stack__group li,
.service__key {
  text-align: left;
  -webkit-hyphens: manual;
  hyphens: manual;
}

::selection { background: var(--petrol); color: var(--paper-2); }

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

/* --------------------------------------------------------- primitivi */

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

.section { padding-block: var(--sec); }
/* La testata resta appiccicata in alto: lascia spazio quando si salta a una sezione */
section[id] { scroll-margin-top: 84px; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--dark { background: var(--ink); color: var(--paper-2); }
.section--dark h2, .section--dark h3 { color: var(--paper-2); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--petrol);
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section--dark .eyebrow { color: var(--brass-2); }
.section--dark .eyebrow::after { background: #2a3640; }

.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--muted);
  max-width: 58ch;
}
.section--dark .lead { color: #9aa7b0; }

.mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

/* Pallino di stato */
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  display: inline-block;
  flex: none;
  box-shadow: 0 0 0 0 rgba(46, 125, 82, 0.5);
}
.dot--pulse { animation: pulse 3.2s ease-out infinite; }

@keyframes pulse {
  0%, 70%, 100% { box-shadow: 0 0 0 0 rgba(46, 125, 82, 0.45); }
  35%           { box-shadow: 0 0 0 6px rgba(46, 125, 82, 0); }
}

/* Bottoni */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper-2);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: var(--petrol); border-color: var(--petrol); transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: transparent; border-color: var(--ink); color: var(--ink); }

.section--dark .btn--ghost { color: var(--paper-2); border-color: #33414c; }
.section--dark .btn--ghost:hover { border-color: var(--brass-2); color: var(--brass-2); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Etichette lunghe (un indirizzo intero) non devono sfondare gli schermi stretti:
   meglio spezzare la parola che far comparire lo scorrimento orizzontale. */
.btn, .arrow { max-width: 100%; overflow-wrap: anywhere; }

/* Link con freccia */
.arrow {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--petrol);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid transparent;
  transition: gap 0.18s ease, border-color 0.18s ease;
}
.arrow:hover { gap: 0.85rem; border-bottom-color: currentColor; }
.arrow span { transition: transform 0.18s ease; }

/* Su fondo scuro il petrolio non si legge: passa all'ottone. */
.section--dark .arrow { color: var(--brass-2); }

.arrow-row { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; }

/* ------------------------------------------------------------- testata */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(231, 229, 224, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.masthead[data-scrolled="true"] { border-bottom-color: var(--line); }

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }

.nav a {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--petrol); border-bottom-color: var(--petrol); }

.lang {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.lang a, .lang span {
  padding: 0.3rem 0.55rem;
  text-decoration: none;
  color: var(--muted);
  transition: background 0.16s ease, color 0.16s ease;
}
.lang a:hover { background: var(--paper-2); color: var(--ink); }
.lang [aria-current="true"] { background: var(--ink); color: var(--paper-2); }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
}

/* ---------------------------------------------------------------- hero */

.hero { padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(2.5rem, 5vw, 4rem); }

.hero__title {
  font-size: clamp(2.6rem, 7.4vw, 5.5rem);
  font-variation-settings: "wdth" 118;
  letter-spacing: -0.035em;
  margin: 0 0 1.75rem;
  max-width: 19ch;
}
.hero__title em {
  font-style: normal;
  color: var(--petrol);
}

.hero__lead { max-width: 54ch; margin-bottom: 2.25rem; }

/* Barra dei sistemi vivi — elemento firma della testata */
.livebar {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--line);
}
.livebar__label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0;
  padding-top: 0.9rem;
}
.livebar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-top: 0;
  margin-top: 0.9rem;
}
.livebar__cell {
  background: var(--paper);
  padding: 1.25rem 1.25rem 1.4rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.2s ease;
}
.livebar__cell:hover { background: var(--card); }
.livebar__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}
.livebar__desc { font-size: 0.875rem; color: var(--muted); margin: 0; }

/* ----------------------------------------------------------- servizi */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service {
  background: var(--paper);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.service__key {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}
.service h3 {
  font-size: 1.375rem;
  font-variation-settings: "wdth" 105;
  letter-spacing: -0.015em;
}
.service p { font-size: 0.9375rem; color: var(--muted); margin: 0; }

/* ------------------------------------ registro prodotti (elemento firma) */

.ledger { border-top: 1px solid #2a3640; }

.record {
  border-bottom: 1px solid #2a3640;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) minmax(0, 20rem);
  gap: 0 clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2.25rem, 4vw, 3.25rem);
  position: relative;
}
.record__spine {
  background: var(--acc, var(--brass));
  height: 100%;
  transform: scaleY(0.28);
  transform-origin: top;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.record:hover .record__spine { transform: scaleY(1); }

.record__meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #8f9ca5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}
.record__meta .sep { color: #3d4a54; }
.record__meta strong { color: var(--paper-2); font-weight: 500; }

.record h3 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  font-variation-settings: "wdth" 112;
  margin-bottom: 0.75rem;
}
.record h3 a { text-decoration: none; }
.record h3 a:hover { color: var(--acc, var(--brass-2)); }

.record__lead { color: #9aa7b0; max-width: 50ch; font-size: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.25rem 0 1.5rem; }
.chip {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: #a8b3bb;
  border: 1px solid #2f3c46;
  border-radius: var(--radius);
  padding: 0.28rem 0.55rem;
}

.record__side {
  border-left: 1px solid #2a3640;
  padding-left: clamp(1.25rem, 3vw, 2.25rem);
  align-self: start;
}
.record__stat { padding-block: 0.7rem; border-bottom: 1px dotted #2f3c46; }
.record__stat:last-child { border-bottom: 0; }
.record__stat dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d7a83;
  margin-bottom: 0.2rem;
}
.record__stat dd { margin: 0; font-size: 0.9375rem; color: var(--paper-2); }

/* ------------------------------------------------------------- metodo */

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  counter-reset: step;
}
.step {
  background: var(--paper);
  padding: clamp(1.5rem, 2.6vw, 2.25rem);
  position: relative;
}
.step__num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--petrol);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}
.step__num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px);
}
.step h3 {
  font-size: 1.1875rem;
  font-variation-settings: "wdth" 104;
  margin-bottom: 0.6rem;
}
.step p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* --------------------------------------------------------------- stack */

.stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.stack__group h3 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
  font-variation-settings: normal;
  margin-bottom: 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.stack__group ul { list-style: none; margin: 0; padding: 0; }
.stack__group li {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  padding-block: 0.28rem;
}

/* ------------------------------------------------------------ contatti */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.contact__facts { list-style: none; margin: 2rem 0 0; padding: 0; }
.contact__facts li {
  display: flex;
  gap: 1rem;
  padding-block: 0.85rem;
  border-bottom: 1px dotted #2f3c46;
  font-size: 0.9375rem;
}
.contact__facts dt, .contact__facts .k {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d7a83;
  width: 6.5rem;
  flex: none;
  padding-top: 0.2rem;
}
.contact__facts a { color: var(--brass-2); text-decoration: none; border-bottom: 1px solid transparent; }
.contact__facts a:hover { border-bottom-color: currentColor; }

.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8f9ca5;
}
.field input, .field textarea {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--paper-2);
  background: #182430;
  border: 1px solid #2f3c46;
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  width: 100%;
  transition: border-color 0.16s ease, background 0.16s ease;
}
.field input::placeholder, .field textarea::placeholder { color: #5c6b75; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brass-2);
  background: #1c2936;
}
.field textarea { min-height: 9rem; resize: vertical; }

.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.8125rem;
  color: #8f9ca5;
  line-height: 1.5;
}
.consent input { margin-top: 0.2rem; accent-color: var(--brass-2); flex: none; }
.consent a { color: #b9c3ca; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notice {
  border-left: 3px solid var(--live);
  background: #16232c;
  padding: 0.9rem 1.1rem;
  font-size: 0.9375rem;
  color: var(--paper-2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.notice--error { border-left-color: #c9503f; }

/* ------------------------------------------------------- pagine prodotto */

.phero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.phero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--acc, var(--petrol));
  border: 1px solid currentColor;
  border-radius: 100px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.5rem;
}
.phero__title {
  font-size: clamp(2.4rem, 6.5vw, 4.5rem);
  font-variation-settings: "wdth" 116;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}
.phero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.phero__fact { background: var(--paper); padding: 1.1rem 1.25rem; }
.phero__fact dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.3rem;
}
.phero__fact dd { margin: 0; font-size: 0.9375rem; font-weight: 500; }

.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.module { background: var(--paper); padding: 1.4rem 1.5rem; }
.module h3 {
  font-size: 1.0625rem;
  font-variation-settings: "wdth" 104;
  margin-bottom: 0.4rem;
}
.module p { font-size: 0.875rem; color: var(--muted); margin: 0; }

.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); margin: 2.5rem 0 1rem; }
.prose h3 { font-size: 1.1875rem; margin: 2rem 0 0.6rem; font-variation-settings: "wdth" 104; }
.prose ul { padding-left: 1.15rem; color: var(--muted); }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--petrol); }

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  font-variation-settings: "wdth" 112;
  max-width: 20ch;
}
.section-head .lead { margin-bottom: 0; }

/* ----------------------------------------------------------------- piè */

.foot {
  background: var(--ink);
  color: #8f9ca5;
  padding-block: clamp(3rem, 5vw, 4rem);
  font-size: 0.875rem;
}
.foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #2a3640;
}
.foot h4 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6d7a83;
  font-variation-settings: normal;
  margin-bottom: 1rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding-block: 0.25rem; }
.foot a { color: #b9c3ca; text-decoration: none; border-bottom: 1px solid transparent; }
.foot a:hover { color: var(--brass-2); border-bottom-color: currentColor; }
.foot__brand { color: var(--paper-2); font-family: var(--mono); font-size: 0.9375rem; font-weight: 600; }
.foot__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 1.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #5c6b75;
}

/* ------------------------------------------------- torna all'inizio */

.totop {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 60;
  width: 46px;
  height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  appearance: none;
  -webkit-appearance: none;
  background: var(--ink);
  color: var(--brass-2);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(16, 24, 32, 0.22);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s,
              background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.totop.is-on { opacity: 1; visibility: visible; transform: none; }
.totop:hover {
  background: var(--petrol);
  border-color: var(--petrol);
  color: var(--paper-2);
  transform: translateY(-2px);
}
.totop svg { width: 15px; height: 15px; display: block; }

@media (max-width: 720px) {
  .totop { width: 42px; height: 42px; }
}

/* -------------------------------------------------------- rivelo scroll */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 980px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
  .livebar__grid { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
  .record { grid-template-columns: 4px minmax(0, 1fr); }
  .record__side {
    grid-column: 2;
    border-left: 0;
    border-top: 1px solid #2a3640;
    padding-left: 0;
    padding-top: 1.25rem;
    margin-top: 1.5rem;
  }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav__toggle { display: inline-block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gut) 1.25rem;
    display: none;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { width: 100%; padding-block: 0.7rem; border-bottom: 1px solid var(--line-soft); }
  .nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--line-soft); }
  .nav .lang { margin-top: 0.9rem; }
  .masthead__inner { position: relative; }
  .livebar__grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .field--row { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact__facts dt, .contact__facts .k { width: 5rem; }
}

/* Telefoni piccoli: recupera spazio sui pulsanti prima di spezzare le parole. */
@media (max-width: 400px) {
  .btn { padding: 0.85rem 1.05rem; letter-spacing: 0.05em; }
  .btn-row { gap: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .masthead, .nav, .btn-row, .form { display: none; }
  body { background: #fff; color: #000; }
}
