/* ============================================================
   HaloLogic.ai — base styles (Modern Halo)
   Buttons, focus, motion. Enforces the BRAND.md contrast rules.
   ============================================================ */

body {
  font-family: var(--ff-body);
  color: var(--charcoal);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--ff-head); line-height: 1.15; }

/* ---- Content links (a11y gate fix NEW-5) ----
   Default-layout pages (e.g. /accessibility/) must not depend on the
   DB/customizer link color: charcoal + underline on light surfaces.
   Deviation from the filed fix ON PURPOSE: `:not([class])` skips classed
   links (.btn--ghost etc. keep their colors) and `:where()` holds
   specificity at (0,1,1) so page-scoped rules — e.g. gold links on dark
   sections (.hl-note a, .footer-meta a) — still win their tie by order. */
.entry-content a:where(:not([class])) { color: var(--charcoal); text-decoration: underline; }

/* ---- Focus: keyboard-visible on every surface ---- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--charcoal);
  outline-offset: 3px;
  /* no border-radius: it would square off .btn's pill focus ring (NEW-1/NEW-6) */
}
/* On dark surfaces the charcoal outline would vanish — use gold there. */
.is-dark :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible { outline-color: var(--gold); }

/* ---- Buttons ----
   CTA = charcoal text on gold (~10.4:1). NEVER white-on-gold. */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--ff-head); font-weight: 600; font-size: 1.02rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .18s ease, background-color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--gold  { background: var(--gold); color: var(--charcoal); }        /* 10.4:1 */
.btn--gold:hover { background: var(--gold-hover); }
.btn--charcoal { background: var(--charcoal); color: var(--white); }    /* 16.9:1 */
.btn--charcoal:hover { background: #1a2f39; }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--block { width: 100%; justify-content: center; padding: 1rem; font-size: 1.1rem; }

/* Turnstile slot (D-014) — exists only with JS + configured keys; the widget
   uses appearance:interaction-only so the slot is empty unless Cloudflare
   decides a visible check is needed. */
.ts-slot { margin: 0 0 1rem; }
.ts-slot:empty { margin: 0; }

/* ---- Motion: honor prefers-reduced-motion (WCAG 2.3.3 / 2.2.2) ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
