/* ============================================
   archaic.studio - Archaeological Descent
   Mid-Century Museum / Wabi-Sabi
   ============================================ */

:root {
    --cool-limestone: #d4cfc6;
    --fired-clay: #2a1f14;
    --aged-vellum: #f5efe0;
    --terracotta: #a0522d;
    --bronze-patina: #7a6840;
    --worn-stone: #8a7f72;
    --deep-charcoal: #2e2a25;
    --amber-glow: #c4943a;
    --nav-parchment: #eae2d0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cool-limestone);
    color: var(--deep-charcoal);
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 2.0;
    overflow-x: hidden;
}

/* Paper-aged texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.06;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='t'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='1' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23t)'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* --- Navigation --- */
.nav-trigger {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 200;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.wedge {
    display: block;
    height: 2px;
    background: var(--bronze-patina);
    transition: opacity 0.3s ease;
}

.wedge-1 { width: 24px; }
.wedge-2 { width: 18px; }
.wedge-3 { width: 12px; }

.nav-trigger:hover .wedge {
    opacity: 0.6;
}

.nav-panel {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--nav-parchment);
    z-index: 150;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    padding: 0 40px;
}

.nav-panel.open {
    right: 0;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-link {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--deep-charcoal);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--terracotta);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--cool-limestone);
}

.crack-pattern {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-glyph {
    width: 200px;
    height: 200px;
    position: relative;
    z-index: 2;
}

.glyph-stroke {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: glyphDraw 3s ease-in-out 0.6s forwards;
}

.glyph-stroke:nth-child(1) { animation-delay: 0.6s; }
.glyph-stroke:nth-child(2) { animation-delay: 1.0s; }
.glyph-stroke:nth-child(3) { animation-delay: 1.4s; }
.glyph-stroke:nth-child(4) { animation-delay: 1.8s; }
.glyph-stroke:nth-child(5) { animation-delay: 2.0s; }
.glyph-stroke:nth-child(6) { animation-delay: 2.2s; }
.glyph-stroke:nth-child(7) { animation-delay: 2.6s; }

.glyph-dot {
    opacity: 0;
    animation: dotFade 0.5s ease-out 3.2s forwards;
}

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

@keyframes dotFade {
    to { opacity: 1; }
}

.hero-title {
    position: absolute;
    bottom: 60px;
    left: 60px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 5rem);
    letter-spacing: 0.18em;
    color: var(--deep-charcoal);
    opacity: 0;
    animation: titleFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) 3.6s forwards;
    text-transform: lowercase;
}

@keyframes titleFade {
    to { opacity: 1; }
}

/* --- Sediment Lines --- */
.sediment-line {
    width: 100%;
    height: 6px;
    overflow: hidden;
}

.sediment-line svg {
    width: 100%;
    height: 100%;
}

/* --- First Stratum --- */
.stratum-1 {
    padding: 100px 0;
    background: var(--cool-limestone);
}

.stratum-content {
    display: flex;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
}

.depth-marker {
    width: 2px;
    min-height: 100%;
    background: var(--terracotta);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.stratum-1.visible .depth-marker {
    opacity: 1;
}

.text-column {
    max-width: 38em;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 0.06em;
    color: var(--deep-charcoal);
    margin-bottom: 2rem;
}

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

/* Slide reveal */
.slide-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Second Stratum (Gallery) --- */
.stratum-2 {
    padding: 80px 0;
    background: var(--cool-limestone);
}

.gallery-heading {
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 0 40px;
}

.gallery-track {
    display: flex;
    gap: 3rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2rem 40px;
    -webkit-overflow-scrolling: touch;
}

.gallery-track::-webkit-scrollbar {
    height: 4px;
}

.gallery-track::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.gallery-track::-webkit-scrollbar-thumb {
    background: var(--bronze-patina);
    border-radius: 2px;
}

.gallery-card {
    flex-shrink: 0;
    width: 320px;
    background: var(--aged-vellum);
    border-radius: 4px;
    padding: 2.5rem 2rem;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.06);
    scroll-snap-align: start;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    perspective: 800px;
    position: relative;
}

.gallery-card:hover {
    transform: rotateX(2deg) rotateY(3deg);
}

.card-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bronze-patina);
    margin-bottom: 1.2rem;
    transition: box-shadow 0.3s ease;
}

.gallery-card:hover .card-indicator {
    box-shadow: 0 0 12px rgba(196, 148, 58, 0.2);
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    color: var(--deep-charcoal);
    margin-bottom: 0.8rem;
}

.card-desc {
    font-size: 16px;
    color: var(--deep-charcoal);
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.card-date {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.08em;
    color: var(--worn-stone);
}

/* --- Third Stratum (Process Timeline) --- */
.stratum-3 {
    padding: 80px 40px;
    background: linear-gradient(to bottom, var(--cool-limestone), #c8bfb0);
}

.stratum-3 .section-heading {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 50px;
}

.timeline-line {
    position: absolute;
    left: 10px;
    top: 0;
    width: 20px;
    height: 100%;
}

.timeline-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 0.1s linear;
}

.timeline-steps {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.timeline-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-node {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--bronze-patina);
    flex-shrink: 0;
    margin-top: 6px;
    transition: box-shadow 0.4s ease;
}

.timeline-step:hover .step-node {
    box-shadow: 0 0 12px rgba(196, 148, 58, 0.2);
}

.step-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    color: var(--deep-charcoal);
    margin-bottom: 0.5rem;
}

.step-text {
    font-size: 17px;
    line-height: 1.9;
    color: var(--deep-charcoal);
    opacity: 0.85;
}

/* Blur reveal */
.blur-reveal {
    filter: blur(6px);
    opacity: 0;
    transition: filter 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.blur-reveal.visible {
    filter: blur(0);
    opacity: 1;
}

/* --- Bedrock --- */
.bedrock {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--fired-clay);
    padding: 80px 40px;
}

.bedrock-content {
    text-align: center;
}

.bedrock-glyph {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
}

.bedrock-contact {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 20px;
    color: var(--aged-vellum);
    margin-bottom: 2rem;
    letter-spacing: 0.04em;
}

.bedrock-colophon {
    font-family: 'Noto Sans Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--worn-stone);
    text-transform: uppercase;
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .hero-title {
        bottom: 30px;
        left: 30px;
        font-size: clamp(1.5rem, 6vw, 3rem);
    }

    .stratum-content {
        padding: 0 20px;
    }

    .gallery-card {
        width: 280px;
    }

    .timeline-container {
        padding-left: 40px;
    }

    .nav-panel {
        width: 240px;
        right: -240px;
    }
}
