:root {
    --color-primary: #1a1a2e;
    --color-secondary: #16213e;
    --color-accent: #0f4c75;
    --color-highlight: #3282b8;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg: #fff;
    --color-bg-alt: #f8f9fa;
    --color-border: #e0e0e0;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --border-radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-bg);
}

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
    color: #fff;
    padding: var(--spacing-xl) 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.app-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.app-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 500px;
    line-height: 1.7;
}

.app-store-badge img,
.testflight-badge img {
    height: 54px;
    transition: transform 0.2s ease;
}

.app-store-badge:hover img,
.testflight-badge:hover img {
    transform: scale(1.05);
}

/* iPhone Mockup */
.phone-mockup {
    display: flex;
    justify-content: center;
}

.phone-frame {
    position: relative;
    width: 280px;
    height: 570px;
    background: #1a1a1a;
    border-radius: 44px;
    padding: 12px;
    box-shadow:
        0 50px 100px rgba(0, 0, 0, 0.4),
        inset 0 0 0 2px #333,
        inset 0 0 0 4px #1a1a1a;
}

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

.phone-frame::after {
    content: '';
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: #333;
    border-radius: 3px;
}

.screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
    background: var(--color-secondary);
}

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

.features h2,
.algorithms h2,
.cta h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--color-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--color-bg-alt);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

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

.feature-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

/* Algorithms Section */
.algorithms {
    padding: var(--spacing-xl) 0;
    background: var(--color-bg-alt);
}

.section-intro {
    text-align: center;
    color: var(--color-text-light);
    margin-top: calc(-1 * var(--spacing-md));
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

.algorithms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.algorithm-card {
    background: var(--color-bg);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.algorithm-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-accent);
}

.algorithm-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.disclaimer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-light);
    max-width: 800px;
    margin: var(--spacing-md) auto 0;
    font-style: italic;
}

/* CTA Section */
.cta {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #fff;
    text-align: center;
}

.cta h2 {
    color: #fff;
    margin-bottom: var(--spacing-sm);
}

.cta p {
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.cta-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.cta-badges .app-store-badge img,
.cta-badges .testflight-badge img {
    width: 162px;
    height: 54px;
    object-fit: contain;
}

/* Footer */
footer {
    padding: var(--spacing-md) 0;
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
}

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

footer nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer nav a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {

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

@media (max-width: 768px) {
    .hero {
        padding: var(--spacing-lg) 0;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .app-info {
        align-items: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .tagline {
        max-width: 100%;
    }

    .phone-mockup {
        order: -1;
    }

    .phone-frame {
        width: 220px;
        height: 450px;
        border-radius: 36px;
        padding: 10px;
    }

    .phone-frame::before {
        top: 10px;
        width: 80px;
        height: 22px;
    }

    .phone-frame::after {
        bottom: 12px;
        width: 100px;
        height: 4px;
    }

    .screenshot {
        border-radius: 26px;
    }

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

    .features h2,
    .algorithms h2,
    .cta h2 {
        font-size: 2rem;
    }

    footer .container {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
}