/* CSS Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* CSS Variables */
:root {
    --bg-dark: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-yellow: #ffd700;
    --border-color: #333333;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --spacing-xxl: 6rem;
    --container-max-width: 1200px;
    --border-radius: 8px;
    --transition: all 0.2s ease;
}

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

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-yellow);
    color: var(--bg-dark);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--border-radius);
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 clamp(3rem, 6vw, 8rem);
}

/* Inline Language Options */
.language-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.language-option-inline {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 400;
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
}

.language-option-inline:hover,
.language-option-inline:focus {
    color: var(--accent-yellow);
    border-bottom-color: var(--accent-yellow);
    outline: none;
}

.language-option-inline.selected {
    color: var(--accent-yellow);
    border-bottom-color: var(--accent-yellow);
    font-weight: 600;
}

/* Main Content */
.main {
    min-height: calc(100vh - 100px);
}

/* Hero Section */
.hero {
    padding: var(--spacing-xl) 0 var(--spacing-lg) 0;
    text-align: center;
}

.hero-title {
    font-size: clamp(1.75rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin: var(--spacing-sm) auto 0 auto;
    max-width: 600px;
}

/* Article Content */
.article {
    padding: var(--spacing-xl) 0;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-paragraph {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

.article-paragraph strong {
    color: var(--accent-yellow);
    font-weight: 600;
}

/* Steps */
.steps {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-lg) 0;
}

.step {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
}

.step:last-child {
    margin-bottom: 0;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
    line-height: 1.3;
}

.step-title strong {
    color: var(--accent-yellow);
}

.step-content {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Call to Action */
.cta {
    padding: var(--spacing-xl) 0;
    text-align: center;
    background-color: rgba(255, 215, 0, 0.03);
}

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

.app-store-button {
    display: inline-block;
    text-decoration: none;
    transition: var(--transition);
}

.app-store-button:hover,
.app-store-button:focus {
    transform: scale(1.05);
    outline: 2px solid var(--accent-yellow);
    outline-offset: 4px;
}

.app-store-badge {
    height: 60px;
    width: auto;
    display: block;
}

/* Footer */
.footer {
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 1rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 3rem;
    }

    .container {
        padding: 0 clamp(1rem, 4vw, 2rem);
    }

    .hero-title {
        margin-bottom: var(--spacing-sm);
    }

    .article-paragraph {
        font-size: 1rem;
    }

    .step {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }

    .app-store-badge {
        height: 50px;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 0.75rem;
        --spacing-xl: 1.5rem;
        --spacing-xxl: 2rem;
    }

    .container {
        padding: 0 clamp(0.75rem, 3vw, 1.5rem);
    }

    .hero {
        padding: var(--spacing-lg) 0 var(--spacing-md) 0;
    }

    .article {
        padding: var(--spacing-lg) 0;
    }

    .step {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .step-title {
        font-size: 1.125rem;
    }

    .app-store-badge {
        height: 45px;
    }
}

/* Focus styles for better accessibility */
*:focus {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --bg-dark: #000000;
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --accent-yellow: #ffff00;
        --border-color: #ffffff;
    }
}

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

/* Print styles */
@media print {
    .cta,
    .footer {
        display: none;
    }

    .main {
        min-height: auto;
    }

    .hero {
        padding: var(--spacing-md) 0;
    }

    .article {
        padding: var(--spacing-md) 0;
    }

    body {
        color: #000;
        background: #fff;
    }
}
