/* historygrapher.com — Inflated-3D Tactical Cartography */

:root {
    --color-darkest: #1a1612;
    --color-dark: #2d2823;
    --color-mid-dark: #3d352d;
    --color-warm-brown: #8a5a3a;
    --color-copper: #d4845a;
    --color-copper-light: #e89a6a;
    --color-sand: #c4b09a;
    --color-purple: #7a5c8a;
    --color-bg: #3a2e22;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--color-darkest);
    color: var(--color-sand);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
}

.noise-filter {
    position: absolute;
    width: 0;
    height: 0;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    filter: url(#noiseFilter);
    opacity: 0.04;
    pointer-events: none;
    z-index: 1;
}

/* Zone Base */
.zone {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

/* HUD Grid */
.hud-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(196,176,154,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(196,176,154,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
}

/* =================== ZONE ALPHA =================== */
#zone-alpha {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-darkest);
}

.spheres-container {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.sphere {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e89a6a 0%, #d4845a 25%, #8a5a3a 60%, #1a1612 100%);
    box-shadow:
        inset -8px -12px 30px rgba(0,0,0,0.6),
        0 20px 60px rgba(212,132,90,0.15),
        0 0 120px rgba(232,154,106,0.08);
    opacity: 0;
    animation: sphereFadeIn 1.5s ease-out forwards;
}

.sphere-1 {
    width: clamp(120px, 20vw, 280px);
    height: clamp(120px, 20vw, 280px);
    top: 15%;
    left: 10%;
    animation-delay: 0.3s;
}

.sphere-2 {
    width: clamp(80px, 12vw, 180px);
    height: clamp(80px, 12vw, 180px);
    top: 25%;
    right: 15%;
    animation-delay: 0.6s;
    background: radial-gradient(circle at 35% 30%, #7a5c8a 0%, #5a3d6a 40%, #2d2823 100%);
    box-shadow:
        inset -8px -12px 30px rgba(0,0,0,0.6),
        0 20px 60px rgba(122,92,138,0.15),
        0 0 120px rgba(122,92,138,0.08);
}

.sphere-3 {
    width: clamp(60px, 8vw, 120px);
    height: clamp(60px, 8vw, 120px);
    bottom: 30%;
    right: 30%;
    animation-delay: 0.9s;
}

@keyframes sphereFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.title-block {
    position: relative;
    z-index: 3;
    text-align: center;
}

.site-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 0.95;
    color: var(--color-sand);
    text-shadow: 0 0 40px rgba(232,154,106,0.2);
}

.site-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.7rem, 1.2vw, 1rem);
    color: var(--color-copper);
    letter-spacing: 0.3em;
    margin-top: 1rem;
    text-transform: uppercase;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 3;
}

.scroll-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    color: var(--color-copper);
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-copper), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.3); }
}

/* =================== ZONE BETA =================== */
#zone-beta {
    background: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

.ridge-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    z-index: 2;
    position: relative;
}

.ridge-panel {
    background: radial-gradient(ellipse at 50% 0%, rgba(61,53,45,0.8) 0%, rgba(45,40,35,0.95) 100%);
    border: 1px solid rgba(196,176,154,0.1);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: clamp(280px, 30%, 340px);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.ridge-panel:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(212,132,90,0.1), 0 10px 40px rgba(0,0,0,0.4);
}

.panel-sphere {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e89a6a 0%, #d4845a 30%, #8a5a3a 70%, #1a1612 100%);
    box-shadow:
        inset -4px -6px 15px rgba(0,0,0,0.5),
        0 8px 25px rgba(212,132,90,0.15);
    margin-bottom: 1.5rem;
}

.panel-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    color: var(--color-copper-light);
    margin-bottom: 1rem;
}

.panel-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-sand);
    opacity: 0.8;
    margin-bottom: 1.5rem;
}

.panel-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--color-copper);
    opacity: 0.6;
}

/* =================== ZONE GAMMA =================== */
#zone-gamma {
    background: var(--color-darkest);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
}

.console-container {
    width: min(700px, 90vw);
    background: radial-gradient(ellipse at 50% 0%, rgba(61,53,45,0.6) 0%, rgba(26,22,18,0.95) 100%);
    border: 1px solid rgba(196,176,154,0.08);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(196,176,154,0.05);
}

.console-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(196,176,154,0.06);
}

.console-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-copper);
    animation: blink 2s ease-in-out infinite;
}

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

.console-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--color-copper);
}

.console-screen {
    padding: 2rem;
}

.console-readout {
    margin-bottom: 2rem;
}

.readout-line {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(196,176,154,0.04);
    display: flex;
    gap: 1rem;
}

.readout-key {
    color: var(--color-copper);
    opacity: 0.7;
    min-width: 120px;
}

.readout-value {
    color: var(--color-sand);
}

.console-timeline {
    margin-top: 1.5rem;
}

.timeline-bar {
    height: 4px;
    background: rgba(196,176,154,0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.timeline-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-copper), var(--color-copper-light));
    border-radius: 2px;
    transition: width 2s ease-out;
}

.timeline-marker {
    position: absolute;
    top: -4px;
    left: 0%;
    width: 12px;
    height: 12px;
    background: var(--color-copper-light);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(232,154,106,0.5);
    transition: left 2s ease-out;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: var(--color-sand);
    opacity: 0.4;
}

/* =================== ZONE DELTA =================== */
#zone-delta {
    background: var(--color-mid-dark);
    padding: 6rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.archive-container {
    position: relative;
    z-index: 2;
    max-width: 1100px;
    width: 100%;
}

.archive-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.15em;
    color: var(--color-sand);
    text-align: center;
    margin-bottom: 3rem;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.archive-card {
    background: radial-gradient(ellipse at 50% 0%, rgba(58,46,34,0.8) 0%, rgba(26,22,18,0.9) 100%);
    border: 1px solid rgba(196,176,154,0.08);
    border-radius: 14px;
    padding: 2rem 1.5rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.archive-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212,132,90,0.3);
}

.card-sphere {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e89a6a 0%, #d4845a 30%, #8a5a3a 70%, #1a1612 100%);
    box-shadow: inset -3px -4px 10px rgba(0,0,0,0.5), 0 4px 15px rgba(212,132,90,0.1);
    margin-bottom: 1.2rem;
}

.card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
    color: var(--color-copper-light);
    margin-bottom: 0.8rem;
}

.card-desc {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--color-sand);
    opacity: 0.7;
    margin-bottom: 1.2rem;
}

.card-code {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--color-purple);
    opacity: 0.7;
}

/* Footer */
.site-footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: var(--color-sand);
    opacity: 0.3;
}

/* Floating animation for spheres */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.sphere-1 { animation: sphereFadeIn 1.5s ease-out forwards, float 8s ease-in-out 2s infinite; }
.sphere-2 { animation: sphereFadeIn 1.5s ease-out 0.6s forwards, float 6s ease-in-out 2.5s infinite; }
.sphere-3 { animation: sphereFadeIn 1.5s ease-out 0.9s forwards, float 7s ease-in-out 3s infinite; }

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
