/* ============================================================
   GLOBAL BASE STYLES
   Applies after reset.css and tokens.css.
   ============================================================ */

/* In-page links land below the fixed nav */
html {
  scroll-padding-top: 88px;
}

/* ----------------------------------------------------------
   BODY
   ---------------------------------------------------------- */
body {
  background-color: var(--col-surface);
  color: var(--col-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 300;
}

/* ----------------------------------------------------------
   SKIP LINK
   Visually hidden until focused — keyboard users first.
   ---------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--col-ground);
  color: white;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 var(--radius-sm) 0;
  transform: translateY(calc(-100% - 4px)); /* fully out of view, no sliver on light heroes */
  transition: transform var(--dur-base) var(--ease-out);
}

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

/* ----------------------------------------------------------
   HEADINGS — display face with restrained weight
   ---------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

/* ----------------------------------------------------------
   EM — italic gold accent inside headings and prose
   ---------------------------------------------------------- */
em {
  font-style: italic;
  font-family: var(--font-display);
}

h1 em,
h2 em,
h3 em,
h4 em,
.accent-em {
  font-style: italic;
  color: var(--col-accent);
  font-family: var(--font-display);
}

/* ----------------------------------------------------------
   EYEBROW LABELS
   ---------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--col-text-muted);
  display: block;
  margin-bottom: var(--space-xs);
}

.eyebrow--light {
  color: rgba(255, 255, 255, 0.6);
}

.eyebrow--accent {
  color: var(--col-accent);
}

/* ----------------------------------------------------------
   LINKS — base
   ---------------------------------------------------------- */
a {
  color: var(--col-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast);
}

a:hover {
  color: var(--col-accent);
}

/* ----------------------------------------------------------
   FOCUS VISIBLE — accessible, on-brand outline
   ---------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--col-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Suppress default focus ring; rely on focus-visible only */
:focus:not(:focus-visible) {
  outline: none;
}

/* ----------------------------------------------------------
   DARK SURFACE TEXT OVERRIDES
   Use .on-dark on any parent placed over a dark background.
   ---------------------------------------------------------- */
.on-dark {
  color: var(--col-text-light);
}

.on-dark .eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.on-dark a {
  color: var(--col-text-light);
}

.on-dark a:hover {
  color: var(--col-accent);
}

/* ----------------------------------------------------------
   SCROLL REVEAL ANIMATION
   JS adds .revealed when element enters viewport.
   ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity  var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}

/* Staggered delays — apply data-delay="1" through "4" */
.reveal[data-delay="1"] { transition-delay: 100ms; }
.reveal[data-delay="2"] { transition-delay: 200ms; }
.reveal[data-delay="3"] { transition-delay: 300ms; }
.reveal[data-delay="4"] { transition-delay: 400ms; }

/* Honour reduced-motion: skip the entrance animation entirely */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
