/* relativity.quest - Street-level Physics Observatory */

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

:root {
    --bg-darkest: #1a1710;
    --bg-dark: #2b261e;
    --bg-mid: #3a342a;
    --gold: #c8a96e;
    --gold-bright: #f0d48a;
    --cream: #d4c9b5;
    --blue: #5b8a9e;
    --red: #c44d3f;
    --orange: #e07a3a;
    --font-mono: 'Share Tech Mono', monospace;
    --font-body: 'Work Sans', sans-serif;
    --font-handwritten: 'Caveat', cursive;
}

html, body {
    height: 100%;
    background: var(--bg-darkest);
    color: var(--cream);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* Observation Wall - Main Grid */
.observation-wall {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    position: relative;
}

/* Scanline Overlay */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* Sidebar Rail */
.sidebar-rail {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--bg-dark);
    border-right: 2px solid var(--bg-mid);
    padding: 2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    overflow-y: auto;
    z-index: 10;
}

.ticker-header {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--gold);
    border-bottom: 1px solid var(--bg-mid);
    padding-bottom: 0.8rem;
    text-transform: uppercase;
}

.ticker-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ticker-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    color: var(--gold);
    text-transform: uppercase;
}

.ticker-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--gold-bright);
    text-shadow: 0 0 8px rgba(240, 212, 138, 0.3);
}

.sidebar-annotation {
    font-family: var(--font-handwritten);
    font-size: 1rem;
    color: var(--blue);
    margin-top: auto;
    opacity: 0.8;
}

/* Main Content */
.main-content {
    padding: 2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* Panels */
.panel {
    position: relative;
    background: var(--bg-dark);
    border: 1px solid var(--bg-mid);
    padding: 2.5rem;
    border-radius: 2px;
}

.panel-border {
    position: absolute;
    top: -1px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--orange));
}

.panel-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.panel-annotation {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--blue);
    margin-top: 1rem;
    letter-spacing: 0.05em;
}

/* Hero Panel */
.hero-panel {
    padding: 4rem 2.5rem;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darkest) 100%);
    border: 1px solid var(--bg-mid);
    position: relative;
    overflow: hidden;
}

.stencil-equation {
    font-family: var(--font-mono);
    font-size: clamp(1rem, 3vw + 0.5rem, 2.5rem);
    color: var(--cream);
    opacity: 0.15;
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    letter-spacing: 0.05em;
}

.stencil-equation.small {
    position: relative;
    top: auto;
    right: auto;
    font-size: 0.85rem;
    opacity: 0.5;
    margin-top: 1.5rem;
}

.equation-highlight {
    color: var(--red);
}

.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--gold-bright);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px rgba(240, 212, 138, 0.2);
}

.title-dot {
    color: var(--red);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.2rem;
    color: var(--cream);
    opacity: 0.7;
    letter-spacing: 0.1em;
}

.graffiti-note {
    font-family: var(--font-handwritten);
    font-size: 1.4rem;
    color: var(--red);
    margin-top: 2rem;
    transform: rotate(-2deg);
}

.caveat-note {
    font-family: var(--font-handwritten);
    font-size: 1.2rem;
    color: var(--blue);
    margin-top: 1rem;
    opacity: 0.8;
}

/* Spacetime Grid */
.spacetime-grid {
    width: 100%;
    height: 350px;
    position: relative;
    background: var(--bg-darkest);
    border: 1px solid var(--bg-mid);
    cursor: grab;
    overflow: hidden;
}

.spacetime-grid:active {
    cursor: grabbing;
}

.grid-mass {
    width: 30px;
    height: 30px;
    background: var(--gold-bright);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(240, 212, 138, 0.5), 0 0 60px rgba(240, 212, 138, 0.2);
    z-index: 2;
    pointer-events: none;
}

/* Time Dilation */
.dilation-display {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.clock-container {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
}

.clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.clock-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--gold);
}

.clock-face {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid var(--bg-mid);
    position: relative;
    background: var(--bg-darkest);
}

.clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    width: 2px;
    height: 45px;
    background: var(--gold-bright);
    transform-origin: bottom center;
    transform: translateX(-50%) rotate(0deg);
    transition: none;
}

.moving-clock .clock-face {
    border-color: var(--blue);
}

.moving-clock .clock-hand {
    background: var(--blue);
}

.clock-readout {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--gold-bright);
}

.moving-clock .clock-readout {
    color: var(--blue);
}

.velocity-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.slider-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--gold);
}

.velocity-slider {
    width: 300px;
    max-width: 100%;
    appearance: none;
    height: 4px;
    background: var(--bg-mid);
    border-radius: 2px;
    outline: none;
}

.velocity-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--gold-bright);
    border-radius: 50%;
    cursor: pointer;
}

.slider-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--gold-bright);
}

.equation-display {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--cream);
    text-align: center;
    margin-top: 1.5rem;
    opacity: 0.7;
}

/* Geodesic Canvas */
#geodesic-canvas {
    width: 100%;
    height: 400px;
    background: var(--bg-darkest);
    border: 1px solid var(--bg-mid);
    display: block;
}

/* Wave Canvas */
#wave-canvas {
    width: 100%;
    height: 300px;
    background: var(--bg-darkest);
    border: 1px solid var(--bg-mid);
    display: block;
}

.wave-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat {
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.stat-label {
    color: var(--gold);
    letter-spacing: 0.08em;
}

.stat span:last-child {
    color: var(--gold-bright);
}

/* Equivalence Panel */
.equivalence-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
}

.elevator {
    width: 150px;
    height: 200px;
    border: 2px solid var(--bg-mid);
    position: relative;
    background: var(--bg-darkest);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.elevator-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    position: absolute;
    top: -1.5rem;
}

.elevator-ball {
    width: 20px;
    height: 20px;
    background: var(--gold-bright);
    border-radius: 50%;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.elevator-floor {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--cream);
}

.equivalence-equals {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    color: var(--red);
}

/* Responsive */
@media (max-width: 768px) {
    .observation-wall {
        grid-template-columns: 1fr;
    }

    .sidebar-rail {
        position: relative;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 2px solid var(--bg-mid);
    }

    .main-content {
        padding: 1.5rem;
    }

    .panel {
        padding: 1.5rem;
    }

    .clock-container {
        gap: 1.5rem;
    }
}
