/* footprint.market - Nocturnal Street Artist Star Chart */

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

:root {
    --bg-primary: #1a1008;
    --bg-section: #2a1f14;
    --spine-amber: #d4a574;
    --text-cream: #e8ddd0;
    --text-ochre: #8b7355;
    --accent-sienna: #e87c40;
    --accent-gold: #e8b040;
    --shadow-cocoa: #3d2e1f;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-cream);
    font-family: "IBM Plex Mono", monospace;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    line-height: 1.85;
    letter-spacing: 0.02em;
    overflow-x: hidden;
    cursor: default;
}

/* Cursor Follow */
#cursor-follow {
    position: fixed;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-gold);
    opacity: 0.3;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), width 0.5s ease, height 0.5s ease, opacity 0.5s ease, background-color 0.5s ease;
    will-change: transform;
}

.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-gold);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

#cursor-trail-1 { opacity: 0.15; }
#cursor-trail-2 { opacity: 0.1; }
#cursor-trail-3 { opacity: 0.05; }

@media (hover: none) {
    #cursor-follow, .cursor-trail { display: none; }
}

/* Timeline Spine */
#timeline-spine {
    position: fixed;
    top: 0;
    left: 8vw;
    width: 2px;
    height: 100vh;
    z-index: 100;
    pointer-events: none;
}

#spine-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--bg-section), var(--spine-amber), var(--accent-gold));
    opacity: 0;
    transition: opacity 2s ease;
}

#spine-line.visible {
    opacity: 1;
}

.spine-node {
    position: absolute;
    left: -19px;
    width: 40px;
    height: 40px;
    pointer-events: all;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.spine-node:hover {
    transform: scale(1.4);
}

.star-8pt {
    width: 40px;
    height: 40px;
    position: relative;
}

.star-8pt::before,
.star-8pt::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 28px;
    border: 2px solid var(--spine-amber);
    transform: translate(-50%, -50%);
    transition: background-color 0.3s ease;
}

.star-8pt::before {
    transform: translate(-50%, -50%) rotate(0deg);
}

.star-8pt::after {
    transform: translate(-50%, -50%) rotate(45deg);
}

.spine-node:hover .star-8pt::before,
.spine-node:hover .star-8pt::after {
    background-color: rgba(232, 124, 64, 0.15);
    border-color: var(--accent-sienna);
}

.star-8pt.small {
    width: 24px;
    height: 24px;
}

.star-8pt.small::before,
.star-8pt.small::after {
    width: 16px;
    height: 16px;
    border-width: 1.5px;
}

.node-tooltip {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Overpass Mono", monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-ochre);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.spine-node:hover .node-tooltip {
    opacity: 1;
}

/* Constellation Layer */
#constellation-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}

/* Zones */
.zone {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    z-index: 10;
}

.zone-spacer {
    height: 100vh;
    background-color: var(--bg-primary);
}

.final-silence {
    height: 50vh;
    background-color: var(--bg-primary);
}

.zone-content {
    width: 100%;
    padding-left: 12vw;
    padding-right: 8vw;
    position: relative;
}

/* Zone 1 - Origin */
.zone-origin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-left: 8vw;
}

.origin-star {
    margin-bottom: 2rem;
    opacity: 0;
    transition: opacity 1s ease;
}

.origin-star.visible {
    opacity: 1;
}

.origin-star .draw-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.5s ease;
}

.origin-star.visible .draw-path {
    stroke-dashoffset: 0;
}

.origin-title {
    font-family: "Space Mono", monospace;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: 0.12em;
    color: var(--text-cream);
    text-transform: lowercase;
    margin-bottom: 1.5rem;
}

.origin-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.origin-title .char.visible {
    opacity: 1;
    transform: translateY(0);
}

.origin-subtitle {
    font-family: "IBM Plex Mono", monospace;
    font-size: 1rem;
    color: var(--text-ochre);
    max-width: 50ch;
    line-height: 1.85;
    opacity: 0;
    transition: opacity 1s ease 1.5s;
}

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

/* Zone 2 - Marketplace */
.zone-marketplace {
    display: flex;
    gap: 4vw;
    align-items: flex-start;
}

.spray-halo {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.halo-sienna {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 124, 64, 0.05) 0%, transparent 70%);
    top: 10%;
    right: 15%;
}

.halo-gold {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(232, 176, 64, 0.04) 0%, transparent 70%);
    bottom: 15%;
    left: 20%;
}

.zone-left-nodes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    min-width: 80px;
    padding-top: 2rem;
}

.milestone-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.milestone-label {
    font-family: "Overpass Mono", monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-ochre);
}

.drip-line {
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, var(--spine-amber), transparent);
    transition: height 0.8s ease;
}

.drip-line.visible {
    height: 80px;
}

.constellation-segment {
    width: 1px;
    height: 40px;
    background-color: var(--text-ochre);
    opacity: 0.4;
}

.zone-text {
    flex: 1;
    max-width: 60ch;
}

.section-title {
    font-family: "Space Mono", monospace;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-cream);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.section-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.section-title .char.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-subtitle {
    font-family: "Space Mono", monospace;
    font-weight: 400;
    font-size: clamp(1rem, 2.2vw, 1.6rem);
    letter-spacing: 0.15em;
    color: var(--spine-amber);
    margin-bottom: 2rem;
}

.body-text {
    font-family: "IBM Plex Mono", monospace;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    line-height: 1.85;
    letter-spacing: 0.02em;
    color: var(--text-cream);
    max-width: 60ch;
    margin-bottom: 1.5em;
}

/* Geometric Dividers */
.geo-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 3rem 0;
    margin-top: 3rem;
}

.geo-divider::before {
    content: "";
    display: flex;
    gap: 16px;
}

/* Zone 3 - Trail */
.zone-dense {
    min-height: auto;
}

.zone-trail {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4vh, 4rem);
}

.trail-block {
    display: flex;
    align-items: center;
    gap: 4vw;
}

.trail-left {
    flex-direction: row;
}

.trail-right {
    flex-direction: row-reverse;
}

.trail-text {
    flex: 1;
    max-width: 55ch;
}

.trail-step-title {
    font-family: "Space Mono", monospace;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-cream);
    margin-bottom: 1rem;
}

.trail-star {
    flex-shrink: 0;
}

.hexagram-star .draw-path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 0.8s ease;
}

.hexagram-star.drawn .draw-path {
    stroke-dashoffset: 0;
}

/* Zone 4 - Cosmos */
#zone-4 {
    background-color: var(--bg-section);
}

.zone-cosmos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 4rem 8vw;
}

.supernova-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin-bottom: 3rem;
}

.supernova {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: supernovaRotate 120s linear infinite;
}

@keyframes supernovaRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.supernova-triangle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 140px solid transparent;
    border-bottom-color: rgba(212, 165, 116, 0.08);
    transform-origin: 0 70px;
    transform: translate(-50%, -50%) rotate(var(--rot));
}

.supernova-triangle::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60px;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 140px solid transparent;
    border-bottom-color: transparent;
    border-left-color: transparent;
    border-right-color: transparent;
}

.constellation-radial {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    overflow: visible;
}

.radial-line.draw-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 1.5s ease;
}

.radial-line.drawn {
    stroke-dashoffset: 0;
}

.cosmos-text {
    position: relative;
    z-index: 2;
    max-width: 55ch;
}

/* Zone 5 - Horizon */
.zone-horizon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 4rem 8vw;
}

.terminal-star {
    margin-bottom: 2rem;
}

.terminal-star .draw-path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.5s ease;
}

.terminal-star.drawn .draw-path {
    stroke-dashoffset: 0;
}

.horizon-text {
    font-family: "Space Mono", monospace;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.4rem);
    letter-spacing: 0.1em;
    color: var(--text-cream);
    margin-bottom: 2rem;
}

.horizon-link {
    font-family: "Overpass Mono", monospace;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-gold);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: color 0.3s ease;
}

.horizon-link:hover {
    color: var(--accent-sienna);
}

/* Scroll reveal animations */
.zone-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.zone-content.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Geometric divider diamonds */
.geo-divider {
    position: relative;
    width: 100%;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    overflow: hidden;
}

.geo-divider::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    background: var(--text-ochre);
    transform: rotate(45deg);
    flex-shrink: 0;
}

.geo-divider::after {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    background: var(--text-ochre);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* SVG draw-path generic */
.draw-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 1.2s ease;
}

.draw-path.drawn {
    stroke-dashoffset: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .zone-marketplace {
        flex-direction: column;
    }

    .zone-left-nodes {
        flex-direction: row;
        min-width: auto;
        padding-top: 0;
        margin-bottom: 2rem;
    }

    .constellation-segment {
        width: 40px;
        height: 1px;
    }

    .trail-block {
        flex-direction: column !important;
    }

    .supernova-container {
        width: 250px;
        height: 250px;
    }

    .supernova-triangle {
        border-left-width: 35px;
        border-right-width: 35px;
        border-bottom-width: 80px;
        transform-origin: 0 40px;
    }

    #timeline-spine {
        left: 4vw;
    }

    .zone-content {
        padding-left: 10vw;
        padding-right: 4vw;
    }

    .zone-origin, .zone-cosmos, .zone-horizon {
        padding-left: 4vw;
    }
}
