/* =============================================
   CSS VARIABLES & RESET
   ============================================= */

:root {
    /* Colors */
    --primary-purple: #667eea;
    --secondary-purple: #764ba2;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hover: linear-gradient(135deg, #7b92ff 0%, #8b5dba 100%);
    
    /* Neutrals */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    --spacing-4xl: 8rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* =============================================
   TYPOGRAPHY
   ============================================= */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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.125rem;
    line-height: 1.7;
    color: var(--gray-600);
}

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

/* =============================================
   LAYOUT
   ============================================= */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    padding: var(--spacing-4xl) 0;
}

/* =============================================
   NAVIGATION
   ============================================= */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--spacing-md) 0;
    transition: all var(--transition-normal);
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.nav-right {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.logo-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: color var(--transition-normal);
}

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

.nav-link-cta {
    background: var(--gradient);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-lg);
    font-weight: 600;
}

.nav-link-cta:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Nav App Store Button */
.nav-app-store-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--black);
    color: var(--white);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-normal);
}

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

.nav-app-store-btn .apple-logo {
    width: 18px;
    height: 18px;
}

.nav-app-store-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.nav-app-store-small {
    font-size: 0.5rem;
    font-weight: 400;
}

.nav-app-store-large {
    font-size: 0.85rem;
    font-weight: 600;
}

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

.hero {
    padding: calc(var(--spacing-4xl) + 60px) 0 var(--spacing-4xl);
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-gradient {
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: var(--gradient);
    opacity: 0.05;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-50px, 50px) scale(1.1);
    }
}

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

.hero-logo {
    width: 120px;
    height: auto;
    margin-bottom: var(--spacing-lg);
    animation: fadeInDown 0.8s ease-out;
}

.hero-title {
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* =============================================
   APP STORE BUTTON
   ============================================= */

.app-store-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--black);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.app-store-button:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.apple-logo-btn {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.app-store-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.app-store-small {
    font-size: 0.65rem;
    font-weight: 400;
}

.app-store-large {
    font-size: 1.25rem;
    font-weight: 600;
}

.app-store-badge {
    width: 160px;
    height: auto;
    filter: drop-shadow(var(--shadow-lg));
}

/* =============================================
   FEATURES SECTION
   ============================================= */

.features {
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-3xl);
}

.section-title {
    color: var(--gray-900);
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-200);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-purple);
}

.feature-icon {
    margin-bottom: var(--spacing-lg);
    display: flex;
}

.feature-title {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* =============================================
   SCREENSHOTS SECTION
   ============================================= */

.screenshots {
    background: var(--white);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.screenshot-mockup {
    display: flex;
    justify-content: center;
}

.phone-frame {
    width: 280px;
    background: var(--gray-900);
    border-radius: 2.5rem;
    padding: 0.75rem;
    box-shadow: var(--shadow-2xl);
    position: relative;
    transition: all var(--transition-normal);
}

.phone-frame:hover {
    transform: translateY(-10px) scale(1.02);
}

.phone-notch {
    position: absolute;
    top: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 24px;
    background: var(--gray-900);
    border-radius: 0 0 1rem 1rem;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    aspect-ratio: 9/19.5;
    background: var(--white);
    border-radius: 2rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.screenshot-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    transition: all var(--transition-normal);
}

.screenshot-image:hover {
    transform: translateY(-10px) scale(1.02);
}

/* =============================================
   CTA SECTION
   ============================================= */

.cta-section {
    background: var(--gradient);
    color: var(--white);
    text-align: center;
    padding: var(--spacing-4xl) 0;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    color: var(--white);
    margin-bottom: var(--spacing-md);
}

.cta-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-xl);
}

/* =============================================
   FOOTER
   ============================================= */

.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.footer-brand-text {
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.footer-link {
    color: var(--gray-400);
    font-size: 0.875rem;
    transition: color var(--transition-normal);
}

.footer-link:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--gray-800);
}

.footer-copyright {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* =============================================
   ANIMATIONS
   ============================================= */

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in.visible {
    opacity: 1;
}

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */

/* Mobile - up to 768px */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    /* Fix navbar for mobile */
    .nav .container {
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .nav-center {
        position: static;
        transform: none;
        gap: var(--spacing-sm);
    }

    .nav-link {
        font-size: 0.875rem;
    }

    .logo {
        font-size: 1rem;
    }

    .logo-icon {
        width: 24px;
        height: 24px;
    }

    .logo-text {
        display: none;
    }

    /* Smaller App Store button in nav */
    .nav-app-store-btn {
        padding: 0.3rem 0.5rem;
    }

    .nav-app-store-btn .apple-logo {
        width: 14px;
        height: 14px;
    }

    .nav-app-store-small {
        font-size: 0.4rem;
    }

    .nav-app-store-large {
        font-size: 0.7rem;
    }

    .hero {
        padding-top: calc(var(--spacing-3xl) + 60px);
        min-height: auto;
    }

    .hero-logo {
        width: 80px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

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

    .phone-frame {
        width: 240px;
    }

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

    .footer-links {
        justify-content: center;
    }
}

/* 320px - Mobile Small */
@media (max-width: 480px) {
    .nav-center {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }
}

/* 768px - Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1024px - Desktop */
@media (min-width: 1024px) {
    section {
        padding: var(--spacing-4xl) 0;
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .screenshots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 1440px - Large Desktop */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
}

/* =============================================
   ACCESSIBILITY
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-purple);
    outline-offset: 4px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --gray-600: #404040;
        --gray-700: #262626;
    }
}

/* =============================================
   UTILITY CLASSES
   ============================================= */

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

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
