:root {
    --cream: #F4EBD8;
    --cream-2: #EFE4CB;
    --paper: #FBF6EA;
    --ink: #0F1411;
    --ink-2: #2A2620;
    --muted: #615a4d;
    --rule: #0F1411;
    --rule-soft: #C9BC9C;
    --blue: #1E66F5;
    --blue-ink: #0a3aa6;
    --green: #178A4E;
    --amber: #D08A2C;
    --red: #C0392B;
    
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-serif: 'Source Serif 4', serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--ink);
    background-color: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--ink);
    background-color: rgba(244, 235, 216, 0.9);
    transition: transform 0.3s ease-in-out;
}

.navbar.hidden {
    transform: translateY(-100%);
}

.nav-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    color: var(--muted);
    text-transform: uppercase;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
}

.dot { color: var(--blue); }

.pre-title-block {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.5rem;
}
.pre-title-block .pill {
    display: inline-block;
    background: var(--ink);
    color: var(--cream);
    padding: 4px 12px;
    border-radius: 999px;
    margin-right: 12px;
    letter-spacing: 0.18em;
}

.credibility-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 600px;
    margin: 3rem auto 2rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}
.credibility-strip .bar {
    flex: 1;
    height: 6px;
    display: flex;
    border-radius: 3px;
    overflow: hidden;
}
.bar i { display: block; height: 100%; }
.bar .g { background: var(--green); flex: 78; }
.bar .a { background: var(--amber); flex: 18; }
.bar .r { background: var(--red); flex: 4; }

.section-heading {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.section-heading .num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    color: var(--blue);
}
.section-heading h2 {
    margin-bottom: 0;
}
.section-heading .rule {
    height: 2px;
    background: var(--ink);
    align-self: center;
}
.section-heading .tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    border: 1px solid var(--rule-soft);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
}

.panel-title {
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.012em;
    margin-bottom: 1rem;
}

.panel-lede {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink-2);
    margin-bottom: 2rem;
}

.pillars {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.pillar {
    border-top: 1px solid var(--ink);
    padding-top: 0.75rem;
}
.pillar h4 {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}
.pillar p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--muted);
}
.pillar .k {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--blue);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: block;
}

.hero-image-placeholder {
    margin-top: 3rem;
    border: 1.5px solid var(--ink);
    border-radius: 8px;
    padding: 1rem;
    background: var(--paper);
    box-shadow: 0 12px 28px rgba(15,20,17,0.1), 0 2px 0 var(--ink);
    text-align: left;
}
.hero-caption {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--ink);
}
.hero-caption .muted-text {
    color: var(--muted);
    font-size: 0.65rem;
}

nav a {
    color: var(--ink);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--blue);
}

.scroll-container {
    width: 100%;
}

.scroll-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

.content {
    max-width: 800px;
    text-align: center;
}

.content.align-left {
    text-align: left;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--ink-2);
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto;
}

.kicker {
    font-family: var(--font-mono);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--blue);
    display: block;
    margin-bottom: 1rem;
}

h2 {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

/* Sticky Scroll Section */
.sticky-container {
    height: 1400vh; /* gives us room to scroll for 13 steps */
    position: relative;
    padding: 0;
    align-items: flex-start;
}

.sticky-content {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ink);
    color: var(--cream);
    overflow: hidden;
}

.animation-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0 auto;
    padding-top: 5rem;
}

.sticky-heading {
    margin-bottom: 0.5rem;
    width: 100%;
}
.sticky-heading h2 {
    color: var(--cream);
    font-size: 1.75rem;
}
.sticky-heading .rule {
    background: var(--cream);
}
.sticky-heading .tag {
    border-color: var(--muted);
    color: var(--cream);
}

.solution-header {
    margin-bottom: 0.5rem;
    position: relative;
    text-align: left;
    max-width: 800px;
    z-index: 20;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.solution-header.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

.corner {
    background: var(--blue);
    color: var(--cream);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    padding: 4px 10px;
    border-radius: 0 8px 0 8px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.sticky-content .panel-title {
    color: var(--cream);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}
.sticky-content .panel-lede {
    color: rgba(244, 235, 216, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.anim-step {
    position: absolute;
    bottom: 8rem;
    left: 2rem;
    right: 2rem;
    top: 17rem;
    transform: translateY(50px);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), top 0.5s ease;
    text-align: left;
}

.animation-wrapper.header-hidden .anim-step {
    top: 10rem;
}

.anim-step.active {
    opacity: 1;
    transform: translateY(0);
    z-index: 10;
}

.anim-step.scrolled-past {
    opacity: 0;
    transform: translateY(-50px);
    z-index: 1;
}

.step-content-split {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.step-text {
    max-width: 800px;
    margin: 0 auto;
}

.step-text h2 {
    color: var(--cream);
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    font-family: var(--font-serif);
}

.step-text p {
    color: rgba(244, 235, 216, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}

.step-visual {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex: 1;
    min-height: 0;
}

.step-visual img.single-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}


.step-visual img.grouped-img {
    max-width: 48%; /* fit two side by side */
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.grid-visual {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

.grid-visual img {
    flex: 1 1 40%;
    max-width: 48%;
    max-height: 45vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

footer {
    padding: 4rem 2rem;
    background-color: var(--ink);
    color: var(--cream);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto 3rem;
    text-align: left;
}

.credits h6 {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8e8674;
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.credits .name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.15;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
}
.team-grid .person {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 500;
    color: #f3e8cf;
}

.baseline {
    border-top: 1px solid #2a2620;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #8e8674;
    max-width: 1000px;
    margin: 0 auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .nav-meta {
        font-size: 0.65rem;
        text-align: center;
    }
    nav a {
        margin: 0 0.75rem;
    }
    .pillars {
        grid-template-columns: 1fr;
    }
    .step-content-split {
        flex-direction: column;
        justify-content: center;
    }
    .step-text {
        text-align: center;
    }
    .step-visual {
        flex-direction: column;
        gap: 1rem;
    }
    .step-visual img.single-img {
        max-height: 40vh;
    }
    .step-visual img.grouped-img {
        max-width: 100%;
        max-height: 30vh;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .team-grid {
        grid-template-columns: 1fr;
    }
    .scroll-section {
        padding: 7rem 1.5rem;
    }
    .hero-title {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }
    .section-heading {
        grid-template-columns: auto 1fr;
        gap: 0.75rem;
    }
    .section-heading .rule {
        display: none;
    }
    .credibility-strip {
        gap: 0.5rem;
    }
    .anim-step {
        top: 18rem;
    }
    .animation-wrapper.header-hidden .anim-step {
        top: 6rem;
    }
    .sticky-heading h2 {
        font-size: 1.4rem;
    }
    .solution-header .panel-title {
        font-size: 1.1rem;
    }
    .baseline {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: center;
    }
}