html {
  scroll-padding-top: 100px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}
*, *::before, *::after {
  box-sizing: inherit;
}
/**
 * ==============================================================================
 * BASE.CSS — RESET, TIPOGRAFIA GLOBALE, CONTAINER E UTILITIES (IMPACTA HUB)
 * ==============================================================================
 */

/* ─── 1. RESET MODERNO ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  color: var(--ink);
  background-color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  position: relative;
}

/* Scroll margin per ancore con header fisso 80px */
[id] {
  scroll-margin-top: 104px;
}

/* ─── 2. SELEZIONE & SCROLLBAR ─── */
::selection {
  background-color: var(--orange);
  color: #ffffff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-soft);
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--orange);
}

/* ─── 3. TIPOGRAFIA GLOBALE ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--ink);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-snug);
}

h1 {
  font-size: var(--font-size-h1-home);
  font-weight: var(--font-weight-black);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-h1);
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-h2);
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: var(--font-weight-bold);
}

h4 {
  font-size: 1.375rem;
  font-weight: var(--font-weight-semibold);
}

p {
  color: var(--muted);
  line-height: var(--line-height-body);
  font-size: var(--font-size-body);
  max-width: 75ch;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

/* Focus ring accessibile */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

ul, ol {
  list-style: none;
}

/* ─── 4. TIPOGRAFIA D'ECCEZIONE (LORA PER HERO SUPPORT) ─── */
.font-serif,
.hero-support-lora {
  font-family: var(--font-serif) !important;
  font-weight: 400 !important;
  font-style: normal !important;
  line-height: 1.65;
}

/* ─── 5. UTILITY COLORI & GRADIENTI ─── */
.text-orange { color: var(--orange) !important; }
.text-orange-text { color: var(--orange-text) !important; }
.text-ink { color: var(--ink) !important; }
.text-muted { color: var(--muted) !important; }
.text-muted-on-dark { color: var(--muted-on-dark) !important; }
.text-white { color: #ffffff !important; }

.bg-white { background-color: var(--white) !important; }
.bg-surface-soft { background-color: var(--surface-soft) !important; }
.bg-dark { background-color: var(--dark) !important; }
.bg-orange { background-color: var(--orange) !important; }
.bg-orange-wash { background-color: var(--orange-wash) !important; }

.text-gradient-orange {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ─── 6. CONTAINER & LAYOUT ─── */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 768px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }
}

@media (min-width: 1280px) {
  .container {
    padding-left: 48px;
    padding-right: 48px;
  }
}

.container--reading {
  max-width: var(--reading-max);
}

.container--interaction {
  max-width: var(--interaction-max);
}

.container--cta {
  max-width: var(--cta-max);
}

.section-padding {
  padding-top: 96px;
  padding-bottom: 96px;
}

@media (max-width: 768px) {
  .section-padding {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

/* Reduced motion */
@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;
  }
}
