@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --brand-primary: #4F26FC;
    --brand-primary-light: #704EFF;
    --brand-primary-dark: #3718CC;
    --brand-secondary: #00C2E8;
    --brand-secondary-light: #38D9FA;
    --brand-secondary-dark: #009EB8;
    --brand-dark: #0B0A14;
    --brand-dark-surface: #131124;
    --brand-dark-card: #191630;
    --brand-dark-border: #26214A;
    --brand-text-dark: #0F0E17;
    --brand-text-muted: #64748B;
    --brand-text-light: #F8FAFC;
    --brand-text-light-muted: #94A3B8;
    --brand-gradient: linear-gradient(135deg, #4F26FC 0%, #00C2E8 100%);
    --brand-gradient-hover: linear-gradient(135deg, #3E1EE0 0%, #00A9CB 100%);
    --brand-glow: 0 0 40px rgba(79, 38, 252, 0.35);
    --brand-glow-cyan: 0 0 40px rgba(0, 194, 232, 0.35);
}

/* Light Theme Variables */
html.light-theme, body.light-theme {
    --brand-dark: #F8FAFC;
    --brand-dark-surface: #FFFFFF;
    --brand-dark-card: #FFFFFF;
    --brand-dark-border: #E2E8F0;
    color: #0F172A !important;
    background-color: #F8FAFC !important;
}

/* Light Theme Overrides */
.light-theme .bg-\[\#08070E\],
.light-theme .bg-\[\#0B0A14\],
.light-theme .bg-\[\#07060C\],
.light-theme .bg-\[\#0D0C1D\] {
    background-color: #F8FAFC !important;
    color: #0F172A !important;
}

.light-theme .bg-\[\#131124\],
.light-theme .bg-\[\#191630\],
.light-theme .bg-\[\#161528\],
.light-theme .bg-\[\#1C1A32\],
.light-theme .bg-\[\#16142C\] {
    background-color: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

.light-theme .bg-black\/30,
.light-theme .bg-black\/40,
.light-theme .bg-black\/50,
.light-theme .bg-black\/60,
.light-theme .bg-black\/70 {
    background-color: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
}

.light-theme .bg-white\/5,
.light-theme .bg-white\/10 {
    background-color: #F1F5F9 !important;
    border-color: #E2E8F0 !important;
}

.light-theme .text-white {
    color: #0F172A !important;
}

.light-theme .text-slate-200,
.light-theme .text-slate-300 {
    color: #334155 !important;
}

.light-theme .text-slate-400 {
    color: #64748B !important;
}

.light-theme .border-white\/5,
.light-theme .border-white\/10,
.light-theme .border-white\/15,
.light-theme .border-white\/20,
.light-theme .border-white\/30,
.light-theme .border-\[\#26214A\] {
    border-color: #E2E8F0 !important;
}

.light-theme .form-input-dark {
    background-color: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    color: #0F172A !important;
}

.light-theme .form-input-dark::placeholder {
    color: #94A3B8 !important;
}

.light-theme .form-input-dark:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 38, 252, 0.15) !important;
}

.light-theme .chip-checkbox label {
    background-color: #FFFFFF !important;
    border-color: #E2E8F0 !important;
    color: #334155 !important;
}

.light-theme .chip-checkbox input[type="checkbox"]:checked + label {
    background-color: rgba(79, 38, 252, 0.1) !important;
    border-color: var(--brand-primary) !important;
    color: var(--brand-primary) !important;
}

.light-theme .btn-secondary {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #CBD5E1 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.light-theme .btn-secondary:hover {
    background-color: #F1F5F9 !important;
    border-color: #94A3B8 !important;
    color: var(--brand-primary) !important;
}

.light-theme #main-navbar {
    background-color: rgba(255, 255, 255, 0.92) !important;
    border-color: #E2E8F0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.light-theme #main-navbar nav a {
    color: #334155 !important;
}

.light-theme #main-navbar nav a:hover {
    color: var(--brand-primary) !important;
}

.light-theme #mobile-menu-drawer {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    border-color: #E2E8F0 !important;
}

.light-theme #mobile-menu-drawer a {
    color: #334155 !important;
}

.light-theme #mobile-menu-drawer a:hover {
    color: var(--brand-primary) !important;
}

.light-theme #mobile-menu-close {
    background-color: #F1F5F9 !important;
    color: #0F172A !important;
    border: 1px solid #E2E8F0 !important;
}

.light-theme #mobile-menu-close:hover {
    background-color: #E2E8F0 !important;
    color: var(--brand-primary) !important;
}

.light-theme #mobile-menu-drawer .border-white\/10 {
    border-color: #E2E8F0 !important;
}

.light-theme footer {
    background-color: #0B0A14 !important;
    color: #94A3B8 !important;
}

.light-theme footer .text-white {
    color: #FFFFFF !important;
}

.light-theme footer .text-slate-400 {
    color: #94A3B8 !important;
}

.light-theme .prose-invert {
    color: #334155 !important;
}

.light-theme .hero-glow-orb {
    opacity: 0.35;
}

/* Dynamic Logo Display */
.theme-logo-light {
    display: none;
}
.theme-logo-dark {
    display: block;
}
.light-theme .theme-logo-light {
    display: block;
}
.light-theme .theme-logo-dark {
    display: none;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #F8FAFC;
    transition: all 0.25s ease;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
    color: #00C2E8;
}

.light-theme .theme-toggle-btn {
    background: #F1F5F9;
    border-color: #CBD5E1;
    color: #0F172A;
}

.light-theme .theme-toggle-btn:hover {
    background: #E2E8F0;
    color: var(--brand-primary);
}

.icon-sun {
    display: none;
}
.icon-moon {
    display: inline-block;
}
.light-theme .icon-sun {
    display: inline-block;
}
.light-theme .icon-moon {
    display: none;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--brand-text-dark);
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    overflow-x: hidden;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

img, svg, video, canvas, audio, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

main {
    flex: 1 0 auto;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Headings font */
h1, h2, h3, .font-heading {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.025em;
}

.font-mono-tag {
    font-family: 'Space Grotesk', sans-serif;
}

/* Gradient text utilities */
.text-gradient {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gradient-cyan {
    background: linear-gradient(135deg, #00C2E8 0%, #38D9FA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Glow & Background Effects */
.bg-mesh-dark {
    background-color: var(--brand-dark);
    background-image: 
        radial-gradient(at 15% 15%, rgba(79, 38, 252, 0.22) 0px, transparent 55%),
        radial-gradient(at 85% 20%, rgba(0, 194, 232, 0.18) 0px, transparent 50%),
        radial-gradient(at 50% 85%, rgba(79, 38, 252, 0.15) 0px, transparent 60%);
}

.bg-mesh-light {
    background-color: #F8FAFC;
    background-image: 
        radial-gradient(at 0% 0%, rgba(79, 38, 252, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 194, 232, 0.05) 0px, transparent 50%);
}

.hero-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* Custom Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
    background: var(--brand-gradient);
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(79, 38, 252, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(79, 38, 252, 0.45);
    background: var(--brand-gradient-hover);
    color: #FFFFFF;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    color: #FFFFFF;
}

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.85rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-primary);
    background: transparent;
    border: 1.5px solid var(--brand-primary);
    border-radius: 9999px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-outline-dark:hover {
    background: var(--brand-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* Cards & Glassmorphism */
.glass-card-dark {
    background: rgba(19, 17, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border-radius: 1.25rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card-dark:hover {
    border-color: rgba(79, 38, 252, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.5);
}

.card-light {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1.25rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-light:hover {
    border-color: #CBD5E1;
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.08);
}

/* Badges */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-dark-pill {
    background: rgba(79, 38, 252, 0.15);
    border: 1px solid rgba(79, 38, 252, 0.35);
    color: var(--brand-secondary-light);
}

.badge-light-pill {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    color: var(--brand-primary);
}

/* Navigation Scroll State */
.nav-scrolled {
    background: rgba(11, 10, 20, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Accordion */
.accordion-header {
    cursor: pointer;
    user-select: none;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0, 1, 0, 1);
}
.accordion-item.active .accordion-content {
    max-height: 1000px;
    transition: max-height 0.45s ease-in-out;
}
.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
    color: #FFFFFF;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-msg {
    pointer-events: auto;
    min-width: 320px;
    max-width: 420px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #0F0E17;
    color: #FFFFFF;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
    border-left: 5px solid var(--brand-primary);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    animation: toastSlideIn 0.35s ease forwards;
}

.toast-msg.success { border-left-color: #10B981; }
.toast-msg.error { border-left-color: #EF4444; }
.toast-msg.warning { border-left-color: #F59E0B; }

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form Styles */
.form-input-clean {
    width: 100%;
    padding: 0.85rem 1.15rem;
    border: 1px solid #CBD5E1;
    border-radius: 0.75rem;
    background-color: #FFFFFF;
    font-size: 0.95rem;
    color: #0F0E17;
    transition: all 0.2s ease;
}

.form-input-clean:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79, 38, 252, 0.15);
}

.form-input-dark {
    width: 100%;
    padding: 0.85rem 1.15rem;
    border: 1px solid #26214A;
    border-radius: 0.75rem;
    background-color: #131124;
    font-size: 0.95rem;
    color: #F8FAFC;
    transition: all 0.2s ease;
}

.form-input-dark:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79, 38, 252, 0.25);
}

/* Multiselect / Chip Selection */
.chip-checkbox input[type="checkbox"] {
    display: none;
}
.chip-checkbox label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 9999px;
    border: 1.5px solid #E2E8F0;
    background-color: #F8FAFC;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.chip-checkbox input[type="checkbox"]:checked + label {
    background-color: rgba(79, 38, 252, 0.1);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 600;
}

/* Animations */
.animate-float {
    animation: floatUpDown 6s ease-in-out infinite;
}

@keyframes floatUpDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@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;
    }
}

/* ==============================================================================
 * Comprehensive Mobile Responsiveness & Touch Optimization System
 * ============================================================================== */

/* 1. Prevent iOS Auto-Zoom on Form Focus */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    input[type="url"],
    select,
    textarea,
    .form-input-clean,
    .form-input-dark {
        font-size: 16px !important;
        min-height: 46px;
    }

    textarea.form-input-dark,
    textarea.form-input-clean {
        min-height: 96px;
    }
}

/* 2. Mobile Toast Notification Safety */
@media (max-width: 640px) {
    #toast-container {
        top: 16px !important;
        left: 16px !important;
        right: 16px !important;
        width: auto !important;
        max-width: calc(100vw - 32px) !important;
    }

    .toast-msg {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 16px !important;
        font-size: 0.85rem !important;
    }
}

/* 3. Mobile Floating WhatsApp Button */
@media (max-width: 640px) {
    .whatsapp-float {
        bottom: 18px !important;
        right: 18px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4) !important;
    }
}

/* 4. Glow Orb Containment on Mobile (Performance & Overflow Prevention) */
@media (max-width: 768px) {
    .hero-glow-orb {
        max-width: 90vw !important;
        max-height: 90vw !important;
        filter: blur(50px) !important;
        opacity: 0.25 !important;
    }
}

/* 5. Mobile Touch-Friendly Buttons & Interactive Elements */
@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary,
    .btn-outline-dark {
        min-height: 44px;
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        touch-action: manipulation;
    }

    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }

    /* Chip Checkboxes for mobile thumb selection */
    .chip-checkbox label {
        padding: 0.65rem 1rem !important;
        font-size: 0.82rem !important;
        min-height: 42px;
        line-height: 1.3;
    }

    /* Accordion Touch Areas */
    .accordion-header {
        padding: 1.15rem 1rem !important;
        min-height: 48px;
    }

    .accordion-content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* 6. Mobile Responsive Tables & Embed Wrappers */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* 7. Safe Area Insets for Notch / Dynamic Island / Bottom Home Indicator */
@supports (padding: max(0px)) {
    #main-navbar {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    #mobile-menu-drawer {
        padding-top: max(1.5rem, env(safe-area-inset-top));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
        padding-right: max(1.5rem, env(safe-area-inset-right));
    }

    .whatsapp-float {
        bottom: max(18px, env(safe-area-inset-bottom) + 12px);
        right: max(18px, env(safe-area-inset-right) + 12px);
    }
}
