/* ============================================
   BASE STYLES
   Reset, typography, layout, utilities
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

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

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

select {
  font-family: inherit;
  font-size: inherit;
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  z-index: 9999;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* --- Focus ring --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Remove default outline for non-keyboard users */
:focus:not(:focus-visible) {
  outline: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6vw + 1rem, 4.75rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 3.2vw + 1rem, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.3rem, 1.5vw + 0.5rem, 1.625rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

p {
  max-width: 62ch;
}

.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

.text-faint {
  color: var(--text-faint);
}

.body-large {
  font-size: clamp(1.125rem, 1vw + 0.5rem, 1.25rem);
  line-height: 1.6;
}

/* Eyebrow label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
  color: var(--text-faint);
}

/* Caption */
.caption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-faint);
}

/* Mono text */
.mono {
  font-family: var(--font-mono);
}

/* --- Text link --- */
.text-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: transparent;
  font-weight: 500;
  transition: text-decoration-color var(--duration) var(--ease);
}

.text-link:hover {
  text-decoration-color: var(--accent);
}

/* --- Layout --- */
.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

section {
  padding: clamp(80px, 10vw, 128px) 0;
}

/* Section header pattern */
.section-header {
  margin-bottom: 64px;
}

.section-header .eyebrow {
  margin-bottom: 16px;
  display: block;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: clamp(1rem, 1vw + 0.5rem, 1.125rem);
}

/* --- Scroll reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease),
              transform var(--duration-slow) var(--ease);
  transition-delay: var(--delay, 0ms);
}

[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* --- Screen reader only --- */
.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;
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* --- Mobile-first breakpoint tokens (as comments for reference) --- */
/* sm: 640px */
/* md: 768px */
/* lg: 1024px */
/* xl: 1280px */
