/* relativity.quest - Styles */
/* Colors: #1a1a2e (deep base), #4a90d9 (primary blue), #f5f0e8 (warm off-white), #e8b84b (accent gold), #6c757d (muted gray) */
/* Font: Inter */

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

:root {
    --deep-base: #1a1a2e;
    --primary-blue: #4a90d9;
    --warm-white: #f5f0e8;
    --accent-gold: #e8b84b;
    --muted-gray: #6c757d;
    --font-main: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--deep-base);
    color: var(--warm-white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Noise Texture Overlay */
.noise-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.08;
}

/* ===================== HERO SECTION ===================== */
#hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
    text-align: center;
}

.hero-content {
    max-width: 900px;
}

.hero-title {
    font-size: clamp(5rem, 12vw, 12rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    color: var(--warm-white);
}

.title-line {
    position: relative;
    display: inline-block;
}

.title-line::after {
    content: '';
    position: absolute;
    bottom: 0.05em;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--accent-gold);
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.title-line.underline-active::after {
    width: 100%;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    color: var(--muted-gray);
    letter-spacing: 0.05em;
    margin-bottom: 2rem;
}

.hero-divider {
    width: 60px;
    height: 2px;
    background: var(--accent-gold);
    margin: 0 auto 2rem;
}

.hero-tagline {
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    font-weight: 400;
    color: var(--warm-white);
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-text {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-gray);
}

.scroll-arrow {
    color: var(--accent-gold);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ===================== DASHBOARD SECTION ===================== */
#dashboard {
    padding: 8rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-gold);
    transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-title.underline-active::after {
    width: 100%;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--muted-gray);
    max-width: 600px;
    font-weight: 300;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Panel Styles */
.panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease;
}

.panel.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.panel:hover {
    border-color: rgba(232, 184, 75, 0.3);
}

.panel-large {
    grid-column: span 1;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
}

.panel-tag {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted-gray);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.panel-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.panel-title.underline-active::after {
    width: 100%;
}

.panel-text {
    font-size: 0.95rem;
    color: var(--muted-gray);
    line-height: 1.7;
    font-weight: 300;
}

.panel-formula {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: baseline;
    gap: 1.5rem;
}

.formula {
    font-size: 2rem;
    font-weight: 300;
    color: var(--primary-blue);
    letter-spacing: 0.02em;
}

.formula sub {
    font-size: 0.6em;
}

.formula-label {
    font-size: 0.75rem;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.panel-stat {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-value sup {
    font-size: 0.5em;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* ===================== VISUALIZATION SECTION ===================== */
#visualization {
    padding: 8rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.viz-header {
    margin-bottom: 3rem;
}

.viz-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

#spacetimeCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.viz-overlay {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.viz-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(26, 26, 46, 0.8);
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================== TIMELINE SECTION ===================== */
#timeline {
    padding: 8rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-header {
    margin-bottom: 4rem;
}

.timeline-track {
    position: relative;
    padding-left: 3rem;
}

.timeline-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -3rem;
    top: 0.5rem;
    width: 9px;
    height: 9px;
    background: var(--accent-gold);
    border-radius: 50%;
    transform: translateX(-4px);
}

.timeline-year {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    min-width: 60px;
    letter-spacing: 0.02em;
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.timeline-content p {
    font-size: 0.95rem;
    color: var(--muted-gray);
    line-height: 1.7;
    font-weight: 300;
}

/* ===================== FOOTER ===================== */
#footer {
    padding: 6rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.footer-tagline {
    font-size: 0.85rem;
    color: var(--muted-gray);
    font-weight: 300;
}

.footer-quote blockquote {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--warm-white);
    opacity: 0.6;
    max-width: 500px;
    line-height: 1.8;
    font-weight: 300;
}

.footer-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-style: normal;
    font-weight: 500;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .panel-large {
        grid-column: span 1;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .viz-container {
        height: 350px;
    }
}

@media (max-width: 600px) {
    #hero {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: clamp(3.5rem, 15vw, 6rem);
    }

    #dashboard,
    #visualization,
    #timeline {
        padding: 4rem 1.5rem;
    }

    .panel {
        padding: 1.5rem;
    }

    .timeline-track {
        padding-left: 2rem;
    }

    .timeline-item::before {
        left: -2rem;
    }

    .timeline-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .viz-container {
        height: 280px;
    }
}
