/* SAGERANK SENTINEL — GLOBAL INTELLIGENCE STYLES */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary: #0ea5e9;
    --primary-rgb: 14, 165, 233;
    --secondary: #d946ef;
    --secondary-rgb: 217, 70, 239;
    --tertiary: #f59e0b;
    --tertiary-rgb: 245, 158, 11;
    --background: #050505;
    --surface: #0a0a0a;
    --surface-variant: #121212;
    --on-surface: #ffffff;
    --on-surface-variant: #94a3b8;
    --outline: rgba(255, 255, 255, 0.08);
    --grad-primary: linear-gradient(135deg, #0ea5e9 0%, #2dd4bf 100%);
    --grad-secondary: linear-gradient(135deg, #d946ef 0%, #8b5cf6 100%);
    --grad-tertiary: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --mouse-x: 50%;
    --mouse-y: 50%;

    /* Fluid font scaling */
    --fs-xs:   clamp(0.625rem, 1.5vw, 0.6875rem);
    --fs-sm:   clamp(0.75rem,  2vw,   0.875rem);
    --fs-base: clamp(0.9rem,   2.5vw, 1rem);
    --fs-lg:   clamp(1rem,     3vw,   1.25rem);
    --fs-xl:   clamp(1.25rem,  4vw,   1.5rem);
    --fs-2xl:  clamp(1.5rem,   5vw,   2rem);
    --fs-3xl:  clamp(1.75rem,  5.5vw, 2.5rem);
    --fs-4xl:  clamp(2rem,     6vw,   3rem);
    --fs-hero: clamp(2.25rem,  8vw,   5rem);
}

html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    background-color: var(--background);
}

/* Targeted overflow containment — does NOT apply to fixed overlays */
main, footer, section {
    max-width: 100%;
    overflow-x: hidden;
}

/* Global Noise Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
    filter: contrast(120%) brightness(120%);
}

.font-headline {
    font-family: 'Space Grotesk', sans-serif;
}

/* =============================================
   GLASSMORPHISM COMPONENTS
   ============================================= */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--mouse-x) var(--mouse-y),
        rgba(14, 165, 233, 0.15) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.glass-card:hover::after { opacity: 1; }
.glass-card:hover {
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-2px);
}

/* Dropdown */
.dropdown-card {
    background: rgba(6, 6, 8, 0.98);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
    border-radius: 1.25rem;
}
.dropdown-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(14,165,233,0.12) 0%, transparent 50%);
    opacity: 0; transition: opacity 0.5s; pointer-events: none;
}
.dropdown-card:hover::after { opacity: 1; }

/* Color variants */
.glass-primary  { background: rgba(14,165,233,0.05);  border-color: rgba(14,165,233,0.1);  }
.glass-secondary{ background: rgba(217,70,239,0.05);  border-color: rgba(217,70,239,0.1);  }
.glass-tertiary { background: rgba(245,158,11,0.05);  border-color: rgba(245,158,11,0.1);  }

/* =============================================
   MOBILE MENU (GLASSMORPHISM)
   ============================================= */
#mobile-menu {
    background: rgba(4, 6, 10, 0.94);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    /* Hidden by default - JS adds .active to show */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-16px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0.4s;
}
#mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0s;
}

/* Burger animation */
.burger-line { transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
.burger-active .line-1 { transform: translateY(7px) rotate(45deg);  }
.burger-active .line-2 { opacity: 0; transform: scaleX(0); }
.burger-active .line-3 { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   BACKGROUND FX
   ============================================= */
.color-blob {
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: blob-float 20s infinite alternate;
    will-change: transform;
}
@media (max-width: 768px) {
    .color-blob { width: 150px; height: 150px; filter: blur(50px); opacity: 0.25; }
}

@keyframes blob-float {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 30px) scale(1.15); }
}

.animate-aurora {
    background: radial-gradient(circle at 50% 50%, #050505 0%, #000000 100%);
    position: relative;
}
.animate-aurora::after {
    content: "";
    position: fixed; inset: 0;
    background: linear-gradient(-45deg, transparent, rgba(14,165,233,0.04), rgba(217,70,239,0.04), transparent);
    background-size: 400% 400%;
    animation: aurora-shift 20s ease infinite;
    z-index: -1;
    pointer-events: none;
}
@keyframes aurora-shift {
    0%  { background-position: 0% 50%;   }
    50% { background-position: 100% 50%; }
    100%{ background-position: 0% 50%;   }
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
.hyper-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #0ea5e9 50%, #d946ef 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-flow 5s linear infinite;
}
.hyper-gradient-secondary {
    background: linear-gradient(135deg, #d946ef 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Responsive headings */
.hero-h1 {
    font-size: clamp(2rem, 8vw, 5rem);
    line-height: 1;
    letter-spacing: -0.03em;
}
.section-h2 {
    font-size: clamp(1.75rem, 5.5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}
.section-h3 {
    font-size: clamp(1.25rem, 4vw, 2rem);
    line-height: 1.1;
}

/* =============================================
   TERMINAL
   ============================================= */
.terminal-window {
    background: #020202;
    border: 1px solid rgba(14,165,233,0.2);
    box-shadow: 0 0 30px rgba(14,165,233,0.1);
}

/* =============================================
   ANIMATIONS & UTILITIES
   ============================================= */
@keyframes shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%);  }
}
@keyframes gold-flow {
    0%   { filter: hue-rotate(0deg)   brightness(1);   }
    50%  { filter: hue-rotate(15deg)  brightness(1.2); }
    100% { filter: hue-rotate(0deg)   brightness(1);   }
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 3D Utilities — disabled on mobile to prevent overflow */
.perspective-2000  { perspective: 2000px; }
.preserve-3d       { transform-style: preserve-3d; }
.translate-z-50    { transform: translateZ(50px); }
.translate-z-100   { transform: translateZ(100px); }

@media (max-width: 1023px) {
    .perspective-2000 { perspective: none; }
    #terminal-tilt {
        transform: none !important;
    }
    #dashboard-tilt {
        transform: none !important;
    }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0) translateZ(50px);   }
    50%       { transform: translateY(-12px) translateZ(50px); }
}
.animate-bounce-slow { animation: bounce-slow 4s ease-in-out infinite; }

/* Mouse halo — desktop only */
.mouse-halo {
    position: fixed;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(14,165,233,0.1) 0%, rgba(217,70,239,0.1) 30%, rgba(245,158,11,0.1) 60%, transparent 80%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(80px);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1s ease;
}
@media (max-width: 768px) { .mouse-halo { display: none; } }

/* Blueprint dots */
.bg-dots {
    background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Masks */
.mask-radial {
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
}
.mask-linear-b {
    mask-image: linear-gradient(to bottom, black 60%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent);
}

/* =============================================
   CUSTOM SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--background); }
::-webkit-scrollbar-thumb { background: var(--surface-variant); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* =============================================
   MOBILE SNAP CAROUSEL
   ============================================= */
.snap-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1.5rem;
    gap: 1rem;
}
.snap-carousel::-webkit-scrollbar { display: none; }

.snap-item {
    flex: 0 0 82%;
    scroll-snap-align: start;
}
.snap-item:last-child { margin-right: 1rem; }

/* Carousel indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
}
.indicator-dot {
    width: 6px; height: 6px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.12);
    transition: all 0.3s ease;
}
.indicator-dot.active {
    width: 24px;
    background: var(--primary);
    border-radius: 4px;
}

/* Carousel fade edge */
.carousel-mask { position: relative; }
.carousel-mask::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 1.5rem;
    width: 50px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.5));
    pointer-events: none;
    z-index: 10;
    border-radius: 0 1.5rem 1.5rem 0;
}

/* Desktop: switch snap → grid */
@media (min-width: 1024px) {
    .carousel-indicators,
    .carousel-mask::after { display: none !important; }

    .snap-carousel {
        display: grid !important;
        overflow-x: visible !important;
        scroll-snap-type: none !important;
        padding-bottom: 0 !important;
        gap: 2rem;
    }
    .snap-item {
        flex: none !important;
        margin-right: 0 !important;
    }
}

/* =============================================
   HUBSPOT OVERRIDES
   ============================================= */
.hs-backlink,[class*="hs-backlink"],.hs-form-frame + a,
.hs-cta-embed-branding,footer.hs-footer {
    display: none !important; visibility: hidden !important;
    opacity: 0 !important; height: 0 !important; pointer-events: none !important;
}
.hubspot-dark-theme + a,
[href*="hubspot.com/products/marketing/forms"],
.hs-form-frame ~ a { display: none !important; height: 0 !important; opacity: 0 !important; pointer-events: none !important; }

/* =============================================
   GLOBAL SECTION SPACING (mobile-first)
   ============================================= */
.section-padding {
    padding-top: clamp(3rem, 8vw, 8rem);
    padding-bottom: clamp(3rem, 8vw, 8rem);
    padding-left: clamp(1.25rem, 5vw, 2.5rem);
    padding-right: clamp(1.25rem, 5vw, 2.5rem);
}

/* =============================================
   MOBILE SPECIFIC HELPERS
   ============================================= */
@media (max-width: 768px) {
    .glass-card { padding: 1.25rem !important; }
    
    section, main {
        overflow-x: hidden;
    }

    /* Prevent 3D elements from causing horizontal overflow */
    #3d-dashboard-container {
        height: 220px !important;
        overflow: hidden !important;
    }
    #dashboard-tilt {
        transform: none !important;
        scale: 0.85;
    }
}

/* =============================================
   FOOTER MOBILE
   ============================================= */
@media (max-width: 640px) {
    footer .grid { gap: 2.5rem !important; }
}

/* =============================================
   MOBILE MENU — FULL FLEDGED GLASSMORPHISM
   ============================================= */
.dropdown-card {
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.8), 0 0 20px rgba(14, 165, 233, 0.05);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(3, 5, 10, 0.95);
    backdrop-filter: blur(32px) saturate(200%);
    -webkit-backdrop-filter: blur(32px) saturate(200%);
    /* Hidden by default */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition:
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.4s;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition:
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0s;
}

.mobile-menu-inner {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 0 2.5rem 0;
    position: relative;
}

/* Radial glow inside the menu */
.mobile-menu-inner::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 400px;
    background: radial-gradient(circle, rgba(14,165,233,0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.mobile-menu-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: relative;
    z-index: 1;
}

.mobile-menu-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.mobile-nav-link {
    display: block;
    padding: 0.875rem 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.2s, padding-left 0.2s;
    text-decoration: none;
}
.mobile-nav-link:hover {
    color: #ffffff;
    padding-left: 1.5rem;
}

.mobile-nav-section {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.mobile-nav-section-label {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.35em;
    color: #0ea5e9;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.mobile-product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.mobile-product-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 1rem;
    text-decoration: none;
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
}
.mobile-product-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(var(--accent, 255,255,255), 0.3);
    transform: translateY(-2px);
}

.mobile-product-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-product-icon .material-symbols-outlined {
    font-size: 1.25rem;
}

.mobile-product-name {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
}

.mobile-product-desc {
    font-size: 0.625rem;
    color: rgba(148,163,184,0.7);
    line-height: 1.4;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-menu-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.mobile-cta-primary {
    display: block;
    width: 100%;
    padding: 1rem 1.5rem;
    background: #0ea5e9;
    color: white;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    border-radius: 9999px;
    text-align: center;
    text-decoration: none;
    transition: background 0.25s, color 0.25s, transform 0.15s;
    box-shadow: 0 0 30px rgba(14,165,233,0.3);
}
.mobile-cta-primary:hover {
    background: white;
    color: black;
    transform: translateY(-1px);
}

.mobile-cta-secondary {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.6);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    border-radius: 9999px;
    text-align: center;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.08);
    transition: background 0.25s, color 0.25s;
}
.mobile-cta-secondary:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

/* Desktop: hide overlay entirely */
@media (min-width: 1024px) {
    .mobile-menu-overlay { display: none !important; }
}

/* =============================================
   FORM INPUTS
   ============================================= */
input, textarea, select {
    -webkit-appearance: none;
    appearance: none;
}

/* =============================================
   GRADIENT SWIPE BUTTON ANIMATION
   ============================================= */
@keyframes gradientSwipe {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-swipe-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #f59e0b 50%, #0ea5e9 100%) !important;
    background-size: 200% 200% !important;
    animation: gradientSwipe 3s ease infinite !important;
    transition: all 0.3s ease !important;
    border: none !important;
}

.gradient-swipe-btn:hover {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4), 0 0 40px rgba(245, 158, 11, 0.2) !important;
    transform: translateY(-2px) !important;
    color: #ffffff !important;
}

