:root {
    --stone: #d8d2c8;
    --paper: #f0e8d8;
    --ceramic: #e8dcc8;
    --signal-dark: #1e1e22;
    --vault-black: #161618;
    --ink-dark: #2c2820;
    --ink-light: #d8d0c4;
    --grain-detail: #b8a890;
    --specimen-border: #c8bca8;
    --signal-line: #3a3a40;
    --body-dark: #3d3830;
    --body-light: #b8b0a4;
    --specimen-text: #6b6058;
    --specimen-text-dark: #8a8278;
}

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

body {
    background-color: var(--stone);
    color: var(--body-dark);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.08rem);
    line-height: 1.8;
    overflow-x: hidden;
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Surfaces */
.surface {
    min-height: 100vh;
    padding: clamp(40px, 8vh, 80px) clamp(20px, 8vw, 120px);
    position: relative;
    overflow: hidden;
}

/* Noise overlays */
.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.stone-grain {
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='4' type='fractalNoise' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: 0.12;
}

.paper-grain {
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.4' numOctaves='2' type='fractalNoise' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.1'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: 0.08;
}

.ceramic-grain {
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.5' numOctaves='3' type='fractalNoise' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    opacity: 0.1;
}

/* Display typography */
.display-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.dark-text {
    color: var(--ink-dark);
}

.light-text {
    color: var(--ink-light);
}

/* Reveal animation */
[data-reveal] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

[data-reveal].revealed {
    opacity: 1;
}

/* ================================================
   Section 1: Stone Surface
   ================================================ */
.surface-stone {
    background-color: var(--stone);
    display: flex;
    align-items: flex-start;
    padding-top: 25vh;
}

.stone-content {
    margin-left: 12%;
    position: relative;
    z-index: 2;
}

.tagline {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: var(--body-dark);
    margin-top: 20px;
    letter-spacing: 0.02em;
}

/* ================================================
   Section 2: Paper Archive
   ================================================ */
.surface-paper {
    background-color: var(--paper);
}

.archive-grid {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 24px;
    position: relative;
    z-index: 2;
    max-width: 1000px;
}

.archive-grid::after {
    content: '';
    position: absolute;
    left: 55%;
    top: 0;
    bottom: 0;
    width: 1px;
    border-left: 1px dashed var(--specimen-border);
}

.archive-prose {
    padding-right: 24px;
}

.archive-prose p {
    margin-bottom: 24px;
    color: var(--body-dark);
}

.archive-specimens {
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.specimen-box {
    border: 1px solid var(--specimen-border);
    padding: 12px 16px;
}

.specimen-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--specimen-text);
}

/* ================================================
   Section 3: Ceramic Surface
   ================================================ */
.surface-ceramic {
    background-color: var(--ceramic);
}

.ceramic-content {
    max-width: 50%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.ceramic-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.25vw, 1.2rem);
    line-height: 2.0;
    color: var(--body-dark);
    margin-bottom: 32px;
}

/* Craquelure */
.craquelure {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
}

.craq-1 {
    width: 40px;
    height: 50px;
    top: 15%;
    left: 10%;
}

.craq-2 {
    width: 50px;
    height: 40px;
    top: 35%;
    right: 15%;
}

.craq-3 {
    width: 45px;
    height: 55px;
    top: 55%;
    left: 25%;
}

.craq-4 {
    width: 35px;
    height: 45px;
    top: 20%;
    right: 30%;
}

.craq-5 {
    width: 50px;
    height: 50px;
    top: 70%;
    right: 10%;
}

.craq-6 {
    width: 40px;
    height: 40px;
    top: 80%;
    left: 45%;
}

/* ================================================
   Section 4: Signal Floor
   ================================================ */
.surface-signal {
    background-color: var(--signal-dark);
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(58, 58, 64, 0.6) 0 1px,
        transparent 1px 4px
    );
}

.signal-content {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.signal-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.08rem);
    line-height: 1.8;
    color: var(--body-light);
    margin-bottom: 28px;
}

/* ================================================
   Section 5: The Vault
   ================================================ */
.surface-vault {
    background-color: var(--vault-black);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.vault-content {
    position: relative;
    z-index: 2;
}

.vault-content .display-title {
    margin-bottom: 40px;
}

.hash {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--specimen-text-dark);
    word-break: break-all;
    max-width: 600px;
    display: block;
    line-height: 1.8;
}

.vault-silence {
    height: 160px;
}

/* Mobile */
@media (max-width: 768px) {
    .stone-content {
        margin-left: 8%;
    }

    .archive-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .archive-grid::after {
        display: none;
    }

    .archive-prose {
        padding-right: 0;
    }

    .archive-specimens {
        padding-left: 0;
    }

    .ceramic-content {
        max-width: 90%;
    }

    .craquelure {
        transform: scale(0.7);
    }

    .signal-content {
        max-width: 90%;
    }

    .hash {
        font-size: 0.6rem;
        max-width: 90vw;
    }
}
