/* paraoligm.com - HUD Overlay Retro-Futurist Design */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    --midnight-sapphire: #0B1D3A;
    --deep-cerulean: #132E5B;
    --ice-filament: #A4D2F5;
    --frost-white: #E8F4FD;
    --pale-sky: #B8D8EA;
    --optimism-amber: #F2C06B;
    --signal-coral: #E8836B;
    --glass-blue: rgba(11, 29, 58, 0.4);
    --border-chrome: rgba(164, 210, 245, 0.3);
    --bg-gradient-start: #0B1D3A;
    --bg-gradient-end: #132E5B;
    --bg-amber-tint: 0;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--pale-sky);
    background: var(--midnight-sapphire);
    overflow-x: hidden;
}

/* ============================================
   BACKGROUND PLANE
   ============================================ */
#background-plane {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background: linear-gradient(
        160deg,
        var(--bg-gradient-start) 0%,
        var(--deep-cerulean) 50%,
        var(--bg-gradient-start) 100%
    );
    transition: background 2s ease-out;
}

#noise-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    pointer-events: none;
}

/* ============================================
   OVERLAY PLANE (Parallax decorations)
   ============================================ */
#overlay-plane {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    will-change: transform;
}

#radar-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.radar-ring {
    fill: none;
    stroke: var(--ice-filament);
    stroke-opacity: 0.12;
    stroke-width: 0.5;
    stroke-dasharray: 8 6;
    transform-origin: 300px 400px;
}

.ring-1 {
    animation: radarSpin 60s linear infinite;
}

.ring-2 {
    animation: radarSpin 80s linear infinite reverse;
}

.ring-3 {
    animation: radarSpin 100s linear infinite;
}

@keyframes radarSpin {
    from { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.02); }
    to { transform: rotate(360deg) scale(1); }
}

#constellation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.constellation-line {
    stroke: var(--ice-filament);
    stroke-opacity: 0.2;
    stroke-width: 0.5;
    fill: none;
}

.constellation-node {
    fill: var(--ice-filament);
    opacity: 0.25;
}

.node-1 { animation: nodePulse 5s ease-in-out infinite; }
.node-2 { animation: nodePulse 7s ease-in-out infinite 0.5s; }
.node-3 { animation: nodePulse 4s ease-in-out infinite 1s; }
.node-4 { animation: nodePulse 6s ease-in-out infinite 1.5s; }
.node-5 { animation: nodePulse 8s ease-in-out infinite 0.3s; }
.node-6 { animation: nodePulse 5s ease-in-out infinite 2s; }
.node-7 { animation: nodePulse 7s ease-in-out infinite 0.8s; }
.node-8 { animation: nodePulse 6s ease-in-out infinite 1.2s; }
.node-9 { animation: nodePulse 4s ease-in-out infinite 0.7s; }
.node-10 { animation: nodePulse 5s ease-in-out infinite 1.8s; }
.node-11 { animation: nodePulse 7s ease-in-out infinite 2.5s; }
.node-12 { animation: nodePulse 6s ease-in-out infinite 0.4s; }
.node-13 { animation: nodePulse 8s ease-in-out infinite 1.1s; }
.node-14 { animation: nodePulse 5s ease-in-out infinite 0.6s; }
.node-15 { animation: nodePulse 4s ease-in-out infinite 2.2s; }

@keyframes nodePulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.4; }
}

/* ============================================
   NAVIGATION PIPS
   ============================================ */
#nav-pips {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-pip {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(164, 210, 245, 0.5);
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    padding: 0;
}

.nav-pip:hover {
    border-color: var(--ice-filament);
    background: rgba(164, 210, 245, 0.15);
}

.nav-pip.active {
    border-color: var(--ice-filament);
    background: rgba(164, 210, 245, 0.2);
    box-shadow: 0 0 12px rgba(164, 210, 245, 0.6);
}

.pip-label {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ice-filament);
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.nav-pip:hover .pip-label {
    opacity: 0.8;
}

/* ============================================
   CONTENT PLANE
   ============================================ */
#content-plane {
    position: relative;
    z-index: 2;
}

/* ============================================
   VIEWPORT SECTIONS
   ============================================ */
.viewport-section {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    scroll-snap-align: start;
    overflow: hidden;
}

.section-bg-tint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    transition: opacity 2s ease-out;
    opacity: 0;
}

/* ============================================
   TRANSITION ZONES
   ============================================ */
.transition-zone {
    height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zone-rule {
    width: 50%;
    border: none;
    border-top: 1px solid rgba(164, 210, 245, 0.2);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-title-group {
    position: absolute;
    top: 20%;
    left: 15%;
    pointer-events: none;
}

.hero-layer {
    font-family: 'Righteous', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.15;
    color: var(--frost-white);
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
}

.hero-layer-3 {
    opacity: 0.15;
    transform: translate(8px, 4px);
    text-shadow: none;
}

.hero-layer-2 {
    opacity: 0.4;
    transform: translate(3px, 2px);
    text-shadow: none;
}

.hero-layer-1 {
    opacity: 1;
    transform: translate(0, 0);
    text-shadow: 0 0 40px rgba(164, 210, 245, 0.3);
}

.hero-layer-3,
.hero-layer-2,
.hero-layer-1 {
    transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 1s ease-out;
}

/* Initial collapsed state (animated on load) */
.hero-layer-3.collapsed,
.hero-layer-2.collapsed,
.hero-layer-1.collapsed {
    transform: translate(0, 0);
    opacity: 0;
}

/* ============================================
   HUD PANELS
   ============================================ */
.hud-panel {
    background: var(--glass-blue);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-chrome);
    border-radius: 2px;
    padding: 2rem;
    position: absolute;
    max-width: 500px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hud-panel.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Skeleton loading state */
.hud-panel.skeleton {
    overflow: hidden;
}

.hud-panel.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        110deg,
        transparent 30%,
        rgba(164, 210, 245, 0.08) 50%,
        transparent 70%
    );
    animation: shimmer 1.5s ease-in-out infinite;
}

.hud-panel.skeleton > * {
    opacity: 0;
}

.hud-panel.skeleton .panel-coord {
    opacity: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-30%); }
    100% { transform: translateX(30%); }
}

.panel-coord {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ice-filament);
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.section-title {
    font-family: 'Righteous', cursive;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 1.15;
    color: var(--frost-white);
    text-shadow: 0 0 30px rgba(164, 210, 245, 0.25);
    margin-bottom: 0;
}

.section-title em {
    font-style: normal;
    color: var(--optimism-amber);
}

.body-text {
    color: var(--pale-sky);
    margin-bottom: 1rem;
}

.body-text:last-child {
    margin-bottom: 0;
}

.body-text em {
    font-style: normal;
    color: var(--optimism-amber);
    font-weight: 400;
}

/* ============================================
   HUD DATA READOUTS
   ============================================ */
.data-readout {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ice-filament);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.data-value {
    color: var(--frost-white);
}

.glitch-text {
    animation: glitchFlicker 3s ease-in-out infinite;
}

@keyframes glitchFlicker {
    0%, 90%, 100% { opacity: 1; }
    92% { opacity: 0.3; transform: translateX(2px); }
    94% { opacity: 0.8; transform: translateX(-1px); }
    96% { opacity: 0.4; transform: translateX(1px); }
    98% { opacity: 1; transform: translateX(0); }
}

/* ============================================
   CTA - SHIFT YOUR PARAOLIGM
   ============================================ */
.cta-text {
    font-family: 'Righteous', cursive;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--frost-white);
    text-align: center;
}

.cta-highlight {
    color: var(--signal-coral);
    animation: ctaPulse 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes ctaPulse {
    0%, 100% {
        text-shadow: 0 0 20px rgba(232, 131, 107, 0.3);
    }
    50% {
        text-shadow: 0 0 40px rgba(232, 131, 107, 0.6),
                     0 0 80px rgba(232, 131, 107, 0.2);
    }
}

/* ============================================
   STARBURST & BOOMERANG ORNAMENTS
   ============================================ */
.starburst {
    position: absolute;
    pointer-events: none;
}

.starburst-line {
    stroke: var(--ice-filament);
    stroke-width: 1;
    stroke-opacity: 0.3;
}

.starburst-dot {
    fill: var(--ice-filament);
    opacity: 0.3;
}

.amber-line {
    stroke: var(--optimism-amber);
    stroke-opacity: 0.4;
}

.amber-dot {
    fill: var(--optimism-amber);
    opacity: 0.4;
}

.boomerang {
    position: absolute;
    pointer-events: none;
}

.boomerang-path {
    fill: none;
    stroke: var(--ice-filament);
    stroke-width: 1.5;
    stroke-opacity: 0.3;
    stroke-linecap: round;
}

.amber-path {
    stroke: var(--optimism-amber);
    stroke-opacity: 0.4;
}

/* ============================================
   PANEL POSITIONS - SECTION 1 (Hero)
   ============================================ */
.panel-hero-sub {
    left: 55%;
    top: 65%;
    max-width: 420px;
}

.starburst-hero {
    right: 10%;
    top: 25%;
    opacity: 0.8;
}

/* ============================================
   PANEL POSITIONS - SECTION 2
   ============================================ */
.panel-s2-title {
    left: 12%;
    top: 18%;
}

.panel-s2-body {
    left: 55%;
    top: 42%;
    max-width: 440px;
}

.boomerang-s2 {
    right: 15%;
    top: 20%;
    opacity: 0.7;
}

/* ============================================
   PANEL POSITIONS - SECTION 3
   ============================================ */
.panel-s3-title {
    left: 20%;
    top: 15%;
}

.panel-s3-body {
    left: 58%;
    top: 50%;
    max-width: 420px;
}

.panel-s3-data {
    left: 15%;
    top: 60%;
    max-width: 300px;
}

.glitch-panel {
    border-color: rgba(232, 131, 107, 0.2);
}

/* ============================================
   PANEL POSITIONS - SECTION 4
   ============================================ */
.panel-s4-title {
    left: 18%;
    top: 22%;
}

.panel-s4-body {
    left: 50%;
    top: 48%;
    max-width: 440px;
}

.starburst-s4 {
    right: 20%;
    top: 25%;
    opacity: 0.6;
}

/* ============================================
   PANEL POSITIONS - SECTION 5
   ============================================ */
.panel-s5-title {
    left: 15%;
    top: 20%;
}

.panel-s5-body {
    left: 48%;
    top: 45%;
    max-width: 440px;
}

.panel-s5-cta {
    left: 50%;
    top: 75%;
    transform: translateX(-50%) translateY(8px);
    text-align: center;
}

.panel-s5-cta.revealed {
    transform: translateX(-50%) translateY(0);
}

.starburst-s5 {
    left: 12%;
    top: 72%;
    opacity: 0.8;
}

.boomerang-s5 {
    right: 12%;
    top: 30%;
    opacity: 0.6;
}

/* ============================================
   RESPONSIVE - MOBILE (<768px)
   ============================================ */
@media (max-width: 768px) {
    #nav-pips {
        bottom: 1rem;
        left: 1rem;
        gap: 0.5rem;
    }

    .nav-pip {
        width: 12px;
        height: 12px;
    }

    .hero-title-group {
        left: 5%;
        top: 15%;
    }

    .hero-layer {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .hero-layer-3 {
        display: none;
    }

    .hero-layer-2 {
        opacity: 0.3;
        transform: translate(2px, 1px);
    }

    .hud-panel {
        position: relative;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        max-width: 90%;
        margin: 1.5rem auto;
        transform: none;
    }

    .hud-panel.revealed {
        transform: none;
    }

    .panel-s5-cta {
        transform: none;
    }

    .panel-s5-cta.revealed {
        transform: none;
    }

    .viewport-section {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .starburst, .boomerang {
        display: none;
    }

    .transition-zone {
        height: 15vh;
    }

    .zone-rule {
        width: 30%;
    }

    #radar-rings {
        opacity: 0.5;
    }
}

/* ============================================
   SECTION GRADIENT TINTS
   ============================================ */
[data-gradient="4"] ~ .panel-s5-title .section-title em,
[data-section="4"] .section-title em {
    text-shadow: 0 0 20px rgba(242, 192, 107, 0.3);
}
