/* ═══════════════════════════════════════════════
   ShieldX — Global Design System
   ═══════════════════════════════════════════════ */

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

body {
    background-color: #0A0A0A;
    color: #e5e2e1;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgba(157, 68, 181, 0.3);
}

/* ─── Glass Card Components ─────────────────── */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-image: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.specular-highlight {
    position: relative;
}
.specular-highlight::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ─── Gradients & Glows ─────────────────────── */
.primary-gradient {
    background: linear-gradient(135deg, #9d44b5 0%, #4d407a 100%);
}

.glow-primary {
    box-shadow: 0 0 20px rgba(157, 68, 181, 0.3);
}

.glow-accent {
    box-shadow: 0 0 20px rgba(157, 68, 181, 0.15);
}

.mesh-gradient-bg {
    background-image:
        radial-gradient(at 0% 0%, rgba(157, 68, 181, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 219, 233, 0.1) 0px, transparent 50%);
}

.iridescent-bg {
    background: radial-gradient(circle at 20% 30%, rgba(157, 68, 181, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(0, 219, 233, 0.15) 0%, transparent 50%);
}

.sparkline-gradient {
    background: linear-gradient(90deg, rgba(0, 219, 233, 0) 0%, rgba(0, 219, 233, 0.2) 100%);
}

/* ─── Material Symbols ──────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ─── Scroll Snap (Welcome Page — Horizontal) ──── */
.snap-container {
    scroll-snap-type: x mandatory;
    height: 100vh;
    overflow-x: scroll;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: row;
}
.snap-container::-webkit-scrollbar {
    display: none;
}
.snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    min-width: 100vw;
    width: 100vw;
    position: relative;
    flex-shrink: 0;
}

/* ─── Animations ────────────────────────────── */
.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes bounce-right {
    0%, 20%, 50%, 80%, 100% { transform: translateX(0); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(5px); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/* ─── Form Inputs ───────────────────────────── */
.form-input {
    width: 100%;
    background: rgba(14, 14, 14, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem 3rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 24px;
    outline: none;
    transition: all 0.2s ease;
}
.form-input::placeholder {
    color: rgba(155, 140, 155, 0.4);
}
.form-input:focus {
    border-color: rgba(242, 175, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(242, 175, 255, 0.05);
}

/* ─── Change Badge ──────────────────────────── */
.badge-positive {
    background: rgba(0, 200, 83, 0.15);
    color: #4CAF50;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}
.badge-negative {
    background: rgba(255, 82, 82, 0.15);
    color: #FF5252;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
}

/* ─── Bottom Nav ────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 16px 32px;
    background: #131313;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px 20px 0 0;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 12px;
    cursor: pointer;
}
.nav-item:hover {
    color: #c084fc;
}
.nav-item.active {
    color: #c084fc;
    background: rgba(168, 85, 247, 0.1);
}
.nav-item span.label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    margin-top: 4px;
}

/* ─── Top Bar ───────────────────────────────── */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 20px;
    position: fixed;
    top: 0;
    z-index: 50;
    background: #131313;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ─── HTMX Native-Feel Transitions ──────────── */

/* Top progress bar (shows during HTMX requests) */
.htmx-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #9d44b5, #00dbe9, #f2afff);
    z-index: 9999;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    width: 100%;
    pointer-events: none;
}
.htmx-progress-bar.loading {
    transform: scaleX(0.7);
    transition: transform 8s cubic-bezier(0.1, 0.5, 0.3, 1);
}
.htmx-progress-bar.done {
    transform: scaleX(1);
    transition: transform 0.15s ease;
}

/* Content swap — fade out fast, fade in with slide */
.htmx-content {
    transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}
.htmx-content.htmx-swapping {
    opacity: 0;
    transform: translateY(4px);
}

/* Animate new content in */
@keyframes htmx-content-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.htmx-content.htmx-settling > * {
    animation: htmx-content-in 0.2s ease-out both;
}

/* Stagger child elements for a cascade effect */
.htmx-content.htmx-settling > *:nth-child(1) { animation-delay: 0ms; }
.htmx-content.htmx-settling > *:nth-child(2) { animation-delay: 30ms; }
.htmx-content.htmx-settling > *:nth-child(3) { animation-delay: 60ms; }
.htmx-content.htmx-settling > *:nth-child(4) { animation-delay: 90ms; }
.htmx-content.htmx-settling > *:nth-child(5) { animation-delay: 120ms; }
.htmx-content.htmx-settling > *:nth-child(n+6) { animation-delay: 140ms; }

/* ─── Scrollbar (global) ────────────────────── */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}
