/* Reset + base element rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: auto; /* GSAP owns scroll choreography; native smooth-scroll would fight it */
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--surface-page);
  color: var(--text-primary);
}

body {
  font-family: var(--font-display);
  font-size: var(--size-body);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

/* Technical / UI label style — small caps-like tracking, monospace */
.eyebrow,
.spec-label,
.nav-link,
.model-index {
  font-family: var(--font-mono);
  font-size: var(--size-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

/* Skip link */
.skip-link {
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  z-index: var(--z-skip-link);
  background: var(--color-chalk);
  color: var(--text-inverse);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--size-small);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: 2px;
  transform: translateY(-140%);
  transition: transform var(--duration-fast) var(--ease-out-soft);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* Visible, consistent focus ring across all interactive elements */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-chalk);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* Reduced motion: strip transforms/transitions globally; JS also skips pinning + scrub */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
