*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --accent: #06B6D4;
    --bg: #FAFBFF;
    --bg-alt: #F1F5F9;
    --text: #1E293B;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(250, 251, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem; height: 72px;
}
.nav-logo {
    font-size: 1.5rem; font-weight: 800; color: var(--primary);
    text-decoration: none; letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
    text-decoration: none; color: var(--text-muted); font-size: 0.925rem;
    font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-cta {
    background: var(--primary); color: var(--white) !important;
    padding: 0.6rem 1.4rem; border-radius: var(--radius-sm);
    font-weight: 600 !important; transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-toggle svg { width: 24px; height: 24px; stroke: var(--text); }

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.85rem 2rem; border-radius: var(--radius-sm);
    font-size: 1rem; font-weight: 600; text-decoration: none;
    transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary {
    background: var(--primary); color: var(--white);
    box-shadow: 0 4px 14px rgba(79,70,229,0.35);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(79,70,229,0.45);
    transform: translateY(-2px);
}
.btn-ghost {
    background: var(--white); color: var(--text);
    border: 1px solid var(--border); box-shadow: var(--shadow);
}
.btn-ghost:hover { border-color: var(--primary-light); color: var(--primary); transform: translateY(-2px); }

/* ── SECTIONS ── */
.section {
    padding: 6rem 2rem;
    max-width: 1200px; margin: 0 auto;
}
.section-header {
    text-align: center; max-width: 650px; margin: 0 auto 4rem;
}
.section-label {
    display: inline-block;
    font-size: 0.825rem; font-weight: 600; color: var(--primary);
    text-transform: uppercase; letter-spacing: 1.5px;
    margin-bottom: 1rem;
}
.section-header h2 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800; letter-spacing: -1px; line-height: 1.15;
    margin-bottom: 1rem;
}
.section-header p { font-size: 1.1rem; color: var(--text-muted); line-height: 1.7; }

/* ── PAGE HEADER (subpages) ── */
.page-header {
    padding: 8rem 2rem 3rem;
    text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, #EEF2FF 100%);
}
.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800; letter-spacing: -1px; margin-bottom: 0.75rem;
}
.page-header p { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ── CONTENT (subpages) ── */
.page-content {
    max-width: 900px; margin: 0 auto;
    padding: 3rem 2rem 6rem;
}
.page-content h2 {
    font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 1rem;
    letter-spacing: -0.3px;
}
.page-content h3 {
    font-size: 1.15rem; font-weight: 600; margin: 2rem 0 0.75rem;
}
.page-content p, .page-content li {
    color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem;
}
.page-content ul, .page-content ol {
    padding-left: 1.5rem; margin-bottom: 1.5rem;
}
.page-content a { color: var(--primary); text-decoration: none; }
.page-content a:hover { text-decoration: underline; }
.page-content code {
    background: var(--bg-alt); padding: 0.15rem 0.4rem;
    border-radius: 4px; font-size: 0.9em; color: var(--primary-dark);
}
.page-content pre {
    background: #1E293B; color: #E2E8F0; padding: 1.25rem 1.5rem;
    border-radius: var(--radius-sm); overflow-x: auto;
    margin-bottom: 1.5rem; font-size: 0.875rem; line-height: 1.7;
}
.page-content pre code {
    background: none; padding: 0; color: inherit; font-size: inherit;
}

/* ── FOOTER ── */
footer {
    background: var(--text); color: rgba(255,255,255,0.7);
    padding: 4rem 2rem 2rem;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem; margin-bottom: 3rem;
}
.footer-brand .nav-logo { display: inline-block; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 300px; }
.footer-col h4 {
    font-size: 0.85rem; font-weight: 600; color: var(--white);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.25rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a {
    color: rgba(255,255,255,0.6); text-decoration: none;
    font-size: 0.9rem; transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.85rem;
}
.footer-social { display: flex; gap: 1rem; }
.footer-social a {
    color: rgba(255,255,255,0.5); transition: color 0.2s; font-size: 1.1rem;
}
.footer-social a:hover { color: var(--white); }

/* ── ANIMATIONS ── */
.fade-up {
    opacity: 0; transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
    .nav-links.open {
        display: flex; flex-direction: column;
        position: absolute; top: 72px; left: 0; right: 0;
        background: var(--white); border-bottom: 1px solid var(--border);
        padding: 1.5rem 2rem; gap: 1rem; box-shadow: var(--shadow-lg);
    }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}
