/* nonri.day - Neubrutalist Observatory HUD */
/* Colors: #E8DCC0, #2A2018, #1E1810, #E0D4C0, #D4A840, #8A7E68, #C44030 */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: #E8DCC0;
    background-color: #1E1810;
    overflow-x: hidden;
    cursor: none;
    position: relative;
    min-height: 100vh;
}

/* Night Sky Background */
.night-sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1E1810;
    z-index: -3;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    z-index: -1;
    pointer-events: none;
    opacity: 0.8;
}

/* Constellation SVGs */
.constellation {
    position: fixed;
    pointer-events: none;
    z-index: -2;
}

.constellation-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 10%;
}

.constellation-2 {
    width: 250px;
    height: 250px;
    bottom: 20%;
    left: 5%;
}

/* HUD Panel Base */
.hud-panel {
    position: relative;
    margin: 40px auto;
    max-width: 700px;
    width: calc(100% - 60px);
    border: 3px solid #D4A840;
    background: rgba(30, 24, 16, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-panel {
    margin-top: 15vh;
    margin-bottom: 20vh;
    border-width: 4px;
    opacity: 0;
}

.hero-panel.drawn {
    opacity: 1;
    animation: panelDraw 1.5s ease-out forwards;
}

.content-panel {
    margin-bottom: 15vh;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.content-panel.visible {
    opacity: 1;
    transform: scale(1);
}

/* Panel Header Bar */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #2A2018;
    border-bottom: 3px solid #D4A840;
}

.panel-label {
    font-family: 'Overpass Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    color: #D4A840;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.panel-coords {
    font-family: 'Overpass Mono', monospace;
    font-size: 11px;
    color: #8A7E68;
}

/* Panel Body */
.panel-body {
    padding: 40px 32px;
}

/* Hero Title */
.hero-title {
    font-family: 'Commissioner', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #E8DCC0;
    margin-bottom: 32px;
    opacity: 0;
    animation: zoomFocus 0.8s ease 2s forwards;
}

/* Readouts */
.readouts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.readout {
    font-family: 'Overpass Mono', monospace;
    font-size: 13px;
    display: flex;
    gap: 8px;
}

.readout-key {
    color: #8A7E68;
}

.readout-value {
    color: #D4A840;
}

/* Section Titles */
.section-title {
    font-family: 'Commissioner', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #E8DCC0;
    margin-bottom: 20px;
}

/* Body Text */
.body-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.05vw, 1.1rem);
    line-height: 1.8;
    color: #E0D4C0;
    margin-bottom: 24px;
}

/* Data Readouts */
.data-readout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(212, 168, 64, 0.2);
}

.data-label {
    font-family: 'Overpass Mono', monospace;
    font-size: 12px;
    color: #8A7E68;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-value {
    font-family: 'Overpass Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #D4A840;
}

/* Alert Color for critical items */
.alert {
    color: #C44030;
}

/* Crosshair Cursor */
.crosshair {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.crosshair-h,
.crosshair-v {
    position: absolute;
    background: rgba(212, 168, 64, 0.3);
}

.crosshair-h {
    width: 40px;
    height: 1px;
    top: 0;
    left: -20px;
}

.crosshair-v {
    width: 1px;
    height: 40px;
    top: -20px;
    left: 0;
}

/* Keyframes */
@keyframes panelDraw {
    0% {
        clip-path: polygon(0 0, 0 0, 0 100%, 0 100%);
    }
    50% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

@keyframes zoomFocus {
    0% {
        opacity: 0;
        transform: scale(1.15);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

/* Responsive */
@media (max-width: 768px) {
    .hud-panel {
        width: calc(100% - 24px);
        margin-left: 12px;
        margin-right: 12px;
    }

    .panel-body {
        padding: 24px 16px;
    }

    .hero-panel {
        margin-top: 10vh;
        margin-bottom: 10vh;
    }

    .content-panel {
        margin-bottom: 8vh;
    }

    body {
        cursor: auto;
    }

    .crosshair {
        display: none !important;
    }
}
