/* naru.day - Neubrutalist Aquarium Control Room */
/* Colors: #020810 #061c36 #0f3460 #0a0a0a #5bc0eb #e94560 #d4a843 #e0dcd0 */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #0f3460;
    color: #e0dcd0;
    font-family: 'Libre Baskerville', Georgia, serif;
    overflow-x: hidden;
    min-height: 420vh;
}

/* Canvas Bubble Field */
#bubble-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* Depth Gauge - right edge */
#depth-gauge {
    position: fixed;
    top: 10vh;
    right: 12px;
    width: 3px;
    height: 80vh;
    background: rgba(91, 192, 235, 0.15);
    z-index: 100;
    border-radius: 2px;
}

#depth-gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to bottom, #5bc0eb, #e94560);
    border-radius: 2px;
    transition: height 0.1s linear;
}

/* HUD Panels - Common */
.hud-panel {
    position: fixed;
    background: rgba(6, 28, 54, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 4px solid #0a0a0a;
    padding: 24px;
    z-index: 50;
    opacity: 0;
    transition: opacity 600ms ease-out, transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.hud-panel.visible {
    opacity: 1;
    transform: translate(0, 0) !important;
}

/* Panel Entry Positions */
.hud-top-left {
    top: clamp(16px, 3vw, 48px);
    left: clamp(16px, 3vw, 48px);
    max-width: 280px;
    transform: translate(-40px, -40px);
}

.hud-top-right {
    top: clamp(16px, 3vw, 48px);
    right: clamp(16px, 3vw, 48px);
    max-width: 240px;
    transform: translate(40px, -40px);
}

.hud-bottom-left.content-panel {
    position: relative;
    max-width: 480px;
    margin-top: 40vh;
    margin-left: clamp(16px, 3vw, 48px);
    transform: translate(-40px, 40px);
}

/* Corner Brackets */
.hud-corner-bracket {
    position: absolute;
    width: 12px;
    height: 12px;
    pointer-events: none;
}

.hud-corner-bracket.tl {
    top: -2px;
    left: -2px;
    border-top: 2px solid #5bc0eb;
    border-left: 2px solid #5bc0eb;
}

.hud-corner-bracket.tr {
    top: -2px;
    right: -2px;
    border-top: 2px solid #5bc0eb;
    border-right: 2px solid #5bc0eb;
}

.hud-corner-bracket.bl {
    bottom: -2px;
    left: -2px;
    border-bottom: 2px solid #5bc0eb;
    border-left: 2px solid #5bc0eb;
}

.hud-corner-bracket.br {
    bottom: -2px;
    right: -2px;
    border-bottom: 2px solid #5bc0eb;
    border-right: 2px solid #5bc0eb;
}

/* Scan Lines */
.hud-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(91, 192, 235, 0.03) 2px,
        rgba(91, 192, 235, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* HUD Labels */
.hud-label {
    font-family: 'Space Mono', monospace;
    font-size: clamp(11px, 1.2vw, 16px);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #5bc0eb;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

/* Telemetry */
.telemetry-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    position: relative;
    z-index: 2;
}

.telemetry-key {
    font-family: 'Space Mono', monospace;
    font-size: clamp(10px, 1vw, 13px);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(91, 192, 235, 0.6);
}

.telemetry-value {
    font-family: 'Space Mono', monospace;
    font-size: clamp(11px, 1.2vw, 16px);
    letter-spacing: 0.18em;
    color: #5bc0eb;
    text-transform: uppercase;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.pulse-ring {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e94560;
    position: relative;
    flex-shrink: 0;
}

.pulse-ring::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #e94560;
    transform: translate(-50%, -50%);
    animation: pulse-expand 3s ease-out infinite;
}

@keyframes pulse-expand {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }
    100% {
        width: 40px;
        height: 40px;
        opacity: 0;
    }
}

.status-text {
    font-family: 'Space Mono', monospace;
    font-size: clamp(10px, 1vw, 13px);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #e94560;
}

/* Hero Center */
#hero-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 30;
    pointer-events: none;
}

#hero-domain {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(64px, 12vw, 200px);
    letter-spacing: 0.04em;
    color: #e0dcd0;
    line-height: 1;
    text-shadow: 0 0 80px rgba(91, 192, 235, 0.3), 0 4px 0 #0a0a0a;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

#hero-tagline {
    font-family: 'Space Mono', monospace;
    font-size: clamp(12px, 1.5vw, 18px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #d4a843;
    margin-top: 16px;
    transition: opacity 0.6s ease;
}

/* Scroll Spacers */
.scroll-spacer {
    position: relative;
    height: 100vh;
    z-index: 10;
}

.scroll-spacer-large {
    height: 150vh;
}

#zone-abyss {
    height: 70vh;
}

/* Observatory Grid */
.observatory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: clamp(16px, 5vw, 80px);
    padding-top: 20vh;
    max-width: 1100px;
    margin: 0 auto;
}

.observatory-panel {
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 600ms ease-out, transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.observatory-panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.observatory-wide {
    grid-column: 1 / -1;
}

/* Panel Content */
.panel-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 32px);
    color: #e0dcd0;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 2;
}

.panel-body {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1.4vw, 20px);
    line-height: 1.72;
    color: #e0dcd0;
    position: relative;
    z-index: 2;
}

/* Data Readout */
.data-readout {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 2px solid rgba(91, 192, 235, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    position: relative;
    z-index: 2;
}

.readout-label {
    font-family: 'Space Mono', monospace;
    font-size: clamp(10px, 1vw, 13px);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(91, 192, 235, 0.6);
}

.readout-value {
    font-family: 'Space Mono', monospace;
    font-size: clamp(14px, 1.5vw, 20px);
    letter-spacing: 0.12em;
    color: #d4a843;
}

/* Abyss Section */
#abyss-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: clamp(16px, 5vw, 80px);
}

#abyss-domain {
    position: relative;
    max-width: 600px;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 600ms ease-out, transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

#abyss-domain.visible {
    opacity: 1;
    transform: translateY(0);
}

#abyss-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 5vw, 56px);
    letter-spacing: 0.04em;
    color: #5bc0eb;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    text-shadow: 0 0 40px rgba(91, 192, 235, 0.5);
}

.abyss-message {
    color: rgba(224, 220, 208, 0.7);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hud-top-left,
    .hud-top-right {
        max-width: 180px;
        padding: 16px;
    }

    .observatory-grid {
        grid-template-columns: 1fr;
        padding: 16px;
        padding-top: 10vh;
    }

    .observatory-panel {
        padding: 16px;
    }

    .hud-bottom-left.content-panel {
        margin-left: 16px;
        margin-right: 16px;
    }

    #hero-domain {
        font-size: clamp(40px, 15vw, 80px);
    }
}
