/* BuddyFin Website Styles */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #007AFF;
    --primary-dark: #005FCC;
    --secondary-color: #FF9500;
    --accent-color: #34C759;
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --background: #FFFFFF;
    --surface: #F2F2F7;
    --border: #D1D1D6;
    --gradient: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --border-radius-large: 20px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s ease;
    --container-width: 1200px;
    --section-padding: 80px 0;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-light);
}

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

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-large {
    padding: 20px 40px;
    font-size: 1.1rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 40px;
    height: 40px;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

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

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

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #FBFBFD 0%, #F7F8FC 100%);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    position: relative;
    width: 300px;
    height: 600px;
    background: linear-gradient(135deg, #1D1D1F 0%, #333 100%);
    border-radius: 40px;
    padding: 20px;
    box-shadow: var(--shadow);
    transform: rotate(-5deg);
    transition: var(--transition);
}

.phone-mockup:hover {
    transform: rotate(0deg) scale(1.05);
}

.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.2rem;
}

/* Features Section */
.features {
    padding: var(--section-padding);
    background: var(--background);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

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

.feature-icon img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

.feature-title {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Screenshots Section */
.screenshots {
    padding: var(--section-padding);
    background: var(--surface);
}

.screenshots-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 0;
    scroll-snap-type: x mandatory;
}

.screenshot-item {
    flex: 0 0 280px;
    text-align: center;
    scroll-snap-align: center;
}

.screenshot-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.screenshot-caption h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.screenshot-caption p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Testimonials Section */
.testimonials {
    padding: var(--section-padding);
    background: var(--background);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border);
}

.testimonial-rating {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.testimonial-author strong {
    color: var(--text-primary);
    display: block;
}

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

/* CTA Section */
.cta {
    padding: var(--section-padding);
    background: var(--gradient);
    color: white;
    text-align: center;
}

.cta-title {
    color: white;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-buttons {
    margin-bottom: 2rem;
}

.download-btn img {
    height: 60px;
    transition: var(--transition);
}

.download-btn:hover img {
    transform: scale(1.05);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.feature-check {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    width: 40px;
    height: 40px;
}

.footer-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-features {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .screenshots-carousel {
        padding-left: 1rem;
    }
    
    .screenshot-item {
        flex: 0 0 220px;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Scroll Animations */
@media (prefers-reduced-motion: no-preference) {
    .feature-card,
    .testimonial-card,
    .screenshot-item {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .feature-card.in-view,
    .testimonial-card.in-view,
    .screenshot-item.in-view {
        opacity: 1;
        transform: translateY(0);
    }
}

/* High DPI / Retina Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo,
    .footer-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}