/* base.css — reset + base typography + layout primitives.
   Build a brand site, not an app UI. Asymmetric, paper-and-ink, no defaults.
*/

/* MODERN RESET */
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: 1.55;
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
  min-height: 100vh;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}
input, textarea, select {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover {
  color: var(--color-steel-deep);
}

/* HEADINGS */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--color-ink);
  text-wrap: balance;
}
h1 {
  font-size: var(--type-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
h2 {
  font-size: var(--type-headline);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
h3 {
  font-size: var(--type-title);
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
}
h4 {
  font-size: var(--type-body);
  font-weight: 600;
  line-height: 1.3;
}

/* PROSE */
p {
  font-size: var(--type-body);
  line-height: 1.55;
  max-width: var(--prose-max);
  text-wrap: pretty;
}
p.lead {
  font-size: var(--type-lead);
  line-height: 1.5;
}
.supporting {
  font-size: var(--type-supporting);
  color: var(--color-ash);
}

/* LABEL / KICKER / EYEBROW — uppercase tracked */
.kicker {
  font-family: var(--font-sans);
  font-size: var(--type-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ash);
  display: inline-block;
}

/* MONO — technical labels, data, units */
.mono,
code,
kbd,
samp {
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* TABULAR-NUMS for any data */
.tabular { font-variant-numeric: tabular-nums; }

/* FOCUS RING — visible, uses steel */
:focus-visible {
  outline: 2px solid var(--color-steel);
  outline-offset: 3px;
}

/* CONTAINER */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
@media (max-width: 1024px) {
  .container { padding: 0 var(--container-pad-tablet); }
}
@media (max-width: 640px) {
  .container { padding: 0 var(--container-pad-mobile); }
}

/* SECTION RHYTHM — 160 / 80 / 32 / 12 */
section {
  padding: var(--space-4xl) 0;
}
section + section {
  padding-top: 0;
}
.section--tight {
  padding: var(--space-2xl) 0;
}

/* GRID */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}
@media (max-width: 768px) {
  .grid-12 {
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-sm);
  }
}

/* HAIRLINE */
.hairline,
hr {
  border: 0;
  border-top: var(--hairline);
  margin: var(--space-md) 0;
}

/* ACCESSIBILITY */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* prefers-reduced-motion: kill non-essential transitions */
@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;
  }
  html { scroll-behavior: auto; }
}

/* SKIP LINK — keyboard accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-sm) var(--space-md);
  z-index: var(--z-modal);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus {
  top: 0;
}
