/* ============================================================
   UI-LIB — BASE
   Reset · typography · layout utilities
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;1,8..60,300;1,8..60,400&family=DM+Mono:wght@300;400;500&display=swap');

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

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-slow), color var(--t-slow);
}

/* Focus ring — WCAG 2.2 §2.4.11 */
:focus-visible {
  outline: 3px solid var(--border-focus);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* Skip nav */
.skip-nav {
  position: absolute; top: -100%; left: var(--sp-4); z-index: var(--z-toast);
  padding: var(--sp-2) var(--sp-4); background: var(--accent); color: #fff;
  font-size: var(--text-sm); font-weight: var(--fw-semi);
  border-radius: var(--r-md); text-decoration: none;
  transition: top var(--t-fast);
}
.skip-nav:focus { top: var(--sp-4); }

/* Headings */
h1 {
  font-family: var(--font-display);
  font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl));
  font-weight: var(--fw-bold);
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: var(--text-1);
}
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl),  2.5vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }
h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  line-height: var(--leading-snug);
  letter-spacing: -0.02em;
  color: var(--text-1);
}

p  { color: var(--text-2); line-height: 1.65; }
a  { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; transition: color var(--t-base); }
a:hover { color: var(--text-1); }
img, video { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* Container */
.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--sp-8);
}
@media (max-width: 768px) { .container { padding-inline: var(--sp-5); } }

/* Section */
.section { padding-block: var(--sp-32); }
@media (max-width: 768px) { .section { padding-block: var(--sp-20); } }

/* Section label */
.section-label {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: var(--accent-muted); border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: var(--fw-semi);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: var(--sp-6);
}

