/* ===== Design Tokens ===== */
:root {
    --primary: #2a9d8f;
    --primary-dark: #238b7e;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --font: system-ui, -apple-system, sans-serif;
    --max-width: 1100px;
    --radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

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

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

/* ===== Nav ===== */
#nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#nav.scrolled {
    border-bottom-color: #e0e0e0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    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: 1.2rem;
    color: var(--text-primary);
}

.nav-brand:hover {
    color: var(--text-primary);
}

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

.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* ===== Sections ===== */
.section {
    padding: 80px 0;
}

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

/* Per-section backgrounds */
#how-it-works {
    background: radial-gradient(ellipse at 50% 40%, #eef8f6 0%, var(--bg-alt) 70%);
}

#why {
    background: linear-gradient(160deg, #f5f9f8 0%, #ffffff 50%, #f8faf9 100%);
}

#legal {
    background: linear-gradient(160deg, #ffffff 0%, #f5f3ef 50%, #faf8f5 100%);
}

#stats {
    background: radial-gradient(ellipse at 50% 100%, #e8f5f3 0%, var(--bg-alt) 60%);
}

#faq {
    background: linear-gradient(180deg, #ffffff 0%, #f6f8fa 100%);
}

.section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 48px;
    color: var(--text-primary);
}

/* ===== Hero ===== */
.hero {
    padding: 80px 24px 60px;
    background: linear-gradient(135deg, #f0faf8 0%, #ffffff 50%, #f5f9f8 100%);
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 64px;
}

.hero-text {
    flex: 1;
}

.hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(42, 157, 143, 0.2);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-tagline {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-description {
    max-width: 480px;
    margin: 0 0 20px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.hero-features {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
}

.hero-features li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 1rem;
}

.hero-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

.hero-phone {
    flex-shrink: 0;
}

.hero-phone .phone-mockup {
    width: 260px;
}

.hero-phone .phone-screen img {
    width: 100%;
    display: block;
}

.cta-button {
    display: inline-block;
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.cta-button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.cta-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== How it works ===== */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.step {
    position: relative;
}

.step-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 8px;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Why ===== */
.why-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.why-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.why-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.why-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 12px;
}

.why-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.why-card p {
    color: var(--text-secondary);
    font-size: 0.93rem;
}

/* ===== Legal ===== */
.legal-intro {
    text-align: center;
    max-width: 700px;
    margin: -24px auto 40px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.legal-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.legal-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.legal-card h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.legal-card p {
    color: var(--text-secondary);
    font-size: 0.93rem;
}

.legal-details {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
}

.legal-details summary {
    padding: 20px 28px;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-details summary::before {
    content: '▸';
    transition: transform 0.2s;
}

.legal-details[open] summary::before {
    transform: rotate(90deg);
}

.legal-details summary::-webkit-details-marker {
    display: none;
}

.legal-full-text {
    padding: 0 28px 24px;
}

.legal-full-text p {
    color: var(--text-secondary);
    font-size: 0.93rem;
    margin-bottom: 12px;
}

/* ===== Stats ===== */
.stats-subtitle {
    text-align: center;
    color: var(--primary);
    font-weight: 500;
    margin-top: -32px;
    margin-bottom: 40px;
    min-height: 24px;
}

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

.stat-card {
    text-align: center;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===== Neighborhoods Ranking ===== */
.stats-neighborhoods {
    max-width: 480px;
    margin: 40px auto 0;
}

.neighborhoods-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
}

.neighborhoods-list {
    list-style: none;
    padding: 0;
    counter-reset: hood;
}

.neighborhoods-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--bg);
    margin-bottom: 8px;
    counter-increment: hood;
}

.neighborhoods-list li::before {
    content: counter(hood) '.';
    font-weight: 700;
    color: var(--primary);
    margin-right: 12px;
    min-width: 20px;
}

.neighborhood-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.neighborhood-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    margin-left: 12px;
}

.neighborhoods-more {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 8px;
}

/* ===== Phone Mockup ===== */
.phone-mockup {
    position: relative;
    width: 280px;
    background: #1a1a1a;
    border-radius: 36px;
    padding: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.phone-notch {
    width: 100px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    margin: 4px auto 8px;
}

.phone-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 1080 / 2290;
    border-radius: 24px;
    overflow: hidden;
    background: #f5f5f3;
}

/* ===== FAQ ===== */
.faq-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.faq-item {
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px solid #e8e8e8;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.faq-item summary {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-item summary::before {
    content: '+';
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 300;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.faq-item[open] summary::before {
    content: '−';
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item p {
    padding: 0 24px 16px 56px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 48px 24px;
    background: var(--text-primary);
    color: #bdc3c7;
}

.footer a {
    color: #ecf0f1;
}

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

.footer-contact {
    font-size: 1rem;
    margin-bottom: 8px;
}

.footer-links {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.footer-tagline {
    font-size: 0.85rem;
    color: #95a5a6;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
    .faq-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-description {
        margin: 0 auto 32px;
    }

    .hero-phone .phone-mockup {
        width: 220px;
    }

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

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

    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .why-cards {
        grid-template-columns: 1fr;
    }

    .faq-list {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .legal-cards {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section {
        padding: 56px 0;
    }

    .section h2 {
        font-size: 1.6rem;
        margin-bottom: 32px;
    }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 480px) {
    .hero {
        padding: 60px 20px 40px;
    }

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

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

    .hero-phone .phone-mockup {
        width: 200px;
    }

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

    .stat-number {
        font-size: 2.2rem;
    }
}
