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

:root {
    --gold: #c9a84c;
    --gold-dim: #8a7d65;
    --gold-dark: #6b5f47;
    --gold-darkest: #3d3422;
    --cream: #e8dcc0;
    --bg-deep: #050505;
    --bg-mid: #0a0a0a;
    --bg-surface: #0d0d0a;
    --text-muted: #b8a882;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-deep);
    color: var(--cream);
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
    line-height: 1.7;
}

.mono {
    font-family: 'Inconsolata', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Layers */
.layer {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.layer-content {
    max-width: 600px;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Layer 0 — Surface */
.layer-0 {
    background: var(--bg-deep);
    min-height: 100vh;
}

.hero-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 8rem);
    color: var(--gold);
    letter-spacing: -0.02em;
    line-height: 0.95;
    text-shadow: 0 0 40px #c9a84c22, 0 0 80px #c9a84c11;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: var(--gold-dim);
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    display: block;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: pulse-line 2s ease-in-out infinite;
}

@keyframes pulse-line {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* Section styles */
.layer-label {
    margin-bottom: 1.5rem;
    color: var(--gold-dark);
}

.section-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2rem, 6vw, 4rem);
    color: var(--gold);
    margin-bottom: 1.5rem;
    line-height: 1;
}

.section-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

/* Layer backgrounds */
.layer-1 {
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-surface) 100%);
}

.layer-2 {
    background: linear-gradient(180deg, var(--bg-surface) 0%, #0a0908 100%);
}

.layer-3 {
    background: linear-gradient(180deg, #0a0908 0%, #080706 100%);
}

.layer-4 {
    background: linear-gradient(180deg, #080706 0%, var(--bg-deep) 100%);
}

/* Artifacts */
.artifact {
    margin: 2rem auto;
    position: relative;
}

/* Sphere artifact */
.artifact-sphere {
    width: 200px;
    height: 200px;
    margin: 3rem auto;
}

.sphere-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 30%, var(--gold-dark), var(--bg-deep));
    box-shadow:
        0 0 20px #c9a84c22,
        0 0 40px #c9a84c11,
        inset 0 -20px 40px #050505;
}

.sphere-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateX(70deg);
    width: 160px;
    height: 160px;
    border: 1px solid var(--gold-dark);
    border-radius: 50%;
    opacity: 0.6;
    animation: spin-slow 20s linear infinite;
}

.sphere-ring-2 {
    width: 190px;
    height: 190px;
    transform: translate(-50%, -50%) rotateX(70deg) rotateZ(60deg);
    animation-duration: 30s;
    animation-direction: reverse;
    opacity: 0.3;
}

@keyframes spin-slow {
    from { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg); }
    to { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg); }
}

/* Crystal artifact */
.artifact-crystal {
    width: 150px;
    height: 200px;
    margin: 2rem auto;
}

.crystal-shard {
    position: absolute;
    background: linear-gradient(135deg, var(--gold-darkest), var(--bg-deep));
    border: 1px solid var(--gold-dark);
    opacity: 0.8;
}

.crystal-shard-1 {
    width: 40px;
    height: 120px;
    left: 55px;
    top: 40px;
    transform: rotate(-5deg);
    clip-path: polygon(50% 0%, 100% 30%, 80% 100%, 20% 100%, 0% 30%);
}

.crystal-shard-2 {
    width: 30px;
    height: 90px;
    left: 35px;
    top: 70px;
    transform: rotate(-15deg);
    clip-path: polygon(50% 0%, 100% 25%, 85% 100%, 15% 100%, 0% 25%);
}

.crystal-shard-3 {
    width: 25px;
    height: 80px;
    left: 85px;
    top: 60px;
    transform: rotate(10deg);
    clip-path: polygon(50% 0%, 100% 20%, 90% 100%, 10% 100%, 0% 20%);
}

/* Monolith artifact */
.artifact-monolith {
    width: 120px;
    height: 200px;
    margin: 2rem auto;
    perspective: 600px;
}

.monolith-face {
    position: absolute;
    background: var(--bg-mid);
    border: 1px solid var(--gold-darkest);
}

.monolith-front {
    width: 80px;
    height: 180px;
    left: 20px;
    top: 10px;
    transform: rotateY(-5deg);
    box-shadow: 0 20px 60px #c9a84c11, inset 0 0 40px #c9a84c08;
}

.monolith-side {
    width: 30px;
    height: 180px;
    left: 100px;
    top: 10px;
    transform: rotateY(60deg) translateZ(-10px);
    background: var(--bg-deep);
    opacity: 0.7;
}

.monolith-top {
    width: 80px;
    height: 20px;
    left: 20px;
    top: 0;
    transform: rotateX(60deg);
    background: var(--gold-darkest);
    opacity: 0.4;
}

/* Hex grid */
.hex-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 2rem;
    max-width: 200px;
    margin-left: auto;
    margin-right: auto;
}

.hex-cell {
    width: 40px;
    height: 46px;
    background: var(--bg-mid);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid var(--gold-darkest);
    transition: background 0.5s ease;
}

.hex-cell:hover {
    background: var(--gold-darkest);
}

/* Eye artifact */
.artifact-eye {
    width: 180px;
    height: 100px;
    margin: 2rem auto;
    position: relative;
}

.eye-outer {
    position: absolute;
    width: 180px;
    height: 90px;
    top: 5px;
    left: 0;
    border-radius: 50%;
    border: 1px solid var(--gold-dark);
    overflow: hidden;
}

.eye-iris {
    position: absolute;
    width: 70px;
    height: 70px;
    top: 15px;
    left: 55px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: radial-gradient(circle, var(--gold-darkest), var(--bg-deep));
    box-shadow: 0 0 20px #c9a84c33;
}

.eye-pupil {
    position: absolute;
    width: 30px;
    height: 30px;
    top: 35px;
    left: 75px;
    border-radius: 50%;
    background: var(--bg-deep);
    transition: transform 0.3s ease;
}

.eye-glint {
    position: absolute;
    width: 8px;
    height: 8px;
    top: 32px;
    left: 82px;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.8;
}

/* Core artifact */
.artifact-core {
    width: 200px;
    height: 200px;
    margin: 2rem auto;
    position: relative;
}

.core-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1px solid var(--gold-dark);
    opacity: 0.5;
    animation: core-expand 3s ease-in-out infinite;
}

.core-pulse-2 {
    animation-delay: 1s;
    width: 80px;
    height: 80px;
}

.core-pulse-3 {
    animation-delay: 2s;
    width: 160px;
    height: 160px;
}

.core-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 30px var(--gold), 0 0 60px #c9a84c44;
    animation: core-glow 2s ease-in-out infinite alternate;
}

@keyframes core-expand {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.1; }
}

@keyframes core-glow {
    from { box-shadow: 0 0 30px var(--gold), 0 0 60px #c9a84c44; }
    to { box-shadow: 0 0 50px var(--gold), 0 0 100px #c9a84c66; }
}

/* Data streams */
.data-stream,
.pressure-reading,
.final-transmission {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 2rem;
}

.data-line {
    color: var(--gold-dark);
    opacity: 0.7;
    font-size: 0.7rem;
}

/* Reveal animations */
.layer-content {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease, transform 1s ease;
}

.layer-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Layer 0 always visible */
.layer-0 .layer-content {
    opacity: 1;
    transform: translateY(0);
}
