/**
 * TeacherAI How It Works Page Styles — "The Golden Egg"
 * Location: /wp-content/plugins/teacherai-simple/assets/css/how-it-works.css
 * 
 * @package TeacherAI
 * @version 1.0.0
 * @author Claude 290 - TEAM TEACHAI (design + content)
 * @author Claude 291 - TEAM TEACHAI (implementation)
 * @date February 13, 2026
 * 
 * PURPOSE: Complete styling for the golden egg How It Works page.
 * Three-act structure: Input → What AI Did → Output
 * Progressive reveal via IntersectionObserver (JS in how-it-works.js)
 * 
 * REPLACES: The old .hiw-* styles in home-page.css (lines 982-1223)
 * Those are now dead CSS and should be cleaned up in a future session.
 * 
 * CLAUDE FIRST: This file owns ALL How It Works page styles.
 * Shared marketing styles (header, footer, buttons, CTA) remain in home-page.css.
 * 
 * NOTE: The .features-hero class is shared with Features page (home-page.css).
 * We use .hiw-hero for this page's hero to avoid conflicts.
 */

/* =============================================
   CSS VARIABLES — Golden Egg Palette
   ============================================= */
:root {
    --hiw-purple-deep: #6B21A8;
    --hiw-purple-mid: #7C3AED;
    --hiw-purple-light: #EDE9FE;
    --hiw-purple-glow: #A78BFA;
    --hiw-gold-warm: #F59E0B;
    --hiw-gold-light: #FEF3C7;
    --hiw-slate-900: #0F172A;
    --hiw-slate-700: #334155;
    --hiw-slate-500: #64748B;
    --hiw-slate-300: #CBD5E1;
    --hiw-slate-100: #F1F5F9;
    --hiw-green-deep: #059669;
    --hiw-green-light: #ECFDF5;
    --hiw-font-display: 'Source Serif 4', Georgia, serif;
    --hiw-font-body: 'DM Sans', -apple-system, sans-serif;
}

/* =============================================
   HERO — Dark gradient with pill tag
   ============================================= */
.hiw-hero {
    background: linear-gradient(135deg, var(--hiw-slate-900) 0%, #1E1044 50%, var(--hiw-purple-deep) 100%);
    padding: 128px 24px 72px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hiw-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 70%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(167, 139, 250, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.hiw-hero-tag {
    display: inline-block;
    font-family: var(--hiw-font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--hiw-purple-glow);
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 24px;
    padding: 6px 20px;
    margin-bottom: 24px;
    position: relative;
}

.hiw-hero h1 {
    font-family: var(--hiw-font-display);
    font-size: clamp(36px, 5.5vw, 56px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 20px;
    position: relative;
}

.hiw-hero p {
    font-family: var(--hiw-font-body);
    font-size: 19px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 520px;
    margin: 0 auto;
    position: relative;
    line-height: 1.6;
}

/* =============================================
   SHARED CONTAINER
   ============================================= */
.hiw-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   ACT LABELS — Shared across all three acts
   ============================================= */
.hiw-act-label {
    font-family: var(--hiw-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--hiw-purple-mid);
    margin-bottom: 12px;
}

/* =============================================
   ACT 1 — What a Teacher Typed
   ============================================= */
.hiw-act-1 {
    padding: 80px 24px 64px;
    background: #ffffff;
}

.hiw-act-1 h2 {
    font-family: var(--hiw-font-display);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    color: var(--hiw-slate-900);
    margin: 0 0 16px;
    line-height: 1.2;
}

.hiw-act-1 .hiw-context {
    font-family: var(--hiw-font-body);
    font-size: 17px;
    color: var(--hiw-slate-500);
    margin: 0 0 36px;
    max-width: 640px;
    line-height: 1.7;
}

/* Builder mockup — styled to resemble the actual Lesson Builder */
.hiw-builder-mockup {
    background: #ffffff;
    border: 1px solid var(--hiw-slate-300);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.hiw-builder-header {
    background: var(--hiw-slate-100);
    padding: 14px 20px;
    border-bottom: 1px solid var(--hiw-slate-300);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hiw-builder-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hiw-slate-300);
}

.hiw-builder-header span {
    font-family: var(--hiw-font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--hiw-slate-500);
    letter-spacing: 0.5px;
}

.hiw-builder-body {
    padding: 28px 24px;
}

.hiw-builder-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.hiw-builder-tag {
    font-family: var(--hiw-font-body);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    background: var(--hiw-purple-light);
    color: var(--hiw-purple-deep);
}

.hiw-builder-tag.hiw-tag-grade {
    background: var(--hiw-green-light);
    color: var(--hiw-green-deep);
}

.hiw-builder-tag.hiw-tag-duration {
    background: var(--hiw-gold-light);
    color: #92400E;
}

.hiw-builder-prompt {
    font-family: var(--hiw-font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--hiw-slate-700);
    padding: 20px;
    background: var(--hiw-slate-100);
    border-radius: 8px;
    border-left: 3px solid var(--hiw-purple-mid);
    margin-bottom: 20px;
}

.hiw-builder-supplies {
    padding: 16px 20px;
    background: var(--hiw-slate-100);
    border-radius: 8px;
}

.hiw-builder-supplies-label {
    font-family: var(--hiw-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--hiw-slate-500);
    margin-bottom: 10px;
}

.hiw-supply-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hiw-supply-item {
    font-family: var(--hiw-font-body);
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 6px;
    background: #ffffff;
    color: var(--hiw-slate-700);
    border: 1px solid var(--hiw-slate-300);
}

.hiw-act-1-footer {
    text-align: center;
    margin-top: 36px;
    font-family: var(--hiw-font-body);
    font-size: 15px;
    color: var(--hiw-slate-500);
    font-style: italic;
    line-height: 1.7;
}

/* =============================================
   DIVIDER — Between Act 1 and Act 2
   ============================================= */
.hiw-divider {
    text-align: center;
    padding: 48px 24px;
    background: #ffffff;
    position: relative;
}

.hiw-divider-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--hiw-slate-300), var(--hiw-purple-mid));
    margin: 0 auto 20px;
}

.hiw-divider-text {
    font-family: var(--hiw-font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--hiw-purple-mid);
    letter-spacing: 0.5px;
}

/* =============================================
   ACT 2 — What AI Did Next
   ============================================= */
.hiw-act-2 {
    padding: 64px 24px 80px;
    background: linear-gradient(180deg, var(--hiw-slate-100) 0%, #ffffff 100%);
}

.hiw-act-2-header {
    text-align: center;
    margin-bottom: 56px;
}

.hiw-act-2-header h2 {
    font-family: var(--hiw-font-display);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    color: var(--hiw-slate-900);
    margin: 0 0 12px;
    line-height: 1.2;
}

.hiw-act-2-header p {
    font-family: var(--hiw-font-body);
    font-size: 17px;
    color: var(--hiw-slate-500);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Step cards — the 10 progressive reveal items */
.hiw-step-card {
    max-width: 800px;
    margin: 0 auto 28px;
    background: #ffffff;
    border-radius: 12px;
    padding: 32px 28px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    /* Scroll reveal initial state */
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hiw-step-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.hiw-step-number {
    position: absolute;
    top: -12px;
    left: 28px;
    width: 28px;
    height: 28px;
    background: var(--hiw-purple-mid);
    color: #ffffff;
    font-family: var(--hiw-font-body);
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.hiw-step-card h3 {
    font-family: var(--hiw-font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--hiw-slate-900);
    margin: 0 0 10px;
    padding-right: 20px;
    line-height: 1.3;
}

.hiw-step-card p {
    font-family: var(--hiw-font-body);
    font-size: 15.5px;
    color: var(--hiw-slate-700);
    line-height: 1.7;
    margin: 0;
}

.hiw-step-card .hiw-detail {
    font-family: var(--hiw-font-body);
    font-size: 14px;
    color: var(--hiw-slate-500);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--hiw-slate-100);
    line-height: 1.65;
}

/* Highlighted step cards (steps 1 and 2) — purple background */
.hiw-step-highlight {
    background: linear-gradient(135deg, var(--hiw-purple-light) 0%, #F5F3FF 100%);
    border: 1px solid rgba(124, 58, 237, 0.12);
}

.hiw-step-highlight .hiw-step-number {
    background: var(--hiw-purple-deep);
    box-shadow: 0 2px 8px rgba(107, 33, 168, 0.4);
}

/* Counter bar — "Under 2 minutes" */
.hiw-counter-bar {
    max-width: 800px;
    margin: 48px auto 0;
    text-align: center;
    /* Scroll reveal initial state */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hiw-counter-bar.visible {
    opacity: 1;
    transform: translateY(0);
}

.hiw-counter-bar .hiw-time {
    font-family: var(--hiw-font-display);
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 700;
    color: var(--hiw-purple-deep);
    margin-bottom: 4px;
}

.hiw-counter-bar .hiw-time-label {
    font-family: var(--hiw-font-body);
    font-size: 15px;
    color: var(--hiw-slate-500);
    line-height: 1.6;
}

/* =============================================
   ACT 3 — What the Teacher Received
   ============================================= */
.hiw-act-3 {
    padding: 80px 24px 64px;
    background: #ffffff;
}

.hiw-act-3-header {
    text-align: center;
    margin-bottom: 48px;
}

.hiw-act-3-header h2 {
    font-family: var(--hiw-font-display);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 700;
    color: var(--hiw-slate-900);
    margin: 0 0 12px;
    line-height: 1.2;
}

.hiw-act-3-header p {
    font-family: var(--hiw-font-body);
    font-size: 17px;
    color: var(--hiw-slate-500);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Output card — the lesson preview */
.hiw-output-card {
    max-width: 800px;
    margin: 0 auto 32px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid var(--hiw-purple-mid);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
    /* Scroll reveal initial state */
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hiw-output-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.hiw-output-title-bar {
    background: linear-gradient(135deg, var(--hiw-purple-deep) 0%, var(--hiw-purple-mid) 100%);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.hiw-output-title-bar h3 {
    font-family: var(--hiw-font-display);
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.hiw-output-badge {
    font-family: var(--hiw-font-body);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    letter-spacing: 0.5px;
}

.hiw-output-body {
    padding: 28px;
}

.hiw-output-meta {
    font-family: var(--hiw-font-body);
    font-size: 14px;
    color: var(--hiw-slate-500);
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hiw-slate-100);
    line-height: 1.6;
}

.hiw-output-section {
    margin-bottom: 24px;
}

.hiw-output-section-title {
    font-family: var(--hiw-font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--hiw-purple-mid);
    margin-bottom: 10px;
}

.hiw-output-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hiw-output-section li {
    font-family: var(--hiw-font-body);
    font-size: 14.5px;
    color: var(--hiw-slate-700);
    padding: 6px 0 6px 20px;
    position: relative;
    line-height: 1.55;
}

.hiw-output-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hiw-purple-light);
    border: 2px solid var(--hiw-purple-mid);
}

.hiw-output-section li code {
    font-size: 12px;
    background: var(--hiw-slate-100);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--hiw-purple-deep);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-weight: 600;
}

/* Lesson structure — Opening / Main / Closing */
.hiw-lesson-structure {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hiw-lesson-phase {
    display: flex;
    gap: 16px;
    padding: 14px 0;
}

.hiw-phase-bar {
    width: 4px;
    border-radius: 4px;
    flex-shrink: 0;
}

.hiw-opening .hiw-phase-bar { background: var(--hiw-purple-mid); }
.hiw-main .hiw-phase-bar { background: var(--hiw-gold-warm); }
.hiw-closing .hiw-phase-bar { background: var(--hiw-green-deep); }

.hiw-phase-content {
    flex: 1;
    min-width: 0;
}

.hiw-phase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.hiw-phase-name {
    font-family: var(--hiw-font-body);
    font-size: 15px;
    font-weight: 700;
    color: var(--hiw-slate-900);
}

.hiw-phase-time {
    font-family: var(--hiw-font-body);
    font-size: 12px;
    font-weight: 700;
    color: var(--hiw-slate-500);
    background: var(--hiw-slate-100);
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.hiw-phase-desc {
    font-family: var(--hiw-font-body);
    font-size: 14px;
    color: var(--hiw-slate-500);
    line-height: 1.55;
    margin: 0;
}

/* Station grid — 6 activity stations */
.hiw-station-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.hiw-station-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 14px;
    background: var(--hiw-slate-100);
    border-radius: 8px;
}

.hiw-station-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--hiw-gold-warm);
    color: #ffffff;
    font-family: var(--hiw-font-body);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.hiw-station-item strong {
    font-family: var(--hiw-font-body);
    font-size: 14px;
    color: var(--hiw-slate-900);
    display: block;
    margin-bottom: 2px;
}

.hiw-station-time {
    font-family: var(--hiw-font-body);
    font-size: 11px;
    font-weight: 700;
    color: var(--hiw-slate-500);
    background: #ffffff;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.hiw-station-item p {
    font-family: var(--hiw-font-body);
    font-size: 13px;
    color: var(--hiw-slate-500);
    line-height: 1.5;
    margin: 2px 0 0;
}

/* "Also included" extras grid */
.hiw-output-extras-label {
    font-family: var(--hiw-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--hiw-slate-500);
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--hiw-slate-100);
    margin-bottom: 4px;
}

.hiw-output-includes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.hiw-output-include-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--hiw-font-body);
    font-size: 14px;
    color: var(--hiw-slate-700);
    font-weight: 500;
}

.hiw-output-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--hiw-green-light);
    color: var(--hiw-green-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* =============================================
   CLOSING LINE — After the output card
   ============================================= */
.hiw-act-3-closing {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding-top: 20px;
    /* Scroll reveal initial state */
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hiw-act-3-closing.visible {
    opacity: 1;
    transform: translateY(0);
}

.hiw-closing-line {
    font-family: var(--hiw-font-display);
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 600;
    color: var(--hiw-slate-900);
    line-height: 1.5;
    margin: 0 0 8px;
}

.hiw-closing-sub {
    font-family: var(--hiw-font-body);
    font-size: 16px;
    color: var(--hiw-slate-500);
    line-height: 1.6;
    margin: 0;
}

/* =============================================
   CTA SECTION — Golden egg specific
   ============================================= */
.hiw-cta-section {
    padding: 72px 24px 80px;
    text-align: center;
    background: var(--hiw-slate-100);
}

.hiw-cta-section h2 {
    font-family: var(--hiw-font-display);
    font-size: clamp(26px, 3.5vw, 34px);
    font-weight: 700;
    color: var(--hiw-slate-900);
    margin: 0 0 12px;
}

.hiw-cta-section p {
    font-family: var(--hiw-font-body);
    font-size: 17px;
    color: var(--hiw-slate-500);
    margin: 0 0 32px;
}

.hiw-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--hiw-font-body);
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--hiw-purple-deep) 0%, var(--hiw-purple-mid) 100%);
    padding: 16px 36px;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hiw-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
    color: #ffffff;
    text-decoration: none;
}

/* =============================================
   RESPONSIVE — Tablet
   ============================================= */
@media (max-width: 900px) {
    .hiw-hero {
        padding: 70px 20px 60px;
    }

    .hiw-act-1,
    .hiw-act-2,
    .hiw-act-3 {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* =============================================
   RESPONSIVE — Mobile
   ============================================= */
@media (max-width: 640px) {
    .hiw-hero {
        padding: 60px 16px 48px;
    }

    .hiw-act-1,
    .hiw-act-2,
    .hiw-act-3 {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hiw-builder-body {
        padding: 20px 16px;
    }

    .hiw-builder-meta {
        gap: 6px;
    }

    .hiw-step-card {
        padding: 28px 20px;
    }

    .hiw-output-body {
        padding: 20px;
    }

    .hiw-output-title-bar {
        padding: 16px 20px;
    }

    .hiw-output-includes {
        grid-template-columns: 1fr;
    }

    .hiw-cta-section {
        padding: 56px 16px 64px;
    }

    .hiw-cta-button {
        padding: 14px 28px;
        font-size: 15px;
    }
}

/* =============================================
   ACCESSIBILITY — Reduced motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .hiw-step-card,
    .hiw-output-card,
    .hiw-counter-bar,
    .hiw-act-3-closing {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hiw-cta-button:hover {
        transform: none;
    }
}

/* =============================================
   END — Golden Egg How It Works Styles
   ============================================= */
