/* CSS Reset & Variables */
:root {
    --primary: #FF9F0A;
    /* Sunset Amber from app */
    --background: #000000;
    --background-secondary: #0a0a0a;
    /* Slightly lighter for cards */
    --surface: #1C1C1E;
    --text: #FFFFFF;
    --text-secondary: #8E8E93;
    --border: #38383A;
    --radius: 20px;
    --radius-sm: 12px;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --spacing-container: 1200px;
}

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

body {
    /* Subtle "highly black" gradient for depth */
    background: radial-gradient(circle at 50% -20%, #1C1C1E 0%, #000000 60%);
    background-color: var(--background);
    /* Fallback */
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

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

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

/* Header */
/* Header */
header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    width: 100%;
}

.header-container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 24px 20px;
    /* Aligned with main content padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
}

.lang-btn {
    background: none;
    color: var(--text-secondary);
    border: none;
    padding: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.lang-btn:hover {
    color: var(--text);
}

.lang-btn.active {
    color: var(--primary);
    transform: scale(1.05);
}

.divider {
    color: var(--text-secondary);
    opacity: 0.5;
    font-size: 14px;
}

/* Main Layout */
/* Main Layout */
main>section {
    padding: 80px 20px;
    max-width: var(--spacing-container);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    /* Ensure it takes width up to max-width */
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 140px;
    /* Space for header */
}

.hero h1 {
    font-size: 48px;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #FFFFFF 0%, #E5E5E5 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-tagline {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #FFFFFF 0%, #E5E5E5 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.hero .subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero .description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.store-badge {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s;
    height: 48px;
    /* Fixed height for consistency */
}

.store-badge img {
    height: 100%;
    width: auto;
    display: block;
}

.store-badge:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.hero-video-frame {
    width: 280px;
    margin: 0;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

.hero-video-frame video {
    width: 100%;
    height: auto;
    display: block;
}

@media (min-width: 768px) {
    .hero-video-frame {
        width: 320px;
    }
}

.hero-image {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Gallery Section */
.app-gallery-section {
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(to bottom, var(--background) 0%, var(--background-secondary) 100%);
}

.gallery-title {
    font-size: 32px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.app-gallery {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    padding-top: 20px;
    /* Prevent clipping on hover */
    /* Hide scrollbar spacing if needed, though mostly hidden via CSS */
    display: flex;
    justify-content: flex-start;
    /* Alignment */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.app-gallery::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.app-gallery {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.gallery-track {
    display: flex;
    padding: 0 max(20px, calc((100vw - var(--spacing-container)) / 2 + 20px));
    gap: 24px;
}

.gallery-item {
    flex: 0 0 auto;
    width: 260px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 4px solid var(--border);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item figcaption {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    background: var(--surface);
}

.phone-frame {
    width: 280px;
    border-radius: 46px;
    overflow: hidden;
    box-shadow:
        0 0 0 2px #3a3a3c,
        /* Outer subtle metallic rim */
        0 50px 100px -20px rgba(0, 0, 0, 0.8);
    /* Deep shadow */
    background: #000;
    border: 8px solid #121212;
    /* Thinner, darker bezel */
    box-sizing: content-box;
    /* Ensure image fits inside without shrinking weirdly if specific sizing used */
}

.phone-frame video {
    width: 100%;
    height: auto;
    display: block;
}

/* How It Works */
.how-it-works {
    text-align: center;
}

.how-it-works h2 {
    font-size: 36px;
    margin-bottom: 60px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.step-card {
    background: var(--surface);
    padding: 24px 20px;
    border-radius: var(--radius);
    text-align: left;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 159, 10, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile-first: inline number + title layout */
.step-card .step-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.step-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.5;
    flex-shrink: 0;
}

.step-card h3 {
    font-size: 20px;
    margin: 0;
}

.step-card p {
    color: var(--text-secondary);
}

/* Desktop: restore stacked layout with larger number */
@media (min-width: 768px) {
    .step-card {
        padding: 40px 30px;
    }

    .step-card .step-header {
        display: block;
    }

    .step-number {
        font-size: 40px;
        margin-bottom: 16px;
    }

    .step-card h3 {
        font-size: 22px;
        margin-bottom: 12px;
    }
}

/* Why Ayer */
.why-ayer {
    background: var(--background-secondary);
    border-radius: var(--radius);
    margin: 40px auto;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 50px;
}

.feature h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 20px;
}

.feature p {
    color: var(--text-secondary);
}

/* Personas */
.personas {
    text-align: center;
}

.personas h2 {
    font-size: 28px;
    margin-bottom: 30px;
}

.persona-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.persona {
    background: var(--surface);
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-align: left;
}

/* Mobile: inline icon + title */
.persona .persona-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.persona .icon {
    font-size: 24px;
    flex-shrink: 0;
}

.persona h3 {
    margin: 0;
    color: var(--text);
    font-size: 14px;
}

.persona p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Desktop: restore centered stacked layout */
@media (min-width: 768px) {
    .personas h2 {
        font-size: 32px;
        margin-bottom: 50px;
    }

    .persona-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
    }

    .persona {
        padding: 24px;
        flex: 1 1 200px;
        max-width: 250px;
        text-align: center;
    }

    .persona .persona-header {
        display: block;
    }

    .persona .icon {
        font-size: 32px;
        margin-bottom: 16px;
        display: block;
    }

    .persona h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .persona p {
        font-size: 14px;
    }
}

/* Privacy Pledge */
.privacy-pledge {
    text-align: center;
    background: radial-gradient(circle at center, #1C1C1E 0%, #000000 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 60px auto;
    padding: 60px !important;
}

.privacy-pledge h2 {
    margin-bottom: 16px;
}

.pledge-main {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--primary);
}

.pledge-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.pledge-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pledge-list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
}

.pledge-note {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ */
.faq {
    max-width: 800px;
    margin: 0 auto;
    /* Ensure centering */
    text-align: center;
}

.faq h2 {
    text-align: center;
    margin-bottom: 40px;
}

.faq-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.faq-item h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.faq-item p {
    color: var(--text-secondary);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 60px 20px;
    text-align: center;
}

.footer-links {
    margin-bottom: 24px;
}

.footer-links a {
    margin: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text);
}

.copyright {
    color: #48484A;
    font-size: 12px;
}

/* Responsive */
@media (min-width: 768px) {
    .hero {
        padding-top: 180px;
    }

    .hero h1 {
        font-size: 72px;
    }

    .phone-frame {
        width: 320px;
    }

    .hero-content {
        margin-bottom: 80px;
    }

    .hero-tagline {
        font-size: 72px;
    }
}