/**
 * Gymnastics Plus — Site-wide Base Layer (gp-base)
 *
 * WS-2 Phase 1 (ADDITIVE). First-party base reset that will REPLACE the Kadence
 * parent's base CSS at the Phase 2 cutover. Unlike gp-core.css (which is scoped to
 * body.gp-app and only enqueued on page-template / gymnast_profile routes), this is
 * loaded UNSCOPED on EVERY page so non-template routes (default Pages, blog single,
 * archives, search, 404, the Kadence-block pages) get a first-party base.
 *
 * Authored to MIRROR Kadence's base (kadence/assets/css/all.min.css + Kadence's
 * system-font defaults, theme typography mods are unset) so that — with the parent
 * still enqueued in Phase 1 — this layers on top with NO visible change on pages
 * that already render styled. Pages that currently render bare (search, 404, the
 * abandoned podcast/founding-members block pages) may GAIN this base; that is the
 * expected, signed-off improvement, not a regression.
 *
 * Font is Poppins, loaded site-wide via the gp-fonts-poppins enqueue (WS-2 Phase 5 —
 * the first time Poppins is actually loaded anywhere; before this, Poppins declarations
 * silently fell back to the system stack). The system stack remains the fallback below.
 *
 * BASE ONLY. No component/layout/page styles — those live in gp-core.css and the
 * per-page stylesheets.
 *
 * @package Gymnastics_Plus
 */

/* Heading-scale tokens (WS-2.5 Task 4) — the structured Poppins ramp, defined ONCE here and
   consumed by the bare h1–h6 below AND by per-surface heading classes (portal/profile/single)
   so the scale lives in one place. Values mirror the Phase-5b scale, so this layer is
   byte-identical. Names are collision-free (taken: --gp-text-*, --gp-font, --gp-gray-*). Colors
   stay here for gp-base's own headings; surface COLOR unification is deferred to the
   --gp-color-* semantic layer (Task 6). */
:root {
    --gp-h1-size: 32px; --gp-h1-line: 1.15; --gp-h1-weight: 700; --gp-h1-tracking: -0.02em;  --gp-h1-color: #1A202C;
    --gp-h2-size: 28px; --gp-h2-line: 1.2;  --gp-h2-weight: 700; --gp-h2-tracking: -0.015em; --gp-h2-color: #1A202C;
    --gp-h3-size: 24px; --gp-h3-line: 1.25; --gp-h3-weight: 600; --gp-h3-tracking: -0.01em;  --gp-h3-color: #1A202C;
    --gp-h4-size: 22px; --gp-h4-line: 1.3;  --gp-h4-weight: 600; --gp-h4-tracking: -0.01em;  --gp-h4-color: #2D3748;
    --gp-h5-size: 20px; --gp-h5-line: 1.35; --gp-h5-weight: 600; --gp-h5-tracking: normal;   --gp-h5-color: #2D3748;
    --gp-h6-size: 18px; --gp-h6-line: 1.4;  --gp-h6-weight: 600; --gp-h6-tracking: normal;   --gp-h6-color: #4A5568;
}

/* ============================================================================
   COLOR TOKEN SYSTEM (WS-2.5 Task 6, Phase 1) — 3-tier, site-wide, dark-ready.
   Defined HERE in gp-base (loaded on EVERY page), not gp-core.css (which is
   scoped to .gp-app templates and only enqueued on some routes). ADDITIVE: in
   this phase NOTHING consumes these tokens, so light mode is byte-identical —
   this just establishes the seam. Tier-1 values mirror gp-core.css :root exactly;
   on .gp-app pages both files define them to the SAME values (no conflict).
   Later phases delete the ~24 local --gp-gold forks and repoint surfaces onto
   the Tier-2 semantics; the #1A202C/#171717 text reconciliation + the
   --gp-text-primary collision are folded in at the consume phase (Phase 3).
   ============================================================================ */
:root {
    /* Tier 1 — PRIMITIVES (raw palette; the ONLY place raw hex lives) */
    --gp-white: #ffffff;
    --gp-black: #000000;
    --gp-gray-50: #fafafa;
    --gp-gray-100: #f5f5f5;
    --gp-gray-200: #e5e5e5;
    --gp-gray-300: #d4d4d4;
    --gp-gray-400: #a3a3a3;
    --gp-gray-500: #737373;
    --gp-gray-600: #525252;
    --gp-gray-700: #404040;
    --gp-gray-800: #262626;
    --gp-gray-900: #171717;
    --gp-gold: #DFB859;
    --gp-gold-hover: #c9a64e;
    --gp-gold-light: rgba(223, 184, 89, 0.1);
    --gp-purple-400: #a855f7;
    --gp-purple-500: #7c3aed;
    --gp-purple-600: #6d28d9;
    --gp-success: #22c55e;
    --gp-error: #ef4444;
    --gp-warning: #f59e0b;
    --gp-info: #3b82f6;

    /* Tier 2 — SEMANTICS (--gp-color-*; the seam for one-place color + dark mode).
       Every value maps to a Tier-1 primitive, so light mode is byte-identical. */
    --gp-color-bg: var(--gp-gray-100);
    --gp-color-surface: var(--gp-white);
    --gp-color-surface-2: var(--gp-gray-50);
    --gp-color-text: var(--gp-gray-900);
    --gp-color-text-muted: var(--gp-gray-500);
    --gp-color-text-inverse: var(--gp-white);
    --gp-color-border: var(--gp-gray-200);
    --gp-color-border-strong: var(--gp-gray-300);
    --gp-color-primary: var(--gp-gray-900);        /* neutral default action */
    --gp-color-on-primary: var(--gp-white);
    --gp-color-accent: var(--gp-gold);             /* gold accent */
    --gp-color-accent-hover: var(--gp-gold-hover);
    --gp-color-on-accent: var(--gp-gray-900);
    --gp-cta: var(--gp-gold);                       /* KEY CTA = gold */
    --gp-cta-on: var(--gp-gray-900);
    --gp-cta-premium: linear-gradient(135deg, var(--gp-purple-500), var(--gp-purple-400)); /* checkout/membership */
    --gp-cta-premium-on: var(--gp-white);
    --gp-color-success: var(--gp-success);
    --gp-color-danger: var(--gp-error);
    --gp-color-warning: var(--gp-warning);
    --gp-color-info: var(--gp-info);
    --gp-color-focus: var(--gp-gold);
    --gp-color-shadow: rgba(0, 0, 0, 0.08);

    /* Tier 3 — COMPONENT tokens (resolve to Tier-2; re-skin a component in one line) */
    --gp-btn-bg: var(--gp-color-primary);
    --gp-btn-on: var(--gp-color-on-primary);
    --gp-card-bg: var(--gp-color-surface);
}

/* Dark mode — redefine Tier-2 ONLY (Tier-1 + every component rule stay byte-identical).
   INERT until a surface opts in via [data-theme="dark"]; the user toggle ships in a later phase. */
[data-theme="dark"] {
    --gp-color-bg: var(--gp-gray-900);
    --gp-color-surface: var(--gp-gray-800);
    --gp-color-surface-2: var(--gp-gray-700);
    --gp-color-text: var(--gp-gray-50);
    --gp-color-text-muted: var(--gp-gray-400);
    --gp-color-text-inverse: var(--gp-gray-900);
    --gp-color-border: var(--gp-gray-700);
    --gp-color-border-strong: var(--gp-gray-600);
    --gp-color-primary: var(--gp-gold);            /* on dark, primary goes gold */
    --gp-color-on-primary: var(--gp-gray-900);
    --gp-color-shadow: rgba(0, 0, 0, 0.4);
}

/* Box-sizing — matches Kadence: html{box-sizing:border-box} *{box-sizing:inherit} */
html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

/* Body base — Poppins (loaded site-wide via gp-fonts-poppins), system stack as fallback */
body {
    margin: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
        Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1A202C; /* Kadence "Strongest text" (palette3) */
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Media — matches Kadence: img{display:block;height:auto;max-width:100%} */
img {
    display: block;
    height: auto;
    max-width: 100%;
}

/* Headings — tight, structured scale tuned for Poppins (WS-2 Phase 5b).
   Owner-preferred compact sizes (h1 32 / h2 28 / h3 24 — the original Kadence sizes) with
   the modern treatment layered on, so they read STRUCTURED rather than shrunk:
     • TIGHT, descending line-heights (1.15 → 1.4) instead of the old uniform loose 1.5;
     • a WEIGHT LADDER — 700 for display h1/h2, 600 (semibold) for h3–h6, body stays 400;
     • slight NEGATIVE letter-spacing on the display sizes so Poppins reads crisp, not airy.
   Bare element selectors keep low specificity so per-page/block CSS still overrides.
   Colors retain the Phase-4 palette (palette3/4/5). WS-2.5 Task 4 TOKENIZED this — the values now
   live in the :root block at the top of this file; the rules below consume them. */
h1, h2, h3, h4, h5, h6 {
    padding: 0;
    margin: 0;
}
h1 { font-size: var(--gp-h1-size); line-height: var(--gp-h1-line); font-weight: var(--gp-h1-weight); letter-spacing: var(--gp-h1-tracking); color: var(--gp-h1-color); } /* palette3 */
h2 { font-size: var(--gp-h2-size); line-height: var(--gp-h2-line); font-weight: var(--gp-h2-weight); letter-spacing: var(--gp-h2-tracking); color: var(--gp-h2-color); }
h3 { font-size: var(--gp-h3-size); line-height: var(--gp-h3-line); font-weight: var(--gp-h3-weight); letter-spacing: var(--gp-h3-tracking); color: var(--gp-h3-color); }
h4 { font-size: var(--gp-h4-size); line-height: var(--gp-h4-line); font-weight: var(--gp-h4-weight); letter-spacing: var(--gp-h4-tracking); color: var(--gp-h4-color); } /* palette4 */
h5 { font-size: var(--gp-h5-size); line-height: var(--gp-h5-line); font-weight: var(--gp-h5-weight); color: var(--gp-h5-color); }
h6 { font-size: var(--gp-h6-size); line-height: var(--gp-h6-line); font-weight: var(--gp-h6-weight); color: var(--gp-h6-color); } /* palette5 */

/* Flow elements — mirror Kadence base spacing */
p {
    margin: 0 0 1.5em;
}
hr {
    height: 0;
    border: 0;
    border-bottom: 2px solid #e5e5e5;
}
ul, ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}
ul { list-style: disc; }
ol { list-style: decimal; }
li > ul, li > ol {
    margin-bottom: 0;
    margin-left: 1.5em;
}
dt { font-weight: 700; }
dd { margin: 0 1.5em 1.5em; }
figure { margin: 0.5em 0; }
table {
    width: 100%;
    margin: 0 0 1.5em;
}

/* Links — concrete gold (Kadence: a{color:var(--global-palette-highlight)} = accent) */
a {
    color: #dba617;
    text-underline-offset: 0.1em;
    transition: color 0.1s linear;
}
a:hover, a:focus, a:active {
    color: #c9a200;
    text-underline-offset: 0.25em;
}

/* Forms & buttons — inherit type, sane normalization */
button, input, select, textarea {
    font: inherit;
    color: inherit;
}
button {
    cursor: pointer;
}
