/* ============================================
   CSS Variables - Brand Colors & Theming
   ============================================ */
:root {
    /* Brand Colors - Matching Screenshot */
    --color-primary: #667eea;
    --color-primary-light: #8b7ee8;
    --color-secondary: #764ba2;
    --color-accent: #f093fb;
    --color-pink: #f093fb;
    
    /* Neutral Colors */
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #4a5568;
    --color-text-light: #718096;
    --color-white: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-white: #ffffff;
    --color-bg-dark: #1a1a2e;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(180deg, #ffffff 0%, #f0f4ff 50%, #e8edff 100%);
    --gradient-cta: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    --gradient-text: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    
    /* Typography */
    --font-family: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Container */
    --container-max-width: 1200px;
    --container-padding: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    color: var(--color-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    background: var(--color-bg-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ============================================
   Container
   ============================================ */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
}

/* ============================================
   Hero Section - Light Gradient Background
   ============================================ */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl) 0;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    z-index: 1;
}

.hero-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto var(--spacing-lg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    background: var(--color-white);
    padding: var(--spacing-sm);
    object-fit: contain;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.03em;
}

.hero-title-main {
    display: block;
    color: var(--color-text-primary);
}

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

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 1rem 2rem;
    border-radius: var(--radius-full);
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
    text-align: center;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-icon,
.btn-icon-right {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

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

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

.btn-primary:active {
    transform: translateY(0);
}

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

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

/* ============================================
   Hero Rating
   ============================================ */
.hero-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ffc107;
    font-size: 1.2rem;
    line-height: 1;
}

.rating-text {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    font-size: 0.95rem;
}

.downloads-text {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Screenshot Carousel Section - Phone Mockups
   ============================================ */
.screenshots-section {
    padding: var(--spacing-xl) 0 var(--spacing-3xl);
    background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 50%, #f0f4ff 100%);
    position: relative;
    overflow: hidden;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: var(--font-weight-bold);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

.carousel-container {
    position: relative;
    max-width: 1800px;
    margin: 0 auto;
    padding: var(--spacing-md) 0 var(--spacing-2xl);
    overflow: hidden;
}

.carousel-light-effects {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.light-streak {
    position: absolute;
    top: 20%;
    width: 200px;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
}

.light-streak-left {
    left: 10%;
}

.light-streak-right {
    right: 10%;
}

.phone-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 650px;
    width: 100%;
    perspective: 1200px;
    z-index: 2;
    overflow: visible;
}

.carousel-tap-area {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 10;
    cursor: pointer;
    user-select: none;
}

.carousel-tap-left {
    left: 0;
}

.carousel-tap-right {
    right: 0;
}

.phone-slide {
    position: absolute;
    width: 280px;
    height: 560px;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                filter 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
}

.phone-mockup {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    background: #1a1a1a;
    padding: 10px;
    position: relative;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
    z-index: 10;
}

.phone-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

/* Carousel positioning - center focused with fade (7 slides, showing 5 at a time)
   Initial state: index 3 is center (4th dot active)
   Note: These are initial positions, JavaScript will update them dynamically */
.phone-slide[data-index="0"] {
    transform: translateX(-840px) scale(0.75) translateZ(-150px);
    opacity: 0.4;
    filter: blur(4px);
}

.phone-slide[data-index="1"] {
    transform: translateX(-560px) scale(0.85) translateZ(-80px);
    opacity: 0.6;
    filter: blur(2px);
}

.phone-slide[data-index="2"] {
    transform: translateX(-280px) scale(0.92) translateZ(-40px);
    opacity: 0.75;
    filter: blur(1px);
}

.phone-slide[data-index="3"] {
    transform: translateX(0) scale(1) translateZ(0);
    opacity: 1;
    filter: blur(0);
    z-index: 5;
}

.phone-slide[data-index="4"] {
    transform: translateX(280px) scale(0.92) translateZ(-40px);
    opacity: 0.75;
    filter: blur(1px);
}

.phone-slide[data-index="5"] {
    transform: translateX(560px) scale(0.85) translateZ(-80px);
    opacity: 0.6;
    filter: blur(2px);
}

.phone-slide[data-index="6"] {
    transform: translateX(840px) scale(0.75) translateZ(-150px);
    opacity: 0.4;
    filter: blur(4px);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: var(--spacing-2xl);
    flex-wrap: wrap;
    z-index: 3;
    position: relative;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.carousel-dot:hover {
    background: var(--color-primary-light);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--gradient-primary);
    width: 32px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    padding: var(--spacing-3xl) 0;
    background: var(--color-bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    text-align: center;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(102, 126, 234, 0.2);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
    border-radius: var(--radius-md);
    color: var(--color-primary);
    transition: transform var(--transition-base);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-primary);
}

.feature-card p {
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ============================================
   CTA Section - Gradient Background
   ============================================ */
.cta-section {
    padding: var(--spacing-3xl) 0;
    background: var(--gradient-cta);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.cta-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

/* ============================================
   Footer - Dark Background
   ============================================ */
.footer {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-dark);
    color: var(--color-white);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    text-align: center;
}

.footer-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    object-fit: contain;
}

.footer-nav {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-nav a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: var(--spacing-xs);
}

/* ============================================
   Animations
   ============================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 4rem;
    }
    
    .hero {
        min-height: 90vh;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-logo {
        width: 80px;
        height: 80px;
    }
    
    .hero-rating {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .phone-carousel {
        height: 550px;
    }
    
    .phone-slide {
        width: 220px;
        height: 440px;
    }
    
    .light-streak {
        width: 150px;
    }
    
    .light-streak-left {
        left: 5%;
    }
    
    .light-streak-right {
        right: 5%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-nav {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .phone-carousel {
        height: 450px;
    }
    
    .phone-slide {
        width: 180px;
        height: 360px;
    }
    
    .light-streak {
        width: 100px;
    }
}

/* ============================================
   Touch Support for Mobile
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .feature-card:hover {
        transform: none;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for keyboard navigation */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .hero,
    .cta-section,
    .carousel-dots,
    .btn,
    .footer {
        display: none;
    }
}
