/* opensource.bid - Underwater Cultural Auction House */
/* Color Palette */
:root {
    --twilight-indigo: #0a1628;
    --abyssal-black: #040b14;
    --trench-blue: #061220;
    --glacial-cyan: #7ec8e3;
    --frozen-mist: #c5d5e4;
    --coral-vermillion: #e85d4a;
    --abyssal-teal: #50a8c7;
    --pearl-phosphor: #d4f1f9;
    --deep-gold: #c9a84c;
    --depth: 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--abyssal-black);
    color: var(--frozen-mist);
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    transition: filter 0.5s ease;
}

/* Particle Field */
#particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--pearl-phosphor);
    pointer-events: none;
}

/* Depth Indicator */
#depth-indicator {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

#depth-indicator:hover {
    opacity: 1;
}

#depth-indicator svg {
    transform: rotate(-90deg);
}

#depth-readout {
    font-size: 0.7rem;
    color: var(--abyssal-teal);
    letter-spacing: 0.04em;
}

/* Typography */
.display-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    color: var(--glacial-cyan);
    letter-spacing: 0.06em;
}

.body-text {
    color: var(--frozen-mist);
    font-family: 'Karla', sans-serif;
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

.body-text strong {
    font-weight: 700;
    color: var(--glacial-cyan);
}

.mono {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--abyssal-teal);
}

/* Depth Zones */
.depth-zone {
    position: relative;
    z-index: 2;
}

.zone-content {
    position: relative;
}

/* Zone 1 - Surface Ceremony */
#zone-1 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 30%, #0a1628 0%, #040b14 100%);
}

#zone-1 .zone-content {
    text-align: center;
    padding: 2rem;
}

#site-title {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
    opacity: 0;
    animation: fadeInTitle 2s ease 1.5s forwards;
}

#site-subtitle {
    font-size: 1rem;
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeInTitle 2s ease 2.5s forwards;
    color: var(--frozen-mist);
}

.divider-line {
    width: 0;
    height: 1px;
    background: var(--pearl-phosphor);
    margin: 3rem auto 0;
    opacity: 0.5;
    animation: drawLine 1.5s ease 3.5s forwards;
}

@keyframes fadeInTitle {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes drawLine {
    from { width: 0; }
    to { width: 200px; }
}

/* Descent Column */
.descent-column {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem;
}

.narrow-prose {
    max-width: 600px;
}

/* Zone 2 - Twilight Artifacts */
#zone-2 {
    min-height: 150vh;
    padding: 10vh 0;
    background: radial-gradient(ellipse at 50% 40%, #0a1628 0%, #061220 60%, #040b14 100%);
}

/* Artifact Cards */
.artifact-card {
    border: 1px solid rgba(126, 200, 227, 0.15);
    border-radius: 2px;
    border-top: 2px solid var(--coral-vermillion);
    padding: 2.5rem;
    margin-bottom: 4rem;
    box-shadow: 0 0 30px rgba(126, 200, 227, 0.05);
    transition: box-shadow 0.6s ease, transform 0.6s ease;
    opacity: 0;
    transform: translateY(30px);
    position: relative;
}

.artifact-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.artifact-card:hover {
    box-shadow: 0 0 40px rgba(126, 200, 227, 0.12);
    transform: translateY(-3px);
}

.artifact-card.visible:hover {
    transform: translateY(-3px);
}

.artifact-id {
    display: block;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.artifact-card .display-text {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.artifact-card .body-text {
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
}

/* Torii Gates */
.torii-gate {
    width: 240px;
    margin: 4rem auto;
    opacity: 0.3;
    transition: opacity 1.2s ease;
}

.torii-gate.illuminated {
    opacity: 0.8;
}

.torii-gate svg {
    width: 100%;
    height: auto;
}

/* Zone 3 - Midnight Philosophy */
#zone-3 {
    min-height: 150vh;
    padding: 10vh 0;
    background: radial-gradient(ellipse at 50% 50%, #061220 0%, #040b14 100%);
}

#zone-3 .body-text {
    margin-bottom: 2.5rem;
}

.section-heading {
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    margin-bottom: 3rem;
    text-align: center;
}

/* Zone 4 - Abyssal Culture */
#zone-4 {
    min-height: 150vh;
    padding: 10vh 0;
    background: radial-gradient(ellipse at 50% 30%, #061220 0%, #040b14 70%, #030a12 100%);
}

/* Star Chart */
#star-chart {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 5rem;
}

#star-chart svg {
    width: 100%;
    height: auto;
}

.star-node {
    transition: opacity 0.8s ease;
}

.star-glow {
    transition: opacity 1.5s ease;
}

.swell-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 2s ease, opacity 0.8s ease;
}

.swell-line.drawn {
    stroke-dashoffset: 0;
    opacity: 0.4;
}

.star-node.visible {
    opacity: 0.7;
}

.star-glow.pulsing {
    animation: starPulse 3s ease-in-out infinite;
}

@keyframes starPulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.12; }
}

/* Coordinates */
.coordinates-block {
    margin: 4rem auto;
    max-width: 500px;
}

.coordinate-entry {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.coordinate-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.coord-label {
    color: var(--deep-gold);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.coord-data {
    color: var(--glacial-cyan);
    font-size: 0.9rem;
}

.coord-meta {
    color: var(--abyssal-teal);
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Zone 5 - Hadal Revelation */
#zone-5 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 50%, #040b14 0%, #020710 100%);
}

#zone-5 .zone-content {
    text-align: center;
    padding: 2rem;
    width: 100%;
}

.revelation-text {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.4;
    animation: revelationGlow 3s ease-in-out infinite;
}

@keyframes revelationGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(126, 200, 227, 0.15); }
    50% { text-shadow: 0 0 30px rgba(126, 200, 227, 0.35); }
}

/* Ocean Floor Waves */
#ocean-floor-waves {
    position: relative;
    width: 100%;
    height: 60px;
    margin-top: 8rem;
    overflow: hidden;
}

.wave-crest {
    position: absolute;
    bottom: 0;
    width: 200%;
    height: 100%;
}

.wave-1 {
    border-radius: 100% 100% 0 0;
    height: 25px;
    bottom: 0;
    left: -50%;
    background: rgba(80, 168, 199, 0.08);
    box-shadow: 0 -2px 8px rgba(126, 200, 227, 0.05);
    animation: waveFloat 8s ease-in-out infinite;
}

.wave-2 {
    border-radius: 80% 120% 0 0;
    height: 20px;
    bottom: 5px;
    left: -30%;
    background: rgba(80, 168, 199, 0.06);
    box-shadow: 0 -1px 6px rgba(126, 200, 227, 0.04);
    animation: waveFloat 8s ease-in-out 1s infinite reverse;
}

.wave-3 {
    border-radius: 120% 80% 0 0;
    height: 15px;
    bottom: 12px;
    left: -40%;
    background: rgba(126, 200, 227, 0.04);
    box-shadow: 0 -1px 4px rgba(126, 200, 227, 0.03);
    animation: waveFloat 10s ease-in-out 0.5s infinite;
}

.wave-4 {
    border-radius: 90% 110% 0 0;
    height: 10px;
    bottom: 18px;
    left: -20%;
    background: rgba(126, 200, 227, 0.03);
    animation: waveFloat 12s ease-in-out 2s infinite reverse;
}

@keyframes waveFloat {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(30px); }
}

/* Responsive */
@media (max-width: 768px) {
    .descent-column {
        padding: 0 1.5rem;
    }

    .artifact-card {
        padding: 1.8rem;
        margin-bottom: 3rem;
    }

    .torii-gate {
        width: 180px;
    }

    #depth-indicator {
        bottom: 15px;
        right: 15px;
    }

    .coordinates-block {
        padding: 0 1rem;
    }
}
