/* =============================================================================
 *  fmi-theme-ext.css
 *  Shared design tokens & primitives for FMI page templates and plugin output.
 *
 *  Load this BEFORE any page-specific styles. In functions.php:
 *
 *      add_action( 'wp_enqueue_scripts', function () {
 *          wp_enqueue_style(
 *              'fmi-theme-ext',
 *              get_stylesheet_directory_uri() . '/fmi-theme-ext.css',
 *              [],
 *              '1.0.0'
 *          );
 *      });
 *
 *  Page templates (.afm-landing-page, .afm-thank-you, etc.) consume these
 *  variables via var(--fmi-*) and define ONLY their own layout no more
 *  local re-declarations of brand colors.
 * ============================================================================= */

:root {

    /* Brand colors */
    --fmi-night-sky:    #222B39;  /* primary dark / brand navy */
    --fmi-golden-hour:  #EBD181;  /* light gold (gradient stops, accents) */
    --fmi-highlight:    #E0A94A;  /* primary accent gold */
    --fmi-afm-green:    #6D9D4C;  /* register / buy CTA */
    --fmi-jade:         #52908B;  /* reserved secondary brand */
    --fmi-border-navy:  #13325D;  /* deep border accent */

    /* Neutrals */
    --fmi-white:        #FFFFFF;
    --fmi-black:        #000000;
    --fmi-greyne:       #F6F6F4;  /* off-white surface */
    --fmi-rule:         #E5E4DE;  /* hairline on light bg */
    --fmi-rule-soft:    #EEEEEA;
    --fmi-rule-dark:    rgba(255,255,255,0.18);  /* hairline on dark bg */
    --fmi-muted:        #8B8F97;  /* tertiary text */
    --fmi-ink:          #3F4858;  /* secondary body text */

    /* Status */
    --fmi-success-bg:   #EAF5EE;
    --fmi-success-ink:  #1F6B3A;
    --fmi-info-bg:      #E1F5FE;
    --fmi-info-ink:     #0277BD;

    /* Typography */
    --fmi-font-display: 'EB Garamond', Georgia, serif;
    --fmi-font-body:    'Lato', 'Helvetica Neue', Arial, sans-serif;

    /* Radii & shadows  */
    --fmi-radius-sm:    4px;
    --fmi-radius-md:    6px;
    --fmi-radius-lg:    8px;
    --fmi-radius-pill:  999px;
    --fmi-shadow-card:  0 4px 20px rgba(0,0,0,0.06);
    --fmi-shadow-lift:  0 14px 36px -18px rgba(0,0,0,0.20);
    --fmi-shadow-mock:  0 30px 60px -30px rgba(25,31,44,0.25);
}


/* =============================================================================
 *  BUTTON SYSTEM
 *  Reusable button shape; modifier classes pick the role.
 *
 *     .fmi-btn                  base
 *     .fmi-btn--green           primary "Register / Buy"   (green)
 *     .fmi-btn--navy            primary "Continue / Access" (post-purchase)
 *     .fmi-btn--ghost           secondary on dark backgrounds
 *     .fmi-btn--outline-dark    secondary on light backgrounds
 *     .fmi-btn--block           full-width
 *
 *  Semantic distinction worth preserving:
 *     green = "I'm buying"
 *     navy  = "I've bought, take me in"
 * ============================================================================= */

.fmi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--fmi-font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: var(--fmi-radius-sm);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease,
                border-color 0.2s ease, color 0.2s ease;
}
.fmi-btn:hover { transform: translateY(-1px); }
.fmi-btn:focus-visible {
    outline: 2px solid var(--fmi-highlight);
    outline-offset: 2px;
}

.fmi-btn--green {
    background: var(--fmi-afm-green);
    color: var(--fmi-white);
}
.fmi-btn--green:hover {
    background: #5E8A40;
    color: var(--fmi-white);
}

.fmi-btn--navy {
    background: var(--fmi-night-sky);
    color: var(--fmi-white);
    box-shadow:
        inset 0 1px 0 var(--fmi-golden-hour),
        0 8px 24px rgba(0,0,0,0.18);
    padding: 18px 28px;
    font-size: 15px;
}
.fmi-btn--navy:hover {
    background: #1A2230;
    color: var(--fmi-white);
}

.fmi-btn--ghost {
    background: transparent;
    color: var(--fmi-white);
    border-color: rgba(255,255,255,0.25);
    font-weight: 400;
}
.fmi-btn--ghost:hover {
    border-color: rgba(255,255,255,0.6);
    color: var(--fmi-white);
}

.fmi-btn--outline-dark {
    background: transparent;
    color: var(--fmi-night-sky);
    border-color: rgba(34,43,57,0.25);
}
.fmi-btn--outline-dark:hover {
    border-color: var(--fmi-night-sky);
}

.fmi-btn--block { width: 100%; }


/* =============================================================================
 *  PASSWORD RESET CARD SYSTEM
 *  Used by [moodle_password_reset_button] once the shortcode is refactored
 *  to emit classes instead of inline styles (see the convergence notes).
 *  Each modifier matches one of the three scenarios the shortcode handles.
 *
 *     .fmi-pw-card                 Scenario A - link is live (happy path)
 *     .fmi-pw-card.is-info         Scenario B - webhook still working (race)
 *     .fmi-pw-card.is-warn         Scenario C - link expired
 * ============================================================================= */

.fmi-pw-card {
    background: var(--fmi-greyne);
    border: 1px solid var(--fmi-rule);
    border-radius: var(--fmi-radius-lg);
    padding: 28px;
    font-family: var(--fmi-font-body);
    color: var(--fmi-night-sky);
}
.fmi-pw-card__title {
    font-family: var(--fmi-font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--fmi-night-sky);
    margin: 0 0 8px;
    line-height: 1.2;
}
.fmi-pw-card__lede {
    font-size: 15px;
    line-height: 1.55;
    color: var(--fmi-ink);
    margin: 0 0 20px;
}
.fmi-pw-card__cta {     /* combine with .fmi-btn .fmi-btn--navy in markup */
    margin-bottom: 14px;
}
.fmi-pw-card__note {
    font-size: 13px;
    color: var(--fmi-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.fmi-pw-card__note strong {
    color: var(--fmi-highlight);
    font-weight: 700;
}

.fmi-pw-card.is-info {
    background: var(--fmi-info-bg);
    border-color: #B3E5FC;
}
.fmi-pw-card.is-info .fmi-pw-card__title {
    color: var(--fmi-info-ink);
}

.fmi-pw-card.is-warn {
    background: var(--fmi-greyne);
    border-left: 4px solid var(--fmi-highlight);
}


/* =============================================================================
 *  SHARED UTILITIES
 *  Small pieces that appear in every section across the design system.
 * ============================================================================= */

/* The 11px / 700 / uppercase / wide-letter-spacing label that opens every
   section in the AFM family. */
.fmi-eyebrow {
    font-family: var(--fmi-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fmi-night-sky);
}
.fmi-eyebrow--gold  { color: var(--fmi-highlight); }
.fmi-eyebrow--muted { color: var(--fmi-muted); }

/* 48 × 3 gold rule used under section headlines. */
.fmi-rule-accent {
    width: 48px;
    height: 3px;
    background: var(--fmi-highlight);
    margin: 16px 0 28px;
    border: 0;
}

/* Confirmation pill used on the thank-you page. */
.fmi-pill-success {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--fmi-success-bg);
    color: var(--fmi-success-ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: var(--fmi-radius-sm);
}
