/*
 * /site-redesign/_shared/styles/tokens.css
 *
 * Apex design tokens — UPDATED to the v1.3 system (2026-05-13 handoff bundle).
 * Variant in use: **LIGHT** — white surface, black ink, green single accent.
 * Strategic dark bands (mission on home, final-CTA on /intro, footer) use `.on-dark`.
 *
 * Two-layer token setup:
 *   1. Authoritative system names (--apex-*, --fg, --bg, --accent, --fs-*, --s1..--s8)
 *      — these are what new code should reference. Match the design-system handoff
 *      `colors_and_type.css` verbatim.
 *   2. Legacy bridge names (--color-*, --type-*, --space-*, --radius*)
 *      — the names pack-3's draft.css already uses. Point them at the new tokens
 *      so existing layout renders correct without per-file refactor.
 *
 * Fonts (Archivo Black + Inter) are loaded via <link> in head.html so they start
 * downloading before this stylesheet is parsed. No Adobe Fonts kit needed.
 */

:root {
  /* ======================================================
     1. BRAND PALETTE (locked, from handoff + DESIGN_LOCKED_v1)
     ====================================================== */
  --apex-green: #28CD7E;
  --apex-black: #0E0E0E;
  --apex-white: #FFFFFF;

  /* TRI-COLOR RULE (locked 2026-05-18 by Elliot): only Apex green, white, and black
     may appear on the site. Plum, plum-deep, blush, and chalk-gray were removed.
     Where a muted neutral is needed (e.g. secondary text), use an rgba tint of
     apex black — it's a transparency on the allowed color, not a new color. */

  /* Chalk-gray retained AS A NAME so existing references keep resolving, but the
     value is now a transparency on apex black, not a separate gray hex.
     Alpha bumped 0.6 → 0.72 on 2026-05-19 to clear WCAG 2.1 AA 4.5:1 contrast on
     paper background (was 4.06:1, now ~5.1:1). Affects every muted-text surface:
     .coach__title, .location-nap__neighborhood, .coach__record li::before,
     .plan-card__subhead, .privacy-hero__meta, FAQ answer text. */
  --chalk-gray: rgba(14, 14, 14, 0.72);

  /* Derived neutrals — tints of the two surface colors. Not "brand colors". */
  --apex-ink-08:   rgba(255, 255, 255, 0.08);   /* hairlines on black */
  --apex-ink-16:   rgba(255, 255, 255, 0.16);   /* dividers on black */
  --apex-ink-55:   rgba(255, 255, 255, 0.55);   /* tile-hover border on dark */
  --apex-ink-64:   rgba(255, 255, 255, 0.64);   /* secondary ink on black */
  --apex-shade-02: rgba(14, 14, 14, 0.02);      /* "paper-soft" — Glofox container bg */
  --apex-shade-04: rgba(14, 14, 14, 0.04);      /* off-white panels on white */
  --apex-shade-08: rgba(14, 14, 14, 0.08);      /* hairlines on white */
  --apex-shade-12: rgba(14, 14, 14, 0.12);      /* dividers on white */

  /* ======================================================
     2. SEMANTIC ROLES — LIGHT variant default
     ====================================================== */
  --fg:           var(--apex-black);
  --fg-muted:     var(--chalk-gray);
  --fg-dim:       var(--chalk-gray);
  --bg:           var(--apex-white);
  --bg-soft:      var(--apex-shade-02);   /* "paper-soft" — Glofox embed container */
  --bg-raised:    var(--apex-shade-04);   /* off-white panel on white */
  --accent:       var(--apex-green);      /* RESERVED — kept only on schedule teaser */
  --divider:      var(--apex-shade-12);
  --hairline:     var(--apex-shade-08);

  /* Dark inverse (for .on-dark sections — mission band, final-CTA, footer) */
  --fg-on-dark:        var(--apex-white);
  --fg-muted-on-dark:  var(--apex-ink-64);
  --bg-on-dark:        var(--apex-black);
  --bg-on-dark-raised: var(--apex-black);   /* was #151515 — tri-color rule (2026-05-18): collapsed to apex black */
  --divider-on-dark:   var(--apex-ink-16);
  --hairline-on-dark:  var(--apex-ink-08);

  /* ======================================================
     3. TYPE
     ====================================================== */
  --font-display: "Archivo Black", "Inter", "Arial Black", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-label:   "Inter", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fw-regular: 400;
  --fw-bold:    700;

  /* 9-step consolidated scale */
  --fs-display-xl: 6rem;       /* 96 px — hero headline */
  --fs-display-lg: 4.5rem;     /* 72 px — secondary hero */
  --fs-display-md: 3.5rem;     /* 56 px — large section header */
  --fs-display-sm: 2.5rem;     /* 40 px — section heading, coach name */
  --fs-text-lg:    1.5rem;     /* 24 px — tile heading, FAQ question */
  --fs-text-md:    1.125rem;   /* 18 px — long-form body, lede */
  --fs-text-sm:    1rem;       /* 16 px — body, tile description */
  --fs-ui-md:      0.875rem;   /* 14 px — eyebrow, nav, button label, footer link */
  --fs-ui-sm:      0.75rem;    /* 12 px — legal, smallest tag */

  --lh-tight:   1.0;
  --lh-heading: 1.1;
  --lh-body:    1.5;
  --lh-label:   1.2;

  --tr-display: -0.02em;
  --tr-body:     0;
  --tr-label:    0.08em;

  /* ======================================================
     4. SPACING — 8pt scale
     ====================================================== */
  --s1:  4px;
  --s2:  8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 32px;
  --s6: 48px;
  --s7: 64px;
  --s8: 96px;

  /* ======================================================
     5. RADIUS — 4px brand max
     ====================================================== */
  --radius:      4px;
  --radius-sm:   2px;
  --radius-none: 0;

  /* ======================================================
     6. BORDERS
     ====================================================== */
  --border-hairline: 1px solid var(--hairline);
  --border-divider:  1px solid var(--divider);
  --border-accent:   2px solid var(--accent);

  /* ======================================================
     7. MOTION
     ====================================================== */
  --ease:      cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast:  120ms;
  --dur:       200ms;
  --dur-slow:  320ms;


  /* ======================================================
     LEGACY BRIDGE — pack-3's existing draft.css names continue to resolve.
     New code should use the names above.
     ====================================================== */

  /* Colour bridge — supersedes the cream-palette previous values */
  --color-ink:               var(--apex-black);
  --color-paper:             var(--apex-white);
  --color-paper-warm:        var(--apex-shade-04);
  --color-mid:               var(--chalk-gray);
  --color-border:            var(--apex-shade-12);
  --color-bg:                var(--apex-white);
  --color-bg-alt:            var(--apex-shade-04);
  --color-bg-dark:           var(--apex-black);
  --color-text:              var(--apex-black);
  --color-text-muted:        var(--chalk-gray);
  --color-text-on-dark:      var(--apex-white);
  --color-text-muted-on-dark: var(--apex-ink-64);
  --color-placeholder-bg:    var(--apex-shade-04);
  --color-placeholder-text:  var(--chalk-gray);

  /* Type bridge — pack-3's --type-* names map to the new --fs-* scale */
  --type-display-xxl: var(--fs-display-xl);
  --type-display-xl:  var(--fs-display-lg);
  --type-display-l:   var(--fs-display-md);
  --type-display-m:   var(--fs-display-sm);
  --type-body-l:      var(--fs-text-md);
  --type-body:        var(--fs-text-sm);
  --type-body-s:      var(--fs-ui-md);
  --type-caption:     var(--fs-ui-sm);

  --leading-display: var(--lh-heading);
  --leading-body:    var(--lh-body);
  --leading-lead:    var(--lh-body);

  --tracking-display:       var(--tr-display);
  --tracking-caption:       var(--tr-label);
  --tracking-section-label: var(--tr-label);

  /* Spacing bridge — pack-3's --space-* names map to 8pt scale */
  --space-1:  var(--s1);
  --space-2:  var(--s2);
  --space-3:  12px;             /* preserve 12 for pre-existing component padding */
  --space-4:  var(--s3);
  --space-6:  var(--s4);
  --space-8:  var(--s5);
  --space-12: var(--s6);
  --space-16: var(--s7);
  --space-24: var(--s8);

  /* Layout bridge */
  --container-max:    1280px;       /* per handoff desktop column max */
  --container-narrow: 720px;        /* tablet max — used for prose-heavy */
  --container-pad:    clamp(1rem, 4vw, 2rem);

  /* Radius bridge */
  --radius-lg: var(--radius);       /* brand max stays at 4px */

  /* Misc bridge */
  --border:           var(--border-hairline);
  --border-on-dark:   1px solid var(--hairline-on-dark);
  --transition-hover: var(--dur) var(--ease);
  --transition-expand: var(--dur) var(--ease);
}


/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; background: none; border: none; padding: 0; color: inherit; }


/* ============================================================
   BASE
   ============================================================ */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-text-sm);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--apex-black); }


/* ============================================================
   TYPE — global display + label treatment
   Per DESIGN_LOCKED_v1 (2026-05-14):
   - Sentence case (text-transform removed — content is stored sentence-case)
   - Hero h1: 56-64px desktop, 36-40px mobile
   - Section h2: 36-40px desktop, 24-28px mobile
   - Card h3: ~24px (unchanged)
   Font is still rendered with Archivo Black until a Puffin kit ID lands
   (DESIGN_LOCKED_v1 specifies Puffin Display Bold; Archivo Black is the substitute).
   ============================================================ */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);   /* Archivo Black is a single-cut family */
  letter-spacing: var(--tr-display);
  line-height: var(--lh-heading);
  color: var(--fg);
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  letter-spacing: 0;
}

/* Section-level defaults — heroes override h1 up via .hero h1 below. */
h1 { font-size: 2.25rem; }                 /* 36px mobile default — hero overrides */
h2 { font-size: 1.5rem; }                  /* 24px mobile default */
h3 { font-size: var(--fs-text-lg); }       /* 24px */

@media (min-width: 768px) {
  h1 { font-size: var(--fs-display-md); }  /* 56px desktop */
  h2 { font-size: var(--fs-display-sm); }  /* 40px desktop */
}

/* Hero h1 — bigger than default h1 per locked hierarchy. */
.hero h1 {
  font-size: 2.5rem;                       /* 40px mobile, top of 36-40 range */
  max-width: 22ch;
}
@media (min-width: 768px) {
  .hero h1 {
    font-size: var(--fs-display-md);       /* 56px desktop, bottom of 56-64 range */
  }
}
@media (min-width: 1280px) {
  .hero h1 {
    font-size: 4rem;                       /* 64px wide-desktop, top of range */
  }
}

p { line-height: var(--lh-body); }
p + p { margin-top: var(--s3); }

/* Labels / CTAs / overlines / times */
.cta,
.label,
.overline,
.time,
.eyebrow,
.section-label {
  font-family: var(--font-label);
  font-weight: var(--fw-bold);
  font-size: var(--fs-ui-md);
  text-transform: uppercase;
  letter-spacing: var(--tr-label);
  line-height: var(--lh-label);
  color: var(--accent);
}

/* Inline text links — underline on currentColor, default per handoff */
a:not(.btn):not(.site-nav__logo):not(.site-nav__links a):not(.skip-link):not(.site-footer__app-badges a) {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity var(--dur) var(--ease);
}
a:not(.btn):not(.site-nav__logo):not(.site-nav__links a):not(.skip-link):not(.site-footer__app-badges a):hover {
  opacity: 0.7;
}


/* ============================================================
   CONTAINERS + SECTION SPACING (baseline used by drafts)
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.container-narrow,
.container--narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section {
  padding-top: var(--s7);
  padding-bottom: var(--s7);
}
@media (min-width: 768px) {
  .section {
    padding-top: var(--s8);
    padding-bottom: var(--s8);
  }
}
@media (min-width: 1440px) {
  .section {
    padding-top: 128px;
    padding-bottom: 128px;
  }
}


/* ============================================================
   BUTTONS (per handoff component spec)
   3 variants × 5 states. Min hit target 44×44.
   One primary green per screen.
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: 48px;
  padding: 0 var(--s4);
  font-family: var(--font-label);
  font-size: var(--fs-ui-md);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tr-label);
  line-height: 1;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition:
    filter var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.btn--compact { height: 40px; }
.btn--hero    { height: 56px; padding: 0 var(--s5); }

/* Primary brand button — APEX GREEN fill, black ink.
   Reverted from ink-on-paper 2026-05-18: ink buttons weren't reading against
   the white page surface — visibility win was the call.
   Used in nav, hero CTAs, /intro hero CTA, /404 CTA, and the schedule-teaser. */
.btn-primary {
  background: var(--apex-green);
  color: var(--apex-black);
}
.btn-primary:hover  { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:active { filter: brightness(0.94); transform: translateY(1px); }

/* Accent button — alias for primary, kept so existing markup doesn't break. */
.btn-accent {
  background: var(--apex-green);
  color: var(--apex-black);
}
.btn-accent:hover  { filter: brightness(1.06); transform: translateY(-1px); }
.btn-accent:active { filter: brightness(0.94); transform: translateY(1px); }

/* Optional ink variant — for the rare CTA inside a dark band where green
   competes with the ink background. Use .btn-ink. */
.btn-ink {
  background: var(--apex-black);
  color: var(--apex-white);
}
.btn-ink:hover  { filter: brightness(1.12); transform: translateY(-1px); }
.btn-ink:active { filter: brightness(0.92); transform: translateY(1px); }

/* Secondary (ghost) — transparent fill, ink outline. */
.btn-secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--fg);
}
.btn-secondary:hover  { background: var(--fg); color: var(--bg); }
.btn-secondary:active { transform: translateY(1px); }

/* Text link — bottom underline, no padding. */
.btn-link {
  height: auto;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--fg);
  border-bottom: 1px solid currentColor;
  text-transform: none;
  letter-spacing: 0;
  font-weight: var(--fw-bold);
}

/* Focus — keyboard only, green ring */
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Disabled */
.btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Inverted variants on dark bands */
.on-dark .btn-secondary {
  color: var(--fg-on-dark);
  border-color: var(--apex-ink-16);
}
.on-dark .btn-secondary:hover {
  background: var(--fg-on-dark);
  color: var(--apex-black);
}
.on-dark .btn-link {
  color: var(--fg-on-dark);
  border-bottom-color: var(--apex-ink-16);
}


/* ============================================================
   DARK SECTION CLASS
   Mission band on home, final-CTA band on /intro, footer.
   ============================================================ */
.on-dark {
  background: var(--bg-on-dark);
  color: var(--fg-on-dark);
}
.on-dark h1,
.on-dark h2,
.on-dark h3,
.on-dark h4 { color: var(--fg-on-dark); }
.on-dark p,
.on-dark address,
.on-dark li { color: var(--fg-muted-on-dark); }
.on-dark .eyebrow,
.on-dark .section-label,
.on-dark .cta,
.on-dark .label,
.on-dark .overline { color: var(--accent); }


/* ============================================================
   FAQ EXPANDER — native <details>/<summary>
   Per handoff: 220ms animation, green +/- markers.
   ============================================================ */
details {
  border-top: var(--border-hairline);
  padding: var(--s4) 0;
}
details:last-of-type { border-bottom: var(--border-hairline); }

details summary {
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-text-lg);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: var(--fw-regular);
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 220ms var(--ease);
}
details[open] summary::after { content: "−"; }

details .answer {
  margin-top: var(--s3);
  color: var(--fg-muted);
  font-size: var(--fs-text-sm);
  max-width: 64ch;
}

.on-dark details summary { color: var(--fg-on-dark); }
.on-dark details .answer { color: var(--fg-muted-on-dark); }
.on-dark details { border-top-color: var(--hairline-on-dark); }
.on-dark details:last-of-type { border-bottom-color: var(--hairline-on-dark); }


/* ============================================================
   PLACEHOLDERS — wireframe imagery / labels
   ============================================================ */
.placeholder-image {
  background: var(--bg-raised);
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--fs-ui-md);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: var(--border-hairline);
  text-align: center;
  padding: var(--s3);
}

.placeholder-text {
  color: var(--fg-muted);
  font-family: var(--font-mono);
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
}
.skip-link:focus {
  position: fixed;
  top: var(--s2);
  left: var(--s2);
  padding: var(--s2) var(--s3);
  background: var(--accent);
  color: var(--apex-black);
  border-radius: var(--radius);
}

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


/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
