/*
Theme Name: Sports Photo Academy
Theme URI: https://sportsphotoacademy.com
Author: Gunnar Mattiasson
Description: Custom theme for Sports Photo Academy — photography education for sports parents, club volunteers and aspiring sports storytellers. Near-black ink canvas + a single hot yellow accent, warm-paper light sections, Inter type. See INSTALL.md for setup.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: spa
*/

/* ==========================================================================
   TOKENS — every color, font and spacing value in this theme is a CSS custom
   property declared here. To reskin the site, edit ONLY this block; nothing
   elsewhere in the CSS or PHP templates hard-codes a color or font.
   ========================================================================== */
:root{
  /* base ink scale (dark surfaces) */
  --ink-900:#0d0d0d;
  --ink-800:#141414;
  --ink-700:#262626;

  /* base paper scale (light surfaces) */
  --paper-100:#ffffff;
  --paper-200:#f6f5f0;
  --paper-300:#eae7dc;

  /* text */
  --cream:#e6e4df;
  --ink-body:#2b2a26;
  --mute-on-dark:#8a8a8a;
  --mute-on-light:#726f66;

  /* the one accent */
  --accent-500:#f5c518;
  --accent-600:#dcae0a;
  --accent-ink:#0d0d0d;

  /* semantic state colors — used sparingly, never as brand accents */
  --success-500:#5a9c5a;
  --error-500:#c0524a;

  /* type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fs-display: clamp(34px, 6vw, 72px);
  --lh-display: 1.04;
  --ls-display: -0.02em;
  --fw-display: 800;

  --fs-h2: clamp(26px, 4vw, 48px);
  --lh-h2: 1.08;
  --ls-h2: -0.015em;
  --fw-h2: 700;

  --fs-h3: clamp(21px, 2.6vw, 32px);
  --lh-h3: 1.15;
  --ls-h3: -0.01em;
  --fw-h3: 700;

  --fs-h4: 20px;
  --lh-h4: 1.3;
  --fw-h4: 600;

  --fs-body-lg: 18px;
  --fs-body: 16px;
  --lh-body: 1.6;
  --fw-body: 400;
  --max-line: 70ch;

  --fs-eyebrow: 12px;
  --ls-eyebrow: 0.2em;
  --fw-eyebrow: 600;

  --fs-meta: 13px;

  /* layout */
  --max-width: 1240px;
  --gutter: 24px;
  --section-pad: 96px;
  --section-pad-mobile: 56px;
  --gap-card: 20px;
  --gap-split: 40px;
  --gap-hero: 80px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-btn: 2px;
  --radius-card: 4px;
  --radius-input: 2px;
  --hairline: 1px;

  --nav-height: 76px;
}

/* Theme scopes — wrap any section in data-theme="dark" or "light" (default
   is dark, since the site's base canvas is dark). Every component reads its
   surface/text colors from these, never hard-coded. */
:root,
[data-theme="dark"]{
  --surface-bg: var(--ink-900);
  --surface-card: var(--ink-800);
  --surface-line: var(--ink-700);
  --text-heading: var(--paper-100);
  --text-body: var(--cream);
  --text-muted: var(--mute-on-dark);
}
[data-theme="light"]{
  --surface-bg: var(--paper-200);
  --surface-card: var(--paper-100);
  --surface-line: var(--paper-300);
  --text-heading: var(--ink-900);
  --text-body: var(--ink-body);
  --text-muted: var(--mute-on-light);
}
[data-theme="yellow"]{
  --surface-bg: var(--accent-500);
  --surface-card: var(--paper-100);
  --surface-line: var(--accent-600);
  --text-heading: var(--accent-ink);
  --text-body: #3a2e00;
  --text-muted: #6b5400;
}
/* The scope above only sets the variables — paint the section itself,
   otherwise a themed section stays transparent and shows the dark body
   behind its (now dark-on-nothing) text. */
[data-theme]{ background: var(--surface-bg); color: var(--text-body); }

/* A handful of components paint themselves in the accent yellow directly
   (for emphasis on dark/light backgrounds) — on a yellow-background block
   that would make them vanish, so swap them to ink there. */
[data-theme="yellow"] .spa-eyebrow,
[data-theme="yellow"] .accent,
[data-theme="yellow"] .spa-numbered-card__n,
[data-theme="yellow"] .spa-numbered-list__n,
[data-theme="yellow"] .spa-lesson__label,
[data-theme="yellow"] .spa-accordion summary::after{ color: var(--accent-ink); }
[data-theme="yellow"] .spa-lesson__number{ -webkit-text-stroke-color: var(--accent-ink); }
[data-theme="yellow"] a{ color: var(--accent-ink); text-decoration: underline; }
[data-theme="yellow"] .spa-btn--primary{ background: var(--accent-ink); color: var(--accent-500); }
[data-theme="yellow"] .spa-btn--ghost{ border-color: var(--accent-ink); color: var(--accent-ink); }
[data-theme="yellow"] .spa-badge--accent{ background: var(--accent-ink); color: var(--accent-500); }
[data-theme="yellow"] .spa-badge--outline{ border-color: var(--accent-ink); color: var(--accent-ink); }
[data-theme="yellow"] .spa-input,
[data-theme="yellow"] .wpcf7-form-control{ background: #fff; border-color: var(--accent-ink); color: var(--accent-ink); }
[data-theme="yellow"] .spa-pullquote{ background: var(--paper-100); border-left-color: var(--accent-ink); }
[data-theme="yellow"] .spa-form-note a{ background: var(--accent-ink); color: var(--accent-500); }

/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--surface-bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-body);
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
h1,h2,h3,h4,p,figure{ margin: 0; }
ul{ margin: 0; padding: 0; list-style: none; }
a{ color: var(--accent-500); text-decoration: none; }
a:hover{ opacity: 0.82; }
button, input, textarea{ font-family: inherit; }

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.spa-container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.spa-section{ padding-top: var(--section-pad); padding-bottom: var(--section-pad); }
.spa-section--tight{ padding-top: 40px; padding-bottom: 40px; }
.spa-section--top{ padding-top: 80px; padding-bottom: 40px; }
@media (max-width: 780px){
  .spa-section{ padding-top: var(--section-pad-mobile); padding-bottom: var(--section-pad-mobile); }
  .spa-section--top{ padding-top: 56px; }
}
.spa-narrow{ max-width: 720px; margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.spa-medium{ max-width: 900px; margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.spa-hero{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--gap-hero);
  align-items: center;
  padding-top: 80px;
  padding-bottom: 80px;
}
.spa-hero--reverse{ grid-template-columns: 0.9fr 1.1fr; }
.spa-hero--reverse .spa-hero__media{ order: -1; }
@media (max-width: 900px){
  .spa-hero, .spa-hero--reverse{ grid-template-columns: 1fr; gap: var(--space-7); padding-top: 48px; padding-bottom: 48px; }
  .spa-hero--reverse .spa-hero__media{ order: 0; }
}

/* Full-bleed hero — single image, crossfade slider, or video background */
.spa-hero-full{
  position: relative;
  min-height: 88vh;
  overflow: hidden;
  background: #0a0a0a;
}
.spa-hero-full__bg{ position: absolute; inset: 0; width: 100%; height: 100%; }
.spa-hero-full__media{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spa-hero-full__media.spa-media--placeholder{ display: flex; align-items: center; justify-content: center; }
.spa-hero-slider{ position: absolute; inset: 0; width: 100%; height: 100%; }
.spa-hero-slider__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1400ms ease;
}
.spa-hero-slider__img.is-active{ opacity: 1; }
.spa-hero-full__scrim{
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.spa-hero-full__scrim[data-scrim="soft"][data-scrim-pos="bottom"]{ background: linear-gradient(180deg, rgba(8,8,8,.06) 0%, rgba(8,8,8,.18) 45%, rgba(8,8,8,.80) 100%); }
.spa-hero-full__scrim[data-scrim="medium"][data-scrim-pos="bottom"]{ background: linear-gradient(180deg, rgba(8,8,8,.10) 0%, rgba(8,8,8,.35) 45%, rgba(8,8,8,.96) 100%); }
.spa-hero-full__scrim[data-scrim="strong"][data-scrim-pos="bottom"]{ background: linear-gradient(180deg, rgba(8,8,8,.30) 0%, rgba(8,8,8,.55) 40%, rgba(8,8,8,.98) 100%); }
.spa-hero-full__scrim[data-scrim="soft"][data-scrim-pos="top"]{ background: linear-gradient(0deg, rgba(8,8,8,.06) 0%, rgba(8,8,8,.18) 45%, rgba(8,8,8,.80) 100%); }
.spa-hero-full__scrim[data-scrim="medium"][data-scrim-pos="top"]{ background: linear-gradient(0deg, rgba(8,8,8,.10) 0%, rgba(8,8,8,.35) 45%, rgba(8,8,8,.96) 100%); }
.spa-hero-full__scrim[data-scrim="strong"][data-scrim-pos="top"]{ background: linear-gradient(0deg, rgba(8,8,8,.30) 0%, rgba(8,8,8,.55) 40%, rgba(8,8,8,.98) 100%); }
.spa-hero-full__content{
  z-index: 1;
  width: 100%;
  padding-top: 72px;
  padding-bottom: 72px;
}
.spa-hero-full__text--narrow{ max-width: 480px; }
.spa-hero-full__text--medium{ max-width: 640px; }
.spa-hero-full__text--wide{ max-width: 880px; }
.spa-hero-full__text--full{ max-width: none; }
.spa-hero-full__text .spa-subhead{ max-width: none; }
/* Desktop/mobile hero swap — only used when a hero has a device-specific
   layout, image, or scrim override; otherwise there's just one hero and
   these classes are absent. */
.spa-hero--device-desktop{ display: revert; }
.spa-hero--device-mobile{ display: none; }
@media (max-width: 780px){
  .spa-hero--device-desktop{ display: none; }
  .spa-hero--device-mobile{ display: revert; }
}
@media (max-width: 780px){
  .spa-hero-full{ min-height: 78vh; }
  .spa-hero-full__content{ padding-top: 48px; padding-bottom: 48px; }
}

/* ==========================================================================
   FLEXIBLE CONTENT BLOCKS — homepage "Content blocks"
   ========================================================================== */

/* Stats bar */
.spa-statsbar{ border-top: var(--hairline) solid var(--surface-line); border-bottom: var(--hairline) solid var(--surface-line); }
.spa-statsbar__grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.spa-stat{ padding: 22px 0; border-left: var(--hairline) solid var(--surface-line); padding-left: 24px; }
.spa-stat:first-child{ border-left: none; padding-left: 0; }
.spa-stat__k{ font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.spa-stat__v{ font-size: 15px; font-weight: 600; color: var(--text-heading); }
@media (max-width: 640px){
  .spa-statsbar__grid{ grid-template-columns: 1fr; }
  .spa-stat{ border-left: none; border-top: var(--hairline) solid var(--surface-line); padding-left: 0; padding-top: 18px; }
  .spa-stat:first-child{ border-top: none; padding-top: 0; }
}

/* Numbered card grid — used by Problem + Newsletter themes */
.spa-numbered-grid{ display: grid; grid-template-columns: 1fr; gap: 0; margin-top: var(--space-7); border-top: var(--hairline) solid var(--surface-line); }
.spa-numbered-grid .spa-numbered-card{ padding: var(--space-6) 0; border-bottom: var(--hairline) solid var(--surface-line); display: grid; grid-template-columns: 44px 1fr; gap: 20px; }
.spa-numbered-card__n{ font-size: 13px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-500); }
@media (min-width: 768px){
  .spa-numbered-grid{ grid-template-columns: repeat(3, 1fr); border-top: none; gap: 1px; background: var(--surface-line); }
  .spa-numbered-grid .spa-numbered-card{ background: var(--surface-bg); padding: var(--space-6); border: none; }
  .spa-numbered-grid--2col{ grid-template-columns: repeat(2, 1fr); }
}
.spa-pullquote{
  margin-top: var(--space-7); padding: var(--space-6) var(--space-5);
  background: var(--surface-card); border-left: 3px solid var(--accent-500);
  font-size: clamp(18px, 2.4vw, 22px); line-height: 1.5; color: var(--text-heading);
}

/* Philosophy — image + body + numbered beliefs list */
.spa-philo-grid{ display: grid; grid-template-columns: 1fr; gap: var(--space-7); align-items: start; margin-top: var(--space-7); }
.spa-numbered-list{ display: flex; flex-direction: column; gap: 0; margin-top: var(--space-6); border-top: var(--hairline) solid var(--surface-line); }
.spa-numbered-list__item{ display: grid; grid-template-columns: 44px 1fr; gap: 20px; padding: var(--space-5) 0; border-bottom: var(--hairline) solid var(--surface-line); }
.spa-numbered-list__n{ color: var(--accent-500); font-weight: 700; font-size: 13px; letter-spacing: 0.08em; }
@media (min-width: 768px){
  .spa-philo-grid{ grid-template-columns: 1fr 1fr; }
  .spa-philo-grid--no-media{ grid-template-columns: 1fr; max-width: var(--max-line); }
  .spa-philo-grid--reverse .spa-philo-grid__media{ order: 1; }
}

/* Audience cards */
.spa-audience-card{ padding: 28px; background: var(--surface-card); border: var(--hairline) solid var(--surface-line); border-radius: var(--radius-card); margin-top: var(--space-7); }
.spa-grid--3 .spa-audience-card{ margin-top: 0; }
.spa-grid--3{ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: var(--space-7); }

/* Lead magnet */
.spa-lm{ display: grid; grid-template-columns: 1fr; margin-top: var(--space-7); border: var(--hairline) solid var(--surface-line); border-radius: var(--radius-card); overflow: hidden; }
.spa-lm__media{ border: none; border-radius: 0; }
.spa-lm__body{ padding: var(--space-6) var(--space-5); background: var(--surface-card); }
.spa-lm__bullets{ list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: var(--space-6); }
.spa-lm__bullets li{ font-size: 14px; line-height: 1.5; color: var(--text-body); padding-left: 24px; position: relative; }
.spa-lm__bullets li::before{ content: "→"; position: absolute; left: 0; color: var(--accent-500); font-weight: 800; }
@media (min-width: 768px){
  .spa-lm{ grid-template-columns: 1fr 1fr; }
}

/* Newsletter signup badges (color follows the block's chosen background theme) */
.spa-newsletter-badges{ margin-top: 14px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--text-muted); }

/* Waitlist / coming soon */
.spa-block-waitlist{ max-width: 720px; }

/* Anchor / tagline banner */
.spa-anchor{ text-align: center; padding: var(--space-8) var(--gutter); }
.spa-anchor p{ font-size: clamp(22px, 3.5vw, 34px); color: var(--text-heading); font-style: italic; font-weight: 300; letter-spacing: -0.01em; margin: 0; }
.spa-anchor .accent{ color: var(--accent-500); }

.spa-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap-card);
}
.spa-grid--2{ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Gallery block — grid + slider (crossfade, same mechanism as the hero slider) */
.spa-gallery-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--gap-card); }
.spa-gallery-slider{ position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius-card); background: var(--surface-card); }

/* Gallery block — carousel (auto-scroll marquee, loops, mixed portrait/landscape) */
.spa-gallery-carousel{ height: var(--spa-carousel-h, 320px); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.spa-gallery-carousel__track{ display: inline-flex; align-items: stretch; height: 100%; gap: var(--gap-card); animation: spa-carousel-scroll linear infinite; animation-duration: var(--spa-carousel-speed, 35s); will-change: transform; }
.spa-gallery-carousel__item{ flex: 0 0 auto; height: 100%; }
.spa-gallery-carousel__item img{ display: block; height: 100%; width: auto; max-width: none; object-fit: contain; border-radius: var(--radius-card); -webkit-user-drag: none; }
@keyframes spa-carousel-scroll{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }
@media (max-width: 640px){
  .spa-gallery-carousel{ height: min(var(--spa-carousel-h, 320px), 220px); }
  /* A narrower viewport shows less of the same total scroll distance per
     second, so the same duration reads as much slower — speed it up to
     compensate for the smaller window onto the track. */
  .spa-gallery-carousel__track{ animation-duration: calc(var(--spa-carousel-speed, 35s) * 0.5); }
}
@media (prefers-reduced-motion: reduce){
  .spa-gallery-carousel{ overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .spa-gallery-carousel__track{ animation: none; }
}

/* Per-block device visibility (Gallery block's Show on desktop/mobile toggles) */
@media (max-width: 780px){
  .spa-hide-mobile{ display: none; }
}
@media (min-width: 781px){
  .spa-hide-desktop{ display: none; }
}

/* ==========================================================================
   BEFORE / AFTER — retouching comparison block
   ========================================================================== */
.spa-ba-list{ display: flex; flex-direction: column; gap: var(--space-8); }
.spa-ba-pair{ margin: 0; }
.spa-ba-pair__caption{ margin-top: 14px; font-size: 13px; color: var(--text-muted); text-align: center; }

/* Side by side */
.spa-ba-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-card); }
.spa-ba-grid__item{ position: relative; border-radius: var(--radius-card); overflow: hidden; }
.spa-ba-grid__item img{ display: block; width: 100%; height: 100%; object-fit: cover; }
.spa-ba-grid__tag{ position: absolute; left: 12px; bottom: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(10,10,10,.72); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* Drag slider — clip the "before" wrapper's width via a range input */
.spa-ba-slider{ width: 100%; }
.spa-ba-slider__frame{ position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-card); overflow: hidden; background: var(--surface-card); user-select: none; }
.spa-ba-slider__after,
.spa-ba-slider__before-wrap img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spa-ba-slider__before-wrap{ position: absolute; inset: 0; width: 50%; height: 100%; overflow: hidden; border-right: 2px solid #fff; }
.spa-ba-slider__before-wrap img{ width: 100vw; max-width: none; }
.spa-ba-slider__handle{ position: absolute; top: 0; bottom: 0; left: 50%; width: 0; transform: translateX(-50%); pointer-events: none; }
.spa-ba-slider__handle::after{ content: "↔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; color: #0a0a0a; display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.spa-ba-slider__tag{ position: absolute; bottom: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(10,10,10,.72); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; z-index: 1; pointer-events: none; }
.spa-ba-slider__tag--before{ left: 12px; }
.spa-ba-slider__tag--after{ right: 12px; }
.spa-ba-slider__range{ position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.spa-ba-slider__range::-webkit-slider-thumb{ -webkit-appearance: none; width: 100%; height: 100%; }

/* Auto-fade — crossfade on a timer (same visual mechanism as the hero slider) */
.spa-ba-fade{ position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-card); overflow: hidden; background: var(--surface-card); }
.spa-ba-fade__img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 900ms ease; }
.spa-ba-fade__img.is-active{ opacity: 1; }
.spa-ba-fade__tag{ position: absolute; bottom: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(10,10,10,.72); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0; transition: opacity 900ms ease; z-index: 1; }
.spa-ba-fade__tag--before{ left: 12px; }
.spa-ba-fade__tag--after{ right: 12px; }
.spa-ba-fade__tag.is-active{ opacity: 1; }
@media (min-width: 640px){
  .spa-ba-list{ display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
}

/* ==========================================================================
   TYPE
   ========================================================================== */
.spa-eyebrow{
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--accent-500);
  margin-bottom: var(--space-4);
  display: block;
}
.spa-display{
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  font-weight: var(--fw-display);
  color: var(--text-heading);
  margin: 0 0 20px;
}
.spa-display .accent{ color: var(--accent-500); }
.spa-h2{
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  font-weight: var(--fw-h2);
  color: var(--text-heading);
  margin: 0 0 8px;
}
.spa-h3{
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
  font-weight: var(--fw-h3);
  color: var(--text-heading);
}
.spa-h4{ font-size: var(--fs-h4); line-height: var(--lh-h4); font-weight: var(--fw-h4); color: var(--text-heading); }
.spa-subhead{ font-size: var(--fs-body-lg); line-height: var(--lh-body); color: var(--text-muted); max-width: 640px; }
.spa-hero-full__content .spa-subhead{ color: #fff; }
.spa-body{ font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-body); max-width: var(--max-line); }
.spa-meta{ font-size: var(--fs-meta); color: var(--text-muted); }

.spa-section-header{ max-width: 720px; margin-bottom: var(--space-7); }
.spa-section-header--center{ margin-left: auto; margin-right: auto; text-align: center; }

/* Post body copy (the_content) */
.spa-prose{ display: flex; flex-direction: column; gap: var(--space-5); max-width: var(--max-line); }
.spa-prose p{ font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-body); }
.spa-prose h2{ font-size: var(--fs-h3); color: var(--text-heading); margin-top: var(--space-6); }
.spa-prose img{ border-radius: var(--radius-card); }
.spa-prose blockquote{
  margin: 0;
  padding: var(--space-5) var(--space-6);
  background: var(--surface-card);
  border-left: 3px solid var(--accent-500);
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.5;
  font-style: italic;
  color: var(--text-heading);
}
.spa-prose blockquote p{ margin: 0; }
.spa-prose blockquote p + p{ margin-top: var(--space-4); }
[data-theme="yellow"] .spa-prose blockquote{ background: var(--paper-100); border-left-color: var(--accent-ink); }
.spa-prose table{
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}
.spa-prose th,
.spa-prose td{
  padding: 12px 16px;
  text-align: left;
  border-bottom: var(--hairline) solid var(--surface-line);
  color: var(--text-body);
}
.spa-prose th{
  font-weight: 700;
  color: var(--text-heading);
}
/* Content links (body copy, table-of-contents lists, FAQ answers, etc.) —
   rendered as a black-on-yellow label so they read clearly on both the dark
   and paper-light sections, instead of low-contrast yellow text on white. */
.spa-prose a,
.spa-body a,
.spa-accordion__answer a,
.spa-testimonial__quote a,
.spa-form-note a{
  color: var(--accent-ink);
  background: var(--accent-500);
  font-weight: 600;
  text-decoration: none;
  padding: 0.05em 0.45em;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.spa-prose a:hover,
.spa-body a:hover,
.spa-accordion__answer a:hover,
.spa-testimonial__quote a:hover,
.spa-form-note a:hover{ opacity: 0.82; }

/* ==========================================================================
   NAV
   ========================================================================== */
.spa-nav{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface-bg);
  border-bottom: var(--hairline) solid var(--surface-line);
}
.spa-nav__row{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--nav-height);
}
.spa-wordmark{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-heading);
  white-space: nowrap;
}
.spa-wordmark .accent{ color: var(--accent-500); }
.spa-nav__links{
  display: flex;
  gap: 28px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}
.spa-nav__links a{ font-size: 14px; font-weight: 500; color: var(--text-body); text-decoration: none; }
.spa-nav__links a:hover{ opacity: 0.82; }
/* A menu item with the "menu-cta" CSS class (set in Appearance → Menus) renders
   as the solid yellow button, so the CTA link is fully editable from wp-admin. */
.spa-nav__links a.menu-cta{
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  background: var(--accent-500);
  color: var(--accent-ink);
  margin-left: auto; /* pins the CTA to the right edge, like the original 3-segment nav */
}
.spa-nav__links a.menu-cta:hover{ opacity: 0.82; }

.spa-nav__toggle{ display: none; }
.spa-nav__toggle-label{
  display: none;
  width: 28px; height: 20px;
  position: relative;
  cursor: pointer;
}
.spa-nav__toggle-label span, .spa-nav__toggle-label span::before, .spa-nav__toggle-label span::after{
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: var(--text-heading); transition: transform 150ms ease;
}
.spa-nav__toggle-label span{ top: 9px; }
.spa-nav__toggle-label span::before{ top: -8px; }
.spa-nav__toggle-label span::after{ top: 8px; }

@media (max-width: 780px){
  .spa-nav__toggle-label{ display: block; }
  .spa-nav__links{
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    background: var(--surface-bg);
    border-bottom: var(--hairline) solid var(--surface-line);
    padding: var(--space-4) var(--gutter) var(--space-6);
  }
  .spa-nav__links a{ padding: 10px 0; width: 100%; }
  .spa-nav__toggle:checked ~ .spa-nav__links{ display: flex; }
  .spa-nav{ position: sticky; }
  .spa-nav__row{ position: relative; }
}

/* Minimal header for lead-magnet landing pages — wordmark only, no nav/CTA */
.spa-nav--minimal .spa-nav__row{ justify-content: flex-start; padding-top: 32px; padding-bottom: 0; min-height: 0; }

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.spa-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 14px 22px;
  border-radius: var(--radius-btn);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: opacity 120ms ease;
  line-height: 1;
}
.spa-btn:hover{ opacity: 0.82; }
.spa-btn--primary{ background: var(--accent-500); color: var(--accent-ink); }
.spa-btn--ghost{ background: transparent; color: var(--text-heading); border-color: var(--surface-line); }
.spa-btn--sm{ padding: 10px 16px; font-size: 13px; }
.spa-btn--lg{ padding: 18px 28px; font-size: 15px; }

.spa-badge{
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
  line-height: 1;
}
.spa-badge--accent{ background: var(--accent-500); color: var(--accent-ink); }
.spa-badge--outline{ background: transparent; color: var(--text-muted); border: 1px solid var(--surface-line); }
.spa-badge--neutral{ background: var(--surface-card); color: var(--text-heading); border: 1px solid var(--surface-line); }

/* ==========================================================================
   PHOTO / MEDIA
   ========================================================================== */
.spa-media{
  position: relative;
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: var(--hairline) solid var(--surface-line);
  background: var(--surface-card);
}
.spa-media img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.spa-media--4-5{ aspect-ratio: 4 / 5; }
.spa-media--4-3{ aspect-ratio: 4 / 3; }
.spa-media--16-9{ aspect-ratio: 16 / 9; }
.spa-media--1-1{ aspect-ratio: 1 / 1; }
/* Placeholder shown when no image field has been filled in yet */
.spa-media--placeholder{
  display: flex;
  align-items: flex-end;
  background-image: repeating-linear-gradient(135deg, var(--surface-bg) 0px, var(--surface-bg) 14px, var(--surface-card) 14px, var(--surface-card) 28px);
}
.spa-media--placeholder span{
  margin: 12px;
  padding: 4px 8px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--cream);
  background: rgba(13,13,13,0.75);
  border-radius: 2px;
}

/* ==========================================================================
   CARDS — course & article
   ========================================================================== */
.spa-course-card{
  background: var(--surface-card);
  border: var(--hairline) solid var(--surface-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.spa-course-card__media{ border-radius: 0; border: none; border-bottom: var(--hairline) solid var(--surface-line); }
.spa-course-card__body{ padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.spa-course-card__body .spa-badge{ align-self: flex-start; }
.spa-course-card__blurb{ font-size: 14px; line-height: 1.55; color: var(--text-muted); flex: 1; margin: 0; }
.spa-course-card__footer{ display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.spa-course-card__price{ font-weight: 700; font-size: 18px; color: var(--text-heading); }

.spa-article-card{ display: block; text-decoration: none; color: inherit; }
.spa-article-card__label{
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-500);
  margin: 16px 0 8px;
  /* reserves label height even with no category, so titles stay aligned */
  min-height: 1em;
  line-height: 1em;
  display: block;
}
.spa-article-card__title{ font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--text-heading); margin: 0 0 8px; }
.spa-article-card__meta{ font-size: 13px; color: var(--text-muted); }

/* Compact "related articles" row — small thumbnail + title + date */
.spa-article-row{ display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.spa-article-row__media{ width: 64px; flex: 0 0 64px; border-radius: var(--radius-card); overflow: hidden; }
.spa-article-row__title{ font-size: 14px; font-weight: 600; letter-spacing: -0.005em; color: var(--text-heading); margin: 0 0 4px; }
.spa-article-row__meta{ font-size: 12px; color: var(--text-muted); }
.spa-related-list{ display: flex; flex-direction: column; gap: var(--space-5); }
.spa-media-caption{ font-size: 11px; color: #55534d; margin-top: 8px; }

/* ==========================================================================
   TESTIMONIAL
   ========================================================================== */
.spa-testimonial{
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface-card);
  border: var(--hairline) solid var(--surface-line);
  border-radius: var(--radius-card);
}
.spa-testimonial__avatar{ width: 56px; flex: 0 0 56px; }
.spa-testimonial__quote{ font-size: 16px; line-height: 1.55; color: var(--text-heading); margin: 0 0 12px; }
.spa-testimonial__byline{ font-size: 13px; color: var(--text-muted); }
.spa-testimonial__byline strong{ font-weight: 600; color: var(--text-body); }

/* ==========================================================================
   NEWSLETTER / FORMS
   ========================================================================== */
.spa-form-card{
  background: var(--surface-card);
  border: var(--hairline) solid var(--surface-line);
  border-radius: var(--radius-card);
  padding: 32px;
}
.spa-form-card__heading{ font-size: 24px; font-weight: 700; color: var(--text-heading); margin: 0 0 8px; }
.spa-form-card__subhead{ font-size: 15px; color: var(--text-muted); margin: 0 0 20px; max-width: 480px; }
.spa-form-row{ display: flex; gap: 10px; flex-wrap: wrap; }
.spa-input{
  flex: 1 1 220px;
  font-size: 15px;
  padding: 14px 16px;
  border-radius: var(--radius-input);
  border: var(--hairline) solid var(--surface-line);
  background: var(--surface-bg);
  color: var(--text-heading);
}
textarea.spa-input{ flex-basis: 100%; resize: vertical; }
.spa-form-note{ font-size: 12px; color: var(--text-muted); margin: 12px 0 0; }
.spa-form-stack{ display: flex; flex-direction: column; gap: 14px; }
.spa-form-stack .spa-input{ flex: 0 0 auto; }
.spa-form-stack textarea.spa-input{ flex-basis: auto; }

/* Signup page — form card in the accent yellow */
.spa-form-card--yellow{ background: var(--accent-500); border-color: var(--accent-600); }
.spa-form-card--yellow .spa-form-card__heading{ color: var(--accent-ink); }
.spa-form-card--yellow .spa-form-card__subhead,
.spa-form-card--yellow .spa-form-note,
.spa-form-card--yellow .spa-lm__bullets li{ color: #3a2e00; }
.spa-form-card--yellow .spa-lm__bullets li::before{ color: var(--accent-ink); }
.spa-form-card--yellow .spa-input{ background: #fff; color: var(--accent-ink); border-color: var(--accent-ink); }
.spa-form-card--yellow .spa-btn--primary{ background: var(--accent-ink); color: var(--accent-500); }

/* Contact Form 7 output — restyled to match .spa-input / .spa-btn */
.spa-cf7 .wpcf7-form p{ margin: 0 0 14px; }
.spa-cf7 .wpcf7-form-control-wrap{ display: block; }
.spa-cf7 input.wpcf7-form-control,
.spa-cf7 textarea.wpcf7-form-control,
.spa-cf7 select.wpcf7-form-control{
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 14px 16px;
  border-radius: var(--radius-input);
  border: var(--hairline) solid var(--surface-line);
  background: var(--surface-bg);
  color: var(--text-heading);
}
.spa-cf7 textarea.wpcf7-form-control{ resize: vertical; min-height: 140px; }
.spa-cf7 input.wpcf7-form-control:focus,
.spa-cf7 textarea.wpcf7-form-control:focus{ outline: 2px solid var(--accent-500); outline-offset: 1px; }
.spa-cf7 input[type="submit"].wpcf7-form-control{
  display: inline-flex;
  width: auto;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 18px 28px;
  background: var(--accent-500);
  color: var(--accent-ink);
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: opacity 120ms ease;
}
.spa-cf7 input[type="submit"].wpcf7-form-control:hover{ opacity: 0.82; }
.spa-cf7 .wpcf7-not-valid-tip{ display: block; color: #c0392b; font-size: 12px; margin-top: 6px; }
.spa-cf7 .wpcf7-response-output{
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-input);
  border: var(--hairline) solid var(--surface-line);
  font-size: 13px;
  color: var(--text-body);
}
.spa-cf7 form.sent .wpcf7-response-output{ border-color: var(--accent-500); }
.spa-cf7 .wpcf7-spinner{ margin-left: 10px; }

/* ==========================================================================
   ACCORDION (FAQ) — native <details>/<summary>, no JS
   ========================================================================== */
.spa-accordion{ border-top: var(--hairline) solid var(--surface-line); }
.spa-accordion details{ border-bottom: var(--hairline) solid var(--surface-line); }
.spa-accordion summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-heading);
}
.spa-accordion summary::-webkit-details-marker{ display: none; }
.spa-accordion summary::after{ content: "+"; color: var(--accent-500); font-size: 20px; line-height: 1; }
.spa-accordion details[open] summary::after{ content: "\2212"; }
.spa-accordion__answer{ font-size: 15px; line-height: 1.6; color: var(--text-muted); margin: 0 0 20px; max-width: 640px; }

/* ==========================================================================
   NUMBERED LESSON — signature teaching format, usable as an ACF block
   anywhere in post/page content.
   ========================================================================== */
.spa-lesson{ margin: var(--space-6) 0; }
.spa-lesson__head{ display: flex; align-items: baseline; gap: 20px; margin-bottom: 18px; }
.spa-lesson__number{
  font-weight: 800;
  font-size: 56px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent-500);
}
.spa-lesson__title{ font-weight: 800; font-size: clamp(21px, 3vw, 30px); letter-spacing: -0.01em; text-transform: uppercase; color: var(--text-heading); margin: 0; }
.spa-lesson__grid{ display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.spa-lesson__label{ font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-500); margin-bottom: 8px; }
.spa-lesson__copy{ font-size: 15px; line-height: 1.55; color: var(--text-body); margin: 0; }

/* ==========================================================================
   FOOTER — always the ink-black scope regardless of the page's last section
   ========================================================================== */
.spa-footer{ background: var(--ink-900); border-top: var(--hairline) solid var(--surface-line); }
.spa-footer__grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  margin-bottom: 40px;
}
.spa-footer__blurb{ font-size: 14px; color: var(--mute-on-dark); max-width: 240px; margin: 10px 0 0; }
.spa-footer__col-title{ font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute-on-dark); margin-bottom: 12px; }
.spa-footer__links{ display: flex; flex-direction: column; gap: 8px; }
.spa-footer__links a{ font-size: 14px; color: var(--cream); }
.spa-footer__bottom{ border-top: var(--hairline) solid var(--surface-line); padding-top: 20px; font-size: 13px; color: var(--mute-on-dark); }

@media (max-width: 560px){
  .spa-footer__grid{ grid-template-columns: 1fr; gap: 32px; }
}

/* ==========================================================================
   RESPONSIVE FINE-TUNING
   ========================================================================== */
@media (max-width: 640px){
  .spa-form-row{ flex-direction: column; }
  .spa-input{ flex-basis: auto; }
  .spa-course-card__footer{ flex-direction: column; align-items: flex-start; gap: 12px; }
  .spa-testimonial{ flex-direction: column; }
}
