/* ==========================================================================
   BASE — reset leggero, tipografia globale, layout e utility
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-stretch: var(--font-stretch);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

/* --- Tipografia ---------------------------------------------------------- */
h1, h2, h3, h4 {
  margin: 0 0 var(--space-5);
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h4); line-height: var(--lh-snug); letter-spacing: 0; }

/* Titolo di sezione rosso ("Come lavoriamo", "Risultati"...) */
.section-title {
  font-size: var(--fs-title);
  line-height: var(--lh-none);
  letter-spacing: var(--ls-title);
  color: var(--color-accent);
}
/* Paragrafo grande in Light ("Studio Banchi è tra le prime agenzie...") */
.text-lg {
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-light);
  line-height: var(--lh-snug);
}
.accent { color: var(--color-accent); }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }

.lead {
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: var(--lh-snug);
  color: var(--color-text);
  max-width: 60ch;
}
.eyebrow {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

a { color: inherit; text-underline-offset: 0.2em; }
a:hover { color: var(--color-accent); }
::selection { background: var(--color-accent); color: var(--color-white); }

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

/* --- Layout -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow {
  max-width: calc(760px + 2 * var(--gutter));
}
.section { padding-block: var(--block-y); }

/* Linea tratteggiata rossa a tutta larghezza sopra una sezione.
   Le linee sono l'unica cosa che può uscire dai 1200px. */
.rule-top { border-top: var(--rule); }
.rule-bottom { border-bottom: var(--rule); }

/* Elemento a tutta larghezza (es. logo grande in home), con il solo margine laterale */
.bleed { padding-inline: var(--gutter); }
.section--surface { background: var(--color-bg); }

/* --- Utility ------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-text);
  color: var(--color-bg);
}
.skip-link:focus { top: var(--space-4); }

/* Rispetta chi disattiva le animazioni */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
