/* ppuzzle.dev - Brutalist Geological Political Timeline */

:root {
    --parchment: #F0EDE6;
    --gold: #C8B88A;
    --warm-linen: #E8DFC8;
    --deep-earth: #1A1714;
    --moss: #5A8F7A;
    --dark-brown: #2C2722;
    --copper: #8B5E3C;
    --stone-gray: #6B6560;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--parchment);
    color: var(--dark-brown);
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
}

/* Paper Texture Overlay */
.paper-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-radial-gradient(
        circle at 50% 50%,
        rgba(200, 184, 138, 0.03) 0px,
        transparent 1px,
        transparent 3px
    );
}

/* Timeline Spine */
.timeline-spine {
    position: fixed;
    left: 60px;
    top: 0;
    bottom: 0;
    width: 2px;
    z-index: 10;
}

.spine-line {
    width: 100%;
    height: 0%;
    background: var(--gold);
    transition: height 0.1s linear;
}

/* Strata */
.stratum {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px 80px 120px;
    position: relative;
}

/* Surface Section */
.surface {
    background: var(--parchment);
    flex-direction: column;
    gap: 32px;
    text-align: center;
    padding-left: 40px;
}

.wordmark {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.02em;
    color: var(--deep-earth);
    opacity: 0;
    animation: surfaceReveal 1.5s ease-out 0.3s forwards;
}

.surface-tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--stone-gray);
    opacity: 0;
    animation: surfaceReveal 1.2s ease-out 0.8s forwards;
}

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

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: surfaceReveal 1s ease-out 1.5s forwards;
}

.hint-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--gold);
}

.hint-arrow {
    animation: bounceDown 2s ease-in-out infinite;
}

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

/* Stratum Marker */
.stratum-marker {
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.marker-depth {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--copper);
    text-transform: uppercase;
}

.marker-era {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--stone-gray);
}

/* Frost Panels */
.frost-panel {
    background: rgba(240, 237, 230, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(200, 184, 138, 0.2);
    padding: 48px 40px;
    max-width: 600px;
    width: 100%;
    margin-left: 60px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.frost-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.stratum-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    letter-spacing: 0.02em;
    color: var(--deep-earth);
    margin-bottom: 20px;
}

.stratum-summary {
    font-size: 15px;
    color: var(--dark-brown);
    line-height: 1.8;
    margin-bottom: 12px;
}

.stratum-expanded {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease;
}

.stratum-expanded.open {
    max-height: 300px;
    opacity: 1;
}

.stratum-expanded p {
    font-size: 14px;
    color: var(--stone-gray);
    line-height: 1.8;
    padding-top: 8px;
    border-top: 1px solid rgba(200, 184, 138, 0.3);
}

.disclosure-toggle {
    display: inline-block;
    margin-top: 12px;
    padding: 0;
    background: none;
    border: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--moss);
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.2s;
}

.disclosure-toggle:hover {
    color: var(--copper);
}

/* Stratum gradient backgrounds */
#stratum1 {
    background: linear-gradient(180deg, var(--parchment) 0%, var(--warm-linen) 100%);
}

#stratum2 {
    background: linear-gradient(180deg, var(--warm-linen) 0%, #DDD5BE 100%);
}

#stratum3 {
    background: linear-gradient(180deg, #DDD5BE 0%, var(--gold) 100%);
}

/* Bedrock */
.bedrock {
    background: var(--dark-brown);
    flex-direction: column;
    text-align: center;
    padding-left: 40px;
    min-height: 80vh;
}

.mountain-silhouette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--dark-brown) 100%);
    clip-path: polygon(0 0, 15% 60%, 28% 20%, 42% 70%, 55% 10%, 70% 55%, 85% 25%, 100% 0, 100% 100%, 0 100%);
}

.bedrock-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--parchment);
    letter-spacing: 0.02em;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.bedrock-text {
    font-size: 15px;
    color: var(--gold);
    max-width: 500px;
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

.bedrock-contact {
    margin-top: 32px;
    position: relative;
    z-index: 2;
}

.bedrock-link {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    color: var(--moss);
    letter-spacing: 0.04em;
    opacity: 0.7;
}
