/* ========================================
   BaeBae Landing Page - Warm Embrace Theme
   Matching Flutter app theme exactly
   ======================================== */

/* ========== CSS Variables ========== */
:root {
    /* PRIMARY PALETTE - Exact match from Flutter */
    --primary: #D4A574;              /* Soft Caramel */
    --primary-light: #E2C4A3;        /* Light Caramel */
    --primary-dark: #B8925F;         /* Deep Caramel */

    --secondary: #E5C4A1;            /* Cream */
    --secondary-light: #F0DCC7;      /* Light Cream */
    --secondary-dark: #D4B08A;       /* Deep Cream */

    --accent: #F5DFC6;               /* Vanilla */
    --accent-light: #FAF0E4;         /* Pale Vanilla */
    --accent-dark: #E8CDB0;          /* Rich Vanilla */

    /* TEXT COLORS */
    --text-primary: #8B6F4C;         /* Cocoa */
    --text-secondary: #A68B6F;       /* Light Cocoa */
    --text-muted: #C4A888;           /* Muted Cocoa */
    --text-inverse: #FFFFFF;         /* White */

    /* FUNCTIONAL COLORS */
    --success: #9FB8AD;              /* Sage */
    --success-light: #C5D9CD;        /* Light Sage */
    --success-dark: #7D9A89;         /* Deep Sage */

    --warning: #F0C987;              /* Sunrise */
    --warning-light: #F7DDB3;        /* Light Sunrise */
    --warning-dark: #D4A55F;         /* Deep Sunrise */

    --error: #E4A5A5;                /* Dusty Rose */
    --error-light: #F0CCCC;          /* Light Rose */
    --error-dark: #C58B8B;           /* Deep Rose */

    --info: #B8D4E3;                 /* Sky Blue */
    --info-light: #D6E8F1;           /* Light Sky */
    --info-dark: #8BB4CC;            /* Deep Sky */

    /* BACKGROUNDS */
    --bg-primary: #FFF5EB;           /* Soft Linen */
    --bg-secondary: #FFFBF5;         /* Warm White */
    --bg-tertiary: #FFFFFF;          /* Pure White */

    /* SURFACES */
    --surface-default: #FFFBF5;      /* Default surface */
    --surface-raised: #FFFFFF;       /* Elevated */
    --surface-pressed: #FFF0E6;      /* Pressed state */

    /* BORDERS */
    --border-default: #F5DFC6;       /* Default borders */
    --border-subtle: #FFF5EB;        /* Subtle borders */
    --border-strong: #E5C4A1;        /* Strong borders */

    /* CARD BACKGROUNDS */
    --card-default: #FFFBF5;         /* Standard cards */
    --card-activity: #FFF8F0;        /* Activity cards */
    --card-milestone-start: #FFF5EB; /* Milestone gradient start */
    --card-milestone-end: #FFE8D1;   /* Milestone gradient end */
    --card-health: #F5FAF8;          /* Health cards */
    --card-alert: #FFF0E6;           /* Alert cards */
    --card-interactive: #FFFFFF;     /* Interactive cards */
    --card-selected: #FAF0E4;        /* Selected state */

    /* SPACING - 4px base unit */
    --space-xxs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-xxxl: 64px;

    /* BORDER RADIUS */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-xxl: 24px;
    --radius-full: 9999px;

    /* SHADOWS - Warm, soft shadows */
    --shadow-xs: 0 1px 3px rgba(139, 111, 76, 0.04);
    --shadow-sm: 0 2px 6px rgba(139, 111, 76, 0.06);
    --shadow-md: 0 4px 12px rgba(139, 111, 76, 0.08);
    --shadow-lg: 0 8px 24px rgba(139, 111, 76, 0.10);
    --shadow-xl: 0 16px 48px rgba(139, 111, 76, 0.12);

    /* TYPOGRAPHY */
    --font-primary: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========== Global Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ========== Typography ========== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-primary);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--space-xxxl);
    color: var(--text-primary);
    font-weight: 300;
    letter-spacing: -0.5px;
}

/* ========== Navigation ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: var(--space-md) 0;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 500;
}

.nav-cta {
    background: var(--primary);
    color: var(--text-inverse) !important;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    font-weight: 500;
}

.nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ========== Hero Section ========== */
.hero {
    padding: 140px 0 var(--space-xxxl);
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xxxl);
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    font-weight: 300;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.hero-trust {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.hero-trust::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
    font-size: 1.2rem;
}

/* Hero App Badges */
.hero-app-badges {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.hero-app-badge img {
    height: 54px;
    transition: transform 0.3s ease;
    filter: drop-shadow(var(--shadow-xs));
}

.hero-app-badge:hover img {
    transform: scale(1.05);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-blob {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.2), rgba(229, 196, 161, 0.3));
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
    animation: blob-float 8s ease-in-out infinite;
}

@keyframes blob-float {
    0%, 100% {
        border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: translate(20px, -20px) rotate(120deg);
    }
    66% {
        border-radius: 50% 50% 30% 70% / 50% 70% 30% 50%;
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.floating-card {
    position: absolute;
    background: var(--bg-tertiary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    animation: float 3s ease-in-out infinite;
    border: 1px solid var(--border-default);
}

.card-icon {
    font-size: 1.5rem;
}

.card-text {
    font-weight: 500;
    color: var(--text-primary);
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 60%;
    left: 5%;
    animation-delay: 1s;
}

.card-3 {
    top: 40%;
    right: 10%;
    animation-delay: 2s;
}

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

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--accent-light);
}

/* ========== Features Section ========== */
.features {
    padding: var(--space-xxxl) 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.feature-card {
    background: var(--card-default);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-default);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-dark);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-weight: 500;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

/* ========== Feature Showcase Carousel ========== */
.feature-showcase {
    padding: var(--space-xxxl) 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.showcase-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xxxl);
}

.carousel-container {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.carousel-track-container {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xxxl);
    align-items: center;
    background: var(--bg-tertiary);
    padding: var(--space-xxxl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-default);
}

.slide-image {
    text-align: center;
}

.slide-image img {
    max-width: 100%;
    height: auto;
    max-height: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.slide-text h3 {
    font-size: 2rem;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    font-weight: 500;
}

.slide-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    padding-left: var(--space-lg);
    position: relative;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: -25px;
}

.carousel-nav.next {
    right: -25px;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-default);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator.active {
    background: var(--primary);
    transform: scale(1.3);
}

.indicator:hover {
    background: var(--primary-light);
}

/* ========== How It Works Section ========== */
.how-it-works {
    padding: var(--space-xxxl) 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--text-inverse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0 auto var(--space-md);
    box-shadow: var(--shadow-sm);
}

.step-icon {
    font-size: 3.5rem;
    margin-bottom: var(--space-md);
}

.step-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    font-weight: 500;
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.step-connector {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--secondary));
    align-self: center;
    margin-top: 50px;
    border-radius: 2px;
}

/* ========== Testimonials Section ========== */
.testimonials {
    padding: var(--space-xxxl) 0;
    background: var(--bg-secondary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.testimonial-card {
    background: var(--card-default);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-default);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stars {
    color: var(--warning);
    font-size: 1.2rem;
    margin-bottom: var(--space-md);
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.testimonial-author strong {
    color: var(--text-primary);
    font-weight: 500;
}

.testimonial-author span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== Stats Section ========== */
.stats {
    padding: var(--space-xxxl) 0;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-light));
    position: relative;
    overflow: hidden;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    text-align: center;
}

.stat {
    color: var(--text-primary);
}

.stat-number {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: var(--space-xs);
    font-family: var(--font-heading);
    letter-spacing: -1px;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ========== Final CTA Section ========== */
.final-cta {
    padding: var(--space-xxxl) 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.cta-title {
    font-size: 3rem;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    font-weight: 300;
    letter-spacing: -1px;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.app-badges {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.app-badge img {
    height: 60px;
    transition: transform 0.3s ease;
    filter: drop-shadow(var(--shadow-xs));
}

.app-badge:hover img {
    transform: scale(1.05);
}

.cta-free {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ========== Footer ========== */
.footer {
    background: var(--text-primary);
    color: var(--text-inverse);
    padding: var(--space-xxxl) 0 var(--space-lg);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: var(--space-xxxl);
    margin-bottom: var(--space-xl);
}

.footer-brand .logo-text {
    color: var(--primary-light);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-md);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    color: var(--text-inverse);
    font-weight: 500;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: var(--space-xs);
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-light);
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .features-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        flex-direction: column;
        gap: var(--space-xl);
    }

    .step-connector {
        display: none;
    }

    .slide-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        padding: var(--space-xl);
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .carousel-nav.prev {
        left: -20px;
    }

    .carousel-nav.next {
        right: -20px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-tertiary);
        flex-direction: column;
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        transition: all 0.3s ease;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        height: 300px;
    }

    .hero-blob {
        width: 250px;
        height: 250px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-app-badges {
        flex-direction: column;
        align-items: center;
    }

    .features-grid,
    .testimonials-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .slide-content {
        padding: var(--space-lg);
    }

    .slide-text h3 {
        font-size: 1.5rem;
    }

    .slide-text p {
        font-size: 1rem;
    }

    .carousel-nav {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }

    .carousel-nav.prev {
        left: 10px;
    }

    .carousel-nav.next {
        right: 10px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .app-badges {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .feature-icon,
    .step-icon {
        font-size: 2.5rem;
    }
}
