/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #334155;
    --gray-light: #64748b;
    --gray-lighter: #e2e8f0;
    --light: #f8fafc;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

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

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--gray-lighter);
}

.btn-secondary:hover {
    background: var(--light);
    border-color: var(--gray-light);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-light);
}

.btn-ghost:hover {
    color: var(--dark);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-lighter);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--dark);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
}

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

.nav-links a {
    color: var(--gray-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--dark);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--light) 0%, var(--white) 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hero-title {
    font-size: 56px;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--gray-light);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

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

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.stat-label {
    font-size: 14px;
    color: var(--gray-light);
}

/* Phone Mockup */
.hero-visual {
    display: flex;
    justify-content: center;
}

.app-screenshot {
    max-height: 670px;
    width: auto;
    border-radius: 28px;
    box-shadow: var(--shadow-xl);
    image-rendering: -webkit-optimize-contrast;
}

.phone-mockup {
    width: 320px;
    height: 680px;
    background: #1a1a1a;
    border-radius: 50px;
    padding: 12px;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,0.1);
    position: relative;
}

.phone-notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 0 0 20px 20px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #f2f2f7;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
}

.phone-home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: #333;
    border-radius: 2px;
}

.app-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f2f2f7;
}

.app-nav {
    padding: 50px 16px 12px;
    background: #f2f2f7;
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.app-content {
    flex: 1;
    overflow: hidden;
    padding: 0 12px 20px;
}

.app-content-inner {
    animation: scrollUpDown 8s ease-in-out infinite;
}

@keyframes scrollUpDown {
    0%, 15% {
        transform: translateY(0);
    }
    40%, 60% {
        transform: translateY(-45%);
    }
    85%, 100% {
        transform: translateY(0);
    }
}

/* Stat Cards */
.app-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.app-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.stat-icon.blue { background: #007aff; color: #fff; }
.stat-icon.purple { background: #af52de; color: #fff; }
.stat-icon.orange { background: #ff9500; color: #fff; }
.stat-icon.green { background: #34c759; color: #fff; }

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

.stat-subtitle {
    font-size: 10px;
    color: #8e8e93;
    margin-top: 1px;
}

/* Sections */
.app-section {
    margin-bottom: 16px;
}

.section-header {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    padding-left: 4px;
}

.section-card {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Accounts Scroll */
.accounts-scroll {
    display: flex;
    gap: 10px;
    overflow-x: hidden;
    padding-bottom: 4px;
}

.phone-mockup {
    pointer-events: none;
    user-select: none;
}

.account-card {
    min-width: 150px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.account-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.account-icon.blue { background: #007aff; color: #fff; }

.account-icon.amex {
    background: #006fcf;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    text-transform: lowercase;
}

.account-name {
    font-size: 14px;
    font-weight: 600;
    color: #000;
}

.account-detail {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

/* Payments */
.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-name {
    font-size: 14px;
    font-weight: 500;
    color: #000;
}

.payment-detail {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

.payment-amount {
    font-size: 14px;
    font-weight: 600;
    color: #ff3b30;
}

/* Transfers */
.transfer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6px 0;
}

.transfer-divider {
    height: 1px;
    background: #e5e5ea;
    margin: 4px 0;
}

.transfer-name {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge.actual {
    background: rgba(52, 199, 89, 0.2);
    color: #34c759;
}

.badge.predicted {
    background: rgba(255, 149, 0, 0.2);
    color: #ff9500;
}

.transfer-dates {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

.transfer-amount {
    font-size: 14px;
    font-weight: 600;
    color: #ff3b30;
}

/* Transactions */
.transaction-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5ea;
}

.transaction-row:last-child {
    border-bottom: none;
}

.transaction-name {
    font-size: 14px;
    font-weight: 500;
    color: #000;
}

.transaction-detail {
    font-size: 11px;
    color: #8e8e93;
    margin-top: 2px;
}

.transaction-amount {
    font-size: 14px;
    font-weight: 600;
}

.transaction-amount.negative {
    color: #000;
}

.transaction-amount.positive {
    color: #34c759;
}

.app-bottom-padding {
    height: 30px;
}

.app-preview {
    padding: 20px;
    color: var(--white);
}

.app-header {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.app-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.app-stat-card {
    background: var(--dark-light);
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
}

.app-stat-card.highlight {
    background: var(--primary);
}

.app-stat-value {
    font-size: 18px;
    font-weight: 700;
}

.app-stat-label {
    font-size: 11px;
    color: var(--gray-light);
}

.app-stat-card.highlight .app-stat-label {
    color: rgba(255, 255, 255, 0.8);
}

.app-section {
    background: var(--dark-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.app-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-light);
    margin-bottom: 12px;
}

.app-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-item:last-child {
    border-bottom: none;
}

.app-item .amount {
    color: #ef4444;
    font-weight: 600;
}

.app-balance-box {
    background: var(--dark-light);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    text-align: center;
}

.app-ideal-box {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.app-balance-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.app-balance-amount {
    font-size: 24px;
    font-weight: 700;
}

.app-ideal-amount {
    font-size: 24px;
    font-weight: 700;
}

.app-transfer-card {
    background: var(--primary);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.app-transfer-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
}

.app-transfer-value {
    font-size: 28px;
    font-weight: 700;
}

.app-transfer-note {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--light);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-title {
    font-size: 40px;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-lighter);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.1);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    stroke: var(--white);
}

.feature-title {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-desc {
    color: var(--gray-light);
    font-size: 15px;
}

/* How It Works */
.how-it-works {
    padding: 100px 0;
    background: var(--white);
}

.steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
}

.step {
    flex: 1;
    max-width: 300px;
    text-align: center;
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    margin: 0 auto 24px;
}

.step-title {
    font-size: 22px;
    margin-bottom: 12px;
}

.step-desc {
    color: var(--gray-light);
    font-size: 15px;
}

.step-connector {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--gray-lighter) 100%);
    margin-top: 32px;
}

/* CTA Section */
.cta {
    padding: 100px 0;
    background: var(--light);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 40px;
    margin-bottom: 16px;
}

.cta-subtitle {
    font-size: 18px;
    color: var(--gray-light);
    margin-bottom: 32px;
}

/* Footer */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--gray-lighter);
    background: var(--white);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.footer-tagline {
    color: var(--gray-light);
    font-size: 14px;
    margin-top: 12px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--dark);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--gray-lighter);
    color: var(--gray-light);
    font-size: 14px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content, .hero-visual {
    animation: fadeInUp 0.8s ease-out;
}

.hero-visual {
    animation-delay: 0.2s;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        max-width: none;
    }

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

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

    .hero-visual {
        order: -1;
    }

    .phone-mockup {
        width: 280px;
        height: 600px;
    }

    .phone-notch {
        width: 100px;
        height: 24px;
    }

    .app-title {
        font-size: 24px;
    }

    .stat-value {
        font-size: 16px;
    }

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

@media (max-width: 768px) {
    .nav-links a:not(.btn) {
        display: none;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

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

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

    .step-connector {
        width: 2px;
        height: 40px;
        background: linear-gradient(180deg, var(--primary) 0%, var(--gray-lighter) 100%);
        margin: 0;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .section-title {
        font-size: 28px;
    }

    .cta-title {
        font-size: 28px;
    }
}
