/* === VARIABLES & RESET === */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.4);
    --background: #020617;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-border: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --gradient-main: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    --gradient-bg: radial-gradient(circle at 50% 0%, #1e293b 0%, #020617 100%);
    --glass-blur: blur(12px);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-glow: 0 0 30px var(--accent-glow);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

/* === UTILITIES === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.accent { color: var(--accent); }
.glass-card {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
}
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem; border-radius: var(--radius-sm);
    font-weight: 600; text-decoration: none; transition: var(--transition);
    cursor: pointer; border: none; font-size: 1rem;
}
.btn-primary {
    background: var(--gradient-main); color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4); }
.btn-outline {
    background: transparent; border: 1px solid var(--surface-border); color: var(--text);
}
.btn-outline:hover { background: var(--surface); border-color: var(--accent); }
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-glow { animation: pulse-glow 2s infinite; }

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(6, 182, 212, 0.2); }
    50% { box-shadow: 0 0 25px rgba(6, 182, 212, 0.6); }
}

/* === BACKGROUND ORBS === */
.bg-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
    animation: float-orb 20s ease-in-out infinite alternate;
}
.orb-1 { width: 600px; height: 600px; background: var(--primary); top: -20%; left: -10%; }
.orb-2 { width: 500px; height: 500px; background: var(--accent); bottom: -10%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 300px; height: 300px; background: #8b5cf6; top: 40%; left: 30%; animation-delay: -10s; opacity: 0.2; }

@keyframes float-orb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* === HEADER === */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    padding: 1rem 0; transition: var(--transition);
}
.glass-nav { background: rgba(2, 6, 23, 0.8); backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--surface-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.logo-text { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.desktop-nav { display: flex; gap: 2rem; }
.desktop-nav a { color: var(--text-muted); text-decoration: none; font-weight: 500; transition: var(--transition); }
.desktop-nav a:hover { color: var(--accent); }
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: var(--transition); }
.mobile-menu { 
    position: absolute; top: 100%; left: 0; right: 0; 
    background: var(--secondary); border-bottom: 1px solid var(--surface-border);
    padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem;
}
.mobile-menu nav { display: flex; flex-direction: column; gap: 1rem; }
.mobile-menu a { color: var(--text); text-decoration: none; font-size: 1.125rem; padding: 0.5rem 0; }
.mobile-cta { color: var(--accent) !important; font-weight: 700; }

/* === HERO === */
.hero {
    min-height: 90vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 8rem 1.5rem 4rem; position: relative;
}
.hero-content { max-width: 800px; }
.tag-pill {
    display: inline-block; padding: 0.5rem 1rem; border-radius: 50px;
    background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.3);
    color: var(--accent); font-size: 0.875rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; font-weight: 800;
    margin-bottom: 1.5rem; background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 2.5rem; max-width: 600px; margin-inline: auto; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.scroll-indicator { margin-top: 4rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; opacity: 0.6; }
.mouse { width: 24px; height: 40px; border: 2px solid var(--text-muted); border-radius: 12px; position: relative; }
.mouse::after {
    content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 8px; background: var(--accent); border-radius: 2px;
    animation: scroll-wheel 1.5s infinite;
}
@keyframes scroll-wheel { 0% { opacity: 1; top: 6px; } 100% { opacity: 0; top: 20px; } }

/* === CONTENT LAYOUT === */
.content-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; padding: 4rem 1.5rem 6rem; align-items: start; }

/* TOC */
.toc-wrapper { position: sticky; top: 6rem; padding: 1.5rem; }
.toc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.toc-header h3 { font-size: 1rem; font-weight: 700; color: var(--text); }
.toc-toggle { background: none; border: none; color: var(--text-muted); cursor: pointer; transition: var(--transition); }
.toc-toggle:hover { color: var(--accent); transform: rotate(180deg); }
.toc-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.toc-nav a {
    display: block; padding: 0.5rem 0.75rem; border-radius: var(--radius-sm);
    color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: var(--transition);
    border-left: 2px solid transparent;
}
.toc-nav a:hover, .toc-nav a.active { color: var(--accent); background: rgba(6, 182, 212, 0.05); border-left-color: var(--accent); }

/* ARTICLE */
.article-content { padding: 2.5rem; }
.article-hero-img { width: 100%; height: auto; border-radius: var(--radius-md); margin-bottom: 2rem; }
.article-content h2 { font-size: 2rem; margin: 3rem 0 1rem; color: var(--text); }
.article-content h3 { font-size: 1.5rem; margin: 2rem 0 0.75rem; color: var(--text); }
.article-content p { margin-bottom: 1.5rem; color: var(--text-muted); }
.article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--primary); }

/* VISUAL ELEMENTS */
.highlight-box { display: flex; gap: 1rem; padding: 1.5rem; margin: 2rem 0; border-left: 4px solid var(--accent); background: rgba(6, 182, 212, 0.05); }
.icon-wrap { font-size: 1.5rem; flex-shrink: 0; }
.feature-list { list-style: none; margin: 1.5rem 0; display: grid; gap: 0.75rem; }
.feature-list li { padding-left: 1.5rem; position: relative; color: var(--text-muted); }
.feature-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: bold; }
.comparison-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin: 2rem 0; }
.comp-card { padding: 1.5rem; background: rgba(255,255,255,0.03); border-radius: var(--radius-sm); border: 1px solid var(--surface-border); transition: var(--transition); }
.comp-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-glow); }
.quote-callout { font-style: italic; font-size: 1.25rem; text-align: center; padding: 2rem; margin: 2rem 0; border-top: 1px solid var(--surface-border); border-bottom: 1px solid var(--surface-border); color: var(--text); }
.step-list { margin: 1.5rem 0; padding-left: 1.5rem; color: var(--text-muted); }
.step-list li { margin-bottom: 0.75rem; padding-left: 0.5rem; }
.step-list li strong { color: var(--text); }

/* BUSINESS CTA */
.business-cta { margin-top: 4rem; padding: 3rem; text-align: center; background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(6,182,212,0.1)); border: 1px solid rgba(6,182,212,0.3); }
.business-cta h3 { font-size: 2rem; margin-bottom: 0.5rem; }
.business-cta p { color: var(--text-muted); margin-bottom: 2rem; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.contact-item {
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
    padding: 1rem; border-radius: var(--radius-sm); background: rgba(255,255,255,0.05);
    color: var(--text); text-decoration: none; transition: var(--transition);
}
.contact-item:hover { background: var(--accent); color: var(--secondary); transform: scale(1.02); }
.social-links { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--surface-border); }
.social-label { color: var(--text-muted); font-size: 0.875rem; }
.social-icon { color: var(--text-muted); transition: var(--transition); display: flex; }
.social-icon:hover { color: var(--accent); transform: translateY(-2px); }

/* FOOTER */
.site-footer { border-top: 1px solid var(--surface-border); padding: 4rem 0 2rem; margin-top: 4rem; background: rgba(2,6,23,0.9); }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; text-align: center; }
.footer-brand p { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.875rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-contact { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-contact a { color: var(--text-muted); text-decoration: none; transition: var(--transition); }
.footer-contact a:hover { color: var(--accent); }
.copyright { grid-column: 1 / -1; text-align: center; color: var(--text-muted); font-size: 0.75rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--surface-border); }

/* PROGRESS & BACK TO TOP */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--gradient-main); z-index: 1001; width: 0%; transition: width 0.1s; }
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 48px; height: 48px;
    border-radius: 50%; background: var(--gradient-main); border: none; color: white;
    cursor: pointer; opacity: 0; visibility: hidden; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; z-index: 999;
    box-shadow: 0 4px 15px rgba(37,99,235,0.4);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-4px); }

/* ANIMATIONS */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.fade-in-up { opacity: 0; transform: translateY(20px); animation: fadeInUp 0.8s forwards; }
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; } .delay-3 { animation-delay: 0.3s; } .delay-4 { animation-delay: 0.4s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* RESPONSIVE */
@media (max-width: 900px) {
    .content-layout { grid-template-columns: 1fr; }
    .toc-wrapper { position: static; margin-bottom: 2rem; }
    .toc-nav.collapsed { display: none; }
    .desktop-nav { display: none; }
    .mobile-menu-toggle { display: block; }
    .hero h1 { font-size: 2.5rem; }
    .article-content { padding: 1.5rem; }
    .business-cta { padding: 2rem 1.5rem; }
    .contact-grid { grid-template-columns: 1fr; }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
    .fade-in-up { opacity: 1; transform: none; animation: none; }
}