html {
    scroll-behavior: smooth;
}
section[id] {
    scroll-margin-top: 5rem;
}

h2[id] {
    scroll-margin-top: 5rem;
}
#hero-glow-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}
.magnetic-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(59, 130, 246, 0.05) 40%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
    transform: translate(-50%, -50%);
    transition: left 0.15s cubic-bezier(0.2, 0, 0.2, 1), top 0.15s cubic-bezier(0.2, 0, 0.2, 1);
    will-change: left, top;
    filter: blur(20px);
}
.hero-grid-bg {
    background-color: #0A0A0A;
    background-image:
        linear-gradient(to right, #1a1a1a 1px, transparent 1px),
        linear-gradient(to bottom, #1a1a1a 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}
.tracing-beam {
    background: linear-gradient(to bottom, transparent, #3B82F6, transparent);
    height: 100%;
    width: 2px;
    position: absolute;
    left: 23px;
    top: 0;
    opacity: 0.5;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #111; 
    border-radius: 2px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 2px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555; 
}
@keyframes scan {
    0% { top: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
.scan-line {
    animation: scan 2s linear infinite;
}
@keyframes fadeInCheck {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}
.animate-check {
    animation: fadeInCheck 0.3s ease-out forwards;
}
.animate-float-in {
    animation: floatIn 2s ease-in-out infinite alternate;
}
@keyframes floatIn {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}
.globe-grid {
    background-image: linear-gradient(#3B82F6 1px, transparent 1px), linear-gradient(90deg, #3B82F6 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center;
    opacity: 0.2;
    mask-image: radial-gradient(circle, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle, black 40%, transparent 80%);
}
@keyframes beam-flow {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}
.animate-beam-flow {
    stroke-dasharray: 10 5;
    animation: beam-flow 1s linear infinite;
}
.mask-fade-bottom {
        mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
.glow-connection {
    box-shadow: 0 0 8px 1px rgba(59, 130, 246, 0.4);
}
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}
.animate-pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes beam-drop {
    0% { stroke-dashoffset: 20; opacity: 0; }
    50% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}
.animate-beam-drop {
    stroke-dasharray: 20 20;
    animation: beam-drop 1.5s linear infinite;
}
@keyframes rapid-flow {
    0% { stroke-dashoffset: 100; opacity: 0; }
    20% { opacity: 0.8; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}
.animate-rapid-flow {
    stroke-dasharray: 5 50;animation: rapid-flow 1.5s linear infinite;
}
@keyframes shockwave-expand {
    0% { r: 20; opacity: 0.8; stroke-width: 2; }
    100% { r: 160; opacity: 0; stroke-width: 0; }
}
.animate-shockwave {
    animation: shockwave-expand 2.5s ease-out infinite;
    transform-origin: center;
}
@keyframes pulse-dot {
    0%, 100% { r: 2; opacity: 0.5; }
    50% { r: 3; opacity: 1; }
}
.animate-pulse-dot {
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes trace-vertical {
    0% { top: 0; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
.animate-trace-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #3B82F6;
    border-radius: 50%;
    left: -2px;box-shadow: 0 0 10px #3B82F6;
    animation: trace-vertical 1.5s linear infinite;
}@keyframes node-pulse {
    0%, 100% { r: 2; opacity: 0.3; }
    50% { r: 3; opacity: 1; }
}
.animate-node-pulse {
    animation: node-pulse 2s ease-in-out infinite;
}
@keyframes search-flow-move {
    from { left: -10%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    to { left: 100%; opacity: 0; }
}
.animate-search-flow {
    animation: search-flow-move 2s linear infinite;
}@keyframes timelineExpand {
    from { max-height: 0; opacity: 0; transform: translateY(-5px); }
    to { max-height: 100px; opacity: 1; transform: translateY(0); }
}
@keyframes timelineCollapse {
    from { max-height: 100px; opacity: 1; }
    to { max-height: 0; opacity: 0; }
}
@keyframes scroll-vertical {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}
.animate-scroll-vertical {
    animation: scroll-vertical 25s linear infinite;
}
.animate-scroll-vertical:hover {
    animation-play-state: paused;
}
@keyframes core-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); border-color: rgba(59, 130, 246, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px rgba(59, 130, 246, 0.6); border-color: rgba(59, 130, 246, 0.8); }
}
.chip-pulse {
    animation: core-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.step-description {
    overflow: hidden;
    transition: all 0.5s ease-in-out;
    max-height: 0;
    opacity: 0;
}
.step-active .step-description {
    max-height: 200px;opacity: 1;
    margin-top: 0.5rem;
}
.step-active .step-title {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #fff, rgba(79, 70, 229, 0.8));
}
.step-active .step-marker-container {
    border-color: #4F46E5;
    background-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.6);
}
.step-active .step-marker-dot {
    background-color: #4F46E5;
    box-shadow: 0 0 10px rgb(79, 70, 229);
}
.step-active .step-status {
    display: inline-flex;
}
.step-inactive .step-status {
    display: none;
}
.step-inactive {
    opacity: 0.5;
}
.step-inactive:hover {
    opacity: 1;
}
/* On mobile, fix the how-it-works section height to prevent layout shifts */
@media (max-width: 1023px) {
    #how-it-works {
        height: 1150px;
        overflow: hidden;
    }
}
.diagram-step {
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0.25;
    transform: scale(0.92);
    border-color: #27272a;
    filter: blur(2px);
    margin-bottom: 3rem;cursor: pointer;
}
.diagram-step:last-child {
    margin-bottom: 0;
}
.diagram-step.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px);
    border-color: #3B82F6;
    box-shadow: 0 0 30px -5px rgba(59, 130, 246, 0.5);z-index: 10;
}
.visualizer-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;padding-top: 0;
    padding-bottom: 0;
}
.visualizer-scroll::-webkit-scrollbar {
    display: none;
}
.stack-perspective {
    perspective: 3000px;
}
.stack-base {
    transform: rotateX(25deg) rotateY(-15deg) rotateZ(5deg) scale(0.85);
    transform-style: preserve-3d;
    box-shadow: -40px 60px 100px -30px rgba(0,0,0,0.8);
}
.dashboard-base {
    transform: translateZ(0);
    background: #09090B;
    border: 1px solid #27272A;
}
.lens-window {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background: rgba(10, 10, 12, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05),
        0 40px 80px -20px rgba(0, 0, 0, 0.95);
}
.lens-layer-1 {
    transform: translateZ(100px) translateX(40px) translateY(-60px);
}
.lens-layer-2 {
    transform: translateZ(180px) translateX(-20px) translateY(80px);
}
.lens-layer-3 {
    transform: translateZ(140px) translateX(60px) translateY(100px);
}
.confidence-bar-bg {
    background: rgba(255,255,255,0.08);
}
.confidence-bar-fill {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}.fake-sidebar-item {
    border-left: 2px solid transparent;
}
.fake-sidebar-item:hover, .fake-sidebar-item.active {
    background: rgba(255,255,255,0.03);
    border-left-color: #4F46E5;
    color: white;
}
        @keyframes scroll-text {
            0% { transform: translateY(0); }
            100% { transform: translateY(-50%); }
        }
        .animate-scroll-text {
            animation: scroll-text 15s linear infinite;
        }
        .animate-scroll-text:hover {
            animation-play-state: paused;
        }
        @keyframes trail-shoot {
            0% { height: 0; opacity: 0; top: 0; }
            10% { opacity: 1; }
            100% { height: 100%; opacity: 0; top: 100%; }
        }
        .trail-beam {
            position: absolute;
            width: 1px;
            background: linear-gradient(to bottom, rgba(59,130,246,0.8), transparent);
            left: 50%;
            top: 0;
            animation: trail-shoot 2s ease-out infinite;
        }
        .glowing-connector {
            position: absolute;
            width: 1px;
            background: linear-gradient(180deg, #3B82F6 0%, rgba(59,130,246,0.2) 100%);
            z-index: 30;
            pointer-events: none;
            box-shadow: 0 0 8px rgba(59,130,246,0.6);
            opacity: 0.8;
            transform-origin: top;
        }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.popup-hidden {
    display: none;
}
.popup-visible {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}
.popup-visible > div {
    animation: scaleIn 0.2s ease-out;
}
.required-asterisk {
    color: #ef4444;
    margin-left: 0.25rem;
}
.input-error {
    border-color: #ef4444 !important;
}
#form-alert {
    display: none;
    margin-bottom: 1rem;
}
#success-message {
    display: none;
    text-align: center;
}

#cookie-banner {
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
    display: none; /* Hide by default */
}

#cookie-banner.show {
    transform: translateY(0);
}
