/* ============================================
   Billy — Landing Page
   ============================================ */

:root {
    --bg: #14141f;
    --bg-alt: #1a1a2e;
    --surface: #202038;
    --surface-high: #2a2a4a;
    --border: #33334f;
    --primary: #4fc3f7;
    --primary-dim: #3aa8db;
    --text: #f4f4fb;
    --text-secondary: #a0a0b8;
    --success: #66bb6a;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --max-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: "Manrope", "Inter", sans-serif;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

img, svg {
    display: block;
}

.page {
    overflow-x: clip;
}

/* ---- Shared ---- */
.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0 0 12px;
}

.section-head {
    max-width: 640px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 38px);
    margin-bottom: 14px;
}

.section-sub {
    font-size: 17px;
}

/* ---- Nav ---- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(20, 20, 31, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--text);
}

.brand-mark {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    object-fit: cover;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 15px;
    font-weight: 500;
}

.nav-links a {
    color: var(--text-secondary);
    transition: color 0.15s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cta {
    background: var(--primary);
    color: #0d1b22 !important;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 700;
}

.nav-cta:hover {
    background: var(--primary-dim);
}

.nav-toggle-input {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    padding: 96px 24px 80px;
    overflow: clip;
}

.hero-glow {
    position: absolute;
    top: -180px;
    right: -120px;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(79, 195, 247, 0.28), transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero-sub {
    font-size: 18px;
    max-width: 480px;
    margin-bottom: 32px;
}

.hero-note {
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ---- Store badges ---- */
.store-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.store-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 18px;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.store-badge:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    background: var(--surface-high);
}

.store-badge-disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.store-icon {
    width: 26px;
    height: 26px;
    color: var(--text);
    flex-shrink: 0;
}

.store-text {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.store-text small {
    font-weight: 400;
    font-size: 11px;
    color: var(--text-secondary);
}

/* ---- Hero visual: phone mockup ---- */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone {
    position: relative;
    width: 260px;
    background: linear-gradient(160deg, var(--surface-high), var(--bg-alt));
    border: 6px solid #0d0d18;
    border-radius: 36px;
    padding: 14px 12px;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.phone-notch {
    width: 70px;
    height: 16px;
    background: #0d0d18;
    border-radius: 0 0 12px 12px;
    margin: 0 auto 10px;
}

.phone-screen {
    background: var(--bg-alt);
    border-radius: 20px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mock-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.mock-total {
    color: var(--primary);
}

.mock-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.mock-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #0d1b22;
    flex-shrink: 0;
}

.mock-name {
    flex: 1;
    color: var(--text);
    font-weight: 600;
}

.mock-amount {
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.mock-cta {
    margin-top: 8px;
    background: var(--primary);
    color: #0d1b22;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    padding: 10px;
    border-radius: 10px;
}

.float-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
    animation: float 4s ease-in-out infinite;
}

.chip-scan {
    top: 14%;
    left: -30px;
    color: var(--primary);
}

.chip-settled {
    bottom: 10%;
    right: -20px;
    color: var(--success);
    animation-delay: 1.4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ---- Features ---- */
.features {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 96px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(79, 195, 247, 0.4);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--tint) 16%, transparent);
    color: var(--tint);
    margin-bottom: 18px;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p {
    font-size: 14.5px;
}

/* ---- How it works ---- */
.how {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 24px 96px;
}

.how-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.how-step {
    flex: 1;
    max-width: 280px;
    text-align: center;
    padding: 0 16px;
}

.how-num {
    display: inline-block;
    font-family: "Manrope", sans-serif;
    font-weight: 800;
    font-size: 15px;
    color: var(--primary);
    background: rgba(79, 195, 247, 0.12);
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    margin-bottom: 16px;
}

.how-step h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.how-step p {
    font-size: 14.5px;
}

.how-connector {
    flex: 0 0 auto;
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, var(--border), var(--primary), var(--border));
    margin-top: 20px;
}

/* ---- Download CTA ---- */
.download {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 120px;
}

.download-card {
    position: relative;
    overflow: clip;
    background: linear-gradient(135deg, var(--surface-high), var(--bg-alt));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 64px 48px;
    text-align: center;
}

.download-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(79, 195, 247, 0.22), transparent 60%);
    pointer-events: none;
}

.download-copy {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.download-copy h2 {
    font-size: clamp(26px, 4vw, 36px);
    color: var(--text);
}

.download-copy p {
    font-size: 16px;
    max-width: 440px;
    margin-bottom: 8px;
}

/* ---- Footer ---- */
.footer {
    border-top: 1px solid var(--border);
    padding: 48px 24px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.footer-tag {
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
    font-size: 14px;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-copy {
    font-size: 13px;
    color: #6a6a82;
    margin-top: 8px;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        order: -1;
        margin-bottom: 12px;
        transform: scale(0.85);
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .how-steps {
        flex-direction: column;
        align-items: center;
        gap: 32px;
    }

    .how-connector {
        display: none;
    }
}

@media (max-width: 640px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        background: var(--bg-alt);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px 20px;
        transform: translateY(-8px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .nav-links a {
        padding: 10px 0;
        width: 100%;
    }

    .nav-cta {
        margin-top: 8px;
        text-align: center;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle-input:checked ~ .nav-links {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .download-card {
        padding: 40px 24px;
    }

    .store-badges {
        justify-content: center;
    }
}

/* ---- Error / NotFound fallback pages ---- */
.fallback-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    gap: 12px;
}

.fallback-page h1 {
    font-size: clamp(32px, 6vw, 48px);
    color: var(--text);
}

.fallback-page p {
    font-size: 16px;
    max-width: 420px;
}

/* ---- Legal pages (Terms / Privacy) ---- */
.legal {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 96px;
}

.legal-header {
    margin-bottom: 40px;
}

.legal-header h1 {
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 10px;
}

.legal-updated {
    font-size: 14px;
    color: var(--text-secondary);
}

.legal section {
    margin-bottom: 36px;
}

.legal h2 {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 12px;
}

.legal p {
    font-size: 15px;
    margin-bottom: 12px;
}

.legal p:last-child {
    margin-bottom: 0;
}

.legal ul {
    margin: 0 0 12px;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.legal li {
    margin-bottom: 6px;
}

.legal a.legal-link {
    color: var(--primary);
    text-decoration: underline;
}

.legal strong {
    color: var(--text);
}

.fallback-page .nav-cta {
    margin-top: 16px;
}
