/* ══════════════════════════════════════════════════════════
   BASE — global resets & typography
   (former Additional CSS section 2, plus scroll-reveal
   from section 6)

   NOTE ON !important: none of these rules need it anymore.
   In the Kadence build they fought the theme's compiled
   customizer stylesheet; here this file IS the stylesheet.
   ══════════════════════════════════════════════════════════ */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.entry-title,
.wp-block-heading {
  font-family: var(--serif);
  font-weight: 400; /* DM Serif Display ships one weight; prevents faux-bold */
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }

/* Body text */
p, li, td, th, blockquote {
  font-family: var(--sans);
  color: var(--ink);
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--ink);
}

/* Visible keyboard focus (accessibility floor — new, invisible to mouse users) */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Horizontal rules — loads after wp-block-library, so plain
   selectors override core separator styles without !important */
hr,
.wp-block-separator {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
  background: none;
  height: auto;
}

/* Content width behavior — preserves the Kadence-era rule that
   let full-width Group sections bleed edge to edge. Block-level
   layout settings stored in your existing page content continue
   to control inner widths, exactly as before. */
.entry-content > *,
.wp-block-group {
  max-width: 100%;
}

/* Skip link (accessibility floor) */
.skip-link {
  position: absolute;
  left: -9999px;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1rem;
}


/* ── SCROLL REVEAL (former section 6) ──────────────────────
   Companion JS is now /assets/js/reveal.js, enqueued by the
   theme (WPCode Lite snippet can be retired).

   Hardened vs. the old version:
   - Only hides content when JS has actually loaded
     (html gets class "js" via inline script in header.php),
     so sections are never invisible if the script fails.
   - Respects prefers-reduced-motion.
   ---------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
