/* ============================================================
   Leah E. Welker—Base element defaults
   Warm, readable, serif-first. Loaded after tokens.
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "onum";
}

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  line-height: var(--leading-tight);
  letter-spacing: var(--display-tracking);
  color: var(--text-strong);
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 1em; max-width: var(--measure-prose); text-wrap: pretty; }

/* ---------- Links ---------- */
a {
  color: var(--text-link);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-soft);
}
a:hover { color: var(--accent-press); text-decoration: underline; }

strong, b { font-weight: var(--weight-semibold); }
em, i { font-style: italic; }

::selection { background: var(--gold-100); color: var(--ink-800); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

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

/* ---------- Skip link—keyboard users jump past the nav ---------- */
.lw-skip-link {
  position: fixed;
  top: -120px;
  left: var(--space-4);
  z-index: 200;
  display: inline-block;
  background: var(--gold-300);
  color: var(--ink-800);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  text-decoration: none;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: top var(--dur-fast) var(--ease-soft);
}
.lw-skip-link:focus {
  top: var(--space-4);
  color: var(--ink-800);
  text-decoration: none;
  outline: 2px solid var(--ink-800);
  outline-offset: 2px;
}
/* The skip target only receives focus to move the reading cursor—no box. */
#main:focus { outline: none; }

/* ---------- Visually hidden, but read by assistive tech ---------- */
.lw-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Placeholders: keep them legible (browsers dim by default) ---------- */
input::placeholder,
textarea::placeholder { color: var(--text-muted); opacity: 1; }
/* Fields sitting on dark "ink" surfaces need a lighter placeholder for contrast. */
.lw-ink-field::placeholder { color: var(--twilight-300); opacity: 1; }

hr {
  border: 0;
  height: 1px;
  background: var(--rule-gold);
  margin: var(--space-6) 0;
}

/* ---------- Eyebrow / small-caps label utility ---------- */
.lw-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-gold);
}

/* ---------- A decorative gold flourish divider ---------- */
.lw-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--gold-300);
}
.lw-divider::before,
.lw-divider::after {
  content: "";
  height: 1px;
  width: clamp(40px, 12vw, 120px);
  background: linear-gradient(to right, transparent, var(--gold-300));
}
.lw-divider::after { background: linear-gradient(to left, transparent, var(--gold-300)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
