/* ============================================================
   a6c.boo — Holographic Deep-Sea Data Terminal
   Ocean Deep Holographic Palette
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --void-bg: #040B1A;
    --panel-bg: #081E3C;
    --caustic: #0A3D5C;
    --cyan: #00E5FF;
    --soft-ocean: #A8D8EA;
    --ice-white: #E0F7FF;
    --holo-magenta: #FF00AA;
    --holo-gold: #FFD700;
    --deep-coral: #FF6B6B;
    --aquamarine: #00FFA3;
    --green-cyan: #00FF6A;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background: var(--void-bg);
    color: var(--soft-ocean);
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    overflow-x: hidden;
    min-height: 100vh;
}

/* --- Grid Overlay (Fixed calibration lines) --- */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 59px,
            rgba(10, 61, 92, 0.15) 59px,
            rgba(10, 61, 92, 0.15) 60px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 59px,
            rgba(10, 61, 92, 0.15) 59px,
            rgba(10, 61, 92, 0.15) 60px
        );
}

#grid-overlay.visible {
    opacity: 1;
}

/* Calibration cross marks at grid intersections via pseudo-element */
#grid-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle 1.5px at 60px 60px, rgba(0, 229, 255, 0.25) 0%, transparent 100%);
    background-size: 60px 60px;
}

/* --- Bioluminescent Particles Canvas --- */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2s ease;
}

#particles-canvas.visible {
    opacity: 1;
}

/* --- Navigation: Isometric Cube Stack --- */
#nav-cubes {
    position: fixed;
    bottom: 40px;
    right: 30px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav-cube {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(0, 229, 255, 0.4);
    transition: color 0.3s ease, transform 0.15s ease;
}

.nav-cube:hover {
    color: var(--deep-coral);
    animation: shake-gentle 0.15s ease;
}

.nav-cube.active {
    color: var(--cyan);
    animation: spin-slow 8s linear infinite;
}

.nav-cube svg {
    width: 100%;
    height: 100%;
}

/* --- Holographic Interference Line --- */
#holo-interference {
    position: fixed;
    left: 0;
    width: 100vw;
    height: 4px;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        90deg,
        var(--cyan),
        var(--holo-magenta),
        var(--holo-gold),
        var(--cyan),
        var(--holo-magenta)
    );
    background-size: 200% 100%;
}

#holo-interference.active {
    opacity: 1;
    animation: interference-sweep 0.3s linear;
}

@keyframes interference-sweep {
    0% { background-position: 0% 0%; opacity: 0.8; }
    50% { background-position: 100% 0%; opacity: 1; }
    100% { background-position: 200% 0%; opacity: 0; }
}

/* --- Sections --- */
.panel-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    padding: 80px 20px;
}

/* --- Hero Section --- */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hero-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

#hero-label {
    min-height: 1.4em;
    display: block;
}

#hero-cube-container {
    opacity: 0;
    transition: opacity 1s ease;
}

#hero-cube-container.visible {
    opacity: 1;
}

#hero-cube {
    filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.3));
}

.cube-face {
    transition: stroke 0.5s ease;
}

#hero-tagline {
    opacity: 0;
    transition: opacity 1.5s ease 0.5s;
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    color: var(--soft-ocean);
    max-width: 480px;
}

#hero-tagline.visible {
    opacity: 1;
}

.tagline {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    color: var(--soft-ocean);
}

/* --- Holographic Panels --- */
.holo-panel {
    background: rgba(8, 30, 60, 0.72);
    border: 1px solid rgba(0, 229, 255, 0.25);
    padding: 48px 40px;
    max-width: 640px;
    width: 100%;
    position: relative;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, border-color 0.3s ease;
    /* Holographic rainbow border gradient */
    border-image: linear-gradient(
        135deg,
        rgba(0, 229, 255, 0.3),
        rgba(255, 0, 170, 0.2),
        rgba(255, 215, 0, 0.2),
        rgba(0, 229, 255, 0.3)
    ) 1;
}

.holo-panel.visible {
    opacity: 1;
    transform: translateX(0) rotate(var(--panel-rotate, 0deg));
}

.holo-panel.exit {
    opacity: 0;
    transition: opacity 0.4s ease-in, transform 0.4s ease-in;
}

.panel-offset-left {
    margin-right: auto;
    margin-left: 8%;
    --panel-rotate: -1.5deg;
}

.panel-offset-right {
    margin-left: auto;
    margin-right: 8%;
    --panel-rotate: 2deg;
}

.panel-offset-center {
    margin: 0 auto;
    --panel-rotate: 0.5deg;
}

/* Panel internal grid rules */
.panel-grid-rule {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(10, 61, 92, 0.12);
}

.rule-top {
    top: 33.33%;
}

.rule-bottom {
    top: 66.66%;
}

.rule-label {
    position: absolute;
    right: 12px;
    top: -8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(0, 229, 255, 0.3);
    letter-spacing: 0.05em;
}

/* --- Typography --- */
.section-heading {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 40px;
    letter-spacing: 0.03em;
    color: var(--ice-white);
    text-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
    margin-bottom: 24px;
}

.section-body {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: var(--soft-ocean);
    margin-bottom: 32px;
}

.mono-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--cyan);
}

/* --- Isometric Icons --- */
.iso-icon {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.iso-icon svg {
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.2));
}

/* Pulse dots on server stack */
.pulse-dot {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

.pulse-dot:nth-child(even) {
    animation-delay: 0.5s;
}

@keyframes pulse-glow {
    0% { opacity: 0.3; r: 1.5; }
    100% { opacity: 1; r: 2.5; }
}

/* Crystal prism shimmer */
.crystal-prism {
    animation: crystal-shimmer 6s ease-in-out infinite alternate;
}

.crystal-prism:nth-child(2) { animation-delay: 1s; }
.crystal-prism:nth-child(3) { animation-delay: 2s; }
.crystal-prism:nth-child(4) { animation-delay: 3s; }
.crystal-prism:nth-child(5) { animation-delay: 4s; }

@keyframes crystal-shimmer {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* --- Depth Readouts --- */
.depth-readout {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(10, 61, 92, 0.2);
}

/* --- Shake Animations --- */
@keyframes shake-gentle {
    0% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    50% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

@keyframes shake-click {
    0% { transform: translateX(0); }
    15% { transform: translateX(-4px); }
    30% { transform: translateX(4px); }
    50% { transform: translateX(-2px); }
    70% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Holo Hue Shift (applied via JS as CSS variable) ---
   Scroll-linked color temperature: #00E5FF -> #00FFA3 -> #00FF6A */
.hue-shift {
    transition: filter 0.1s linear;
}

/* --- Scroll midpoint accent (aquamarine thermal layer) --- */
.hue-mid {
    color: #00FFA3;
}

/* --- Rainbow border flash --- */
@keyframes rainbow-border {
    0% { border-color: var(--cyan); }
    25% { border-color: var(--holo-magenta); }
    50% { border-color: var(--holo-gold); }
    75% { border-color: var(--holo-magenta); }
    100% { border-color: var(--cyan); }
}

.holo-panel.rainbow-flash {
    animation: rainbow-border 0.3s linear;
}

/* --- Caustic Light Background Animation --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 600px 300px at 30% 40%, rgba(10, 61, 92, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 500px 250px at 70% 60%, rgba(10, 61, 92, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 400px 200px at 50% 80%, rgba(10, 61, 92, 0.05) 0%, transparent 70%);
    animation: caustic-drift 20s ease-in-out infinite alternate;
}

@keyframes caustic-drift {
    0% {
        background-position: 0% 0%, 100% 100%, 50% 50%;
    }
    50% {
        background-position: 20% 30%, 80% 70%, 40% 60%;
    }
    100% {
        background-position: 10% 50%, 90% 30%, 60% 80%;
    }
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-heading {
        font-size: 28px;
    }

    .holo-panel {
        padding: 32px 24px;
        max-width: 100%;
    }

    .panel-offset-left,
    .panel-offset-right {
        margin-left: 4%;
        margin-right: 4%;
    }

    #nav-cubes {
        bottom: 20px;
        right: 16px;
    }

    #hero-tagline {
        font-size: 17px;
        max-width: 320px;
    }

    .iso-icon svg {
        width: 120px;
        height: auto;
    }
}
