/* ==========================================================================
   main.css — Global resets, base typography, and layout primitives.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% 64px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 100%,
    var(--color-background);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

/* Fine coordinate marks in section corners — part of the shared visual
   system referenced throughout the site (section numbers, tech labels). */
.section {
  overflow: hidden;
}

.section::before,
.section::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  top: 28px;
  opacity: 0.5;
  pointer-events: none;
}

.section::before {
  left: var(--space-lg);
  border-top: 1px solid var(--color-border);
  border-left: 1px solid var(--color-border);
}

.section::after {
  right: var(--space-lg);
  border-top: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

@media (max-width: 767px) {
  .section::before,
  .section::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

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

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

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

::selection {
  background: var(--color-accent-dim);
  color: var(--color-text-primary);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-weight: 600;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--color-border-soft);
  position: relative;
  scroll-margin-top: var(--header-height);
}

.section--tinted {
  background: var(--color-surface);
}

.section-head {
  max-width: 620px;
  margin-bottom: var(--space-xl);
}

.section-head .eyebrow {
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}

.section-sub {
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
  font-size: 15.5px;
  max-width: 56ch;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--color-accent);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.eyebrow::before {
  content: '';
  width: 16px;
  height: 1px;
  background: var(--color-accent);
}

.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;
}

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  background: var(--color-accent);
  color: #05060a;
  padding: 10px 16px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  z-index: 200;
  transition: top var(--transition-fast);
}

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