/* ============================================
   MasqueradeProtocol.com - Styles
   Sci-fi Domestica: Deep-space warmth
   ============================================ */

/* Custom Properties - Ethereal Blue System */
:root {
    --midnight-hull: #0B1526;
    --stratosphere: #132E4A;
    --protocol-blue: #4DA8DA;
    --transmission: #7EC8E3;
    --frost-white: #E8F4FD;
    --ember-amber: #E8A45A;
    --cerulean-ink: #B8D4E8;
    --dawn-mist: #F0F6FA;
    --deep-navy: #1A2A3A;

    --sidebar-width: 280px;
    --content-margin: 64px;
    --content-max-width: 720px;
    --easing: cubic-bezier(0.4, 0.0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
    color: var(--cerulean-ink);
    background-color: var(--midnight-hull);
    overflow-x: hidden;
}

/* ============================================
   Sidebar Navigation
   ============================================ */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: rgba(11, 21, 38, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(77, 168, 218, 0.15);
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 40px 24px;
}

#sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 60px;
}

.mask-logo {
    flex-shrink: 0;
}

.sidebar-title {
    font-family: 'Comfortaa', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--protocol-blue);
    line-height: 1.4;
}

/* Waypoint Track */
#waypoint-track {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 48px;
    padding-left: 6px;
}

.waypoint-line {
    position: absolute;
    left: 11px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: rgba(77, 168, 218, 0.3);
}

.waypoint {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.waypoint-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--midnight-hull);
    border: 1.5px solid var(--protocol-blue);
    flex-shrink: 0;
    transition: all 600ms var(--easing);
    position: relative;
}

.waypoint-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(77, 168, 218, 0.4), transparent);
    opacity: 0;
    transition: opacity 600ms var(--easing);
}

.waypoint.active .waypoint-dot {
    background: var(--protocol-blue);
    border-color: var(--transmission);
    box-shadow: 0 0 12px rgba(77, 168, 218, 0.4);
}

.waypoint.active .waypoint-dot::after {
    opacity: 1;
    animation: waypoint-pulse 3s ease-in-out infinite;
}

@keyframes waypoint-pulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.5); }
}

.waypoint-label {
    font-family: 'Comfortaa', sans-serif;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(184, 212, 232, 0.5);
    transition: color 400ms var(--easing);
}

.waypoint.active .waypoint-label {
    color: var(--frost-white);
}

.waypoint:hover .waypoint-label {
    color: var(--cerulean-ink);
}

/* ============================================
   Mobile Navigation
   ============================================ */
#mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(11, 21, 38, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(77, 168, 218, 0.15);
    z-index: 100;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.mobile-waypoint {
    cursor: pointer;
    padding: 8px;
}

.mobile-waypoint .waypoint-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--midnight-hull);
    border: 1.5px solid var(--protocol-blue);
    transition: all 600ms var(--easing);
}

.mobile-waypoint.active .waypoint-dot {
    background: var(--protocol-blue);
    box-shadow: 0 0 10px rgba(77, 168, 218, 0.5);
}

/* ============================================
   Main Content Area
   ============================================ */
#content {
    margin-left: var(--sidebar-width);
    scroll-snap-type: y proximity;
    overflow-y: auto;
    height: 100vh;
}

/* ============================================
   Panels (Sections)
   ============================================ */
.panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--midnight-hull);
    scroll-snap-align: start;
    transition: filter 400ms var(--easing), opacity 400ms var(--easing);
}

.panel.blur-out {
    filter: blur(12px);
    opacity: 0.3;
}

.panel.blur-in {
    filter: blur(8px);
    opacity: 0.4;
}

.panel.focused {
    filter: blur(0px);
    opacity: 1;
}

/* Panel Content */
.panel-content {
    position: relative;
    z-index: 1;
    padding: 80px var(--content-margin);
    max-width: var(--content-max-width);
    width: 100%;
}

.panel-content h2 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 56px;
    color: var(--frost-white);
    letter-spacing: -0.01em;
    margin-bottom: 32px;
    line-height: 1.15;
}

.panel-content h3 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 40px;
    color: var(--frost-white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.panel-content p {
    margin-bottom: 24px;
    color: var(--cerulean-ink);
    font-weight: 400;
}

.panel-content p:last-child {
    margin-bottom: 0;
}

/* ============================================
   Hero Panel (Panel 1)
   ============================================ */
.panel-hero {
    justify-content: center;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 40px;
    position: relative;
}

.hero-title {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 72px;
    color: var(--frost-white);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1500ms var(--easing), transform 1500ms var(--easing);
}

.hero-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-tagline {
    font-family: 'Quicksand', sans-serif;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.75;
    color: var(--cerulean-ink);
    max-width: 560px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1200ms var(--easing), transform 1200ms var(--easing);
}

.hero-tagline.visible {
    opacity: 1;
    transform: translateY(0);
}

.mask-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   Wave-Form SVG Canvases
   ============================================ */
.wave-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    filter: blur(4px);
}

.hero-waves {
    filter: blur(5px);
}

.side-waves {
    left: auto;
    right: 0;
    width: 40%;
}

.active-waves path {
    stroke-width: 2.5px;
}

.fade-waves {
    opacity: 0.15;
}

/* ============================================
   Amber Accent
   ============================================ */
.amber-accent {
    color: var(--ember-amber);
    font-weight: 500;
}

/* ============================================
   Frosted Glass Card
   ============================================ */
.frosted-card {
    background: rgba(11, 21, 38, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(77, 168, 218, 0.2);
    border-radius: 12px;
    padding: 40px;
    margin: 32px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 60px rgba(77, 168, 218, 0.05);
}

.frosted-card h3 {
    font-size: 28px;
    margin-bottom: 16px;
}

.frosted-card p {
    font-size: 16px;
    line-height: 1.8;
}

/* ============================================
   Final Panel (Transmission Complete)
   ============================================ */
.panel-final {
    justify-content: center;
}

.final-content {
    max-width: 540px;
    margin: 0 auto;
    text-align: center;
    padding: 80px 40px;
}

.mask-divider {
    margin-bottom: 48px;
    opacity: 0.6;
}

.mask-divider svg {
    display: inline-block;
}

.return-link {
    display: inline-block;
    margin-top: 40px;
    font-family: 'Quicksand', sans-serif;
    font-size: 17px;
    font-weight: 500;
    color: var(--ember-amber);
    text-decoration: none;
    transition: opacity 400ms var(--easing), color 400ms var(--easing);
}

.return-link:hover {
    opacity: 0.8;
    color: var(--transmission);
}

/* ============================================
   Wave-Form Path Styles
   ============================================ */
.wave-path {
    fill: none;
    stroke-linecap: round;
}

/* ============================================
   Scrollbar Styling
   ============================================ */
#content::-webkit-scrollbar {
    width: 4px;
}

#content::-webkit-scrollbar-track {
    background: var(--midnight-hull);
}

#content::-webkit-scrollbar-thumb {
    background: rgba(77, 168, 218, 0.3);
    border-radius: 2px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
        --content-margin: 24px;
    }

    #sidebar {
        display: none;
    }

    #mobile-nav {
        display: flex;
    }

    #content {
        margin-left: 0;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: 44px;
    }

    .hero-tagline {
        font-size: 16px;
    }

    .panel-content h2 {
        font-size: 36px;
    }

    .panel-content h3 {
        font-size: 28px;
    }

    .panel-content {
        padding: 60px var(--content-margin);
    }

    .hero-content {
        padding: 60px 24px;
    }

    .final-content {
        padding: 60px 24px;
    }

    .frosted-card {
        padding: 24px;
    }

    .side-waves {
        width: 100%;
        left: 0;
        opacity: 0.3;
    }

    .panel.blur-out {
        filter: blur(16px);
    }

    .panel.blur-in {
        filter: blur(16px);
        opacity: 0.3;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 34px;
    }

    .panel-content h2 {
        font-size: 30px;
    }

    body {
        font-size: 15px;
    }
}
