/* ============================================================
   apex.css — the GoPractice brand, on the APEX only
   ============================================================

   gopractice.eu (marketing pages, login, platform admin dashboard) wears the
   GoPractice palette; a studio subdomain never does (white-label, note 13).
   Two locks keep it there:

   1. templates/base.html.twig links this file only when tenant_is_apex().
   2. Every rule below is scoped under html.is-apex, a class the same layout
      sets only on the apex — so even a stray <link> paints nothing on a studio.
      Turbo never carries the class across: apex ↔ studio is cross-origin, so
      that is always a full page load. Pinned by ApexBrandScopeTest.

   It changes TOKENS, never component rules: .btn--primary still reads
   --color-primary, which is the brand blue here and untouched on a studio,
   where tenant_brand_css() keeps PlatformBrand::PRIMARY as the default.

   Palette — from the logo, plus one navy that is NOT in it (trial, 2026-11-07):
   the logo's sky blue is a fill only: on white it is 2.3:1, so it never colours
   text on a light surface. Every text pairing below is ≥ 4.5:1. */

html.is-apex {
    /* Brand */
    --gp-blue:      #2752F9;   /* logo blue — buttons, links (white text 5.74:1) */
    --gp-blue-700:  #1341F9;   /* hover / pressed (white text 6.66:1) */
    --gp-blue-600:  #3962F9;   /* primary in the dark theme (white text 4.90:1) */
    --gp-sky:       #2DB5FB;   /* the logo's dot — fill only, navy text 7.18:1 */
    --gp-sky-300:   #67CBFB;   /* hover on sky */
    --gp-blue-50:   #E5EDFE;   /* tinted panels */
    --gp-blue-100:  #D2E0FD;   /* selected */
    --gp-blue-200:  #BAD4FB;   /* borders on tint */
    --gp-navy:      #0B1A4D;   /* NOT in the logo: footer, CTA band, sidebar */
    --gp-navy-700:  #16286A;   /* hover on navy */
    --gp-navy-text: #B4BEDD;   /* body text on navy (8.94:1) */
    --gp-navy-dim:  #8C99C8;   /* headings/fine print on navy (5.91:1) */

    /* Platform tokens re-pointed at the brand */
    --color-bg:          #F5F8FF;
    --color-border:      #E1E7F5;
    --color-text:        #0F1B3D;
    --color-text-muted:  #55607A;
    --color-text-subtle: #6B7590;

    --color-nav-bg:          var(--gp-navy);
    --color-nav-text:        var(--gp-navy-text);
    --color-nav-active-bg:   rgba(45, 181, 251, 0.16);
    --color-nav-active-text: #ffffff;

    --color-primary:       var(--gp-blue);
    --color-primary-hover: var(--gp-blue-700);
    --color-on-primary:    #ffffff;

    --color-accent-blue-bg:   var(--gp-blue-50);
    --color-accent-blue-fg:   var(--gp-blue);
    --color-accent-indigo-bg: var(--gp-blue-50);
    --color-accent-indigo-fg: var(--gp-blue);

    --flash-info-bg:     var(--gp-blue-50);
    --flash-info-text:   var(--gp-blue-700);
    --flash-info-border: var(--gp-blue-200);

    /* Wizards (.wiz-root reads var(--wiz-g, <forest green>)) — the admin wizards. */
    --wiz-g:       var(--gp-blue);
    --wiz-g-mid:   var(--gp-blue-700);
    --wiz-g-light: var(--gp-blue-50);

    --shadow-sm: 0 1px 2px rgba(11, 26, 77, 0.06);
    --shadow-md: 0 8px 20px -6px rgba(11, 26, 77, 0.16);
    --shadow-lg: 0 24px 48px -16px rgba(11, 26, 77, 0.30);

    --gp-font: 'Outfit', system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Outfit (self-hosted, css/fonts.css, already linked on every page). */
html.is-apex body {
    font-family: var(--gp-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html.is-apex ::selection {
    background: var(--gp-blue-100);
    color: var(--gp-navy);
}

/* Dark theme (admin dashboard only — dark.css is loaded by dashboard/layout).
   (0,1,2) beats dark.css's body.dark-theme (0,1,1) on specificity, not order. */
html.is-apex body.dark-theme {
    --color-bg:            #0A1230;
    --color-surface:       #111B3F;
    --color-border:        #22305E;
    --color-nav-bg:        #070D24;
    --color-primary:       var(--gp-blue-600);
    --color-primary-hover: var(--gp-blue);
    --color-accent-blue-bg:   #16286A; --color-accent-blue-fg:   #A2BAFC;
    --color-accent-indigo-bg: #16286A; --color-accent-indigo-fg: #A2BAFC;
    background: #0A1230;
}

/* ── Login / password pages ── */
/* Flat ground, no glow (2026-11-07): the card's border carries the edge. */
html.is-apex .page-centered {
    background: var(--color-bg);
}

html.is-apex .auth-card {
    border: 1px solid var(--color-border);
    box-shadow: none;
}

html.is-apex .auth-card__title a:hover {
    color: var(--gp-blue);
}

/* ── Marketing chrome ── */
html.is-apex .site-header {
    background: var(--color-surface);
}

html.is-apex .site-header__brand,
html.is-apex .site-footer__logo {
    font-size: 1.125rem;
    letter-spacing: -0.03em;
}

html.is-apex .site-header__nav a,
html.is-apex .site-header__signin {
    font-weight: 500;
    transition: color var(--transition);
}

html.is-apex .site-header__nav a:hover,
html.is-apex .site-header__signin:hover {
    color: var(--gp-blue);
}

/* Hero: plain surface. The colour is the studio photo behind the example ledger, not a
   gradient wash (2026-11-07; the light-blue offset block gave way to the photo 2026-11-18). */
html.is-apex .site-section--hero {
    background: var(--color-surface);
}

/* The hero card is a link (2026-11-18): its "See what happens next" line and its hover border
   in the brand blue, like every other link on the apex. */
html.is-apex .site-ledger__more {
    color: var(--gp-blue);
}

html.is-apex .site-hero__figure:hover .site-ledger__head,
html.is-apex .site-hero__figure:hover .site-ledger__rows,
html.is-apex .site-hero__figure:hover .site-ledger__more {
    border-color: var(--gp-blue);
}

html.is-apex .site-hero__figure:focus-visible .site-ledger {
    outline-color: var(--gp-blue);
}

/* The member-pays step of the homepage story: the logo's sky on a navy ring. */
html.is-apex .site-timeline__item--key::after {
    background: var(--gp-sky);
    box-shadow: 0 0 0 3px var(--gp-navy);
}

html.is-apex .site-hero__title,
html.is-apex .site-section__title {
    color: var(--gp-navy);
}

html.is-apex .btn--lg {
    border-radius: 10px;
}

html.is-apex .btn--outline {
    color: var(--gp-navy);
    box-shadow: inset 0 0 0 1px var(--gp-blue-200);
}

html.is-apex .btn--outline:hover {
    background: var(--gp-blue-50);
}

/* The 0% commission band, in the brand tint rather than green. */
html.is-apex .site-claim {
    background: var(--gp-blue-50);
    border-color: var(--gp-blue-100);
}

html.is-apex .site-claim__figure {
    color: var(--gp-blue);
}

html.is-apex .site-claim__note {
    border-left-color: var(--gp-sky);
}

html.is-apex .site-price--featured {
    border-color: var(--gp-blue);
    box-shadow: 0 0 0 1px var(--gp-blue);
}

/* Closing band: solid navy, with the logo's sky button as the one bright thing on it. */
html.is-apex .site-section--cta {
    background: var(--gp-navy);
    color: #ffffff;
}

html.is-apex .site-cta__lead {
    color: var(--gp-navy-text);
}

html.is-apex .site-cta__button {
    background: var(--gp-sky);
    color: var(--gp-navy);
}

html.is-apex .site-cta__button:hover {
    background: var(--gp-sky-300);
}

/* Footer: navy. */
html.is-apex .site-footer {
    background: var(--gp-navy);
    border-top: 0;
    color: var(--gp-navy-text);
}

html.is-apex .site-footer__logo {
    color: #ffffff;
}

html.is-apex .site-footer__tagline,
html.is-apex .site-footer__col,
html.is-apex .site-footer__legal {
    color: var(--gp-navy-text);
}

html.is-apex .site-footer__col a:hover,
html.is-apex .site-footer__social-link:focus-visible {
    color: #ffffff;
}

html.is-apex .site-footer__heading,
html.is-apex .site-footer__fineprint {
    color: var(--gp-navy-dim);
}

html.is-apex .site-footer__legal {
    border-top-color: rgba(255, 255, 255, 0.12);
}
