

/* ===== CSS RESET ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Brand */
    --primary:        #7c3aed;
    --primary-dark:   #6d28d9;
    --primary-light:  #a78bfa;
    --primary-subtle: rgba(124,58,237,0.08);
    --secondary:      #0ea5e9;
    --accent:         #f59e0b;

    /* Backgrounds */
    --bg-primary:     #f8fafc;
    --bg-secondary:   #ffffff;
    --bg-card:        #ffffff;
    --bg-hover:       #f1f5f9;
    --bg-footer:      #0f172a;

    /* Text */
    --text-primary:   #0f172a;
    --text-secondary: #475569;
    --text-muted:     #94a3b8;
    --text-footer:    #cbd5e1;

    /* Borders */
    --border:         #e2e8f0;
    --border-hover:   #7c3aed;

    /* Gradients — canonical names */
    --grad-primary:   linear-gradient(135deg, #7c3aed, #0ea5e9);
    --grad-hero:      linear-gradient(160deg, #faf5ff 0%, #ede9fe 40%, #dbeafe 100%);
    --grad-card:      linear-gradient(145deg, #ffffff, #fafafa);

    /* Aliases used by tool.css */
    --gradient-primary: linear-gradient(135deg, #7c3aed, #0ea5e9);
    --gradient-hero:    linear-gradient(160deg, #faf5ff 0%, #ede9fe 40%, #dbeafe 100%);

    /* Shadows */
    --shadow-xs:   0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm:   0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md:   0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
    --shadow-lg:   0 8px 30px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
    --shadow-glow: 0 0 24px rgba(124,58,237,0.22);

    /* Border Radius — canonical names */
    --r-sm:   8px;
    --r-md:   12px;
    --r-lg:   16px;
    --r-xl:   20px;
    --r-full: 9999px;

    /* Aliases used by tool.css */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Motion */
    --ease:       cubic-bezier(0.4, 0, 0.2, 1);
    --t:          all 0.25s var(--ease);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Layout */
    --container: 1280px;
    --nav-h:     68px;
}

/* ===== BASE ===== */
html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a   { text-decoration: none; color: inherit; transition: var(--t); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== UTILITIES ===== */
.gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ===== BG PATTERN ===== */
.bg-pattern {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 0%   0%,   rgba(124,58,237,0.06) 0%, transparent 100%),
        radial-gradient(ellipse 50% 60% at 100% 100%, rgba(14,165,233,0.06)  0%, transparent 100%),
        radial-gradient(ellipse 40% 40% at 60%  40%,  rgba(245,158,11,0.03)  0%, transparent 100%);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease);
    will-change: transform;
}

.navbar.scrolled {
    background: rgba(255,255,255,0.97);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.3rem;
    flex-shrink: 0;
    text-decoration: none;
}

.nav-logo-icon {
    width: 38px;
    height: 38px;
    background: var(--grad-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(124,58,237,0.25);
    transition: var(--t);
}

.nav-logo:hover .nav-logo-icon {
    transform: rotate(-5deg) scale(1.05);
}

.nav-logo-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo-sub {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-top: -5px;
    -webkit-text-fill-color: var(--text-muted);
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.nav-links a {
    padding: 7px 14px;
    border-radius: var(--r-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--t);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
    background: var(--primary-subtle);
}

.nav-links .nav-cta {
    background: var(--grad-primary);
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    padding: 7px 18px;
    border-radius: var(--r-full);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    box-shadow: 0 2px 10px rgba(124,58,237,0.22);
}

.nav-links .nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.nav-links .nav-cta i { font-size: 0.75rem; }

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    font-size: 1.1rem;
    padding: 7px 10px;
    border-radius: var(--r-sm);
    transition: var(--t);
}

.mobile-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    inset-inline: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 16px;
    z-index: 999;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.3s var(--ease), opacity 0.25s var(--ease);
    box-shadow: var(--shadow-lg);
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: var(--t);
}

.mobile-menu a:hover {
    color: var(--primary);
    background: var(--primary-subtle);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-footer);
    padding: 56px 24px 0;
    margin-top: 80px;
}

.footer-container {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-brand .footer-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--grad-primary);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    flex-shrink: 0;
}

.footer-brand h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
}

.footer-brand p {
    color: var(--text-footer);
    font-size: 0.875rem;
    line-height: 1.75;
    opacity: 0.78;
    margin-bottom: 20px;
    max-width: 320px;
}

.footer-social { display: flex; gap: 10px; }

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-footer);
    font-size: 0.85rem;
    transition: var(--t);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--grad-primary);
    border-color: transparent;
    color: #fff;
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column ul { list-style: none; }

.footer-column ul li { margin-bottom: 10px; }

.footer-column ul li a {
    color: var(--text-footer);
    font-size: 0.85rem;
    opacity: 0.72;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: var(--t);
}

.footer-column ul li a::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0;
    transition: var(--t);
    flex-shrink: 0;
}

.footer-column ul li a:hover {
    color: var(--primary-light);
    opacity: 1;
    padding-left: 2px;
}

.footer-column ul li a:hover::before { opacity: 1; }

.footer-bottom {
    max-width: var(--container);
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-bottom p { color: var(--text-footer); font-size: 0.8rem; opacity: 0.6; }

.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }

.footer-bottom-links a {
    color: var(--text-footer);
    font-size: 0.8rem;
    opacity: 0.6;
    text-decoration: none;
    transition: var(--t);
}

.footer-bottom-links a:hover { color: var(--primary-light); opacity: 1; }

/* ============================================
   FAQ — SHARED
   ============================================ */
.faq-section {
    max-width: 760px;
    margin: 0 auto;
    padding: 64px 24px;
}

.faq-section h2 {
    text-align: center;
    font-size: 1.9rem;
    font-weight: 800;
    margin-bottom: 36px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin-bottom: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: var(--t);
}

.faq-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.faq-item.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.07); }

.faq-question {
    width: 100%;
    padding: 18px 22px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    line-height: 1.5;
    transition: color 0.2s;
}

.faq-question:hover { color: var(--primary); }
.faq-item.active .faq-question { color: var(--primary); }

.faq-question i {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.3s var(--ease), color 0.2s;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.faq-item.active .faq-question i { transform: rotate(180deg); color: var(--primary); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq-item.active .faq-answer { max-height: 300px; }

.faq-answer p {
    padding: 14px 22px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
    border-top: 1px solid var(--border);
    margin-top: 0;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: var(--grad-primary);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1rem;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.9);
    transition: var(--t);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: var(--shadow-glow);
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--text-primary);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--r-full);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s var(--ease);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast i { color: #10b981; }

/* ============================================
   RESPONSIVE — SHARED
   ============================================ */
@media (max-width: 1024px) {
    .footer-container { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    :root { --nav-h: 62px; }
    .nav-links    { display: none; }
    .mobile-toggle { display: block; }
    .mobile-menu  { display: block; }
    .nav-container { padding: 0 16px; }
    .footer { padding: 44px 16px 0; margin-top: 60px; }
    .footer-container { grid-template-columns: 1fr; gap: 28px; padding-bottom: 36px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .faq-section { padding: 48px 16px; }
    .faq-section h2 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .nav-logo-sub { display: none; }
    .back-to-top { bottom: 20px; right: 20px; width: 40px; height: 40px; }
    .toast { font-size: 0.82rem; padding: 10px 18px; }
}