/* ── Design Tokens ─────────────────────────────────────────── */

:root {
    --bg-primary: #172554;
    --bg-gradient-indigo: #312E81;
    --bg-gradient-blue: #1E3A8A;
    --surface-card: #1C2840;
    --border-card: #29334A;
    --brand-blue: #60A5FA;
    --text-primary: #FFFFFF;
    --text-soft: #D2D4D9;
    --text-faint: #6B7383;

    --radius-md: 12px;
    --radius-lg: 16px;
    --max-width: 780px;
}

/* ── Font Face ────────────────────────────────────────────── */

@font-face {
    font-family: "SF Pro";
    src: url("fonts/SF-Pro-Text-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "SF Pro";
    src: url("fonts/SF-Pro-Text-Semibold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ── Reset & Base ─────────────────────────────────────────── */

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

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

body {
    font-family: "SF Pro", -apple-system, system-ui, sans-serif;
    font-weight: 400;
    color: var(--text-soft);
    background: linear-gradient(to bottom right, var(--bg-primary), var(--bg-gradient-indigo), var(--bg-gradient-blue));
    min-height: 100vh;
    line-height: 1.6;
}

a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: opacity 0.15s ease;
}

a:hover {
    opacity: 0.8;
}

/* ── Layout ───────────────────────────────────────────────── */

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

/* ── Hero (index page) ────────────────────────────────────── */

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 24px 60px;
    gap: 20px;
}

.hero-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    object-fit: cover;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--brand-blue);
    font-weight: 600;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-soft);
    max-width: 480px;
    line-height: 1.6;
}

.app-store-badge {
    display: inline-block;
    margin-top: 8px;
}

.app-store-badge img {
    height: 54px;
    width: auto;
}

/* ── Screenshots ─────────────────────────────────────────── */

.screenshots {
    padding: 48px 24px 64px;
    background: radial-gradient(
        ellipse at 50% 50%,
        rgba(96, 165, 250, 0.08) 0%,
        transparent 70%
    );
}

.screenshots-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    max-width: 960px;
    margin: 0 auto;
}

.screenshot {
    width: 280px;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ── How It Works ────────────────────────────────────────── */

.how-it-works {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 24px 80px;
    text-align: center;
}

.how-it-works-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 48px;
    letter-spacing: -0.01em;
}

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

.step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface-card);
    border: 1px solid var(--border-card);
    color: var(--brand-blue);
    font-size: 1rem;
    font-weight: 600;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.step-description {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.5;
}

.step:not(:last-child)::after {
    content: "\2192";
    position: absolute;
    right: -24px;
    top: 8px;
    color: var(--text-faint);
    font-size: 1.25rem;
}

/* ── About ───────────────────────────────────────────────── */

.about {
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 32px;
    font-size: 0.9rem;
    color: var(--text-faint);
}

/* ── CTA Button (fallback if no badge image) ──────────────── */

.cta-button {
    display: inline-block;
    padding: 14px 36px;
    background-color: var(--brand-blue);
    color: var(--bg-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.15s ease;
    text-decoration: none;
}

.cta-button:hover {
    opacity: 0.85;
}

/* ── Legal Pages ──────────────────────────────────────────── */

.legal-page {
    padding: 48px 24px 80px;
}

.legal-page .container {
    max-width: var(--max-width);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    color: var(--brand-blue);
    margin-bottom: 32px;
}

.back-link::before {
    content: "\2190";
}

.card {
    background-color: var(--surface-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
}

.card h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.card .last-updated {
    font-size: 0.85rem;
    color: var(--text-faint);
    margin-bottom: 32px;
}

.card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 12px;
}

.card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 8px;
}

.card p {
    margin-bottom: 14px;
    line-height: 1.7;
}

.card ul {
    margin-bottom: 14px;
    padding-left: 24px;
}

.card li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.card strong {
    color: var(--text-primary);
    font-weight: 600;
}

.card hr {
    border: none;
    border-top: 1px solid var(--border-card);
    margin: 32px 0;
}

.card em {
    color: var(--text-faint);
    font-style: italic;
}

/* ── Footer ───────────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 48px 24px;
    font-size: 0.85rem;
    color: var(--text-faint);
    border-top: 1px solid var(--border-card);
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer p {
    margin-bottom: 4px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-faint);
    transition: color 0.15s ease;
}

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

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-tagline {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .screenshots {
        padding-top: 32px;
        padding-bottom: 40px;
    }

    .screenshots-row {
        overflow-x: auto;
        justify-content: flex-start;
        padding: 0 24px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .screenshot {
        flex-shrink: 0;
        width: 200px;
        scroll-snap-align: center;
    }

    .how-it-works {
        padding: 48px 24px 48px;
    }

    .about {
        padding: 0 24px 40px;
    }

    .card {
        padding: 28px 20px;
    }

    .card h1 {
        font-size: 1.4rem;
    }

    .card h2 {
        font-size: 1.1rem;
    }
}
