/* ============================================
   SimpleStatsTracker — Design System & Styles
   ============================================ */

/* --- CSS Variables / Design Tokens --- */
:root {
    /* Brand colors */
    --color-primary: #667eea;
    --color-primary-dark: #5567d4;
    --color-primary-light: #8b9ef0;
    --color-accent: #764ba2;
    --color-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Neutrals */
    --color-text: #1a1a2e;
    --color-text-secondary: #555;
    --color-text-muted: #777;
    --color-bg: #ffffff;
    --color-bg-alt: #f7f8fc;
    --color-bg-dark: #1a1a2e;
    --color-border: #e5e7eb;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-base: 1rem;
    --font-size-sm: 0.9rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --line-height: 1.6;

    /* Spacing */
    --section-padding: 100px 0;
    --section-padding-mobile: 60px 0;
    --container-max: 1140px;
    --container-padding: 0 24px;

    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 8px 25px rgba(102, 126, 234, 0.35);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 50px;
    --transition: 0.3s ease;
}


/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
    color: var(--color-primary-dark);
}

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


/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--transition);
}

.nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: var(--font-size-xl);
    color: var(--color-text);
    text-decoration: none;
}

.nav-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition);
}

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

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-gradient);
    color: #fff !important;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: transform var(--transition), box-shadow var(--transition);
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
    color: #fff !important;
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition);
}


/* --- Hero Section --- */
.hero {
    padding: 140px 0 100px;
    background: var(--color-bg-alt);
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-badge {
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-primary);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--color-text);
}

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

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: 36px;
    max-width: 500px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.hero-phone-frame {
    width: 280px;
    height: 560px;
    background: var(--color-gradient);
    border-radius: 36px;
    padding: 12px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.hero-phone-screen {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 26px;
}

.hero-phone-placeholder {
    text-align: center;
    color: var(--color-text-muted);
    padding: 24px;
}

.hero-phone-placeholder .placeholder-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin: 0 auto 16px;
}

.hero-phone-placeholder p {
    font-size: var(--font-size-sm);
}


/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-family);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-gradient);
    color: #fff;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-base);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--color-text-secondary);
    padding: 14px 24px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-base);
    border: 2px solid var(--color-border);
}

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

.btn-white {
    background: #fff;
    color: var(--color-primary);
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-size: var(--font-size-base);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-primary);
}

.btn-icon {
    width: 20px;
    height: 20px;
}


/* --- Section Shared --- */
.section {
    padding: var(--section-padding);
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 60px;
}

.section-label {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-header p {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
}


/* --- Problem Section --- */
.problem {
    text-align: center;
}

.problem-card {
    max-width: 780px;
    margin: 0 auto;
    background: var(--color-bg-dark);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 60px 48px;
}

.problem-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}

.problem-card p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.75);
    max-width: 540px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.problem-card .btn-white {
    margin-top: 8px;
}


/* --- Features Section --- */
.feature-row {
    display: flex;
    align-items: center;
    gap: 80px;
    margin-bottom: 80px;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
    min-width: 0;
}

.feature-icon-badge {
    width: 48px;
    height: 48px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.feature-text h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-text p {
    color: var(--color-text-secondary);
    font-size: var(--font-size-lg);
    line-height: 1.7;
}

.feature-visual {
    flex: 1;
    min-width: 0;
}

.feature-img-wrapper {
    background: var(--color-bg-alt);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
}

.feature-img-wrapper img {
    max-height: 100%;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.feature-img-placeholder {
    color: var(--color-text-muted);
    text-align: center;
    font-size: var(--font-size-sm);
}


/* --- How It Works Section --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step-card {
    text-align: center;
    padding: 40px 24px;
}

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

.step-card h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: 10px;
}

.step-card p {
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.6;
}


/* --- Social Proof Section --- */
.proof-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.proof-stat {
    text-align: center;
}

.proof-stat .stat-value {
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.proof-stat .stat-label {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

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

.testimonial-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 32px;
}

.testimonial-stars {
    color: #f5a623;
    font-size: 1.1rem;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.testimonial-card blockquote {
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.7;
    margin-bottom: 20px;
    font-style: normal;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    background: var(--color-bg-alt);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-primary);
    font-size: var(--font-size-sm);
}

.testimonial-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.testimonial-detail {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}


/* --- FAQ Section --- */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

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

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
    gap: 16px;
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    position: relative;
    transition: transform var(--transition);
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
    top: 50%;
    left: 50%;
}

.faq-icon::before {
    width: 14px;
    height: 2px;
    transform: translate(-50%, -50%);
}

.faq-icon::after {
    width: 2px;
    height: 14px;
    transform: translate(-50%, -50%);
    transition: transform var(--transition), opacity var(--transition);
}

.faq-item.active .faq-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-answer-inner {
    padding: 0 0 24px;
    color: var(--color-text-secondary);
    line-height: 1.7;
    font-size: var(--font-size-base);
}


/* --- Final CTA Section --- */
.cta-banner {
    background: var(--color-gradient);
    color: #fff;
    text-align: center;
    padding: 80px 24px;
}

.cta-banner h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-banner p {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}


/* --- Footer --- */
.footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 0;
}

.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    font-size: var(--font-size-base);
}

.footer-brand img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
    transition: color var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.footer-copy {
    width: 100%;
    text-align: center;
    padding-top: 24px;
    margin-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}


/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-phone-frame {
        width: 240px;
        height: 480px;
    }

    .feature-row,
    .feature-row.reverse {
        flex-direction: column;
        gap: 40px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 400px;
        margin: 0 auto;
    }

    .step-card {
        padding: 24px;
    }

    .proof-stats {
        gap: 24px;
    }
}

/* Mobile nav */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 16px 24px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-md);
    }

    .nav-links.open {
        display: flex;
    }

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

/* Small mobile */
@media (max-width: 480px) {
    .hero {
        padding: 110px 0 60px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-phone-frame {
        width: 200px;
        height: 400px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .problem-card {
        padding: 40px 24px;
    }

    .problem-card h2 {
        font-size: 1.6rem;
    }

    .feature-text h3 {
        font-size: 1.3rem;
    }

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

    .proof-stat .stat-value {
        font-size: 2.2rem;
    }

    .cta-banner h2 {
        font-size: 1.8rem;
    }

    .footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-copy {
        text-align: center;
    }

    .section {
        padding: var(--section-padding-mobile);
    }

    .section-header {
        margin-bottom: 40px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}
