/**
 * IB Math Master — Course Landing Pages
 * Shared across: AI HL, AI SL, AA HL, AA SL
 *
 * DEPENDS ON: tokens.css, shared.css
 * REUSES: .ib-container, .ib-section, .ib-section-light, .ib-section-bordered,
 *         .ib-btn, .ib-btn-white, .ib-btn-primary, .ib-btn-outline-white,
 *         .ib-btn-lg, .ib-btn-group, .ib-eyebrow, .ib-hero-centered,
 *         .ib-cta, .ib-cta-content
 *
 * PREFIX: cl- (course landing)
 */


/* =========================================
   HERO
   ========================================= */

.cl-hero {
    background: var(--ib-navy);
    overflow: hidden;
    padding: 72px 0 56px;
    position: relative;
    text-align: center;
}

.cl-hero::before {
    background: radial-gradient(ellipse at 20% 10%, rgba(56, 189, 248, 0.14) 0%, transparent 55%);
    content: '';
    height: 100%;
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
}

.cl-hero::after {
    background: radial-gradient(ellipse at 80% 90%, rgba(99, 102, 241, 0.09) 0%, transparent 50%);
    content: '';
    height: 100%;
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
}


/* =========================================
   HERO — Decorative Orbs
   ========================================= */

.cl-hero-orb {
    border-radius: var(--ib-radius-circle);
    filter: blur(80px);
    pointer-events: none;
    position: absolute;
}

.cl-hero-orb-1 {
    background: rgba(56, 189, 248, 0.16);
    height: 520px;
    left: -14%;
    top: -30%;
    width: 520px;
}

.cl-hero-orb-2 {
    background: rgba(99, 102, 241, 0.1);
    bottom: -35%;
    height: 420px;
    right: -10%;
    width: 420px;
}

.cl-hero-orb-3 {
    background: rgba(56, 189, 248, 0.06);
    height: 220px;
    right: 22%;
    top: 20%;
    width: 220px;
}


/* =========================================
   HERO — Typography
   ========================================= */

.cl-hero h1 {
    color: var(--ib-white);
    font-size: clamp(36px, 5.5vw, 54px);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: var(--ib-space-14);
}

.cl-hero-highlight {
    color: var(--ib-accent);
}

.cl-hero-sub {
    color: rgba(255, 255, 255, 0.75);
    font-size: clamp(15px, 2vw, 17px);
    line-height: 1.7;
    margin: 0 auto var(--ib-space-14);
    max-width: 580px;
}

.cl-hero-qualifier {
    color: var(--ib-accent);
    font-size: var(--ib-font-size-sm);
    font-weight: 600;
    margin: 0 auto var(--ib-space-28);
}


/* =========================================
   HERO — Stats Bar
   ========================================= */

.cl-hero-stats {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: var(--ib-space-40);
    justify-content: center;
    margin: var(--ib-space-32) auto 0;
    max-width: 480px;
    padding-top: var(--ib-space-24);
}

.cl-hero-stat {
    text-align: center;
}

.cl-hero-stat-num {
    color: var(--ib-accent);
    font-size: var(--ib-font-size-3xl);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1;
}

.cl-hero-stat-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: var(--ib-font-size-xs);
    font-weight: 500;
    margin-top: var(--ib-space-4);
}


/* =========================================
   DEMANDS — Header
   ========================================= */

.cl-demands-header {
    margin: 0 auto var(--ib-space-48);
    max-width: 700px;
    text-align: center;
}

.cl-demands-header h2 {
    color: var(--ib-navy);
    font-size: clamp(26px, 3.5vw, 34px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: var(--ib-space-14);
}

.cl-demands-header p {
    color: var(--ib-text-secondary);
    font-size: var(--ib-font-size-md);
    line-height: 1.75;
}


/* =========================================
   DEMANDS — Card Grid
   ========================================= */

.cl-demands-grid {
    display: grid;
    gap: var(--ib-space-20);
    grid-template-columns: 1fr 1fr;
    margin: 0 auto;
    max-width: 880px;
}

.cl-demand-card {
    background: var(--ib-white);
    border: 1px solid var(--ib-border);
    border-radius: var(--ib-radius-md);
    padding: var(--ib-space-32) var(--ib-space-28);
    position: relative;
    transition: box-shadow var(--ib-transition), transform var(--ib-transition);
}

.cl-demand-card::before {
    background: linear-gradient(180deg, var(--ib-accent-hover), var(--ib-accent));
    border-radius: var(--ib-radius-md) 0 0 var(--ib-radius-md);
    content: '';
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 4px;
}

.cl-demand-card:hover {
    box-shadow: var(--ib-shadow-lg);
    transform: translateY(-4px);
}

.cl-demand-num {
    color: var(--ib-accent-hover);
    font-size: var(--ib-font-size-xs);
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: var(--ib-space-10);
    padding-left: var(--ib-space-6);
    text-transform: uppercase;
}

.cl-demand-card h3 {
    color: var(--ib-navy);
    font-size: var(--ib-font-size-body);
    font-weight: 700;
    margin-bottom: var(--ib-space-10);
    padding-left: var(--ib-space-6);
}

.cl-demand-card p {
    color: var(--ib-text-secondary);
    font-size: var(--ib-font-size-base);
    line-height: 1.75;
    padding-left: var(--ib-space-6);
}


/* =========================================
   MID CTA — Compact Conversion Card
   ========================================= */

.cl-mid-cta {
    padding: 0 0 var(--ib-section-pad);
}

.cl-mid-cta-card {
    align-items: center;
    background: var(--ib-light);
    border: 2px solid var(--ib-border);
    border-radius: var(--ib-radius-lg);
    display: flex;
    gap: var(--ib-space-32);
    justify-content: space-between;
    margin: 0 auto;
    max-width: 880px;
    padding: var(--ib-space-36) var(--ib-space-40);
}

.cl-mid-cta-text h3 {
    color: var(--ib-navy);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: var(--ib-space-6);
}

.cl-mid-cta-text p {
    color: var(--ib-text-muted);
    font-size: var(--ib-font-size-base);
    line-height: 1.6;
}

.cl-mid-cta-actions {
    flex-shrink: 0;
    text-align: center;
}

.cl-mid-cta-link {
    color: var(--ib-accent-hover);
    display: block;
    font-size: var(--ib-font-size-sm);
    font-weight: 600;
    margin-top: var(--ib-space-12);
    transition: color var(--ib-transition-fast);
}

.cl-mid-cta-link:hover {
    color: var(--ib-navy);
}


/* =========================================
   PROOF — Inner Wrapper
   ========================================= */

.cl-proof-inner {
    margin: 0 auto;
    max-width: 880px;
}


/* =========================================
   TESTIMONIAL — Review Card
   ========================================= */

.cl-testimonial {
    background: var(--ib-white);
    border: 1px solid var(--ib-border);
    border-radius: var(--ib-radius-lg);
    box-shadow: 0 4px 24px rgba(14, 165, 233, 0.06);
    margin-bottom: var(--ib-space-56);
    padding: var(--ib-space-40) var(--ib-space-40) var(--ib-space-36);
}

.cl-testimonial-label {
    align-self: flex-start;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: var(--ib-radius-pill);
    color: var(--ib-accent-hover);
    display: inline-flex;
    font-size: var(--ib-font-size-xs);
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: var(--ib-space-20);
    padding: var(--ib-space-6) var(--ib-space-16);
    text-transform: uppercase;
}

.cl-testimonial-body {
    display: flex;
    flex-direction: column;
    gap: var(--ib-space-16);
}

.cl-testimonial-quote {
    color: var(--ib-text);
    font-size: var(--ib-font-size-md);
    line-height: 1.8;
}

.cl-testimonial-divider {
    background: linear-gradient(90deg, var(--ib-accent-hover), var(--ib-accent));
    border: none;
    height: 2px;
    margin: var(--ib-space-4) 0;
    width: 48px;
}

.cl-testimonial-meta {
    align-items: baseline;
    display: flex;
    gap: var(--ib-space-8);
}

.cl-testimonial-name {
    color: var(--ib-navy);
    font-size: var(--ib-font-size-base);
    font-weight: 700;
}

.cl-testimonial-detail {
    color: var(--ib-text-secondary);
    font-size: var(--ib-font-size-sm);
    font-weight: 600;
}


/* =========================================
   ASSESSMENT — Cards
   ========================================= */

.cl-assess-heading {
    color: var(--ib-navy);
    font-size: clamp(26px, 3.5vw, 34px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: var(--ib-space-40);
    text-align: center;
}

.cl-assess-grid {
    display: grid;
    gap: var(--ib-space-20);
    grid-template-columns: repeat(4, 1fr);
    margin: 0 auto var(--ib-space-36);
    max-width: 880px;
}

.cl-assess-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cl-assess-card {
    background: var(--ib-white);
    border: 1px solid var(--ib-border);
    border-radius: var(--ib-radius-md);
    overflow: hidden;
    padding: var(--ib-space-28) var(--ib-space-20);
    position: relative;
    transition: box-shadow var(--ib-transition), transform var(--ib-transition);
}

.cl-assess-card::before {
    background: linear-gradient(90deg, var(--ib-accent-hover), var(--ib-accent));
    content: '';
    height: 3px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.cl-assess-card:hover {
    box-shadow: var(--ib-shadow-lg);
    transform: translateY(-4px);
}

.cl-assess-pct {
    color: var(--ib-accent-hover);
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: var(--ib-space-6);
}

.cl-assess-name {
    color: var(--ib-navy);
    font-size: var(--ib-font-size-base);
    font-weight: 700;
    margin-bottom: var(--ib-space-16);
}

.cl-assess-meta {
    border-top: 1px solid var(--ib-border);
    padding-top: var(--ib-space-14);
}

.cl-assess-duration {
    color: var(--ib-text);
    font-size: var(--ib-font-size-sm);
    font-weight: 600;
    margin-bottom: var(--ib-space-2);
}

.cl-assess-detail {
    color: var(--ib-text-muted);
    font-size: var(--ib-font-size-sm);
    font-weight: 500;
}


/* =========================================
   SYLLABUS LINK
   ========================================= */

.cl-syl-link {
    color: var(--ib-text-muted);
    font-size: var(--ib-font-size-base);
    text-align: center;
}

.cl-syl-link a {
    color: var(--ib-accent-hover);
    font-weight: 600;
    transition: color var(--ib-transition-fast);
}

.cl-syl-link a:hover {
    color: var(--ib-navy);
}


/* =========================================
   RESPONSIVE — 768px
   ========================================= */

@media (max-width: 768px) {
    .cl-hero {
        padding: 56px 0 52px;
    }

    /* FIX: Eyebrow more visible on mobile hero */
    .cl-hero .ib-eyebrow {
        background: rgba(56, 189, 248, 0.18);
        border-color: rgba(56, 189, 248, 0.35);
        font-size: 11px;
        margin-bottom: var(--ib-space-16);
    }

    /* FIX: Outline button clearly visible on navy */
    .cl-hero .ib-btn-outline-white {
        background: rgba(255, 255, 255, 0.06);
        border-color: rgba(255, 255, 255, 0.5);
    }

    /* FIX: Stats stay horizontal, compact layout */
    .cl-hero-stats {
        gap: var(--ib-space-20);
        max-width: 100%;
    }

    .cl-hero-stat-num {
        font-size: var(--ib-font-size-xl);
    }

    .cl-hero-stat-label {
        font-size: 11px;
    }

    .cl-demands-grid {
        grid-template-columns: 1fr;
    }

    .cl-mid-cta {
        padding: 0 0 56px;
    }

    .cl-mid-cta-card {
        flex-direction: column;
        gap: var(--ib-space-20);
        padding: var(--ib-space-28) var(--ib-space-24);
        text-align: center;
    }

    .cl-testimonial {
        padding: var(--ib-space-28) var(--ib-space-24);
    }

    .cl-testimonial-meta {
        flex-wrap: wrap;
    }

    .cl-assess-grid,
    .cl-assess-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =========================================
   RESPONSIVE — 480px
   ========================================= */

@media (max-width: 480px) {
    .cl-assess-grid,
    .cl-assess-grid-3 {
        grid-template-columns: 1fr;
    }

    /* FIX: Stats remain horizontal at small screens */
    .cl-hero-stats {
        gap: var(--ib-space-16);
    }

    .cl-hero-stat-num {
        font-size: var(--ib-font-size-lg);
    }

    .cl-hero-stat-label {
        font-size: 10px;
    }
}
