/* ggoomimi.com - Evolved Minimal Crystalline Dream */

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

:root {
    --parchment: #F5F0E8;
    --espresso: #2A2018;
    --bronze: #B8956A;
    --amber-dust: #D4A574;
    --champagne: #E8C8A0;
    --walnut: #5C4832;
    --rose-quartz: #C9A8B0;
    --charcoal-silk: #1E1A16;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--parchment);
    color: var(--espresso);
    overflow-x: hidden;
    line-height: 1.75;
}

/* Noise Texture Layer */
.noise-svg {
    position: absolute;
    width: 0;
    height: 0;
}

.noise-layer {
    position: fixed;
    inset: 0;
    background: var(--parchment);
    opacity: 0.03;
    filter: url(#noiseFilter);
    pointer-events: none;
    z-index: 0;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.progress-track {
    width: 2px;
    height: 60px;
    background: var(--champagne);
    position: relative;
}

.progress-dot {
    width: 6px;
    height: 6px;
    background: var(--bronze);
    border-radius: 50%;
    position: absolute;
    left: -2px;
    top: 0;
    transition: top 100ms ease;
}

/* Timeline Spine */
.timeline-spine {
    position: fixed;
    left: 25vw;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--bronze);
    z-index: 10;
    transition: width 300ms ease;
}

/* Crystal Nodes */
.crystal-node {
    position: absolute;
    left: 25vw;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    z-index: 20;
    transition: width 800ms ease-out, height 800ms ease-out, transform 800ms ease-out;
}

.crystal-node::before {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid var(--bronze);
    background: transparent;
}

.crystal-node::after {
    content: '';
    position: absolute;
    inset: 3px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid var(--amber-dust);
    background: transparent;
}

.crystal-node.active {
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%) rotate(15deg);
}

/* Strata */
.stratum {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    z-index: 5;
}

.stratum-hero {
    justify-content: flex-start;
    padding-left: calc(25vw + 40px);
    min-height: 100vh;
}

.stratum-content {
    padding-left: calc(25vw + 40px);
    padding-right: 10vw;
    margin-top: 60vh;
}

.stratum-closing {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 60vh;
}

/* Crystal Formations */
.crystal-formation {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

.crystal-hero {
    left: calc(25vw - 200px);
    top: 50%;
    transform: translateY(-50%);
    width: 40vw;
    height: 50vh;
    opacity: 0;
    transition: opacity 2000ms ease-in-out;
}

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

.crystal-svg {
    width: 100%;
    height: 100%;
}

.crystal-facet {
    opacity: 0;
    transition: opacity 600ms ease-in-out;
    transition-delay: calc(var(--i, 0) * 100ms);
}

.crystal-hero.visible .crystal-facet {
    opacity: 0.6;
}

.crystal-closing {
    width: 60vw;
    height: 60vh;
}

.crystal-final {
    width: 100%;
    height: 100%;
}

.closing-facet {
    opacity: 0.5;
    transition: opacity 800ms ease, transform 800ms ease;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 30;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: 0.06em;
    line-height: 1.05;
    color: var(--espresso);
}

.hero-title .cursor {
    display: inline-block;
    width: 2px;
    height: 0.8em;
    background: var(--bronze);
    margin-left: 4px;
    animation: blink 1s steps(1) infinite;
    vertical-align: baseline;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-subtitle {
    margin-top: 24px;
    opacity: 0;
    transition: opacity 400ms ease;
}

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

.mono-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.75rem, 0.9vw, 0.875rem);
    letter-spacing: 0.08em;
    color: var(--walnut);
}

/* Content Blocks */
.content-block {
    max-width: 55vw;
    position: relative;
}

.slide-in {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.slide-in.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-date {
    display: block;
    margin-bottom: 16px;
    color: var(--bronze);
}

.section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4.5rem);
    letter-spacing: 0.02em;
    line-height: 1.05;
    color: var(--espresso);
    margin-bottom: 24px;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.75;
    color: var(--espresso);
    max-width: 32ch;
}

/* Ghost Typography */
.ghost-letter {
    position: absolute;
    font-family: 'Playfair Display', serif;
    font-size: clamp(15rem, 25vw, 25rem);
    color: transparent;
    -webkit-text-stroke: 1px var(--champagne);
    pointer-events: none;
    z-index: 1;
    left: 15vw;
    opacity: 0.4;
}

.ghost-1 {
    top: 120vh;
}

/* Grain Dividers */
.grain-divider {
    width: 100%;
    height: 3px;
    background: var(--champagne);
    opacity: 0.3;
    position: relative;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-spine {
        left: 24px;
    }

    .crystal-node {
        left: 24px;
    }

    .stratum-hero {
        padding-left: 60px;
        padding-right: 24px;
    }

    .stratum-content {
        padding-left: 60px;
        padding-right: 24px;
        margin-top: 30vh;
    }

    .stratum-closing {
        margin-top: 30vh;
    }

    .content-block {
        max-width: calc(100vw - 84px);
    }

    .body-text {
        max-width: 100%;
    }

    .crystal-hero {
        left: -20px;
        width: 80vw;
    }

    .ghost-letter {
        display: none;
    }

    .scroll-progress {
        right: 12px;
    }
}
