/* ── Base ───────────────────────────────────────────────────────────────── */

:root {
    --background: #020617;
    --foreground: #e2e8f0;
}

body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    color: var(--foreground);
    background: var(--background);
}

/* ── Grid pattern for hero backgrounds ─────────────────────────────────── */

.bg-grid {
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 64px 64px;
}

/* ── Subtle radial glow ─────────────────────────────────────────────────── */

.bg-glow {
    background: radial-gradient(
        ellipse 60% 50% at 50% 0%,
        rgba(59, 130, 246, 0.08) 0%,
        transparent 70%
    );
}

/* ── Hero gradient orbs ─────────────────────────────────────────────────── */

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    will-change: transform;
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    top: -10%;
    left: -10%;
    animation: orbDrift1 12s ease-in-out infinite;
}

.hero-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    top: 10%;
    right: -15%;
    animation: orbDrift2 15s ease-in-out infinite;
}

.hero-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    bottom: -5%;
    left: 30%;
    animation: orbDrift3 18s ease-in-out infinite;
}

@keyframes orbDrift1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(60px, 30px) scale(1.1); }
    66%       { transform: translate(-30px, -20px) scale(0.95); }
}

@keyframes orbDrift2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(-50px, 40px) scale(0.9); }
    66%       { transform: translate(40px, -30px) scale(1.08); }
}

@keyframes orbDrift3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(-40px, -50px) scale(1.15); }
}

/* ── Hero beam lines ────────────────────────────────────────────────────── */

.hero-beam {
    position: absolute;
    height: 1px;
    pointer-events: none;
    opacity: 0;
    animation: beamSlide 6s ease-in-out infinite;
}

.hero-beam::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.6), transparent);
}

@keyframes beamSlide {
    0%   { opacity: 0; transform: translateX(-100%); }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { opacity: 0; transform: translateX(100vw); }
}

/* ── Glow button ────────────────────────────────────────────────────────── */

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
    pointer-events: none;
}

.btn-glow:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* ── Noise texture overlay ──────────────────────────────────────────────── */

.noise-overlay {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
}

/* ── Scrollbar ──────────────────────────────────────────────────────────── */

::-webkit-scrollbar       { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #475569; }

/* ── Reduced motion ─────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
