/* ==========================================================================
   GenAI Roadmap — Design System
   Signature: a hand-plotted "route" — a winding path with numbered waypoint
   markers — used across the hero, How It Works, and roadmap phase pages to
   literalize the idea of a personalized route through a curriculum.
   ========================================================================== */

:root {
    /* Color */
    --ink: #10161D;
    --ink-soft: #1B2530;
    --paper: #F3F5F6;
    --paper-raised: #FFFFFF;
    --accent: #2D5FE0;
    --accent-soft: #E8EEFD;
    --coral: #FF6B4A;
    --coral-soft: #FFE8E1;
    --signal: #2FAE6B;
    --signal-soft: #E3F6EC;
    --text-body: #262B33;
    --text-muted: #667085;
    --text-on-ink: #F3F5F6;
    --text-on-ink-muted: #9AA6B2;
    --line: rgba(16, 22, 29, 0.10);
    --line-on-ink: rgba(243, 245, 246, 0.14);

    /* Type */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Layout */
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-soft: 0 8px 30px rgba(16, 22, 29, 0.07);
    --shadow-lifted: 0 20px 50px rgba(16, 22, 29, 0.14);
    --nav-height: 76px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-body);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5em;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }

.container-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-wide {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.waypoint-label {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.waypoint-label::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
}

.lead-muted {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 620px;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn-primary, .btn-secondary, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.98rem;
    padding: 14px 28px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--coral);
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 107, 74, 0.32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255, 107, 74, 0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-outline:focus-visible, a:focus-visible, button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.btn-secondary {
    background: var(--ink);
    color: var(--text-on-ink);
}
.btn-secondary:hover { transform: translateY(-2px); background: var(--ink-soft); }

.btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--line);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn-primary:disabled, .btn-secondary:disabled, .btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ---------------------------------------------------------------------- */
/* Navigation                                                              */
/* ---------------------------------------------------------------------- */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(243, 245, 246, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.nav-inner {
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-logo-mark { color: var(--accent); font-size: 1rem; }
.nav-logo-accent { color: var(--accent); }

/* Logo macro (templates/macros/logo.html) — image + text-fallback sizing */
.brand-logo-text { font-family: var(--font-display); font-weight: 700; }
.brand-logo-img { display: inline-block; vertical-align: middle; }
.brand-logo-img.logo-nav { height: 32px; width: auto; }
.brand-logo-icon.logo-nav { height: 28px; margin-right: 2px; }
.brand-logo-img.logo-footer { height: 30px; width: auto; }
.brand-logo-icon.logo-footer { height: 26px; margin-right: 2px; }
.footer-logo-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 2px; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-links a:not(.btn-nav-cta) {
    font-weight: 500;
    color: var(--text-body);
    font-size: 0.95rem;
    transition: color 0.15s ease;
}
.nav-links a:not(.btn-nav-cta):hover { color: var(--accent); }

.btn-nav-cta {
    background: var(--ink);
    color: var(--text-on-ink) !important;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.18s ease, transform 0.18s ease;
}
.btn-nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
    background: var(--ink);
    color: var(--text-on-ink);
    position: relative;
    overflow: hidden;
    padding: 88px 0 110px;
}

.hero-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.2vw, 3.4rem);
    color: #fff;
    margin-bottom: 0.35em;
}
.hero h1 .hero-highlight {
    color: var(--coral);
    position: relative;
}

.hero-sub {
    color: var(--text-on-ink-muted);
    font-size: 1.15rem;
    max-width: 520px;
    margin-bottom: 2em;
}

.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-meta {
    margin-top: 28px;
    display: flex;
    gap: 28px;
    color: var(--text-on-ink-muted);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}
.hero-meta strong { color: #fff; display: block; font-family: var(--font-display); font-size: 1.3rem; }

/* Signature route graphic */
.route-graphic {
    position: relative;
    width: 100%;
}
.route-graphic svg { width: 100%; height: auto; display: block; }

.route-node-label {
    font-family: var(--font-mono);
    font-size: 11px;
    fill: var(--text-on-ink-muted);
}
.route-node-title {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    fill: #fff;
}

/* ---------------------------------------------------------------------- */
/* Generic sections                                                        */
/* ---------------------------------------------------------------------- */

section { padding: 96px 0; }
.section-alt { background: var(--paper-raised); }

.section-head {
    max-width: 640px;
    margin: 0 auto 56px;
    text-align: center;
}
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head .waypoint-label { justify-content: center; display: flex; }
.section-head .lead-muted { margin: 0 auto; }

/* Why Personalized */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}
.why-card {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.why-card i { font-size: 1.5rem; color: var(--accent); margin-bottom: 16px; display: block; }
.why-card h3 { font-size: 1.1rem; }
.why-card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* Who is this for */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}
.audience-card {
    background: var(--ink);
    color: var(--text-on-ink);
    border-radius: var(--radius-md);
    padding: 26px 18px;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease;
}
.audience-card:hover { transform: translateY(-4px); background: var(--ink-soft); }
.audience-card i { font-size: 1.4rem; color: var(--coral); margin-bottom: 12px; display: block; }
.audience-card span { font-weight: 600; font-size: 0.92rem; }

/* How it works — numbered, because it's a real sequence */
.steps-row {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
}
.step-item {
    position: relative;
    padding: 0 20px;
    text-align: left;
}
.step-item::before {
    content: attr(data-step);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--accent-soft);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.step-item h3 { font-size: 1.05rem; }
.step-item p { color: var(--text-muted); font-size: 0.92rem; }
.step-connector {
    position: absolute;
    top: 17px;
    left: 54px;
    right: -20px;
    height: 1px;
    border-top: 2px dashed var(--line);
}
.step-item:last-child .step-connector { display: none; }

/* CTA band */
.cta-band {
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-lg);
    max-width: 1180px;
    margin: 0 auto;
    padding: 56px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; font-size: 1.7rem; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }
.cta-band .btn-secondary { background: #fff; color: var(--ink); }
.cta-band .btn-secondary:hover { background: var(--coral-soft); color: var(--ink); }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
    background: var(--ink);
    color: var(--text-on-ink-muted);
    padding: 64px 24px 24px;
}
.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--line-on-ink);
}
.footer-brand { max-width: 320px; }
.footer-brand p { margin-top: 10px; font-size: 0.9rem; }
.footer-links { display: flex; gap: 64px; }
.footer-links h4 {
    color: #fff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
    font-weight: 500;
    margin-bottom: 14px;
}
.footer-links a { display: block; margin-bottom: 10px; font-size: 0.92rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
    max-width: 1180px;
    margin: 0 auto;
    padding-top: 24px;
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------------- */
/* Quiz                                                                    */
/* ---------------------------------------------------------------------- */

.quiz-shell {
    max-width: 720px;
    margin: 0 auto;
    padding: 56px 24px 100px;
}

.quiz-progress-track {
    height: 6px;
    background: var(--line);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}
.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--coral));
    width: 10%;
    border-radius: 999px;
    transition: width 0.35s ease;
}
.quiz-progress-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.quiz-card {
    background: var(--paper-raised);
    border-radius: var(--radius-lg);
    padding: 44px;
    box-shadow: var(--shadow-soft);
    min-height: 360px;
}

.quiz-question-num {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.quiz-card h2 { font-size: 1.5rem; margin-bottom: 8px; }
.quiz-help { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 28px; }

.quiz-options { display: grid; gap: 12px; }
.quiz-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.quiz-option:hover { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option.selected {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.quiz-option .option-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--line);
    flex-shrink: 0;
    position: relative;
}
.quiz-option.selected .option-marker { border-color: var(--accent); }
.quiz-option.selected .option-marker::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: var(--accent);
    border-radius: 50%;
}
.quiz-option span.option-text { font-weight: 500; font-size: 0.98rem; }

.quiz-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
}
.quiz-nav-row .btn-outline:disabled { visibility: hidden; }

/* Toasts */
.toast-stack {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--ink);
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    box-shadow: var(--shadow-lifted);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastIn 0.25s ease;
    max-width: 320px;
}
.toast i { color: var(--coral); }
@keyframes toastIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------- */
/* Loading screen                                                          */
/* ---------------------------------------------------------------------- */

.loading-shell {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: var(--text-on-ink);
    padding: 40px 24px;
}
.loading-card { max-width: 440px; text-align: center; }
.loading-spinner {
    width: 56px;
    height: 56px;
    margin: 0 auto 28px;
    border-radius: 50%;
    border: 3px solid var(--line-on-ink);
    border-top-color: var(--coral);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-checklist {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    text-align: left;
    display: inline-flex;
    flex-direction: column;
    gap: 12px;
}
.loading-checklist li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-on-ink-muted);
    font-size: 0.95rem;
    opacity: 0.4;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.loading-checklist li.active { opacity: 1; color: #fff; }
.loading-checklist li i { color: var(--signal); visibility: hidden; }
.loading-checklist li.active i { visibility: visible; }

/* ---------------------------------------------------------------------- */
/* Result page                                                            */
/* ---------------------------------------------------------------------- */

.result-hero {
    background: var(--ink);
    color: var(--text-on-ink);
    padding: 72px 0 64px;
    text-align: center;
}
.result-hero .waypoint-label { justify-content: center; display: inline-flex; }
.result-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }

.result-body {
    max-width: 900px;
    margin: -48px auto 0;
    padding: 0 24px 100px;
    position: relative;
    z-index: 3;
}

.result-card {
    background: var(--paper-raised);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lifted);
    padding: 44px;
    margin-bottom: 28px;
}
.result-card h2 { font-size: 1.4rem; }
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}
.result-stat {
    background: var(--paper);
    border-radius: var(--radius-md);
    padding: 20px;
}
.result-stat .waypoint-label { margin-bottom: 6px; }
.result-stat strong { font-family: var(--font-display); font-size: 1.15rem; display: block; }

.profile-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}
.profile-chip {
    background: var(--paper);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 0.85rem;
}
.profile-chip .waypoint-label { margin-bottom: 4px; font-size: 0.68rem; }

.target-roles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}
.role-pill {
    background: var(--signal-soft);
    color: var(--signal);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---------------------------------------------------------------------- */
/* Roadmap preview pages                                                   */
/* ---------------------------------------------------------------------- */

.roadmap-hero {
    background: var(--ink);
    color: var(--text-on-ink);
    padding: 64px 0 56px;
}
.roadmap-hero h1 { color: #fff; }
.roadmap-hero .lead-muted { color: var(--text-on-ink-muted); }

.roadmap-body {
    max-width: 820px;
    margin: 0 auto;
    padding: 64px 24px;
}
.roadmap-body h2 { font-size: 1.5rem; margin-top: 2.2em; }
.roadmap-body h2:first-child { margin-top: 0; }

.phase-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    margin-bottom: 20px;
    background: var(--paper-raised);
    position: relative;
    padding-left: 68px;
}
.phase-card .phase-num {
    position: absolute;
    left: 24px;
    top: 28px;
    font-family: var(--font-mono);
    color: var(--accent);
    background: var(--accent-soft);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.phase-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.phase-card p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }

.lock-gate {
    background: var(--ink);
    color: var(--text-on-ink);
    border-radius: var(--radius-lg);
    padding: 44px;
    text-align: center;
    margin-top: 48px;
}
.lock-gate i.bi-lock-fill { font-size: 1.8rem; color: var(--coral); margin-bottom: 14px; display: block; }
.lock-gate h3 { color: #fff; font-size: 1.3rem; }
.lock-feature-list {
    list-style: none;
    padding: 0;
    margin: 22px 0 30px;
    display: inline-grid;
    text-align: left;
    gap: 10px;
}
.lock-feature-list li { color: var(--text-on-ink-muted); font-size: 0.95rem; display: flex; gap: 10px; align-items: center; }
.lock-feature-list li i { color: var(--signal); }

/* ---------------------------------------------------------------------- */
/* About / 404                                                             */
/* ---------------------------------------------------------------------- */

.about-shell { max-width: 720px; margin: 0 auto; padding: 88px 24px 100px; }
.error-404 { padding: 140px 0; }

/* ---------------------------------------------------------------------- */
/* Fade-in on scroll                                                       */
/* ---------------------------------------------------------------------- */

.fade-up {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */

@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .audience-grid { grid-template-columns: repeat(3, 1fr); }
    .steps-row { grid-template-columns: repeat(2, 1fr); gap: 32px 0; }
    .step-connector { display: none; }
    .result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .nav-links {
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--paper-raised);
        flex-direction: column;
        align-items: stretch;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--line);
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; }
    .why-grid, .audience-grid { grid-template-columns: 1fr 1fr; }
    section { padding: 64px 0; }
    .quiz-card { padding: 28px 22px; }
    .cta-band { flex-direction: column; text-align: center; padding: 40px 28px; }
    .footer-inner { flex-direction: column; }
    .phase-card { padding-left: 60px; padding-right: 20px; }
}

@media (max-width: 420px) {
    .why-grid, .audience-grid { grid-template-columns: 1fr; }
}
