/* =====================================================
   DV HANDBOOK — PROFESSIONAL UI POLISH
   Clean, modern, engineering-grade. No noise.
   ===================================================== */

:root {
    --brand-1: #6366f1;   /* indigo */
    --brand-2: #06b6d4;   /* cyan  */
    --brand-3: #ec4899;   /* pink accent (used sparingly) */
    --ink-900: #e7e9ee;
    --ink-700: #b4b8c5;
    --ink-500: #7a8096;
    --surface-0: #0b0d14;
    --surface-1: #11141d;
    --surface-2: #161a25;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.10);
}

/* --- Clean base --------------------------------------------------- */
html, body {
    background: var(--surface-0);
    color: var(--ink-900);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 500px at 15% -5%, rgba(99, 102, 241, 0.14), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(6, 182, 212, 0.10), transparent 60%),
        radial-gradient(700px 500px at 50% 110%, rgba(236, 72, 153, 0.05), transparent 60%);
}

.grid-overlay {
    opacity: 0.35 !important;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) !important;
    background-size: 48px 48px !important;
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 85%);
}

.bg-circuit::before { animation: none !important; opacity: 0.5; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--surface-0); }
::-webkit-scrollbar-thumb {
    background: #2a2f40;
    border-radius: 10px;
    border: 2px solid var(--surface-0);
}
::-webkit-scrollbar-thumb:hover { background: #394058; }

/* --- Navbar ------------------------------------------------------- */
.navbar {
    background: rgba(11, 13, 20, 0.72) !important;
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--border-subtle) !important;
}
.navbar.scrolled {
    background: rgba(11, 13, 20, 0.88) !important;
    border-bottom-color: var(--border-strong) !important;
}
.logo-icon {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2)) !important;
    color: #fff !important;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 18px -6px rgba(99, 102, 241, 0.6) !important;
    animation: none !important;
}
.nav-links a {
    position: relative;
    color: var(--ink-700) !important;
    font-weight: 500;
    transition: color 0.15s;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--ink-900) !important;
    text-shadow: none !important;
}
.nav-links a::before { content: none !important; }
.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -6px;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    border-radius: 2px;
}

/* --- Hero --------------------------------------------------------- */
.hero { position: relative; z-index: 2; }

.hero-badge {
    background: rgba(99, 102, 241, 0.08) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    color: var(--ink-700) !important;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    overflow: visible !important;
}
.hero-badge::before { content: none !important; }
.hero-badge .pulse {
    background: #22c55e !important;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: softPulse 2.2s ease-in-out infinite;
}
@keyframes softPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50%      { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
}
.hero h1 .gradient-text {
    background: linear-gradient(135deg, #a5b4fc 0%, var(--brand-1) 40%, var(--brand-2) 100%) !important;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none !important;
    animation: none !important;
    text-shadow: none !important;
}
.hero p {
    color: var(--ink-700);
    max-width: 640px;
}

/* --- Buttons ------------------------------------------------------ */
.btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s, filter 0.2s !important;
}
.btn-primary {
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2)) !important;
    color: #fff !important;
    border: 1px solid transparent !important;
    clip-path: none !important;
    box-shadow: 0 8px 24px -8px rgba(99, 102, 241, 0.6) !important;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -8px rgba(99, 102, 241, 0.75) !important;
    filter: brightness(1.05);
}
.btn-primary::before, .btn-primary::after { content: none !important; }

.btn-secondary, .btn.btn-outline {
    background: var(--surface-1) !important;
    border: 1px solid var(--border-strong) !important;
    color: var(--ink-900) !important;
    box-shadow: none !important;
}
.btn-secondary:hover, .btn.btn-outline:hover {
    background: var(--surface-2) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

/* --- Stats -------------------------------------------------------- */
.stat {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
    backdrop-filter: none !important;
}
.stat::before { content: none !important; }
.stat:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
}
.stat-number {
    font-family: 'Inter', sans-serif !important;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none !important;
    text-shadow: none !important;
    letter-spacing: -0.02em;
}
.stat-label {
    color: var(--ink-500) !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.85rem !important;
}

/* --- Section headers --------------------------------------------- */
.section { position: relative; z-index: 2; }
.section-header .tag {
    display: inline-block;
    background: rgba(99, 102, 241, 0.08) !important;
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    color: #a5b4fc !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.02em !important;
    text-transform: none !important;
    padding: 0.3rem 0.85rem !important;
    border-radius: 999px;
}
.section-header .tag::before { content: none !important; }
.section-header::before { content: none !important; }
.section-header h2 {
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--ink-900) !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    animation: none !important;
    text-shadow: none !important;
    display: block !important;
}
.section-header h2::after { content: none !important; }
.section-header p {
    color: var(--ink-500);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0.75rem auto 0;
}

/* --- Cards (topic / feature / step) ------------------------------ */
.topic-card,
.feature-card,
.step-card {
    position: relative;
    background: var(--surface-1) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 14px !important;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.3s, background 0.2s !important;
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.02) inset, 0 4px 12px -4px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: none !important;
    isolation: auto !important;
}

.topic-card::before,
.feature-card::before,
.step-card::before,
.topic-card::after,
.feature-card::after,
.step-card::after {
    content: none !important;
}

.topic-card:hover,
.feature-card:hover,
.step-card:hover {
    background: var(--surface-2) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    transform: translateY(-3px) !important;
    box-shadow:
        0 18px 40px -18px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(99, 102, 241, 0.15) !important;
}

/* Card icon — refined tile */
.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.12)) !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    box-shadow: none !important;
    font-size: 1.35rem;
    transition: transform 0.2s;
}
.topic-card:hover .card-icon,
.feature-card:hover .card-icon {
    transform: scale(1.05);
    box-shadow: none !important;
}

.topic-card h3,
.feature-card h3,
.step-card h3 {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink-900);
    margin-top: 0.9rem;
}
.card-desc {
    color: var(--ink-700);
    line-height: 1.55;
}
.card-meta .source {
    color: var(--ink-500);
    font-size: 0.82rem;
    font-weight: 500;
}

/* --- Footer ------------------------------------------------------- */
.footer {
    background: transparent;
    border-top: 1px solid var(--border-subtle);
    position: relative;
    z-index: 2;
}
.footer::before, .footer::after { content: none !important; }

/* --- Scroll reveal (subtle) -------------------------------------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    filter: none !important;
    transition-delay: 0s !important;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: none;
}

/* --- Kill leftover heavy effects from prior versions ------------ */
.cursor-glow,
.hud-frame,
.neon-floor,
.neon-horizon,
.hud-ring,
.hud-ring-left,
.circuit-svg,
.hex-overlay,
.tech-marquee,
.hero-terminal,
.boot-screen,
#data-rain,
#particle-canvas,
.particle,
.hud-corners {
    display: none !important;
}

body::after { content: none !important; }
.hero::before, .hero::after { content: none !important; }
.hero-content::before { content: none !important; }
.hero h1::before, .hero h1::after { content: none !important; }
.aberration-active .hero h1 { animation: none !important; }

/* --- Responsive --------------------------------------------------- */
@media (max-width: 768px) {
    .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
}
