/* ==========================================================================
   SMART SPITI — BASE / RESET / TYPOGRAPHY
   ========================================================================== */

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

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

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

body{
  margin: 0;
  background: var(--surface-light);
  color: var(--text-on-light);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a{ color: inherit; text-decoration: none; }

ul, ol{ margin: 0; padding: 0; list-style: none; }

button{
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

input, textarea, select{
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---- Headings ---------------------------------------------------------- */

h1, h2, h3, h4, h5, h6{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
}

.text-display{
  font-size: var(--fs-display);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
}

h1, .h1{ font-size: var(--fs-h1); }
h2, .h2{ font-size: var(--fs-h2); }
h3, .h3{ font-size: var(--fs-h3); font-weight: 600; }
h4, .h4{ font-size: var(--fs-h4); font-weight: 600; }

p{ margin: 0; }

.text-lead{
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--text-on-light-muted);
  max-width: 62ch;
}

.text-body{
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--text-on-light-muted);
  max-width: 68ch;
}

.text-small{ font-size: var(--fs-small); line-height: var(--lh-normal); }
.text-caption{ font-size: var(--fs-caption); color: var(--text-on-light-faint); }

/* Eyebrow — used sparingly, as a structural label, not a decoration on
   every section. Small caps rather than shouting full uppercase tracking. */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-on-light-faint);
}

.eyebrow::before{
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* ---- Dark-surface text variants ---------------------------------------- */

.on-dark{ color: var(--text-on-dark); }
.on-dark .text-lead,
.on-dark .text-body{ color: var(--text-on-dark-muted); }
.on-dark .eyebrow{ color: var(--text-on-dark-faint); }

/* ---- Selection ---------------------------------------------------------- */

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

/* ---- Focus visibility (accessibility floor) ---------------------------- */

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

.on-dark :focus-visible{
  outline-color: var(--paper);
}
