/* ==========================================================================
   VitaeSalute — Base Reset, Zero-Overflow Rules & Fluid Typography
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  max-width: 100%;
  background-color: var(--vs-bg-limestone);
  color: var(--vs-ink-primary);
  font-family: var(--vs-font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.vs-scroll-lock {
  overflow: hidden;
}

main {
  display: block;
  min-width: 0;
}

svg {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2.5px solid var(--vs-brand-petrol);
  outline-offset: 2px;
}

.vs-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--vs-bg-graphite);
  color: var(--vs-ink-inverse);
  padding: 0.75rem 1.25rem;
  border-radius: var(--vs-radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.vs-skip-link:focus-visible {
  left: 0.75rem;
  top: 0.75rem;
}

/* Fluid Typography & Italian Word-Wrap Safety */
h1,
h2,
h3,
h4 {
  font-family: var(--vs-font-display);
  font-weight: 700;
  color: inherit;
  margin: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

h1,
.vs-h1 {
  font-size: clamp(1.8rem, 5.4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

h2,
.vs-h2 {
  font-size: clamp(1.45rem, 3.6vw, 2.35rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
}

h3,
.vs-h3 {
  font-size: clamp(1.125rem, 2.2vw, 1.4rem);
  line-height: 1.24;
  letter-spacing: -0.02em;
}

h4,
.vs-h4 {
  font-size: 1.05rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 1rem;
  overflow-wrap: break-word;
}

p:last-child {
  margin-bottom: 0;
}

.vs-lead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  color: var(--vs-ink-secondary);
}

.vs-mono {
  font-family: var(--vs-font-mono);
  font-variant-numeric: tabular-nums;
}

.vs-muted {
  color: var(--vs-ink-secondary);
}

/* Layout Containers & Grid Zero-Overflow Discipline */
.vs-container {
  width: 100%;
  max-width: var(--vs-container-max);
  margin-inline: auto;
  padding-inline: var(--vs-gutter);
}

.vs-section {
  padding-block: var(--vs-section-py);
}

.vs-section--paper {
  background-color: var(--vs-bg-paper);
  border-block: var(--vs-border-width) solid var(--vs-border-ink);
}

.vs-section--sand {
  background-color: var(--vs-bg-sand);
  border-block: var(--vs-border-width) solid var(--vs-border-ink);
}

.vs-section--graphite {
  background-color: var(--vs-bg-graphite);
  color: var(--vs-ink-inverse);
}

.vs-grid > *,
.vs-bento > *,
.vs-flex > *,
.vs-split > * {
  min-width: 0;
}

.vs-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@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;
  }
}
