/* ==========================================================
   style.css
   Hand-written overrides that sit on top of Tailwind (CDN) utility
   classes. Brand colors themselves live in the tailwind.config
   block at the top of every page — this file only holds things
   Tailwind utilities can't express, plus styling for the
   server-rendered spam-guard.php fields (whose HTML we don't
   control the class names of beyond `.sg-math-field`).
   ========================================================== */

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Sticky header gains a slightly stronger shadow after scroll (see js/main.js) */
#site-header.is-scrolled {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

/* Hero slider: only the active slide is visible; JS toggles opacity */
.hero-slide {
  will-change: opacity;
}

/* ----------------------------------------------------------
   spam-guard.php field styling
   ----------------------------------------------------------
   sg_render_honeypot_field() already inlines its own hidden
   positioning styles, so nothing is needed for it here.

   sg_render_math_fields() outputs plain <label>/<input> pairs
   wrapped in a `.sg-math-field` div. We style those to match the
   Tailwind text-input look used elsewhere on the same form.
   ---------------------------------------------------------- */
.sg-math-field {
  margin-top: 0.75rem;
}

.sg-math-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155; /* slate-700 */
  margin-bottom: 0.375rem;
}

.sg-math-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: #0f172a; /* slate-900 */
  background-color: #ffffff;
  border: 1px solid #cbd5e1; /* slate-300 */
  border-radius: 0.375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sg-math-field input:focus {
  outline: none;
  border-color: #007bc4; /* brand blue */
  box-shadow: 0 0 0 3px rgba(0, 123, 196, 0.25);
}

/* Dark-background contexts (e.g. the footer newsletter block) need
   light-colored labels so they stay readable against a dark panel. */
.sg-math-field--on-dark label {
  color: #cbd5e1; /* slate-300 */
}
.sg-math-field--on-dark input {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.sg-math-field--on-dark input::placeholder {
  color: #94a3b8;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
