/* Reset + element defaults + base typography */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--color-ink-700);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--color-ink);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 600;
  line-height: 1.25;
}

h4 {
  font-size: var(--fs-h4);
  font-weight: 600;
  line-height: 1.35;
}

p {
  max-width: 68ch;
}

/* Tech-forward utility label — real data/label use (curriculum tags,
   training-detail dt/dd, footer meta), not a costume for "technical." */
.u-mono {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.02em;
}

a {
  color: var(--color-ink);
  text-decoration: none;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}

ul,
ol {
  padding-left: var(--space-5);
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: var(--fs-body);
}

/* Theme browser-default surfaces from the palette — the cheapest signal a
   page was built rather than assembled. */
::selection {
  background-color: var(--color-terracotta);
  color: var(--color-cream);
}

/* Visible focus for keyboard users only */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 2px;
  border-radius: 2px;
}

.l-dark :focus-visible,
.c-nav :focus-visible {
  outline-color: var(--color-terracotta);
}

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

/* Scroll-reveal — progressive enhancement: content is fully visible by
   default. The opacity-0 starting state only applies once JS confirms it's
   running (html.js-ready) and will add .is-revealed, so a script failure
   never leaves content permanently hidden. */
.js-ready .js-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--ease-smooth), transform var(--ease-smooth);
}

.js-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.js-ready .js-reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--ease-smooth), transform var(--ease-smooth);
}

.js-reveal-stagger.is-revealed > * {
  opacity: 1;
  transform: translateY(0);
}

.js-reveal-stagger.is-revealed > *:nth-child(1) { transition-delay: 0ms; }
.js-reveal-stagger.is-revealed > *:nth-child(2) { transition-delay: 70ms; }
.js-reveal-stagger.is-revealed > *:nth-child(3) { transition-delay: 140ms; }
.js-reveal-stagger.is-revealed > *:nth-child(4) { transition-delay: 210ms; }
.js-reveal-stagger.is-revealed > *:nth-child(5) { transition-delay: 280ms; }
.js-reveal-stagger.is-revealed > *:nth-child(6) { transition-delay: 350ms; }
.js-reveal-stagger.is-revealed > *:nth-child(7) { transition-delay: 420ms; }
.js-reveal-stagger.is-revealed > *:nth-child(8) { transition-delay: 490ms; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal,
  .js-reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.u-visually-hidden.u-skip-link:focus {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-4);
  margin: 0;
  clip: auto;
  overflow: visible;
  background: var(--color-ink);
  color: var(--color-cream);
  z-index: 1000;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2);
}
