:root {
    --concrete: #D4CFC7;
    --charcoal: #1B1B1B;
    --ink: #1A1A1A;
    --chalk: #F0EDE8;
    --ochre: #D4A574;
    --slate: #4A6B8A;
    --glass-light: rgba(255, 255, 255, 0.35);
    --glass-dark: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.18);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    --lattice: #C8BFB0;
    --gold: #C49A5C;
    --entropy: 0;
}

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

body {
    background-color: var(--concrete);
    color: var(--ink);
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.9;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* Lattice Background */
.lattice-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M0 12h48M0 24h48M0 36h48M12 0v48M24 0v48M36 0v48' stroke='%23C8BFB0' stroke-width='0.5' fill='none'/%3E%3Crect x='22' y='22' width='4' height='4' transform='rotate(45 24 24)' stroke='%23C8BFB0' stroke-width='0.5' fill='none'/%3E%3C/svg%3E");
    background-size: 48px 48px;
}

.lattice-dense {
    opacity: 0.15;
}

/* Zones */
.zone {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* AXIOM */
.zone-axiom {
    background: var(--concrete);
    display: flex;
    align-items: center;
    justify-content: center;
}

.axiom-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-numeral {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(12rem, 25vw, 20rem);
    color: var(--ink);
    line-height: 1;
    transition: transform 0.1s ease;
}

.axiom-text {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--ink);
    max-width: 50ch;
    margin: 24px auto 0;
    opacity: 0.8;
}

/* DISTRIBUTION */
.zone-distribution {
    background: var(--concrete);
    padding: 10vh 5vw;
}

.dist-layout {
    display: flex;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.dist-left {
    flex: 7;
    position: relative;
}

.dist-right {
    flex: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bell-curve {
    width: 100%;
    height: 200px;
    position: relative;
    margin-bottom: 40px;
}

.bell-curve::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 180px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    border: 3px solid var(--ochre);
    border-bottom: none;
    opacity: 0.5;
}

.ghost-char {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 15vw;
    color: var(--ink);
    opacity: 0.04;
    position: absolute;
    top: 10%;
    left: 5%;
    z-index: 0;
    pointer-events: none;
}

/* Glass Cards */
.glass-card {
    background: var(--glass-light);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    border: 1px solid var(--glass-border-light);
    border-radius: 12px;
    padding: 28px 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.4s ease;
    position: relative;
    z-index: 2;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--ink);
    margin-bottom: 8px;
}

.card-math {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--slate);
    margin-bottom: 12px;
}

.card-body {
    font-family: 'Source Serif 4', serif;
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ink);
}

/* Section Heading */
.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--ink);
    margin-bottom: 24px;
    line-height: 1.2;
}

.body-text {
    margin-bottom: 1.5rem;
}

/* EXPERIMENT */
.zone-experiment {
    background: var(--concrete);
    padding: 10vh 5vw;
    min-height: 120vh;
}

.scatter-field {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    min-height: 80vh;
}

.scatter-card {
    position: absolute;
    width: clamp(260px, 30vw, 360px);
}

.sc-1 {
    top: 5%;
    left: 8%;
    transform: rotate(-1deg);
}

.sc-2 {
    top: 35%;
    left: 45%;
    transform: rotate(0.5deg);
}

.sc-3 {
    top: 65%;
    left: 15%;
    transform: rotate(-0.5deg);
}

/* CONVERGENCE */
.zone-convergence {
    background: var(--concrete);
    padding: 12vh 5vw;
}

.convergence-column {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.diamond-divider {
    text-align: center;
    color: var(--ochre);
    font-size: 0.8rem;
    margin: 3rem 0;
    opacity: 0.6;
}

/* ENTROPY */
.zone-entropy {
    background: var(--charcoal);
    color: var(--chalk);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.zone-entropy .glass-card {
    background: var(--glass-dark);
    border-color: var(--glass-border-dark);
}

.entropy-fragments {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.drift-char {
    position: absolute;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--chalk);
    opacity: 0.08;
}

.drift-1 {
    top: 15%;
    left: 10%;
    animation: driftSlow 30s ease-in-out infinite alternate;
    transform: rotate(-3deg);
}

.drift-2 {
    top: 30%;
    right: 15%;
    animation: driftSlow 25s ease-in-out infinite alternate-reverse;
    transform: rotate(2deg);
}

.drift-3 {
    bottom: 30%;
    left: 20%;
    animation: driftSlow 35s ease-in-out infinite alternate;
    transform: rotate(-1deg);
}

.drift-4 {
    bottom: 15%;
    right: 10%;
    animation: driftSlow 28s ease-in-out infinite alternate-reverse;
    transform: rotate(3deg);
}

@keyframes driftSlow {
    0% { transform: translate(0, 0) rotate(-2deg); }
    100% { transform: translate(30px, 20px) rotate(2deg); }
}

.entropy-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.final-numeral {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(12rem, 25vw, 20rem);
    color: var(--ochre);
    line-height: 1;
}

/* Reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .dist-layout {
        flex-direction: column;
    }

    .scatter-card {
        position: relative;
        top: auto !important;
        left: auto !important;
        width: 100%;
        margin-bottom: 24px;
        transform: none !important;
    }

    .ghost-char {
        display: none;
    }

    .zone-experiment {
        padding: 8vh 20px;
    }

    .scatter-field {
        min-height: auto;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .drift-char {
        animation: none;
    }

    .glass-card {
        transition: none;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-numeral {
        transition: none;
    }
}
