/* ==========================================================================
   XV7 FX Funds Premium Stylesheet
   ========================================================================== */

/* Design Variables & Theme Configuration */
:root {
    --color-bg: #060101; /* Deepest Obsidian Blaze */
    --color-bg-alt: #120202; /* Deep Black-Red */
    --color-primary: #FF2D2D; /* Vibrant Blaze Red */
    --color-primary-rgb: 255, 45, 45;
    --color-secondary: #990000; /* Rich Crimson-Black Blaze */
    --color-secondary-rgb: 153, 0, 0;
    --color-accent: #FF5E5E; /* Bright Blaze Neon Rose */
    --color-accent-rgb: 255, 94, 94;
    --color-profit: #00FF88; /* High-tech Mint/Neon Green */
    --color-profit-rgb: 0, 255, 136;
    --color-loss: #FF2D2D; /* Blaze Red */
    --color-loss-rgb: 255, 45, 45;
    --color-text: #F8FAFC;
    --color-text-muted: #A0AAB8;
    --color-card-bg: rgba(26, 0, 0, 0.45); /* Crimson-black glass background */
    --color-panel-bg: rgba(20, 0, 0, 0.75); /* Crimson-black panel background */
    --color-border: rgba(255, 45, 45, 0.15); /* Sleek crimson border */
    --color-border-hover: rgba(255, 45, 45, 0.45); /* Hover border glow */
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;

    /* Shadows & Transitions */
    --glow-primary: 0 0 25px rgba(255, 45, 45, 0.35);
    --glow-secondary: 0 0 25px rgba(153, 0, 0, 0.35);
    --glow-profit: 0 0 25px rgba(0, 255, 136, 0.35);
    --shadow-premium: 0 12px 35px -10px rgba(0, 0, 0, 0.95);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--color-bg);
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: transparent;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
    
    /* Block User Text Selection */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Top scroll mask to hide leakage above floating notch header */
.top-scroll-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 1.25rem;
    background-color: var(--color-bg);
    z-index: 99;
    pointer-events: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(var(--color-primary-rgb), 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(var(--color-primary-rgb), 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -3;
    pointer-events: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
    border-left: 1px solid rgba(255, 45, 45, 0.05);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 45, 45, 0.22);
    border: 2px solid var(--color-bg);
    border-radius: 20px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
}

/* Glowing Background Blobs */
.bg-glow {
    position: fixed;
    width: 85vw;
    height: 85vw;
    max-width: 1200px;
    max-height: 1200px;
    border-radius: 50%;
    filter: blur(180px);
    opacity: 0.12;
    z-index: -2;
    pointer-events: none;
    animation: blob-pulse 25s infinite alternate ease-in-out;
    mix-blend-mode: plus-lighter;
}

.bg-glow-1 {
    top: -25%;
    left: -15%;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 1) 0%, rgba(var(--color-primary-rgb), 0.35) 45%, rgba(1, 2, 4, 0) 75%);
}

.bg-glow-2 {
    bottom: -25%;
    right: -15%;
    background: radial-gradient(circle, rgba(var(--color-secondary-rgb), 1) 0%, rgba(var(--color-secondary-rgb), 0.35) 45%, rgba(1, 2, 4, 0) 75%);
    animation-delay: -7s;
}

@keyframes blob-pulse {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.15) translate(40px, -30px); }
    100% { transform: scale(0.95) translate(-20px, 40px); }
}

/* Interactive Canvas Background */
#bg-network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.65;
}

/* Interactive Foreground Rain Canvas */
#rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 98;
    pointer-events: none;
    opacity: 0.8;
}

/* Grid & Layout Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 6rem 0;
    position: relative;
}

.main-content {
    position: relative;
    z-index: 5;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    perspective: 1200px; /* Perspective for children 3D entrance */
}

/* Typography elements */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

p {
    color: var(--color-text-muted);
}

.text-gradient {
    background: linear-gradient(135deg, #fff 30%, var(--color-secondary) 70%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-center {
    text-align: center;
}

/* Buttons and Interactions */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.95rem 2.25rem;
    border-radius: 50px; /* Fully curved pill shape */
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    z-index: 2;
    border: 1.5px solid transparent;
}

/* Glass glare sweeping light effect */
.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    transition: left 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1;
}

.btn:hover::after {
    left: 140%;
}

.btn * {
    position: relative;
    z-index: 2;
}

.btn-hero {
    color: var(--color-accent); /* Vibrant red/rose text visible without hover */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 15px rgba(225, 29, 72, 0.15);
    border: none;
    background: transparent;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    margin-top: -300px;
    margin-left: -300px;
    background: conic-gradient(
        from 0deg,
        transparent 30%,
        var(--color-accent) 55%,
        var(--color-primary) 70%,
        transparent 95%
    );
    animation: spin 3.5s linear infinite;
    z-index: 0; /* Changed from -2 to render cleanly in front of card backgrounds */
    pointer-events: none;
}

.btn-hero::after {
    content: '';
    position: absolute !important;
    top: 1.5px !important;
    left: 1.5px !important;
    right: 1.5px !important;
    bottom: 1.5px !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    background: var(--color-bg) !important;
    border-radius: 50px !important;
    z-index: 1 !important; /* Changed from -1 to render cleanly in front of card backgrounds */
    pointer-events: none !important;
    transition: var(--transition-smooth) !important;
}

.btn-hero:hover {
    color: #fff; /* White text on hover */
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 25px rgba(225, 29, 72, 0.45), 0 0 15px rgba(136, 19, 55, 0.35);
}

.btn-hero:hover::before {
    animation-duration: 2s; /* Rotate faster on hover */
}

.btn-hero:hover::after {
    background: #130409 !important; /* Solid dark crimson-black inner mask to block center of rotating border on hover */
}

.btn-secondary {
    background: linear-gradient(var(--color-bg), var(--color-bg)) padding-box,
                linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.25)) border-box;
    color: var(--color-text);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
    color: #fff;
    background: linear-gradient(rgba(225, 29, 72, 0.05), rgba(112, 26, 117, 0.05)) padding-box,
                linear-gradient(135deg, var(--color-primary), var(--color-secondary)) border-box;
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.25);
}

.btn-full {
    width: 100%;
}

.btn-pulse {
    animation: btn-glow-pulse 2.5s infinite alternate ease-in-out;
}

@keyframes btn-glow-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(var(--color-primary-rgb), 0.15);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 25px rgba(var(--color-primary-rgb), 0.55), 0 0 10px rgba(var(--color-secondary-rgb), 0.35);
        transform: scale(1.01);
    }
}

.header {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2.5rem);
    max-width: 1150px;
    z-index: 100;
    
    background: radial-gradient(circle 120px at var(--header-glow-x, -9999px) var(--header-glow-y, -9999px), rgba(255, 45, 45, 0.28) 0%, rgba(255, 45, 45, 0.08) 35%, transparent 70%),
                linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%),
                rgba(10, 4, 4, 0.45);
                
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.09);
    border-radius: 100px;
    box-shadow: 
        0 15px 40px -15px rgba(0, 0, 0, 0.8), 
        inset 0 1.5px 0 rgba(255, 255, 255, 0.16),
        0 0 25px rgba(255, 45, 45, 0.02);
    transition: var(--transition-smooth), background 0s;
}

.header:hover {
    border-color: rgba(255, 45, 45, 0.35);
    box-shadow: 
        0 18px 45px -15px rgba(0, 0, 0, 0.9), 
        inset 0 1.5px 0 rgba(255, 255, 255, 0.22),
        0 0 35px rgba(255, 45, 45, 0.12);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin: 0 auto;
    padding: 0.65rem 1.75rem 0.65rem 1.15rem; /* Reduced left padding to shift logo and name left */
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.logo-img {
    height: 38px;
    width: 38px;
    border-radius: 50%;
    object-fit: cover; /* Round crop and zoomed in slightly */
    border: 1.5px solid var(--color-primary);
    filter: drop-shadow(0 0 8px rgba(var(--color-primary-rgb), 0.45));
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logo-accent {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.nav-link {
    color: var(--color-text-muted);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-nav {
    padding: 0.55rem 1.35rem;
    font-size: 0.82rem;
    border: none;
    background: transparent;
    color: var(--color-accent); /* Vibrant red/rose text visible on load */
    border-radius: 50px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.25);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glowing red live heartbeat indicator */
.btn-status-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff; /* Bright white core */
    border: 1.5px solid var(--color-accent); /* Glowing red border */
    position: relative;
    z-index: 3;
    box-shadow: 0 0 8px var(--color-accent), 0 0 4px var(--color-accent) inset;
    animation: statusPulse 1.5s infinite alternate ease-in-out;
}

@keyframes statusPulse {
    0% {
        transform: scale(0.85);
        box-shadow: 0 0 6px var(--color-accent), 0 0 2px var(--color-accent) inset;
    }
    100% {
        transform: scale(1.15);
        box-shadow: 0 0 14px var(--color-accent), 0 0 6px var(--color-accent) inset, 0 0 4px #fff;
    }
}

/* Continuous chrome shimmer gradient text */
.btn-nav span {
    background: linear-gradient(
        90deg,
        #ffffff 0%,
        #ffcccc 25%,
        #ff5555 50%,
        #ffcccc 75%,
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 3s linear infinite;
    transition: var(--transition-smooth);
    display: inline-block;
}

@keyframes textShimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: -200% center;
    }
}

.btn-nav i {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s ease;
    color: var(--color-primary); /* Vibrant glowing red arrow */
}

/* Orbiting "shooting star" light capsule tracing border counter-clockwise */
.btn-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250px;
    height: 250px;
    margin-top: -125px;
    margin-left: -125px;
    background: conic-gradient(
        from 0deg,
        transparent 40%,
        var(--color-accent) 46%,
        #ffffff 50%,
        var(--color-accent) 54%,
        transparent 60%
    );
    animation: spin 3s linear infinite reverse;
    z-index: 0;
    pointer-events: none;
}

.btn-nav::after {
    content: '';
    position: absolute !important;
    top: 1.5px !important;
    left: 1.5px !important;
    right: 1.5px !important;
    bottom: 1.5px !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    background: var(--color-bg) !important; /* Obsidian black inner mask for strong contrast in normal state */
    border-radius: 50px !important;
    z-index: 1 !important;
    pointer-events: none !important;
    transition: var(--transition-smooth) !important;
}

/* Hover Transitions */
.btn-nav:hover {
    color: #fff;
    animation: btnHaloRipple 1.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.btn-nav:hover .btn-status-pulse {
    background: #fff;
    box-shadow: 0 0 12px #fff, 0 0 4px var(--color-accent);
    animation: statusPulseHover 1s infinite alternate ease-in-out;
}

@keyframes statusPulseHover {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
        box-shadow: 0 0 4px #fff;
    }
    100% {
        transform: scale(1.25);
        opacity: 1;
        box-shadow: 0 0 14px #fff, 0 0 6px var(--color-accent);
    }
}

.btn-nav:hover span {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
}

.btn-nav:hover i {
    transform: translate(3px, -3px) scale(1.1);
    color: #fff;
}

.btn-nav:hover::before {
    animation-duration: 1.5s; /* Orbit faster on hover */
}

.btn-nav:hover::after {
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary)) !important; /* Fills with red gradient on hover */
}

@keyframes btnHaloRipple {
    0% {
        box-shadow: 0 0 0 0px rgba(var(--color-accent-rgb), 0.6), 
                    0 0 0 0px rgba(var(--color-primary-rgb), 0.3),
                    0 0 15px rgba(var(--color-primary-rgb), 0.5);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(var(--color-accent-rgb), 0.2), 
                    0 0 0 12px rgba(var(--color-primary-rgb), 0.1),
                    0 0 25px rgba(var(--color-primary-rgb), 0.7);
    }
    100% {
        box-shadow: 0 0 0 12px rgba(var(--color-accent-rgb), 0), 
                    0 0 0 24px rgba(var(--color-primary-rgb), 0),
                    0 0 35px rgba(var(--color-primary-rgb), 0.9);
    }
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(var(--color-primary-rgb), 0.15);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition-smooth);
    outline: none;
    position: relative;
    z-index: 110;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
}

.mobile-menu-btn:hover {
    background: rgba(225, 29, 72, 0.08);
    border-color: rgba(225, 29, 72, 0.45);
    box-shadow: 0 0 15px rgba(225, 29, 72, 0.25);
}

.hamburger-box {
    width: 20px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hamburger-inner {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
    border-radius: 4px;
    position: absolute;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.25s ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
    position: absolute;
    border-radius: 4px;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.2s ease, background-color 0.25s ease;
}

.hamburger-inner::before {
    top: -6px;
}

.hamburger-inner::after {
    top: 6px;
}

.mobile-menu-btn.active .hamburger-inner {
    transform: rotate(45deg);
    background-color: var(--color-accent);
}

.mobile-menu-btn.active .hamburger-inner::before {
    transform: translateY(6px) rotate(-90deg);
    background-color: var(--color-accent);
}

.mobile-menu-btn.active .hamburger-inner::after {
    opacity: 0;
}

.mobile-drawer {
    position: fixed;
    top: 5.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2.5rem);
    max-width: 1150px;
    max-height: 0;
    background: rgba(4, 7, 18, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow-y: auto;
    z-index: 99;
    border: 1px solid rgba(225, 29, 72, 0.22);
    border-radius: 24px;
    box-shadow: var(--shadow-premium);
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.mobile-drawer.open {
    max-height: 480px;
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
}

.mobile-nav-link {
    color: var(--color-text-muted);
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-link:hover {
    color: #fff;
    padding-left: 5px;
}

.mobile-nav-link, .mobile-join-btn {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1), transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), color 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open .mobile-nav-link,
.mobile-drawer.open .mobile-join-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero-section {
    padding-top: 110px; /* Offset fixed floating header */
    padding-bottom: 2rem;
    min-height: calc(100vh - 110px);
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

@media (min-height: 850px) {
    .hero-section {
        min-height: 100vh;
        padding-top: 110px;
        padding-bottom: 0;
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    align-items: center;
    width: 100%;
}

.badge-institutional {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(var(--color-primary-rgb), 0.1);
    border: 1px solid rgba(var(--color-primary-rgb), 0.25);
    color: var(--color-accent);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.05);
}

.hero-title {
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

@media (max-height: 750px) {
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 0.85rem;
    }
    .badge-institutional {
        margin-bottom: 0.85rem;
    }
}

.hero-subtitle {
    font-size: 1rem;
    line-height: 1.55;
    margin-bottom: 1.75rem;
    max-width: 550px;
}

@media (max-height: 750px) {
    .hero-subtitle {
        margin-bottom: 1.25rem;
        font-size: 0.95rem;
    }
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 2.25rem;
}

@media (max-height: 750px) {
    .hero-actions {
        margin-bottom: 1.75rem;
    }
}

.hero-security-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: linear-gradient(135deg, rgba(20, 10, 10, 0.3) 0%, rgba(10, 5, 5, 0.5) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 45, 45, 0.08);
    border-radius: 12px;
    padding: 0.65rem 1.25rem;
    gap: 1.25rem;
    margin-top: 1.25rem;
    position: relative;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.4), 
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 0 20px rgba(255, 45, 45, 0.01);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.hero-security-stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 45, 45, 0.2), transparent);
}

.hero-security-stats:hover {
    border-color: rgba(255, 45, 45, 0.15);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.5), 
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 0 25px rgba(255, 45, 45, 0.02);
}

@media (max-height: 750px) {
    .hero-security-stats {
        padding: 0.5rem 1rem;
        gap: 1rem;
        margin-top: 1rem;
    }
}

.sec-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    transition: var(--transition-smooth);
}

.sec-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.625rem;
    top: 20%;
    height: 60%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 45, 45, 0.12), transparent);
}

.sec-stat:hover {
    transform: translateY(-1px);
}

.sec-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 45, 45, 0.03);
    border: 1px solid rgba(255, 45, 45, 0.12);
    color: var(--color-accent);
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.sec-stat:hover .sec-stat-icon {
    background: rgba(255, 45, 45, 0.1);
    border-color: rgba(255, 45, 45, 0.35);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 45, 45, 0.2);
    transform: scale(1.05) rotate(5deg);
}

.sec-stat-details {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.sec-stat-value {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.92rem;
    color: #fff;
    letter-spacing: 0.02em;
    text-shadow: 0 0 6px rgba(255, 45, 45, 0.1);
    transition: var(--transition-smooth);
}

.sec-stat:hover .sec-stat-value {
    color: var(--color-accent);
    text-shadow: 0 0 10px rgba(255, 45, 45, 0.3);
}

.sec-stat-label {
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: var(--transition-smooth);
}

.sec-stat:hover .sec-stat-label {
    color: rgba(255, 255, 255, 0.65);
}
.hero-visual-block {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.gateway-card {
    background: transparent;
    border: none;
    border-radius: 24px;
    box-shadow: var(--shadow-premium), 0 0 30px rgba(var(--color-secondary-rgb), 0.05);
    width: 100%;
    max-width: 430px;
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
}

.gateway-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 800px;
    height: 800px;
    margin-top: -400px;
    margin-left: -400px;
    background: conic-gradient(
        from 0deg,
        transparent 30%,
        var(--color-accent) 55%,
        var(--color-primary) 70%,
        transparent 95%
    );
    animation: spin 6s linear infinite;
    z-index: 0;
    pointer-events: none;
}

.gateway-card::after {
    content: '';
    position: absolute !important;
    top: 1.5px !important;
    left: 1.5px !important;
    right: 1.5px !important;
    bottom: 1.5px !important;
    width: auto !important;
    height: auto !important;
    transform: none !important;
    background: var(--color-panel-bg) !important;
    border-radius: 23px !important;
    z-index: 1 !important;
    pointer-events: none !important;
}

.gateway-card > * {
    position: relative;
    z-index: 2;
}

.gateway-card:hover {
    box-shadow: var(--shadow-premium), 0 0 40px rgba(var(--color-primary-rgb), 0.18);
    transform: translateY(-2px);
}

.gateway-card:hover::before {
    animation-duration: 3s; /* Rotate faster on hover */
}

.gateway-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.35rem;
    background: rgba(13, 20, 35, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin: 1.5px 1.5px 0 1.5px; /* Inset to expose the revolving border */
    border-top-left-radius: 22.5px;
    border-top-right-radius: 22.5px;
}

.gateway-logo-icon {
    font-size: 1.45rem;
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.5);
}

.gateway-header-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gateway-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.85rem;
    color: #fff;
    letter-spacing: 0.05em;
}

.gateway-subtitle {
    font-size: 0.68rem;
    color: var(--color-text-muted);
}

.gateway-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-profit);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.2rem 0.5rem;
    border-radius: 100px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-profit);
    box-shadow: 0 0 8px var(--color-profit);
    animation: indicator-pulse 2s infinite ease-in-out;
}

.gateway-body {
    padding: 1.25rem 1.35rem;
    margin: 0 1.5px 1.5px 1.5px; /* Inset to expose the revolving border */
    border-bottom-left-radius: 22.5px;
    border-bottom-right-radius: 22.5px;
}

.gateway-stat-row {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 0.55rem 0.95rem;
}

.gateway-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.gateway-stat-label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.gateway-stat-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-accent);
    text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.2);
}

.gateway-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.95rem 0;
}

.gateway-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.95rem;
}

.gateway-metric-item {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.gateway-metric-item .metric-icon {
    font-size: 1rem;
    color: var(--color-primary);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(var(--color-secondary-rgb), 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(var(--color-secondary-rgb), 0.12);
}

.metric-details {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.68rem;
    color: var(--color-text-muted);
}

.metric-value {
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
}

.gateway-server-status {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.server-status-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.percentage-match {
    color: var(--color-profit);
}

.broker-logos {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.broker-badge {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.broker-badge i {
    color: var(--color-secondary);
}

.gateway-engine-container {
    position: relative;
    width: 100%;
    max-width: 430px;
    height: 360px; /* Symmetrical height to match hero sections */
    background: transparent;
    border: none;
    border-radius: 24px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}



#gateway-engine-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Layered on top of background panel mask */
}

.engine-floating-text {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    text-shadow: 0 0 5px rgba(225, 29, 72, 0.4);
    z-index: 3; /* Render on top of canvas drawing */
    pointer-events: none;
    background: rgba(225, 29, 72, 0.05);
    border: 1px solid rgba(225, 29, 72, 0.15);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.engine-core-label {
    position: absolute;
    bottom: 12px;
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    z-index: 4;
    pointer-events: none;
    text-transform: uppercase;
}

.engine-floating-text.t1 {
    top: 40px;
    left: 35px;
    animation: float-around-1 8s ease-in-out infinite alternate;
}
.engine-floating-text.t2 {
    top: 60px;
    right: 35px;
    animation: float-around-2 10s ease-in-out infinite alternate;
}
.engine-floating-text.t3 {
    bottom: 60px;
    left: 40px;
    animation: float-around-3 9s ease-in-out infinite alternate;
}
.engine-floating-text.t4 {
    bottom: 50px;
    right: 40px;
    animation: float-around-4 7s ease-in-out infinite alternate;
}

@keyframes float-around-1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(15px, 10px) rotate(3deg); }
}
@keyframes float-around-2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-10px, 15px) rotate(-4deg); }
}
@keyframes float-around-3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(12px, -8px) rotate(-3deg); }
}
@keyframes float-around-4 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-12px, -12px) rotate(4deg); }
}



/* Affiliations Section */
.affiliations-section {
    background-color: rgba(8, 12, 28, 0.4);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 3rem 0;
}

.section-tag {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--color-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.5rem;
}

.affiliations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.partner-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-image 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform-style: preserve-3d;
}

.partner-card * {
    transform: translateZ(35px);
}

.partner-icon {
    font-size: 2.25rem;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
    text-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.35);
}

.partner-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.partner-desc {
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Engine Specs (Features) Section */
.section-header {
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1rem;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2.25rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), transparent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--color-secondary-rgb), 0.3);
    box-shadow: var(--shadow-premium), 0 0 20px rgba(var(--color-secondary-rgb), 0.06);
}

.feature-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(var(--color-secondary-rgb), 0.1);
    color: var(--color-primary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(var(--color-secondary-rgb), 0.15);
    transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon-wrapper {
    background: var(--color-primary);
    color: #fff;
    box-shadow: var(--glow-primary);
    transform: scale(1.05);
}

.feature-card h3 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Performance Section & ROI Calculator */
.performance-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3.5rem;
    align-items: start;
}

.perf-stats-block {
    display: flex;
    flex-direction: column;
}

.chart-container {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 2rem;
    height: 360px;
    position: relative;
    box-shadow: var(--shadow-premium);
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Backtest Performance Block */
.backtest-stats-block {
    background: var(--color-panel-bg);
    border: 1px solid rgba(var(--color-primary-rgb), 0.25);
    border-radius: 24px;
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-premium), 0 0 30px rgba(var(--color-primary-rgb), 0.05);
}

.backtest-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.backtest-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}



.val-profit {
    color: var(--color-profit) !important;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}
.val-loss {
    color: var(--color-loss) !important;
    text-shadow: 0 0 8px rgba(244, 63, 94, 0.2);
}

.stats-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    border-color: rgba(var(--color-primary-rgb), 0.3);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.stat-card-label {
    font-size: 0.68rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-card-value {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.backtest-note {
    display: flex;
    gap: 0.65rem;
    align-items: start;
    background: rgba(var(--color-primary-rgb), 0.05);
    border: 1px solid rgba(var(--color-primary-rgb), 0.12);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-bottom: 1.25rem;
}

.backtest-note i {
    color: var(--color-secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

.backtest-join-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.join-prompt-text {
    font-size: 0.85rem;
    color: var(--color-text);
    font-weight: 500;
    text-align: center;
    line-height: 1.35;
}

/* Technical Parameters Grid Section */
.technical-section {
    background: rgba(8, 12, 28, 0.3);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 3rem auto 0 auto;
}

.specs-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.specs-card * {
    transform: translateZ(20px);
}

.specs-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 10%, rgba(var(--color-secondary-rgb), 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.specs-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--color-primary-rgb), 0.35);
    box-shadow: var(--shadow-premium), 0 0 25px rgba(var(--color-primary-rgb), 0.08);
}

.specs-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.specs-card-icon {
    font-size: 1.35rem;
    color: var(--color-accent);
    text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.4);
}

.specs-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    margin: 0;
}

.specs-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.specs-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: var(--transition-smooth);
}

.specs-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.specs-label {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-text);
    transition: var(--transition-smooth);
}

.specs-item:hover .specs-label {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.specs-value {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.8rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    letter-spacing: 0.02em;
    transition: var(--transition-smooth);
}

.specs-value.highlighted {
    color: var(--color-accent);
    background: rgba(var(--color-primary-rgb), 0.06);
    border-color: rgba(var(--color-primary-rgb), 0.25);
    text-shadow: 0 0 8px rgba(var(--color-primary-rgb), 0.25);
}

.specs-info {
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--color-text-muted);
}

/* Managed Hosting Highlight Banner */
.managed-hosting-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 2.5rem auto 0 auto;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.08) 0%, rgba(var(--color-secondary-rgb), 0.04) 100%);
    border: 1px solid rgba(var(--color-primary-rgb), 0.25);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-premium), 0 0 15px rgba(var(--color-primary-rgb), 0.06);
    transition: var(--transition-smooth);
}

.managed-hosting-banner:hover {
    border-color: rgba(var(--color-primary-rgb), 0.55);
    transform: translateY(-3px);
    box-shadow: var(--shadow-premium), 0 0 25px rgba(var(--color-primary-rgb), 0.15);
}

.banner-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-accent);
    font-size: 1.45rem;
    border: 1px solid rgba(var(--color-primary-rgb), 0.22);
    box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.15);
    flex-shrink: 0;
}

.banner-text-content {
    flex: 1;
}

.banner-text-content h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
    letter-spacing: 0.02em;
}

.banner-text-content p {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

/* FAQ Accordion */
.faq-accordion {
    max-width: 800px;
    margin: 3rem auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    border-color: rgba(var(--color-secondary-rgb), 0.35);
}

.faq-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    user-select: none;
}

.faq-trigger h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

.faq-icon {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: transform 0.3s ease;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 2rem;
}

.faq-content p {
    font-size: 0.9rem;
    padding-bottom: 1.5rem;
    line-height: 1.6;
}

/* Open Accordion State */
.faq-item.active {
    border-color: var(--color-primary);
    background: rgba(var(--color-secondary-rgb), 0.03);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--color-primary);
}

.faq-item.active .faq-content {
    max-height: 200px; /* Arbitrary high value to enable transition */
}

/* CTA Call to Action */
.cta-section {
    position: relative;
    padding: 7rem 0;
    background: radial-gradient(circle at center, rgba(var(--color-secondary-rgb), 0.08) 0%, transparent 60%);
    border-bottom: 1px solid var(--color-border);
}

.cta-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}

.cta-desc {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer Section */
.footer {
    background-color: #03050b;
    padding: 4rem 0 3rem 0;
    color: var(--color-text-muted);
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 450px;
}

.footer-brand .logo {
    margin-bottom: 0.5rem;
}

.footer-desc {
    font-size: 0.88rem;
    line-height: 1.5;
}

.footer-copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1.75rem;
    font-size: 0.825rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: #fff;
}


/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.97) rotateX(6deg);
    transform-origin: center top;
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
}

/* Mouse Tracking Spotlight Glow overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(
        600px circle at var(--mouse-x, -9999px) var(--mouse-y, -9999px),
        rgba(255, 45, 45, 0.035) 0%,
        rgba(255, 45, 45, 0.01) 50%,
        transparent 100%
    );
    z-index: -2;
    pointer-events: none;
}



/* /* High-Tech Circular Scroll Progress Dial (Bottom-Right HUD) */
.scroll-dial {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    z-index: 90;
    /* Thin outer progress arc drawn via conic gradient set dynamically in JS */
    background: conic-gradient(var(--color-primary) var(--scroll-deg, 0deg), rgba(255, 45, 45, 0.08) var(--scroll-deg, 0deg));
    padding: 1.5px; /* Progress ring thickness */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-premium), 0 0 15px rgba(255, 45, 45, 0.04);
    pointer-events: none;
    transition: var(--transition-smooth);
}

@media (max-width: 768px) {
    .scroll-dial {
        display: none; /* Hide on mobile to prevent clutter */
    }
}

.scroll-dial-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--color-bg-alt); /* Match background */
    display: flex;
    align-items: center;
    justify-content: center;
}

#scroll-pct-text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--color-accent);
    text-shadow: 0 0 5px rgba(255, 45, 45, 0.4);
    letter-spacing: 0.02em;
}

/* Simplified Holographic Trailing Reticle Cursor */
#custom-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px; /* Slightly smaller normal pointer */
    height: 18px;
    margin-left: -9px;
    margin-top: -9px;
    border: 1px solid rgba(255, 45, 45, 0.55);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate3d(-100px, -100px, 0);
    will-change: transform;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, width 0.3s, height 0.3s, margin-left 0.3s, margin-top 0.3s, border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 8px rgba(255, 45, 45, 0.15);
}

@media (hover: hover) {
    #custom-cursor-ring {
        display: block;
    }
}

/* Hovered locked target state */
#custom-cursor-ring.hovered {
    width: 32px;
    height: 32px;
    margin-left: -16px;
    margin-top: -16px;
    border: 1.5px solid #ffffff;
    background-color: rgba(255, 45, 45, 0.06);
    box-shadow: 0 0 15px rgba(255, 45, 45, 0.35);
}


/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-section {
        padding-top: 7.5rem;
        padding-bottom: 3rem;
        min-height: auto;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }
    
    .hero-text-block {
        text-align: center;
    }
    
    .badge-institutional {
        justify-content: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-security-stats {
        max-width: 600px;
        margin: 0 auto;
    }

    .gateway-card {
        margin: 0 auto;
        max-width: 440px;
    }
    
    .performance-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
    
    .nav-links, .btn-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        width: 38px;
        height: 38px;
    }
    
    .logo {
        font-size: 1.15rem;
        gap: 0.5rem;
    }
    
    .logo-img {
        height: 32px;
        width: 32px;
    }
    
    .nav-container {
        padding: 0.5rem 1rem 0.5rem 0.75rem;
    }
    
    /* Optimize background glows to save GPU on iOS Safari */
    .bg-glow {
        filter: blur(80px) !important;
        mix-blend-mode: normal !important;
        animation: none !important;
        opacity: 0.08 !important;
    }
    
    /* Disable 3D transforms on mobile to bypass WebKit compositor rendering bugs */
    .partner-card, .specs-card {
        transform-style: flat !important;
    }
    .partner-card *, .specs-card * {
        transform: none !important;
    }
    
    .hero-title {
        font-size: 2.15rem;
        min-height: 90px; /* Lock height to avoid jitter, optimized to avoid layout gap */
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.85rem;
    }
    
    /* Bypass scroll reveal transitions on mobile viewports to prevent blank content load failures */
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    .affiliations-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .chart-container {
        height: 250px;
    }
    
    .footer-copyright {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem; /* Expand padding for more usable screen space */
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    .header {
        width: calc(100% - 2rem);
    }
    
    .mobile-drawer {
        width: calc(100% - 2rem);
    }

    .hero-title {
        font-size: 1.75rem;
        min-height: 80px; /* Stable height on narrow mobile, optimized gap */
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.45;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .hero-security-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        padding: 0.85rem 0.5rem !important;
        margin-top: 1.5rem !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, rgba(20, 10, 10, 0.5) 0%, rgba(10, 5, 5, 0.7) 100%) !important;
        border: 1px solid rgba(255, 45, 45, 0.15) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }
    
    .sec-stat {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.35rem !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .sec-stat:not(:last-child)::after {
        display: none !important;
    }
    
    .sec-stat-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.95rem !important;
        border-radius: 8px !important;
        margin-bottom: 0 !important;
        background: rgba(255, 45, 45, 0.05) !important;
        border: 1px solid rgba(255, 45, 45, 0.2) !important;
        color: var(--color-accent) !important;
    }
    
    .sec-stat-value {
        font-size: 0.78rem !important;
        font-weight: 700 !important;
        color: #fff !important;
        line-height: 1.2 !important;
    }
    
    .sec-stat-label {
        font-size: 0.54rem !important;
        color: var(--color-text-muted) !important;
        margin-top: 0.1rem !important;
        line-height: 1.2 !important;
        letter-spacing: 0.02em !important;
    }
    
    .gateway-metrics-grid {
        grid-template-columns: 1fr; /* Stack metrics to avoid text wrapping inside items */
        gap: 0.85rem;
    }
    
    .stats-card-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep dashboard 2-col visual grid on mobile */
        gap: 0.5rem;
    }
    
    .stat-card {
        padding: 0.5rem 0.65rem;
    }
    
    .backtest-stats-block {
        padding: 1.25rem;
    }
    
    .specs-card {
        padding: 1.25rem;
    }
    
    .specs-item-header {
        flex-direction: column; /* Stack spec values vertically on narrow viewports */
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .partner-card, .feature-card {
        padding: 1.25rem;
    }
    
    .faq-trigger {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.55rem;
        min-height: 95px;
    }
    
    .stats-card-grid {
        grid-template-columns: 1fr; /* Stack stats cards only on extremely narrow screens */
    }
}

/* Hero Typewriter & Cursor Animation */
.typing-cursor {
    color: var(--color-accent);
    font-weight: 500;
    animation: blink 0.75s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {
    from, to { color: transparent }
    50% { color: var(--color-accent) }
}


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

