/* Apphive Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors */
    --primary: #f97316;
    --primary-glow: rgba(249, 115, 22, 0.4);
    --secondary: #3b82f6;

    /* Backgrounds - Deep Space Theme */
    --bg-body: #030014;
    --bg-surface: #0f172a;
    --bg-glass: rgba(15, 23, 42, 0.6);
    --bg-glass-heavy: rgba(15, 23, 42, 0.8);

    /* Text */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    --gradient-hero: radial-gradient(circle at top center, #1e1b4b 0%, #030014 100%);
    --gradient-glow: conic-gradient(from 180deg at 50% 50%, #2a8af6 0deg, #a853ba 180deg, #e92a67 360deg);

    /* Borders & Shadows */
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.05);

    /* Sizes */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- SEASONS ENGINE --- */
/* Christmas Theme (Festive Glow) */
[data-season="christmas"] {
    --primary: #e11d48;
    /* Rose 600 - Festive Red */
    --primary-dark: #be123c;
    /* Rose 700 */
    --secondary: #fbbf24;
    /* Amber 400 - Gold */
    --accent: #10b981;
    /* Emerald 500 - Green (Complementary) */

    /* Warmer, richer gradients */
    --gradient-main: linear-gradient(135deg, var(--primary) 0%, #fbbf24 100%);
    --gradient-text: linear-gradient(to right, #e11d48, #fbbf24);

    /* Enhance the dark theme background slightly */
    --bg-body: #0f0505;
    /* Very subtle warm tint */
}

/* Optional: Snow Effect Container (Added via JS) */
.snow-particle {
    position: fixed;
    top: -10px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
    animation: fall linear infinite;
    z-index: 9999;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Fix visibility in light mode */
[data-theme="light"] .snow-particle {
    background: #cbd5e1;
    /* Slate 300 - Visible against white */
}

/* ---------------------- */

/* Light Theme Variables */
[data-theme="light"] {
    --bg-body: #ffffff;
    --bg-surface: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-glass-heavy: rgba(255, 255, 255, 0.9);

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;

    --gradient-hero: radial-gradient(circle at top center, #f0f9ff 0%, #ffffff 100%);

    --border-glass: rgba(0, 0, 0, 0.1);
    --border-light: rgba(0, 0, 0, 0.05);

    /* For light mode, cards need a bit more shadow to pop */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-card);
}

[data-theme="light"] .nav-link {
    color: var(--text-muted);
}

[data-theme="light"] .nav-link:hover,
[data-theme="light"] .nav-link.active {
    color: var(--primary);
}

[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(249, 115, 22, 0.1);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

[data-theme="light"] .hero-visual {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    background-image: var(--gradient-hero);
    background-attachment: fixed;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    border: none;
    cursor: pointer;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
}

.glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-muted);
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition-bounce);
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
}

.btn-ghost {
    padding: 12px 4px;
    color: var(--text-muted);
    gap: 6px;
}

.btn-ghost:hover {
    color: var(--text-main);
    transform: translateY(-1px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

header.scrolled {
    background: var(--bg-glass-heavy);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Trusted By Section */
.trusted-by {
    padding: 40px 0;
    border-bottom: 1px solid var(--border-light);
}

.partner-logo {
    height: 32px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.partner-logo:hover,
.partner-logo.active {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.15);
}

.partner-logo:active {
    transform: scale(1.1);
}

nav {
    display: flex;
    justify-content: flex-start;
    /* items flow from start */
    align-items: center;
    height: 100%;
    gap: 40px;
    /* Space between logo and links */
}

/* Nav Links Centering/Push */
.nav-links.desktop {
    margin-left: auto;
    margin-right: auto;
}

/* Theme Toggle */
.theme-toggle {
    margin-left: 0 !important;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-muted);
    font-size: 1rem;
}

.theme-toggle:hover {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

.mobile-toggle {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
}

.logo img {
    height: 36px;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
    padding: 8px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.menu-open {
    overflow: hidden;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {

    /* Header Layout */
    nav {
        justify-content: flex-start;
        /* Standard flow */
        gap: 0;
        padding: 0;
    }

    /* Group Toggle & Menu */
    /* Push Theme Toggle to the right, carrying the Mobile Toggle with it */
    .theme-toggle {
        margin-left: auto !important;
        margin-right: 16px !important;
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }

    .mobile-toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 1002;
    }

    .nav-links.desktop {
        display: none;
    }

    h1 {
        font-size: 2.5rem;
    }

    /* Mobile Menu Dropdown */
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-surface);
        padding: 100px 24px 40px;
        align-items: center;
        gap: 32px;
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-links.active .nav-link {
        font-size: 1.5rem;
    }

    .logo {
        z-index: 1002;
        font-size: 1.25rem;
        /* Slightly smaller text logo */
    }

    /* Adjust Grid for Mobile */
    .hero-section>.container>div {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .hero-content {
        order: 1;
    }

    .hero-visual {
        order: 2;
        margin-top: 40px;
    }

    .hero-btns {
        justify-content: center;
    }

    /* Footer Stack */
    footer .container>div {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    footer .logo {
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}