/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: #1a0a10;
    color: #f5ede0;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* Concrete Grain Overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: 0.06;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' type='fractalNoise' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 300px 300px;
}

/* === Grid Overlay === */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 39px,
            rgba(140, 47, 74, 0.2) 39px,
            rgba(140, 47, 74, 0.2) 40px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 39px,
            rgba(140, 47, 74, 0.15) 39px,
            rgba(140, 47, 74, 0.15) 40px
        );
    filter: url(#grid-wobble);
}

/* === Scroll Indicator === */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    right: 30px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 3px;
    background: #c8b9a8;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #c4596e;
    border-radius: 2px;
    transition: width 0.4s ease;
}

.scroll-indicator span.active::after {
    width: 100%;
}

/* === Diagonal Sections === */
.diagonal-section {
    position: relative;
    min-height: 100vh;
    padding: 12vh 8vw;
    display: flex;
    align-items: center;
}

/* Odd sections clip-path */
.diagonal-section:nth-child(odd of .diagonal-section) {
    clip-path: polygon(0 0, 100% 6vw, 100% 100%, 0 calc(100% - 6vw));
}

/* Even sections clip-path */
.diagonal-section:nth-child(even of .diagonal-section) {
    clip-path: polygon(0 6vw, 100% 0, 100% calc(100% - 6vw), 0 100%);
}

/* First section: straight top */
.hero-section {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6vw), 0 100%) !important;
}

.diagonal-section + .diagonal-section {
    margin-top: -6vw;
}

.diagonal-section:nth-child(1) { z-index: 10; }
.diagonal-section:nth-child(3) { z-index: 9; }
.diagonal-section:nth-child(5) { z-index: 8; }
.diagonal-section:nth-child(7) { z-index: 7; }
.diagonal-section:nth-child(9) { z-index: 6; }

.section-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* === Fade-Reveal System === */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.9s cubic-bezier(0.25, 0.1, 0.25, 1),
        transform 0.9s cubic-bezier(0.25, 0.1, 0.25, 1);
    transition-delay: calc(var(--reveal-index, 0) * 120ms);
}

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

/* === Hero Section === */
.hero-section {
    background: #1a0a10;
    background-image: radial-gradient(ellipse at 30% 70%, #4a1529 0%, #1a0a10 60%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    padding-top: 0;
}

.hero-section .section-content {
    position: relative;
    height: 100vh;
}

.hero-grid-line {
    position: absolute;
    top: 48vh;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(140, 47, 74, 0.4);
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

.wordmark-container {
    position: absolute;
    left: 0;
    top: 35vh;
}

.wordmark {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(3rem, 10vw, 9rem);
    font-weight: 700;
    color: #f5ede0;
    letter-spacing: -0.01em;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.wordmark-shadow {
    position: absolute;
    top: 4px;
    left: 4px;
    font-family: 'Baloo 2', cursive;
    font-size: clamp(3rem, 10vw, 9rem);
    font-weight: 700;
    color: #4a1529;
    letter-spacing: -0.01em;
    line-height: 1;
    z-index: 1;
    filter: url(#spray-stencil);
}

.tagline {
    position: absolute;
    top: 55vh;
    left: 0;
    font-family: 'Nunito', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 400;
    color: #c8b9a8;
    letter-spacing: 0.15em;
    text-transform: lowercase;
}

/* === Compression Section === */
.compression-section {
    background: #2a1520;
    background-image: radial-gradient(ellipse at 70% 30%, #4a1529 0%, #2a1520 55%);
    min-height: 100vh;
}

.compression-visual {
    display: flex;
    align-items: center;
    gap: clamp(24px, 4vw, 60px);
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hash-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 280px;
}

.hash-tag {
    font-family: 'Fira Code', monospace;
    font-size: clamp(0.6rem, 0.8vw, 0.8rem);
    color: #8c2f4a;
    text-shadow: 0 0 12px rgba(140, 47, 74, 0.3);
    padding: 2px 6px;
    border: 1px solid rgba(140, 47, 74, 0.25);
    border-radius: 3px;
    background: rgba(26, 10, 16, 0.5);
    white-space: nowrap;
}

.compression-arrow {
    flex-shrink: 0;
}

.proof-mark {
    display: flex;
    align-items: center;
    justify-content: center;
}

.proof-hash {
    font-family: 'Fira Code', monospace;
    font-size: clamp(1.2rem, 2vw, 2rem);
    color: #c4596e;
    text-shadow: 0 0 20px rgba(196, 89, 110, 0.4);
    border: 2px solid #c4596e;
    padding: 12px 24px;
    border-radius: 8px;
    background: rgba(26, 10, 16, 0.6);
}

.compression-text h2 {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    color: #f5ede0;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.compression-text p {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    color: #c8b9a8;
    max-width: 600px;
    line-height: 1.75;
}

/* === Proof Garden === */
.garden-section {
    background: #1a0a10;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 7px,
            rgba(200, 185, 168, 0.07) 7px,
            rgba(200, 185, 168, 0.07) 8px
        ),
        radial-gradient(ellipse at 50% 50%, #2a1520 0%, #1a0a10 70%);
    min-height: 100vh;
}

.garden-title {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #f5ede0;
    letter-spacing: 0.02em;
    text-align: center;
    margin-bottom: 4rem;
}

.proof-stones {
    display: flex;
    justify-content: center;
    gap: clamp(16px, 3vw, 48px);
    flex-wrap: wrap;
}

.proof-stone {
    width: clamp(120px, 15vw, 180px);
    height: clamp(120px, 15vw, 180px);
    border-radius: 16px;
    border: 1px solid #8c2f4a;
    background: rgba(42, 21, 32, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.proof-stone::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.7' type='fractalNoise' numOctaves='3'/%3E%3C/filter%3E%3Crect width='150' height='150' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.proof-stone span {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(1rem, 1.5vw, 1.4rem);
    font-weight: 700;
    color: #f5ede0;
    letter-spacing: 0.02em;
    z-index: 1;
}

.garden-caption {
    text-align: center;
    margin-top: 3rem;
    font-family: 'Nunito', sans-serif;
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
    color: #c8b9a8;
    letter-spacing: 0.1em;
    text-transform: lowercase;
    font-style: italic;
}

/* === Architecture Mural === */
.architecture-section {
    background: #2a1520;
    background-image: radial-gradient(ellipse at 25% 60%, #4a1529 0%, #2a1520 50%);
    min-height: 100vh;
}

.arch-title {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #f5ede0;
    letter-spacing: 0.02em;
    margin-bottom: 3rem;
}

.arch-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    max-width: 700px;
}

.arch-layer {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.arch-layer-label {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(1.1rem, 1.8vw, 1.6rem);
    font-weight: 700;
    color: #f5ede0;
    min-width: 200px;
}

.arch-layer-bar {
    height: 8px;
    border-radius: 4px;
    position: relative;
}

.arch-l1 {
    width: clamp(200px, 35vw, 400px);
    background: linear-gradient(90deg, #4a1529, #8c2f4a);
}

.arch-da {
    width: clamp(170px, 30vw, 340px);
    background: linear-gradient(90deg, #4a1529, #c4596e);
}

.arch-seq {
    width: clamp(140px, 25vw, 280px);
    background: linear-gradient(90deg, #8c2f4a, #c4596e);
}

.arch-prover {
    width: clamp(100px, 18vw, 200px);
    background: linear-gradient(90deg, #c4596e, #f5ede0);
}

/* Drip marks on bars */
.arch-layer-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 100%;
    width: 2px;
    height: 20px;
    background: inherit;
    border-radius: 0 0 2px 2px;
    opacity: 0.5;
}

.arch-connector {
    padding-left: 100px;
    display: flex;
    align-items: center;
}

.arch-annotation {
    font-family: 'Fira Code', monospace;
    font-size: clamp(0.7rem, 0.85vw, 0.9rem);
    color: #8c2f4a;
    text-shadow: 0 0 12px rgba(140, 47, 74, 0.3);
}

/* === Closing Section === */
.closing-section {
    background: #f5ede0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.closing-section .section-content {
    text-align: center;
}

.closing-text {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 400;
    color: #4a1529;
    letter-spacing: 0.05em;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* === Decorative Marks === */
.deco-slash {
    position: absolute;
    width: 2px;
    height: 40px;
    background: #c4596e;
    transform: rotate(45deg);
    opacity: 0.6;
    pointer-events: none;
}

.deco-slash-1 {
    right: 12vw;
    top: 25vh;
}

.deco-slash-2 {
    left: 5vw;
    bottom: 20vh;
}

.deco-dots {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #c4596e;
    border-radius: 50%;
    opacity: 0.5;
    pointer-events: none;
}

.deco-dots::before,
.deco-dots::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #c4596e;
    border-radius: 50%;
}

.deco-dots::before {
    top: -10px;
    left: 8px;
}

.deco-dots::after {
    top: 4px;
    left: 12px;
}

.deco-dots-1 {
    left: 15vw;
    bottom: 30vh;
}

.deco-circle {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 1px solid #c4596e;
    border-radius: 50%;
    opacity: 0.4;
    pointer-events: none;
}

.deco-circle::before,
.deco-circle::after {
    content: '';
    position: absolute;
    background: #c4596e;
}

.deco-circle::before {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
}

.deco-circle::after {
    width: 100%;
    height: 1px;
    top: 50%;
    left: 0;
}

.deco-circle-1 {
    right: 10vw;
    bottom: 25vh;
}

/* === Responsive === */
@media (max-width: 768px) {
    .diagonal-section {
        padding: 15vh 6vw;
    }

    .compression-visual {
        flex-direction: column;
        align-items: flex-start;
    }

    .proof-stones {
        flex-direction: column;
        align-items: center;
    }

    .proof-stone {
        width: 80%;
        max-width: 250px;
        height: 100px;
    }

    .arch-layer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .arch-connector {
        padding-left: 20px;
    }
}
