/* ============================================================
   STRATUM LABS — BASE STYLES
   Reset · Typography · Global
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.65;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

/* ── Global typography hierarchy ───────────────────────── */

/* Display — killer lines, hero metaphor */
.t-d1 {
  font-family: var(--font-body);
  font-size: var(--text-d1);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.t-d2 {
  font-family: var(--font-body);
  font-size: var(--text-d2);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Headings — section titles (Poppins, never bold 700) */
h1, .t-h1 {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h2, .t-h2 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h3, .t-h3 {
  font-family: var(--font-display);
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}

/* Body — analytical prose */
p, .t-body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-soft);
}

/* Small */
.t-small {
  font-family: var(--font-body);
  font-size: var(--text-small);
  line-height: 1.6;
  color: var(--color-text-soft);
}

/* Labels / metadata — tracked caps */
.t-label {
  font-family: var(--font-display);
  font-size: var(--text-caption);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Caption */
.t-caption {
  font-family: var(--font-display);
  font-size: var(--text-caption);
  font-weight: 300;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Accent colour */
.t-red { color: var(--color-accent); }
.t-muted { color: var(--color-text-muted); }
.t-soft { color: var(--color-text-soft); }

/* Italic for literary passages */
.t-italic { font-style: italic; }

/* ── Global utilities ───────────────────────────────────── */
.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-2);
  background: var(--color-accent);
  color: var(--white);
  padding: var(--space-1) var(--space-2);
  z-index: var(--z-modal);
  font-family: var(--font-display);
  font-size: var(--text-small);
}

.skip-link:focus {
  top: var(--space-1);
}

/* ── Divider ─────────────────────────────────────────────── */
.rule {
  width: 100%;
  height: var(--rule-thin);
  background: var(--color-border);
  border: none;
}

/* ── Callout block (Stone 50 + red left rule) ─────────────── */
.callout {
  background: var(--color-surface);
  border-left: var(--rule-accent) solid var(--color-accent);
  padding: var(--space-3) var(--space-4);
}

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

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