/* ==========================================================================
   Iron Acre — Reset, base elements, typography, utilities
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Keeps anchored sections clear of the fixed header. */
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

body {
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--c-void);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Locked while the mobile drawer is open. */
body.is-locked {
  overflow: hidden;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

ul[class],
ol[class] {
  list-style: none;
  padding: 0;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  font-weight: var(--fw-black);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-4xl);
}

h2 {
  font-size: var(--fs-3xl);
}

h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-normal);
}

h4 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-normal);
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-color: var(--c-lime);
  text-underline-offset: 0.2em;
}

strong {
  font-weight: var(--fw-bold);
}

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

/* --------------------------------------------------------------------------
   Focus — always visible, never removed
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Suppress the default ring only where :focus-visible is supported, so
   keyboard users keep an indicator while mouse users do not see one. */
:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-skip);
  padding: var(--space-3) var(--space-5);
  background-color: var(--c-lime);
  color: var(--c-void);
  font-weight: var(--fw-bold);
  border-radius: var(--radius-md);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform var(--dur-fast) var(--ease-out);
}

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

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--c-lime);
  line-height: 1;
}

.eyebrow::before {
  content: "";
  inline-size: var(--space-8);
  block-size: 2px;
  background-color: var(--c-lime);
  flex: none;
}

.lede {
  font-size: var(--fs-lg);
  color: var(--c-text-mute);
  line-height: var(--lh-relaxed);
  max-inline-size: 56ch;
}

.accent {
  color: var(--c-lime);
}

.text-mute {
  color: var(--c-text-mute);
}

/* --------------------------------------------------------------------------
   Scroll reveal
   `has-reveal` is set on <html> by js/reveal.js only once it has confirmed the
   effect will actually run, so content is never stranded at zero opacity when
   JavaScript is unavailable or reduced motion is preferred.
   -------------------------------------------------------------------------- */
.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

.has-reveal [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */
@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;
  }
}
