/* sora.markets — Evolved Minimal Design */
/* Colors: Shell White #faf6f0, Evening Dune #1e1a14, Roast Umber #3d3228, Driftwood #5a4e42 */
/* Liquid Honey #c8a97e, Aged Gold #b89f7d, Sunset Amber #d4a553, Mist Blue #c5c9ce */
/* Storm Shell #8a8e94, Conch Pink #d4a0a0, Warm Parchment #f5efe6 */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #faf6f0;
    color: #3d3228;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    letter-spacing: 0.02em;
    line-height: 1.85;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   Domain Anchor
   ========================================== */

.domain-anchor {
    position: fixed;
    top: 2rem;
    left: 2.5rem;
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #5a4e42;
    text-decoration: none;
    z-index: 100;
    transition: color 0.6s ease, opacity 0.4s ease;
    opacity: 0.7;
}

.domain-anchor:hover {
    color: #c8a97e;
    opacity: 1;
}

.domain-anchor.light-mode {
    color: #f5efe6;
}

/* ==========================================
   Section Navigation
   ========================================== */

.section-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.section-nav.visible {
    opacity: 1;
}

.nav-indicator {
    width: 2px;
    height: 20px;
    background: #c5c9ce;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
    border-radius: 1px;
}

.nav-indicator.active {
    background: #c8a97e;
    height: 32px;
}

.nav-indicator:hover {
    background: #d4a553;
}

/* ==========================================
   Gradient Mesh Background
   ========================================== */

.gradient-mesh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.gradient-mesh-svg {
    width: 100%;
    height: 100%;
}

/* ==========================================
   Wave Canvas
   ========================================== */

.wave-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.wave-canvas.active {
    opacity: 1;
}

/* ==========================================
   Particle Canvas
   ========================================== */

.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.particle-canvas.active {
    opacity: 1;
}

/* ==========================================
   Zones (Sections)
   ========================================== */

.zone {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Zone 1: Empty Sky — 100vh */
.zone-1 {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.spiral-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vh;
    height: 80vh;
    max-width: 800px;
    max-height: 800px;
}

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

.spiral-path {
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
    transition: stroke-dashoffset 4s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.spiral-path.animate {
    stroke-dashoffset: 0;
}

.zone-1-name {
    position: absolute;
    bottom: 3rem;
    left: 5vw;
}

.domain-text {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.2vw, 1.1rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #3d3228;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease 2s, transform 1.5s ease 2s;
}

.domain-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Zone 2: The Wave — 150vh */
.zone-2 {
    min-height: 150vh;
    padding: 20vh 0;
    position: relative;
}

/* Zone 3: The Depth — 200vh */
.zone-3 {
    min-height: 200vh;
    padding: 0;
    position: relative;
    background-color: transparent;
    transition: background-color 1.2s ease;
}

.zone-3.active-dark {
    background-color: #1e1a14;
}

.depth-transition {
    height: 60vh;
    background: linear-gradient(to bottom, transparent, #1e1a14);
    pointer-events: none;
}

/* Zone 4: The Shell — 150vh */
.zone-4 {
    min-height: 150vh;
    padding: 15vh 0 20vh;
    position: relative;
    background: linear-gradient(to bottom, #1e1a14 0%, #2a2318 15%, #faf6f0 40%, #faf6f0 100%);
}

.shell-spiral-container {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 40vh;
    height: 40vh;
    max-width: 400px;
    max-height: 400px;
    opacity: 0;
    transition: opacity 2s ease;
}

.shell-spiral-container.visible {
    opacity: 0.5;
}

.shell-spiral-svg {
    width: 100%;
    height: 100%;
}

.shell-spiral-path {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    transition: stroke-dashoffset 3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.shell-spiral-path.animate {
    stroke-dashoffset: 0;
}

/* Zone 5: Return — 100vh */
.zone-5 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.return-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
}

.breathing-space {
    height: 30vh;
}

/* ==========================================
   Content River
   ========================================== */

.content-river {
    margin: 0 auto;
    padding: 0 2rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

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

.river-narrow {
    max-width: 420px;
}

.river-medium {
    max-width: 640px;
}

.river-wide {
    max-width: 880px;
}

.river-drift-left {
    margin-left: max(2rem, calc(50% - 420px - 8vw));
    margin-right: auto;
}

.river-drift-right {
    margin-right: max(2rem, calc(50% - 420px - 8vw));
    margin-left: auto;
}

.river-center {
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   Typography
   ========================================== */

.section-label {
    display: block;
    font-family: 'Inconsolata', monospace;
    font-weight: 300;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 1.4;
    color: #b89f7d;
    margin-bottom: 2rem;
}

.section-label-light {
    color: #c8a97e;
}

.section-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    letter-spacing: 0.08em;
    line-height: 1.15;
    text-transform: uppercase;
    color: #3d3228;
    margin-bottom: 3rem;
}

.section-title-light {
    color: #f5efe6;
}

.body-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    letter-spacing: 0.02em;
    line-height: 1.85;
    color: #5a4e42;
    margin-bottom: 2rem;
}

.body-text-light {
    color: #c5c9ce;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* Ghost Numerals */
.ghost-numeral {
    position: absolute;
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.ghost-numeral-coords {
    top: 15vh;
    right: 8vw;
    font-size: clamp(4rem, 10vw, 9rem);
    color: #c8a97e;
    opacity: 0.15;
    display: flex;
    flex-direction: column;
    letter-spacing: -0.02em;
}

.ghost-numeral-dark {
    bottom: 20vh;
    left: 10vw;
    font-size: clamp(6rem, 15vw, 14rem);
    color: #c8a97e;
    opacity: 0.1;
    letter-spacing: -0.02em;
}

/* Closing Text */
.closing-text {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #3d3228;
    text-align: center;
    margin-bottom: 0.5rem;
}

.closing-period {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #c8a97e;
    text-align: center;
    opacity: 0.6;
}

/* ==========================================
   Wave Chart
   ========================================== */

.wave-chart-container {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 3rem 0;
    cursor: crosshair;
}

.wave-chart-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-tooltip {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 26, 20, 0.9);
    padding: 0.4rem 0.8rem;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.chart-tooltip.visible {
    opacity: 1;
}

.tooltip-value {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    color: #c8a97e;
    display: block;
}

.tooltip-label {
    font-family: 'Inconsolata', monospace;
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #8a8e94;
    display: block;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
    .domain-anchor {
        top: 1.5rem;
        left: 1.5rem;
        font-size: 0.65rem;
    }

    .section-nav {
        right: 1rem;
    }

    .content-river {
        padding: 0 1.5rem;
    }

    .river-drift-left,
    .river-drift-right {
        margin-left: auto;
        margin-right: auto;
    }

    .ghost-numeral-coords {
        font-size: clamp(2rem, 8vw, 5rem);
        right: 4vw;
    }

    .ghost-numeral-dark {
        font-size: clamp(4rem, 12vw, 8rem);
        left: 5vw;
    }

    .spiral-container {
        width: 70vw;
        height: 70vw;
    }

    .zone-1-name {
        left: 1.5rem;
        bottom: 2rem;
    }

    .zone-2 {
        min-height: 120vh;
    }

    .zone-3 {
        min-height: 160vh;
    }

    .zone-4 {
        min-height: 120vh;
    }
}

@media (max-width: 480px) {
    .river-narrow,
    .river-medium {
        max-width: 100%;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.2rem);
    }

    .body-text {
        font-size: 0.9rem;
    }

    .ghost-numeral-coords {
        display: none;
    }
}
