/* layer2.report — Goblincore meets blockchain geology */

:root {
    --color-gold: #c4a97d;
    --color-earth: #5c4a3a;
    --color-cream: #e8dcc0;
    --color-rust: #a45a2a;
    --color-brown: #8b7355;
    --color-dark: #2c2218;
    --color-light: #f5ead6;
    --color-amber: #8b6f47;
    --color-mid: #4A3D2E;
    --color-muted: #6B5D4D;
    --color-tan: #B89B72;
    --font-display: 'Anybody', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --font-mono: 'Courier Prime', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-light);
    color: var(--color-dark);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* Strata Sections */
.stratum {
    min-height: 100vh;
    position: relative;
    padding: 6rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#surface {
    background: var(--color-light);
}

.stratum-shallow {
    background: var(--color-cream);
}

.stratum-deep {
    background: #B89B72;
    border-top: 2px solid #4A3D2E;
}

.stratum-bedrock {
    background: var(--color-earth);
    color: var(--color-cream);
}

.stratum-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Typography */
.headline-display {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 7vw, 6rem);
    font-variation-settings: 'wdth' 150;
    line-height: 1.05;
    color: #3d2f1e;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.headline-section {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-variation-settings: 'wdth' 130;
    line-height: 1.1;
    color: var(--color-dark);
    margin-bottom: 2.5rem;
}

.stratum-bedrock .headline-section {
    color: var(--color-gold);
}

.prose-intro {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.8;
    max-width: 600px;
    color: var(--color-earth);
    margin-bottom: 3rem;
}

.prose-body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.75;
    color: var(--color-dark);
}

.stratum-bedrock .prose-body {
    color: var(--color-cream);
}

/* Broken Grid */
.broken-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.6fr 0.5fr 1.3fr 0.8fr;
    gap: 1.5rem;
    align-items: start;
}

.block-a { grid-column: 1 / 3; grid-row: 1; }
.block-b { grid-column: 3 / 6; grid-row: 1; margin-top: 3rem; }
.block-c { grid-column: 2 / 4; grid-row: 2; margin-top: -2rem; }
.block-d { grid-column: 1 / 4; grid-row: 1; }
.block-e { grid-column: 3 / 6; grid-row: 1; margin-top: 2rem; z-index: 2; }
.block-f { grid-column: 1 / 6; grid-row: 2; min-height: 120px; }
.block-g { grid-column: 1 / 4; grid-row: 1; }
.block-h { grid-column: 3 / 6; grid-row: 1; margin-top: 4rem; }

/* Specimens */
.specimen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.specimen-svg {
    width: 160px;
    height: 160px;
    transition: transform 0.6s ease;
}

.specimen:hover .specimen-svg {
    transform: rotate(5deg) scale(1.05);
}

.specimen-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-brown);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stratum-bedrock .specimen-label {
    color: var(--color-gold);
}

/* Soil Lines */
.soil-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--color-brown) 0px,
        var(--color-brown) 20px,
        transparent 20px,
        transparent 25px
    );
    opacity: 0.6;
}

.soil-line-dark {
    background: repeating-linear-gradient(
        90deg,
        var(--color-earth) 0px,
        var(--color-earth) 30px,
        transparent 30px,
        transparent 36px
    );
}

.soil-line-deepest {
    background: repeating-linear-gradient(
        90deg,
        var(--color-dark) 0px,
        var(--color-dark) 40px,
        transparent 40px,
        transparent 44px
    );
    opacity: 0.8;
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    animation: bob 2s ease-in-out infinite;
}

.scroll-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #6B5D4D;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Mycelium SVG */
.mycelium-svg {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.mycelium-path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawPath 3s ease forwards;
}

@keyframes drawPath {
    to { stroke-dashoffset: 0; }
}

/* Data Particle Field */
.data-particle-field {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-rust);
    opacity: 0;
    animation: particleDrift 4s ease-in-out infinite;
}

@keyframes particleDrift {
    0% { opacity: 0; transform: translateY(0) translateX(0); }
    20% { opacity: 0.7; }
    80% { opacity: 0.7; }
    100% { opacity: 0; transform: translateY(-60px) translateX(30px); }
}

/* Annotations */
.annotation {
    margin-top: 3rem;
    padding-left: 1.5rem;
    border-left: 2px solid var(--color-rust);
}

.annotation-marker {
    font-family: var(--font-mono);
    color: var(--color-rust);
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.annotation-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--color-earth);
}

/* Fossil Imprint */
.fossil-imprint {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.monospace-data {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-gold);
    opacity: 0.8;
    letter-spacing: 0.03em;
}

/* ZK Specimen Animation */
.zk-specimen circle {
    transform-origin: center;
    animation: zkPulse 4s ease-in-out infinite;
}

.zk-specimen circle:nth-child(1) { animation-delay: 0s; }
.zk-specimen circle:nth-child(2) { animation-delay: 0.3s; }
.zk-specimen circle:nth-child(3) { animation-delay: 0.6s; }
.zk-specimen circle:nth-child(4) { animation-delay: 0.9s; }

@keyframes zkPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Footer */
#footer {
    padding: 4rem;
    background: var(--color-dark);
    text-align: center;
}

.footer-text {
    font-family: var(--font-display);
    font-variation-settings: 'wdth' 120;
    font-size: 1.2rem;
    color: var(--color-gold);
    margin-bottom: 0.5rem;
}

.footer-sub {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-brown);
    letter-spacing: 0.05em;
}

/* Scroll-based reveal */
.stratum-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.stratum-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .stratum {
        padding: 4rem 2rem;
    }
    .broken-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
    .block-b, .block-c, .block-e, .block-f, .block-h {
        margin-top: 0;
    }
}
