/* archaic.works - Digital Archaeological Excavation */

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

body {
    background-color: #E8DFD0;
    color: #1C1917;
    font-family: 'Crimson Pro', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* Archaeological Grid Overlay */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(107,91,62,0.06) 39px, rgba(107,91,62,0.06) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(107,91,62,0.06) 39px, rgba(107,91,62,0.06) 40px);
    pointer-events: none;
    z-index: 1;
}

/* Incised Letterform Effect */
.incised {
    color: #6B5B3E;
    text-shadow:
        -1px -1px 0 #0F0D0B,
        1px 1px 0 #D9CBAF;
}

/* Stone Lintel Navigation */
#stone-lintel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(180deg, #D9CBAF 0%, #C4A265 40%, #B89858 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(15,13,11,0.3);
}

.nav-text {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.nav-separator {
    color: #6B5B3E;
    font-size: 1.2rem;
}

/* Hero - Topsoil */
#hero-topsoil {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 30% 50%, rgba(196,162,101,0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(217,203,175,0.4) 0%, transparent 50%),
        linear-gradient(180deg, #E8DFD0 0%, #D9CBAF 100%);
    overflow: hidden;
}

.surface-cracks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

#crack-svg {
    width: 100%;
    height: 100%;
}

.crack-line {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    opacity: 0;
}

.crack-line.drawn {
    stroke-dashoffset: 0;
    opacity: 1;
    transition: stroke-dashoffset 2.5s ease, opacity 0.5s ease;
}

.hero-title-container {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero-title {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-title.visible {
    opacity: 1;
}

.hero-subtitle {
    font-family: 'Spectral', serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    letter-spacing: 0.05em;
    color: #6B5B3E;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.hero-subtitle.visible {
    opacity: 1;
}

/* Stratum Sections */
.stratum {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

/* Sandstone Layer */
.sandstone-layer {
    background:
        radial-gradient(circle at 20% 40%, rgba(196,162,101,0.15) 0%, transparent 30%),
        radial-gradient(circle at 80% 60%, rgba(217,203,175,0.2) 0%, transparent 30%),
        linear-gradient(180deg, #D9CBAF, #C4A265 40%, #D9CBAF);
}

/* Clay Layer */
.clay-layer {
    background:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(160,82,45,0.05) 2px, rgba(160,82,45,0.05) 3px),
        linear-gradient(180deg, #A0522D 0%, #6B5B3E 50%, #A0522D 100%);
    color: #E8DFD0;
}

.clay-layer .incised {
    color: #D9CBAF;
    text-shadow: -1px -1px 0 #1C1917, 1px 1px 0 #A0522D;
}

.clay-layer .catalog-label {
    color: #D9CBAF;
}

/* Limestone Layer */
.limestone-layer {
    background:
        radial-gradient(circle at 50% 50%, rgba(232,223,208,0.5) 0%, transparent 50%),
        linear-gradient(180deg, #E8DFD0, #D9CBAF);
}

/* Basalt Layer */
.basalt-layer {
    background:
        radial-gradient(circle at 30% 70%, rgba(42,37,32,0.3) 0%, transparent 40%),
        linear-gradient(180deg, #2A2520, #1C1917);
    color: #D9CBAF;
}

.basalt-layer .incised {
    color: #C4A265;
    text-shadow: -1px -1px 0 #0F0D0B, 1px 1px 0 #2A2520;
}

.basalt-layer .catalog-label {
    color: #6B5B3E;
}

/* Stratum Transitions */
.stratum-transition {
    height: 40px;
    position: relative;
    overflow: hidden;
}

.dust-band {
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(90deg, transparent 0px, transparent 3px, rgba(196,162,101,0.1) 3px, rgba(196,162,101,0.1) 6px),
        linear-gradient(90deg, #D9CBAF, #C4A265, #D9CBAF);
    animation: dustDrift 40s linear infinite;
}

@keyframes dustDrift {
    from { background-position: 0 0; }
    to { background-position: 200px 0; }
}

/* Content Blocks */
.content-block {
    width: 55vw;
    max-width: 700px;
    min-width: 300px;
    padding: 48px;
    position: relative;
    mask-image: radial-gradient(ellipse 95% 90% at center, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 95% 90% at center, black 60%, transparent 100%);
    opacity: 0;
    filter: blur(3px);
    transition: opacity 0.8s ease, filter 0.8s ease;
}

.content-block.revealed {
    opacity: 1;
    filter: blur(0);
}

.content-left { margin-left: 10%; }
.content-center-right { margin-left: 35%; }
.content-center-left { margin-left: 15%; }

/* Catalog Labels */
.catalog-label {
    font-family: 'Fira Code', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: #6B5B3E;
    display: block;
    margin-bottom: 12px;
}

/* Section Titles */
.section-title {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

/* Body Text */
.content-block p {
    margin-bottom: 1.2em;
}

.content-block em {
    font-style: italic;
}

/* Artifact Silhouettes */
.artifact-silhouette {
    position: absolute;
    z-index: 5;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.silhouette-left {
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.silhouette-right {
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
}

.artifact-silhouette:hover svg path,
.artifact-silhouette:hover svg line,
.artifact-silhouette:hover svg circle {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: artifactDraw 1.5s ease forwards;
}

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

/* Bedrock Footer */
#bedrock {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 50%, rgba(42,37,32,0.5) 0%, transparent 50%),
        linear-gradient(180deg, #1C1917, #0F0D0B);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.fossil-imprint {
    position: relative;
}

.fossil-text {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #1C1917;
    text-shadow: 0 0 0 transparent;
    opacity: 0.01;
    transition: opacity 0.3s ease;
}

.fossil-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196,162,101,0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.bedrock-meta {
    margin-top: 40px;
}

.bedrock-meta .catalog-label {
    color: #6B5B3E;
    opacity: 0.4;
}

/* Responsive */
@media (max-width: 768px) {
    .content-block {
        width: 85vw;
    }
    .content-left,
    .content-center-right,
    .content-center-left {
        margin-left: 7.5%;
    }
    .artifact-silhouette {
        display: none;
    }
    #stone-lintel {
        height: 50px;
    }
    .nav-text {
        font-size: 0.8rem;
    }
}
