/*
 * myFinancialTracker — Homepage Styles
 * Modern, design-forward aesthetic with bento grids, glassmorphism, and smooth animations.
 * Mobile-first responsive. Uses existing design tokens from styles.css.
 */

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    padding: 1.5rem 0 2.5rem;
    background: linear-gradient(165deg,
        #2c3035 0%,
        #1a1c20 50%,
        #0f1113 100%);
}

/* Background orbs */
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: orbFloat 20s ease-in-out infinite;
    will-change: transform;
}

.hero-orb--1 {
    width: 600px;
    height: 600px;
    top: -20%;
    right: -15%;
    background: radial-gradient(circle, color-mix(in srgb, var(--md-sys-color-primary, #203448) 20%, transparent) 0%, transparent 70%);
    animation-delay: 0s;
}

.hero-orb--2 {
    width: 450px;
    height: 450px;
    bottom: -10%;
    left: -10%;
    background: radial-gradient(circle, color-mix(in srgb, var(--md-sys-color-secondary, #00a651) 15%, transparent) 0%, transparent 70%);
    animation-delay: -7s;
    animation-duration: 18s;
}

.hero-orb--3 {
    width: 350px;
    height: 350px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, color-mix(in srgb, var(--md-sys-color-tertiary, #FF8C00) 10%, transparent) 0%, transparent 70%);
    animation-delay: -14s;
    animation-duration: 22s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -40px) scale(1.08); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Subtle grid overlay */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(32, 52, 72, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(32, 52, 72, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 1;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
    max-width: var(--container-width, 1200px);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-text {
    animation: fadeInUp 0.8s cubic-bezier(0, 0, 0.2, 1) both;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: color-mix(in srgb, var(--md-sys-color-primary, #203448) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--md-sys-color-primary, #203448) 15%, transparent);
    color: var(--md-sys-color-primary, #203448);
    padding: 0.25rem 0.7rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--md-sys-color-secondary, #00a651);
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

.hero-text h1 {
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    text-align: left;
}

/* .hero-highlight removed — use .gradient-text--primary-secondary from common.css instead */



.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.65;
    color: #c1c7ce;
    max-width: 500px;
    margin-bottom: 2rem;
}

/* Hero section text — consistent light colors in both light and dark mode */
.hero-section .trust-item {
    color: #9ca3af;
}

.hero-section .trust-item i {
    color: #4ade80;
}

.hero-section .trust-item span {
    color: #4ade80;
}

.btn.primary .fa-play {
    margin-right: 0.4rem;
}

/* Hero Visual — Phone Mockup + Floating Cards */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInRight 1s cubic-bezier(0, 0, 0.2, 1) 0.2s both;
}

/* fadeInRight / fadeInUp keyframes are defined in styles.css (single source of truth) */

/* Phone mockup */
.hero-phone-mockup {
    position: relative;
    z-index: 2;
}

.phone-frame {
    width: 280px;
    height: 560px;
    background: var(--md-sys-color-inverse-surface, #0f172a);
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.15),
        0 0 0 3px var(--md-sys-color-inverse-surface, #0f172a),
        0 0 0 6px color-mix(in srgb, var(--md-sys-color-inverse-surface, #0f172a) 30%, transparent);
    position: relative;
    overflow: hidden;
}


.phone-notch {
    width: 100px;
    height: 30px;
    background: var(--md-sys-color-inverse-surface, #0f172a);
    border-radius: 0 0 20px 20px;
    margin: 0 auto;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--md-sys-color-inverse-surface, #0f172a);
    border-radius: 30px;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}



.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--md-sys-color-inverse-on-surface, #e2e8f0);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.5rem 0.5rem 1rem;
    opacity: 0.7;
}

.screen-icons {
    display: flex;
    gap: 0.3rem;
    font-size: 0.6rem;
}

.mock-balance {
    text-align: center;
    margin-bottom: 1.2rem;
}

.mock-label {
    display: block;
    font-size: 0.7rem;
    color: color-mix(in srgb, var(--md-sys-color-inverse-on-surface, #e2e8f0) 60%, transparent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.mock-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--md-sys-color-inverse-on-surface, #f1f5f9);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
}

.mock-change {
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-weight: 600;
}

.mock-change.up {
    color: var(--md-sys-color-secondary, #00a651);
    background: color-mix(in srgb, var(--md-sys-color-secondary, #00a651) 15%, transparent);
}

/* Mini chart */
.mock-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 80px;
    padding: 0 0.25rem;
    margin-bottom: 1.2rem;
}

.chart-bar {
    flex: 1;
    height: var(--h);
    background: linear-gradient(180deg, color-mix(in srgb, var(--md-sys-color-purple-accent, #8b5cf6) 60%, transparent), color-mix(in srgb, var(--md-sys-color-purple-accent, #8b5cf6) 15%, transparent));
    border-radius: 4px 4px 0 0;
    transition: height 0.6s ease;
    position: relative;
}

.chart-bar.active {
    background: linear-gradient(180deg, var(--md-sys-color-purple-accent, #8b5cf6), color-mix(in srgb, var(--md-sys-color-purple-accent, #8b5cf6) 30%, transparent));
}

/* Mock transactions */
.mock-transactions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mock-txn {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    transition: background 0.2s;
}

.mock-txn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.txn-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.txn-food { background: color-mix(in srgb, var(--md-sys-color-tertiary, #FF8C00) 20%, transparent); color: var(--md-sys-color-tertiary, #FF8C00); }
.txn-income { background: color-mix(in srgb, var(--md-sys-color-secondary, #00a651) 20%, transparent); color: var(--md-sys-color-secondary, #00a651); }
.txn-transport { background: color-mix(in srgb, var(--md-sys-color-primary, #203448) 20%, transparent); color: var(--md-sys-color-primary, #203448); }

.txn-info {
    flex: 1;
    min-width: 0;
}

.txn-name {
    display: block;
    font-size: 0.75rem;
    color: var(--md-sys-color-inverse-on-surface, #e2e8f0);
    font-weight: 500;
}

.txn-cat {
    display: block;
    font-size: 0.65rem;
    color: color-mix(in srgb, var(--md-sys-color-inverse-on-surface, #e2e8f0) 50%, transparent);
}

.txn-amount {
    font-size: 0.78rem;
    font-weight: 600;
    flex-shrink: 0;
}

.txn-amount.out { color: var(--md-sys-color-error, #ba1a1a); }
.txn-amount.in { color: var(--md-sys-color-secondary, #00a651); }

.phone-glow {
    position: absolute;
    inset: -30px;
    border-radius: 50px;
    background: radial-gradient(ellipse at center,
        color-mix(in srgb, var(--md-sys-color-primary, #203448) 15%, transparent) 0%,
        transparent 70%);
    z-index: -1;
    animation: pulse 4s ease-in-out infinite;
}

/* Floating cards */
.float-card {
    position: absolute;
    background: var(--md-sys-color-surface, #ffffff);
    border-radius: 14px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    z-index: 3;
    animation: floatCard 6s ease-in-out infinite;
}

.float-card--1 {
    top: 8%;
    left: -5%;
    animation-delay: 0s;
}

.float-card--2 {
    bottom: 15%;
    right: -8%;
    animation-delay: -3s;
}

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

.fc-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--md-sys-color-primary, #203448) 12%, transparent);
    color: var(--md-sys-color-primary, #203448);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.fc-green {
    background: color-mix(in srgb, var(--md-sys-color-secondary, #00a651) 12%, transparent);
    color: var(--md-sys-color-secondary, #00a651);
}

.fc-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface, #1a1c1e);
}

.fc-label {
    display: block;
    font-size: 0.72rem;
    color: var(--md-sys-color-on-surface-variant, #42474e);
}

/* ============================================================
   TRUSTED BY SECTION
   ============================================================ */

.trusted-section {
    padding: 1.25rem 0;
    background: #1a1c20;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trusted-label {
    text-align: center;
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.trusted-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trusted-stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e2e2e6;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4ade80;
}

.stat-desc {
    display: block;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.3rem;
    font-weight: 500;
}

/* ============================================================
   FEATURES BENTO GRID
   ============================================================ */

.features-section {
    padding: 2.5rem 0 5rem;
    background: var(--md-sys-color-surface, #ffffff);
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */

.testimonial-section {
    padding: 2.5rem 0 5rem;
    background: var(--md-sys-color-surface, #ffffff);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--md-sys-color-surface-container-low, #f7f9fc);
    border: 1px solid var(--md-sys-color-surface-container-highest, #e5e7eb);
    border-radius: 20px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.05);
}

.testimonial-stars {
    color: var(--md-sys-color-tertiary, #FF8C00);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.testimonial-card p {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--md-sys-color-on-surface, #1a1c1e);
    font-style: italic;
    margin-bottom: 1.25rem;
}

/* ============================================================
   PRICING SNAPSHOT
   ============================================================ */

.pricing-snapshot-section {
    padding: 2.5rem 0 5rem;
    background: var(--md-sys-color-surface-container-low, #f7f9fc);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
}

.pricing-card {
    background: var(--md-sys-color-surface, #ffffff);
    border: 1px solid var(--md-sys-color-surface-container-highest, #e5e7eb);
    border-radius: 24px;
    padding: 2rem 1.75rem;
    text-align: center;
    transition: all 0.35s cubic-bezier(0.2, 0, 0, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.pricing-card--featured {
    background: linear-gradient(180deg,
        var(--md-sys-color-surface, #ffffff) 0%,
        color-mix(in srgb, var(--md-sys-color-secondary, #00a651) 3%, var(--md-sys-color-surface, #ffffff)) 100%);
    border: 2px solid var(--md-sys-color-secondary, #00a651);
    box-shadow: 0 8px 30px rgba(0, 166, 81, 0.08);
    transform: scale(1.03);
}

.pricing-card--featured:hover {
    transform: scale(1.03) translateY(-4px);
}

.pricing-card--featured .btn.primary {
    background: var(--md-sys-color-secondary, #00a651);
    border-color: var(--md-sys-color-secondary, #00a651);
    color: white;
}

.pricing-card--featured .btn.primary:hover {
    background: var(--md-sys-color-tertiary, #FF8C00);
    color: var(--md-sys-color-on-tertiary, #ffffff);
    box-shadow: 0 8px 25px rgba(255, 140, 0, 0.3);
}

.pricing-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--md-sys-color-secondary, #00a651);
    color: white;
    padding: 0.2rem 0.9rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.5rem 0 0.75rem;
    color: var(--md-sys-color-on-surface, #1a1c1e);
}

.pricing-price {
    margin-bottom: 0.1rem;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface, #1a1c1e);
    letter-spacing: -0.02em;
}

.price-period {
    font-size: 0.9rem;
    color: var(--md-sys-color-on-surface-variant, #42474e);
    font-weight: 500;
}

.pricing-yearly {
    font-size: 0.95rem;
    color: var(--md-sys-color-on-surface, #1a1c1e);
    margin-top: 0.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    color: var(--md-sys-color-on-surface, #1a1c1e);
}

.pricing-features li i {
    color: var(--md-sys-color-secondary, #00a651);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.pricing-card .btn {
    margin-top: auto;
}

/* ============================================================
   RESPONSIVE: TABLET (max-width: 1024px)
   ============================================================ */

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

    .hero-text {
        order: 1;
        text-align: center;
    }

    .hero-visual {
        order: 0;
        max-width: 480px;
        margin: 0 auto;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .testimonial-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
        gap: 2rem;
    }

    .pricing-card--featured {
        transform: none;
    }

    .pricing-card--featured:hover {
        transform: translateY(-4px);
    }

    .trusted-stats {
        gap: 1.5rem;
    }

    .stat-divider {
        display: none;
    }

    .float-card--1 {
        left: -10%;
    }

    .float-card--2 {
        right: -10%;
    }
}

/* ============================================================
   RESPONSIVE: MOBILE (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {
    .hero-section {
        padding-top: 1rem;
        padding-bottom: 2rem;
        min-height: auto;
    }

    .hero-container {
        padding: 0 1rem;
    }

    .hero-text h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .phone-frame {
        width: 220px;
        height: 440px;
    }

    .float-card {
        padding: 0.6rem 0.8rem;
        gap: 0.4rem;
    }

    .float-card--1 {
        top: 2%;
        left: 0%;
    }

    .float-card--2 {
        bottom: 8%;
        right: -2%;
    }

    .fc-value { font-size: 0.78rem; }
    .fc-label { font-size: 0.65rem; }

    .trusted-stats {
        flex-direction: column;
        gap: 1.25rem;
    }

    .stat-divider {
        width: 48px;
        height: 1px;
    }

    .testimonial-grid {
        max-width: 100%;
    }

    .cta-card {
        padding: 1.5rem 1.5rem;
        border-radius: 24px;
    }

    .cta-card h2 {
        font-size: 1.5rem;
    }

    .cta-trust {
        gap: 1.5rem;
    }

    .hero-trust {
        gap: 1rem;
    }

    .trust-item {
        font-size: 0.78rem;
    }
}

/* ============================================================
   RESPONSIVE: SMALL MOBILE (max-width: 480px)
   ============================================================ */

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .cta-buttons .btn--lg {
        width: 100%;
        justify-content: center;
    }

    .phone-frame {
        width: 180px;
        height: 360px;
        border-radius: 30px;
    }

    .phone-screen {
        border-radius: 22px;
        padding: 0.6rem;
    }

    .mock-value {
        font-size: 1.3rem;
    }

    .mock-chart {
        height: 60px;
        gap: 4px;
    }

    .mock-txn {
        padding: 0.45rem 0.5rem;
        gap: 0.4rem;
    }

    .txn-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 0.6rem;
    }

    .txn-name { font-size: 0.68rem; }
    .txn-cat { font-size: 0.6rem; }
    .txn-amount { font-size: 0.7rem; }

    .float-card {
        display: none;
    }

    .pricing-cards {
        max-width: 100%;
    }

    .cta-trust {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

}
