/* 
   Money Habit Landing Page Styles 
   Theme: Elegant, Outlined, Symmetrical, Stripe-like
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --primary-color: #2B3467;
    --primary-light: #3a458c;
    --secondary-color: #BAD7E9;
    --accent-color: #EB455F;

    /* Neutral Colors */
    --text-dark: #111827;
    --text-light: #4B5563;
    --text-lighter: #9CA3AF;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;

    /* Status Colors */
    --success: #10B981;
    --error: #EF4444;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --section-padding: 5rem 2rem;

    /* Borders & Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --border-width: 1px;

    /* Shadows (Minimal for outlined look) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
    border-bottom: 1px solid var(--border-color);
}

/* Stripe Pattern: Alternating Section Backgrounds */
.section:nth-child(even) {
    background-color: var(--bg-light);
}

.section:nth-child(odd) {
    background-color: var(--bg-white);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-light);
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-white);
}

.btn-store {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background-color: var(--text-dark);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.875rem;
    /* Smaller font */
    font-weight: 700;
    /* Bold */
}

.btn-store:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 52, 103, 0.2);
}

.btn-store svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    flex-shrink: 0;
}


/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    position: relative;
    overflow: hidden;
    /* Subtle grid pattern background */
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center top;
    /* overflow: hidden; Removed to allow orbits to extend */
}

/* Fade out the grid at the bottom */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, var(--bg-white), transparent);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    /* Ensure text is above orbits */
}

.hero-content h1 {
    font-size: 4rem;
    /* Larger, more impactful */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

#dynamic-word {
    display: inline-block;
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-width: 180px;
    /* Prevent layout jump */
}

.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-visual {
    position: relative;
    height: 650px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align phone to bottom */
}

/* Phone Mockup Styling */
.phone-mockup {
    width: 280px;
    height: 576px;
    /* 9:18.5 aspect ratio */
    background: var(--bg-white);
    border: 8px solid var(--text-dark);
    /* Dark bezel */
    border-radius: 40px;
    margin-bottom: 4rem;
    /* Lifted up from bottom */
    position: relative;
    overflow: hidden;
    box-shadow:
        0 0 0 2px var(--border-color),
        /* Outer outline */
        0 20px 40px -10px rgba(0, 0, 0, 0.1);
    /* Subtle shadow */
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    overflow: hidden;
    position: relative;
    border-radius: 32px;
    /* Match inner phone radius */
}

.screenshot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom;
    /* Align image content to bottom */
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.screenshot.active {
    opacity: 1;
}

/* Card Components (Features, Benefits, etc.) */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 4px 0 0 var(--secondary-color);
    /* Outlined shadow effect */
}

.icon-box {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Testimonials */
.testimonial-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1px solid var(--primary-color);
}

/* CTA Section */
.cta-section {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.cta-section h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.copyright {
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* CTA Buttons Group */
.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    /* Force 1 line */
    align-items: center;
    justify-content: center;
    /* Centered by default */
}

/* Hero should keep buttons left-aligned on desktop */
.hero-content .cta-buttons {
    justify-content: flex-start;
}

/* Responsive */
@media (max-width: 968px) {

    .hero-grid,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-content {
        text-align: center;
        order: -1;
        /* Keep text at top on mobile */
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .cta-buttons {
        justify-content: center;
        gap: 0.5rem;
    }

    .btn-store {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }

    .hero-visual {
        height: 400px;
    }
}

@media (max-width: 640px) {
    :root {
        --header-height: 70px;
        --section-padding: 3rem 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .logo {
        font-size: 1.25rem;
    }

    .nav-links {
        display: none;
        /* Hide nav links on mobile for now */
    }
}

/* Utility classes for Privacy/Terms/Support pages */
.page-header {
    text-align: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
}

.content-box {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(43, 52, 103, 0.1);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.table th {
    text-align: left;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--primary-color);
    font-weight: 700;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.table tr:last-child td {
    border-bottom: none;
}

/* Alert & Warning Boxes */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-color: #10B981;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #EF4444;
}

.warning-box {
    background: #FFFBEB;
    border: 1px solid #FCD34D;
    border-left: 4px solid #F59E0B;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    color: #92400E;
}

.warning-box strong {
    color: #B45309;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        /* Neutral Colors */
        --bg-white: #111827;
        /* Dark background */
        --bg-light: #1F2937;
        /* Slightly lighter dark background for stripes/inputs */
        --text-dark: #F9FAFB;
        /* Light text for headings/body */
        --text-light: #D1D5DB;
        /* Gray text for secondary content */
        --text-lighter: #9CA3AF;
        /* Muted text */
        --border-color: #374151;
        /* Darker border color */

        /* Brand Colors Adaptation */
        --primary-color: #BAD7E9;
        /* Lighter primary for text visibility */
        --primary-light: #2B3467;
        /* Original dark blue for backgrounds/accents if needed */

        /* Specific Overrides */
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    }

    /* Adjust specific elements for dark mode if variables aren't enough */
    .phone-mockup {
        border-color: #000;
        box-shadow: 0 0 0 2px var(--border-color), 0 20px 40px -10px rgba(0, 0, 0, 0.5);
    }

    .phone-screen {
        background: #1F2937;
        color: var(--text-dark);
    }

    /* Ensure form inputs have correct background/text */
    .form-input,
    .form-select,
    .form-textarea {
        background-color: var(--bg-light);
        color: var(--text-dark);
    }

    /* Adjust button text colors for contrast */
    .btn-primary {
        background-color: var(--primary-color);
        color: #111827;
        /* Dark text on light button */
        border-color: var(--primary-color);
    }

    .btn-primary:hover {
        background-color: #9cbdd3;
        /* Slightly darker shade of the light blue */
        border-color: #9cbdd3;
    }

    .btn-outline {
        color: var(--primary-color);
        border-color: var(--border-color);
    }

    .btn-outline:hover {
        background-color: var(--bg-light);
        border-color: var(--primary-color);
    }

    .btn-store {
        background-color: var(--bg-light);
        /* Dark card background */
        border: 1px solid var(--border-color);
        color: var(--text-dark);
    }

    .btn-store:hover {
        border-color: var(--primary-color);
        background-color: var(--bg-light);
    }

    /* Invert SVG icons in store buttons if they are black */
    .btn-store svg {
        fill: var(--text-dark);
    }

    /* Fix table header color */
    .table th {
        color: var(--primary-color);
        border-bottom-color: var(--border-color);
    }

    /* Warning/Alert Adjustments */
    .warning-box {
        background: #451a03;
        border-color: #78350f;
        color: #fcd34d;
    }

    .warning-box strong {
        color: #fbbf24;
    }

    .alert-success {
        background: #064e3b;
        color: #d1fae5;
        border-color: #059669;
    }

    .alert-error {
        background: #7f1d1d;
        color: #fecaca;
        border-color: #dc2626;
    }

    /* Highlight box adjustment */
    .feature-card:hover,
    .card:hover,
    .testimonial-card:hover,
    .benefit-item:hover {
        box-shadow: 0 4px 0 0 var(--primary-light);
    }

    /* Mobile menu bg */
    .navbar {
        background: rgba(17, 24, 39, 0.95);
    }
}