/* base.css — reset, typography, viewport-edge layout. Built against design.md §2, §3, §4. */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  background-color: var(--void);
  overflow-x: hidden;
}

body {
  font-family: var(--font-mono);
  font-weight: var(--weight-regular);
  font-size: 15px;
  line-height: 1.6;
  color: var(--paper);
  background-color: var(--void);
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: 'ss01', 'cv11';
}

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

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

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

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

ol, ul { list-style: none; }

/* §2 Type roles */

.display {
  font-family: var(--font-display);
  font-feature-settings: 'ss01', 'ss02', 'cv01', 'cv02';
  letter-spacing: -0.02em;
}

.poster {
  font-family: var(--font-display);
  font-weight: var(--weight-thin);
  font-size: clamp(160px, 28vw, 480px);
  line-height: 0.78;
  letter-spacing: -0.04em;
  font-variation-settings: 'wght' 200;
  will-change: font-variation-settings, letter-spacing;
}

.massive {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: clamp(72px, 12vw, 192px);
  line-height: 0.85;
  letter-spacing: -0.035em;
}

.h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: clamp(48px, 6vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.0;
  letter-spacing: -0.02em;
}

.h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.mono { font-family: var(--font-mono); }

.body-lg { font-family: var(--font-mono); font-size: 18px; line-height: 1.55; }
.body    { font-family: var(--font-mono); font-size: 15px; line-height: 1.6; }
.body-sm { font-family: var(--font-mono); font-size: 13px; line-height: 1.5; }

.mono-sm {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
}

.mono-xs {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.35;
}

.tabular { font-variant-numeric: tabular-nums; }

.mid { color: var(--mid); }
.dim { color: var(--dim); }

/* §4 Viewport-edge anchors */

.viewport {
  position: relative;
  width: 100%;
}

.edge {
  position: absolute;
}

.edge.tl { top: var(--page-margin); left: var(--page-margin); }
.edge.tr { top: var(--page-margin); right: var(--page-margin); }
.edge.bl { bottom: var(--page-margin); left: var(--page-margin); }
.edge.br { bottom: var(--page-margin); right: var(--page-margin); }

/* Sections */

.section {
  position: relative;
  padding: 0 var(--page-margin);
}

.section + .section {
  border-top: 1px solid var(--hairline);
}

/* Reduced motion */

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