/* 
 * BESPOKE LANDING PAGE MOLD
 * Design System & Theming
 */

@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&family=Inter:wght@400;500;600&display=swap');

:root {
    /* 
     * PALETTE: Fun & Playful 
     */
    --bg-gradient: linear-gradient(135deg, #FFDEE9 0%, #B5FFFC 100%);
    --bg-overlay: radial-gradient(rgba(139, 92, 246, 0.15) 1.5px, transparent 1.5px);

    --bg-body: #FFFBEB;
    --bg-subtle: rgba(255, 255, 255, 0.6);
    /* Semi-transparent for glass effect */
    --bg-surface: rgba(255, 255, 255, 0.7);
    /* More transparent */

    --text-primary: #1F2937;
    /* Gray 800 */
    --text-secondary: #4B5563;
    /* Gray 600 */
    --text-tertiary: #9CA3AF;

    --brand-primary: #8B5CF6;
    /* Violet */
    --brand-hover: #7C3AED;

    --accent: #F59E0B;
    /* Amber */

    --border-light: #FDE68A;

    /* Spacing System - 4pt grid scale */
    --space-xs: 0.5rem;
    --space-sm: 1.5rem;
    --space-md: 3rem;
    --space-lg: 6rem;
    --space-xl: 10rem;

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Patrick Hand', cursive;
    --font-serif: 'Patrick Hand', cursive;

    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    /* Dreamy Night Mode */
    --bg-gradient: linear-gradient(135deg, #0F2027 0%, #203A43 50%, #2C5364 100%);
    --bg-overlay: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    /* Stars */

    --bg-body: #1E1B4B;
    --bg-subtle: rgba(17, 24, 39, 0.6);
    --bg-surface: rgba(17, 24, 39, 0.8);

    --text-primary: #FFFFFF;
    /* Pure White for max contrast */
    --text-secondary: #E2E8F0;
    /* Very light slate */
    --text-tertiary: #9CA3AF;

    --brand-primary: #A78BFA;
    /* Light Violet */
    --brand-hover: #C4B5FD;

    --border-light: rgba(255, 255, 255, 0.1);
}

/* 
 * RESET & BASE 
 */
html,
body {
    font-family: var(--font-sans);

    background: var(--bg-gradient);
    background-attachment: fixed;

    background-image:
        var(--bg-overlay),
        var(--bg-gradient);
    background-size: 40px 40px, 100% 100%;

    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    letter-spacing: -0.025em;
    font-weight: 700;
    line-height: 1.15;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* 
 * UTILITIES 
 */
.text-serif {
    font-family: var(--font-serif);
}

.text-balance {
    text-wrap: balance;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

/* Custom Spacing */
.py-section {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-lg);
}

.mb-nature {
    margin-bottom: var(--space-sm);
}

.gap-nature {
    gap: var(--space-sm);
}

/* Glow Text for Dark Mode Readability */
/* Glow Text for Dark Mode Readability */
[data-theme="dark"] .text-glow-dark {
    color: #7C3AED !important;
    /* Vibrant Violet */
    font-weight: 700 !important;
    text-shadow: 0 0 2px rgba(139, 92, 246, 0.2), 2px 2px 0px rgba(0, 0, 0, 0.1);
    /* Subtle glow + shadow for contrast on white */
}

/* 
 * NAVBAR 
 */
.navbar {
    padding: 1.25rem 0;
    background: transparent;
    transition: padding 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    padding: 0.75rem 0;
    background: var(--bg-body);
    /* Solid background on scroll */
    border-bottom: 1px solid var(--border-light);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(30, 41, 59, 0.85);
    /* Lighter Slate Glass */
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.03em;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0 0.75rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

/* Mobile Nav Visibility */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--bg-surface);
        margin: 1rem -1rem 0 -1rem;
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 1.5rem 1.5rem;
    }

    [data-theme="dark"] .navbar-collapse {
        background: var(--bg-surface);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .nav-link {
        margin: 0.5rem 0;
        padding: 0.75rem 1rem !important;
        border-radius: 8px;
    }

    .nav-link:hover {
        background: var(--bg-subtle);
    }

    /* Shrink Icons for Phone View */
    .navbar-brand {
        font-size: 1.25rem !important;
    }

    .bi-person-circle {
        font-size: 1.25rem !important;
    }

    .theme-switch i {
        font-size: 1.1rem !important;
    }

    .navbar-toggler span.fs-2 {
        font-size: 1.5rem !important;
    }

    /* Fixed Navbar Logic for Mobile */
    .navbar.fixed-top {
        position: fixed !important;
        background: transparent;
        transition: all 0.3s ease;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .navbar.scrolled {
        background: var(--bg-body) !important;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .navbar-collapse {
        background: var(--bg-surface);
        backdrop-filter: blur(15px);
        margin: 1.25rem -1.25rem 0 -1.25rem;
        padding: 1.5rem;
        border-top: 1px solid var(--border-light);
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 1.5rem 1.5rem;
    }

    [data-theme="dark"] .navbar.scrolled {
        background: rgba(15, 23, 42, 0.95) !important;
    }

    [data-theme="dark"] .navbar-collapse {
        background: rgba(30, 41, 59, 0.8) !important;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    }
}

/* 
 * BUTTONS 
 */
.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.01em;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    color: var(--bg-body);
    /* Contrast text */
}

.btn-primary:hover {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
    color: var(--bg-body);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: transparent;
}

/* 
 * HERO SECTION 
 */
.hero {
    min-height: 90vh;
    /* Not quite full screen to show scroll hint */
    display: flex;
    align-items: center;
    padding-top: var(--space-lg);
}

.hero-headline {
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: var(--space-sm);
}

.hero-sub {
    font-size: 1.35rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: var(--space-md);
    font-weight: 400;
}

/* 
 * CARDS & FEATURES (Asymmetric)
 */
.feature-card {
    padding: 3rem;
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    height: 100%;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--text-tertiary);
    transform: translateY(-4px);
}

/* 
 * PRICING 
 */
.card-price {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    transition: var(--transition);
}

.card-price.featured {
    background: var(--text-primary);
    color: var(--bg-body);
    border-color: var(--text-primary);
}

.card-price.featured .text-secondary {
    color: rgba(255, 255, 255, 0.6) !important;
}

.card-price.featured .btn {
    background: var(--bg-body);
    color: var(--text-primary);
    border: none;
}

.currency {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
}

/* 
 * DARK MODE TOGGLE 
 */
.theme-switch {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.theme-switch:hover {
    opacity: 1;
}

/* 
 * MOBILE APP-LIKE UI 
 */
@media (max-width: 991.98px) {

    html,
    body {
        padding-bottom: 80px;
        /* Space for bottom nav */
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
    }

    body::-webkit-scrollbar {
        display: none;
        /* Hide scrollbar for Chrome, Safari and Opera */
    }

    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 75px;
        background: var(--bg-surface);
        backdrop-filter: blur(20px);
        display: flex;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid var(--border-light);
        z-index: 2000;
        padding: 0 10px;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.05);
    }

    [data-theme="dark"] .mobile-bottom-nav {
        background: rgba(15, 23, 42, 0.9);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        font-size: 0.725rem;
        font-weight: 500;
        text-decoration: none !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        flex: 1;
        position: relative;
        height: 100%;
        padding-top: 5px;
    }

    /* Ensure dropdown toggles in nav-items align perfectly */
    .mobile-bottom-nav .nav-item .dropdown-toggle {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        color: inherit;
        text-decoration: none !important;
    }

    .mobile-bottom-nav .nav-item i {
        font-size: 1.35rem;
        margin-bottom: 0px;
        transition: transform 0.2s ease;
    }

    .mobile-bottom-nav .nav-item:active {
        transform: scale(0.92);
        opacity: 0.8;
    }

    .mobile-bottom-nav .nav-item.active,
    .mobile-bottom-nav .nav-item.show {
        color: var(--brand-primary);
    }

    .mobile-bottom-nav .nav-item.active i,
    .mobile-bottom-nav .nav-item.show i {
        transform: translateY(-2px);
    }

    .mobile-bottom-nav .nav-fab {
        width: 48px;
        height: 48px;
        background: linear-gradient(135deg, var(--brand-primary), var(--brand-hover));
        color: white !important;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 3px !important;
        box-shadow: 0 8px 16px rgba(139, 92, 246, 0.3);
        transform: translateY(-8px);
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .mobile-bottom-nav .nav-item:active .nav-fab {
        transform: translateY(-4px) scale(0.95);
    }

    .user-avatar-sm {
        width: 26px;
        height: 26px;
        background: linear-gradient(135deg, #8B5CF6, #F59E0B);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-family: var(--font-sans);
        /* Use sans for better readability at small size */
        margin-bottom: 5px;
        font-size: 0.85rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }

    /* Glow effect when active or menu is open */
    .mobile-bottom-nav .nav-item.active .user-avatar-sm,
    .mobile-bottom-nav .nav-item.show .user-avatar-sm {
        box-shadow: 0 0 15px var(--brand-primary);
        transform: scale(1.1);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }

    .no-caret::after {
        display: none !important;
    }

    /* Hide footer on mobile for a cleaner app feel */
    footer#footer {
        display: none;
    }

    /* Section adjustment for mobile */
    .py-section,
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .feature-card {
        padding: 2rem;
        border-radius: 20px;
    }

    .hero-headline {
        font-size: 2.8rem;
    }

    /* Floating Theme Toggle position for app-like access */
    .theme-switch {
        background: var(--bg-surface);
        width: 40px;
        height: 40px;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        opacity: 1;
    }

    /* Centered Hero for App Look */
    .hero {
        text-align: center;
        padding-top: 5rem !important;
        /* Added gap to clear the fixed-top navbar */
        min-height: auto;
        display: block !important;
    }

    .hero .container {
        padding-top: 1rem;
    }

    .hero .row {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .hero .d-flex {
        justify-content: center;
    }

    .hero-sub {
        margin-left: auto;
        margin-right: auto;
        font-size: 1.1rem !important;
        opacity: 0.9;
    }

    /* Floating Emojis for Mobile Hero */
    .hero::before {
        content: '✨';
        position: absolute;
        top: 15%;
        left: 10%;
        font-size: 2rem;
        animation: float 4s ease-in-out infinite;
        opacity: 0.6;
    }

    .hero::after {
        content: '🚀';
        position: absolute;
        bottom: 20%;
        right: 15%;
        font-size: 2.5rem;
        animation: float 6s ease-in-out infinite;
        opacity: 0.6;
    }

    .kids-magic-float {
        position: absolute;
        pointer-events: none;
        z-index: -1;
        font-size: 2rem;
        animation: float 5s ease-in-out infinite;
    }

    .row {
        margin-right: 0;
        margin-left: 0;
    }

    .container {
        padding-right: 15px;
        padding-left: 15px;
    }

    /* Bouncy Buttons for Kids */
    .btn-lg {
        animation: bounce 4s ease-in-out infinite;
    }

    .btn-primary.btn-lg {
        animation: bounce 4s ease-in-out infinite, pulse-glow 2s ease-in-out infinite;
    }

    .feature-card:hover {
        animation: wiggle 0.4s ease-in-out;
    }
}

/* 
 * ANIMATIONS 
 */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes bounce {

    0%,
    100%,
    20%,
    50%,
    80% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0);
    }

    25% {
        transform: rotate(-3deg);
    }

    75% {
        transform: rotate(3deg);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
    }

    50% {
        box-shadow: 0 0 25px rgba(139, 92, 246, 0.5);
    }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

#app-splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}
