/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ChipScan dark theme palette */
    --bg: #1A1A1A;            /* deep charcoal background */
    --surface: #2A2A2A;        /* card/section surface */
    --surface-2: #333333;      /* elevated surface */
    --border: #3A3A3A;         /* subtle borders */
    /* Brand palette, from tools/generate_brand.py. The felt and chip hues are
       sampled medians from the real photos in test/images/; the values here are
       lifted for contrast against the dark background. */
    --primary: #D2701F;        /* poker-felt orange (the mark's plate) */
    --primary-dark: #8A430F;
    --primary-light: #E8874A;
    --accent: #12A891;         /* chip teal-jade (the mark's top chip) */
    --text: #F5F5F5;           /* high-contrast white */
    --text-muted: #B8B8B8;     /* secondary text */
    --text-dim: #888888;       /* tertiary text */
    --gradient: linear-gradient(135deg, #D2701F 0%, #12A891 100%);

    /* Backwards-compat aliases used across pages */
    --dark: var(--bg);
    --dark-light: var(--surface);
    --gray: var(--text-muted);
    --gray-light: var(--text-dim);
    --gray-lighter: var(--surface);
    --white: var(--text);
    --secondary: var(--accent);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.logo-image {
    width: 36px;
    height: 36px;
}

.logo-icon {
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: 0.3s;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(210, 112, 31, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Section */
.hero {
    padding: 140px 0 80px;
    background: radial-gradient(ellipse at top, rgba(210, 112, 31, 0.12) 0%, rgba(26, 26, 26, 0) 60%), var(--bg);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hero-note {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.arrow {
    transition: transform 0.3s;
}

.btn-primary:hover .arrow {
    transform: translateX(4px);
}

/* Hero visual — chip stack mockup */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-frame {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 9 / 16;
    background: linear-gradient(180deg, #0f1715 0%, #1c2a23 100%);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.scan-frame::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 2px dashed rgba(210, 112, 31, 0.6);
    border-radius: 20px;
    pointer-events: none;
}

.scan-frame::after {
    content: "6 CHIPS COUNTED";
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 168, 145, 0.92);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    padding: 6px 14px;
    border-radius: 12px;
}

.scan-frame .chip-vis {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scan-frame .chip-vis img,
.scan-frame .chip-vis svg {
    width: 70%;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(210, 112, 31, 0.35));
}

/* Sections */
.features,
.how-it-works,
.benefits,
.download-section,
.pricing,
.screenshots {
    padding: 80px 0;
}

.features {
    background: var(--bg);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Privacy banner — the lead-with-privacy strip */
.privacy-banner {
    background: linear-gradient(135deg, rgba(18, 168, 145, 0.15) 0%, rgba(210, 112, 31, 0.08) 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 36px 0;
}

.privacy-banner-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.privacy-banner-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.privacy-banner h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.privacy-banner p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.feature-icon svg {
    width: 48px;
    height: 48px;
}

.feature-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* How It Works */
.how-it-works {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.how-it-works .section-subtitle {
    color: var(--text-muted);
}

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

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    color: #fff;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.step-content p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Benefits Section */
.benefits {
    background: var(--bg);
}

.benefits-content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.benefits-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
}

.lead {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.benefits-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefits-list li {
    display: flex;
    gap: 1rem;
}

.check {
    width: 26px;
    height: 26px;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
}

.benefits-list strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.benefits-list p {
    color: var(--text-muted);
}

/* Pricing (minimal) */
.pricing {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.pricing-simple {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.pricing-simple .price-tag {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0 0.5rem;
}

.pricing-simple p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: var(--gradient);
    color: #fff;
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta .btn-primary {
    background: var(--bg);
    color: var(--primary);
}

.cta .btn-primary:hover {
    background: #000;
    color: var(--primary-light);
}

/* Footer */
.footer {
    background: #0f0f0f;
    color: var(--text);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: var(--text);
}

.footer-column a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
}

.footer-bottom-left {
    flex: 1;
}

.footer-version {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.footer-disclaimer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.footer-disclaimer p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Page Styles (about, privacy, terms, support, etc.) */
.page-hero {
    padding: 140px 0 60px;
    background: radial-gradient(ellipse at top, rgba(210, 112, 31, 0.15) 0%, rgba(26, 26, 26, 0) 70%), var(--bg);
    color: var(--text);
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.page-content {
    padding: 60px 0;
    background: var(--bg);
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.content-section h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text);
}

.content-section p {
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.content-section ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-section li {
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.content-section strong {
    color: var(--text);
}

.content-section a {
    color: var(--primary);
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

/* Guide steps */
.guide-step {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.guide-step:last-child {
    border-bottom: none;
}

.guide-number {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.guide-content {
    flex: 1;
}

.guide-content h2 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.guide-content h3 {
    font-size: 1.15rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.tips-list {
    list-style: none;
    margin-left: 0 !important;
}

.tips-list li {
    padding: 1rem;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--primary);
}

/* FAQ */
.faq-list {
    margin-top: 2rem;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.75rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.faq-item h3 {
    color: var(--primary);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.faq-item p {
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.faq-item a:hover {
    text-decoration: underline;
}

/* Contact info / boxes */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-item {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 1.75rem;
    border-radius: 12px;
}

.contact-item h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.contact-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-top: 0.5rem;
}

.contact-link:hover {
    text-decoration: underline;
}

.highlight-box {
    background: rgba(18, 168, 145, 0.12);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    color: var(--text);
    font-weight: 500;
}

.warning-box {
    background: rgba(210, 112, 31, 0.1);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    color: var(--text);
}

.contact-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}

.contact-box p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.legal-content {
    max-width: 900px;
    margin: 0 auto;
}

/* Download cards */
.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.download-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s;
}

.download-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.4);
}

.download-icon {
    margin-bottom: 1rem;
}

.download-icon svg {
    width: 48px;
    height: 48px;
}

.download-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.download-card p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Cookie consent (unused on native-app site but kept for compatibility) */
.cookie-consent {
    display: none;
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content,
    .benefits-content,
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .scan-frame {
        max-width: 280px;
        margin: 0 auto;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .benefits-list li {
        text-align: left;
    }

    .privacy-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .guide-step {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 110px 0 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta a {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 1.85rem;
    }

    .cta h2 {
        font-size: 1.85rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .page-title {
        font-size: 2.1rem;
    }
}
