:root {
    --bg: #f4f6fb;
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --surface-dark: linear-gradient(135deg, #25367e 0%, #4157bf 100%);
    --stroke: rgba(20, 33, 71, 0.09);
    --stroke-strong: rgba(37, 54, 126, 0.18);
    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #64748b;
    --brand: #2d3d8a;
    --brand-2: #5670f3;
    --shadow: 0 18px 45px rgba(26, 39, 84, 0.08);
    --shadow-soft: 0 10px 30px rgba(31, 45, 91, 0.06);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --max-width: 1280px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(86, 112, 243, 0.08), transparent 30%),
        radial-gradient(circle at top right, rgba(45, 61, 138, 0.10), transparent 26%),
        var(--bg);
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    background: rgba(244, 246, 251, 0.86);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.topbar-inner,
.page-footer-inner,
.page-main {
    width: min(var(--max-width), calc(100% - 32px));
    margin: 0 auto;
}

.topbar-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand,
.footer-brand {
    letter-spacing: 0.18em;
    font-size: 0.95rem;
    font-weight: 800;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ghost-button,
.primary-button {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.9rem 1.2rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.ghost-button {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.08);
    color: var(--text);
}

.primary-button {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: #fff;
    box-shadow: 0 14px 28px rgba(45, 61, 138, 0.22);
}

.ghost-button:hover,
.primary-button:hover {
    transform: translateY(-1px);
}

.page-main {
    padding: 34px 0 48px;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(18px);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.95fr;
    gap: 22px;
    align-items: stretch;
    margin-bottom: 22px;
}

.hero-card {
    padding: 38px;
}

.hero-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-back-button {
    flex-shrink: 0;
    min-width: 124px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(45, 61, 138, 0.08);
    color: var(--brand);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inverse {
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.88);
}

.hero-card h1,
.section-head h2,
.core-idea-banner h2,
.cta-strip h2 {
    margin: 16px 0 0;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-card h1 {
    font-size: clamp(2.4rem, 4vw, 4.55rem);
    max-width: 12ch;
}

.hero-subtitle {
    margin: 16px 0 12px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-soft);
}

.hero-copy,
.body-text,
.story-card p,
.stack-card li,
.result-card p,
.cta-strip p {
    color: var(--text-soft);
    font-size: 1.04rem;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-pill {
    padding: 0.75rem 0.95rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(37, 54, 126, 0.12);
    color: var(--text);
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.metrics-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.metric-card,
.mini-card,
.stack-card,
.result-card,
.stat-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(37, 54, 126, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85);
}

.metric-card {
    padding: 18px;
}

.metric-value {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.metric-label {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hero-visual {
    overflow: hidden;
    min-height: 100%;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-nav-mobile {
    display: none;
}

.content-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.side-rail {
    position: sticky;
    top: 102px;
    padding: 22px;
}

.side-rail-label {
    margin: 0 0 14px;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-nav {
    display: grid;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    color: var(--text-soft);
    font-weight: 600;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(45, 61, 138, 0.08);
    border-color: rgba(45, 61, 138, 0.14);
    color: var(--brand);
    transform: translateX(2px);
}

.story-stack {
    display: grid;
    gap: 22px;
}

.story-card {
    padding: 30px;
}

.section-head {
    margin-bottom: 16px;
}

.section-head h2,
.core-idea-banner h2,
.cta-strip h2 {
    font-size: clamp(1.9rem, 2.8vw, 2.8rem);
}

.two-column-text {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.lead-text {
    font-size: 1.18rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 18px;
}

.challenge-grid,
.stack-grid,
.results-grid {
    display: grid;
    gap: 16px;
}

.challenge-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.mini-card,
.result-card {
    padding: 20px;
}

.mini-card h3,
.stack-card h3,
.result-card h3 {
    margin: 0 0 10px;
    font-size: 1.02rem;
}

.split-card {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 22px;
    align-items: stretch;
}

.media-block {
    min-height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.media-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-block {
    align-self: center;
}

.core-idea-banner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    padding: 30px;
    color: #fff;
    background: var(--surface-dark);
    border: none;
    box-shadow: var(--shadow);
}

.core-idea-banner p {
    color: rgba(255, 255, 255, 0.84);
    font-size: 1.05rem;
}

.core-idea-banner img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    border-radius: 22px;
    object-fit: cover;
}

.stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stack-card {
    padding: 22px;
}

.stack-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-soft);
}

.stack-card li + li {
    margin-top: 10px;
}

.results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.outcome-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 22px;
    align-items: start;
}

.stat-list {
    display: grid;
    gap: 12px;
}

.stat-item {
    padding: 18px;
    display: grid;
    gap: 8px;
}

.stat-item strong {
    font-size: 1.45rem;
    letter-spacing: -0.04em;
}

.stat-item span {
    color: var(--text-muted);
}

.reflection-card blockquote {
    margin: 20px 0 0;
    padding: 20px 22px;
    border-left: 4px solid rgba(45, 61, 138, 0.25);
    border-radius: 16px;
    background: rgba(45, 61, 138, 0.05);
    color: var(--text-soft);
    font-size: 1.08rem;
    font-weight: 600;
}

.reflection-card cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    color: var(--text-muted);
    font-weight: 500;
}

.cta-strip {
    margin-top: 22px;
    padding: 28px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(135deg, rgba(37,54,126,0.97) 0%, rgba(86,112,243,0.97) 100%);
    color: #fff;
    border: none;
    box-shadow: var(--shadow);
}

.cta-strip p {
    color: rgba(255, 255, 255, 0.84);
    max-width: 60ch;
}

.page-footer {
    padding: 0 0 42px;
}

.page-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 28px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.footer-copy,
.footer-contact p,
.footer-contact a {
    margin: 6px 0 0;
    color: var(--text-muted);
}

.footer-contact {
    text-align: right;
}

.desktop-only {
    display: inline-flex;
}

@media (max-width: 1100px) {
    .intro-grid,
    .content-grid,
    .split-card,
    .core-idea-banner,
    .outcome-layout,
    .cta-strip {
        grid-template-columns: 1fr;
    }

    .content-grid {
        display: block;
    }

    .side-rail {
        display: none;
    }

    .section-nav-mobile {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 6px 0 14px;
        margin-bottom: 8px;
        scrollbar-width: none;
    }

    .section-nav-mobile::-webkit-scrollbar {
        display: none;
    }

    .section-nav-mobile a {
        white-space: nowrap;
        padding: 0.82rem 1rem;
        border-radius: 999px;
        background: rgba(255,255,255,0.9);
        border: 1px solid rgba(37, 54, 126, 0.08);
        color: var(--text-soft);
        font-weight: 600;
    }

    .hero-visual {
        min-height: 420px;
    }

    .challenge-grid,
    .results-grid,
    .stack-grid,
    .two-column-text,
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .core-idea-banner img {
        min-height: 320px;
    }

    .footer-contact {
        text-align: left;
    }
}

@media (max-width: 720px) {
    .topbar-inner,
    .page-footer-inner,
    .page-main {
        width: min(var(--max-width), calc(100% - 20px));
    }

    .topbar-inner {
        min-height: 70px;
    }

    .desktop-only {
        display: none;
    }

    .hero-card,
    .story-card,
    .core-idea-banner,
    .cta-strip {
        padding: 22px;
        border-radius: 22px;
    }

    .hero-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-back-button {
        width: 100%;
    }

    .hero-card h1 {
        font-size: clamp(2.15rem, 12vw, 3.2rem);
    }

    .challenge-grid,
    .results-grid,
    .stack-grid,
    .two-column-text,
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 280px;
    }

    .result-card,
    .mini-card,
    .stack-card,
    .metric-card,
    .stat-item {
        border-radius: 18px;
    }

    .cta-strip,
    .page-footer-inner {
        display: grid;
    }

    .topbar-actions {
        gap: 8px;
    }

    .ghost-button,
    .primary-button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
