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

:root {
    /* Color Palette - Sophisticated teal + warm amber */
    --primary: #0D9488;
    --primary-dark: #0F766E;
    --primary-light: #14B8A6;
    --accent: #D97706;
    --accent-light: #F59E0B;

    /* Neutrals with warmth */
    --text: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --bg: #FAFAF9;
    --bg-warm: #F5F5F4;
    --surface: #FFFFFF;
    --border: #E7E5E4;
    --border-light: #F5F5F4;

    /* Shadows with subtle color */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.12);

    /* Typography */
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --radius: 6px;
    --radius-lg: 10px;
    --radius-xl: 16px;

    /* Animation */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

body {
    min-height: 100vh;
    position: relative;
}

/* Subtle noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 1000;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Entrance Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 250, 249, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.6);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

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

.logo-dot {
    color: var(--primary);
}

.nav-status {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-warm);
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    letter-spacing: 0.02em;
}

/* Hero */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    position: relative;
}

.hero-badge {
    margin-bottom: 28px;
    animation: fadeUp 0.8s var(--ease-out) both;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--text);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 16px;
    border-radius: 999px;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 7vw, 4rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text);
    letter-spacing: -0.02em;
    animation: fadeUp 0.8s var(--ease-out) 0.1s both;
}

.highlight {
    color: var(--primary);
    font-style: italic;
    position: relative;
}

.highlight::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.08em;
    height: 0.12em;
    background: var(--accent);
    opacity: 0.4;
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 44px;
    animation: fadeUp 0.8s var(--ease-out) 0.2s both;
}

.hero-subtitle strong {
    color: var(--text);
    font-weight: 600;
}

/* Signup Form */
.signup-form {
    max-width: 460px;
    margin: 0 auto;
    animation: fadeUp 0.8s var(--ease-out) 0.3s both;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    background: var(--surface);
    padding: 6px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
    transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.input-wrapper:focus-within {
    box-shadow: var(--shadow-xl), 0 0 0 2px var(--primary);
    transform: translateY(-1px);
}

.email-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-family: inherit;
    background: transparent;
    min-width: 0;
    color: var(--text);
}

.email-input::placeholder {
    color: var(--text-muted);
}

.submit-btn {
    background: var(--text);
    color: white;
    border: none;
    padding: 14px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.form-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 14px;
    letter-spacing: 0.01em;
}

/* Stats Preview */
.stats-preview {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    animation: fadeUp 0.8s var(--ease-out) 0.4s both;
}

.stat {
    text-align: center;
    padding: 0 40px;
    position: relative;
}

.stat:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 48px;
    background: var(--border);
}

.stat-number {
    display: block;
    font-family: var(--font-body);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

.stat-cite {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--primary);
    text-decoration: none;
    vertical-align: super;
    margin-left: 2px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.stat-cite:hover {
    opacity: 1;
    text-decoration: underline;
}

.stat-divider {
    display: none;
}

/* Features */
.features {
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-body);
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
    color: var(--text);
    letter-spacing: -0.02em;
}

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

.feature-card {
    background: var(--surface);
    padding: 36px 28px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    text-align: left;
    transition: all 0.4s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Problem Section */
.problem {
    padding: 80px 0;
    background: var(--text);
    color: white;
    position: relative;
    overflow: hidden;
}

.problem::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(13, 148, 136, 0.15), transparent);
    pointer-events: none;
}

.problem .section-title {
    color: white;
    position: relative;
}

.problem-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-bottom: 40px;
    position: relative;
}

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

.problem-number {
    display: block;
    font-family: var(--font-body);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-light);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.problem-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 180px;
}

.problem-text {
    text-align: center;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
}

.mission-text {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 28px;
    position: relative;
}

.mission-text em {
    font-style: italic;
}

/* Preview Mockup */
.preview {
    padding: 80px 0;
    background: var(--bg-warm);
}

.mockup {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    max-width: 880px;
    margin: 0 auto;
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.mockup-dots {
    display: flex;
    gap: 7px;
}

.mockup-dots span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--border);
}

.mockup-dots span:first-child { background: #EF4444; }
.mockup-dots span:nth-child(2) { background: #F59E0B; }
.mockup-dots span:last-child { background: #22C55E; }

.mockup-url {
    flex: 1;
    background: var(--surface);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
}

.mockup-content {
    display: flex;
    min-height: 320px;
}

.mockup-sidebar {
    width: 200px;
    padding: 24px;
    border-right: 1px solid var(--border);
    background: var(--bg);
}

.mockup-filter {
    margin-bottom: 24px;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.filter-options {
    display: flex;
    gap: 6px;
}

.filter-opt {
    padding: 5px 11px;
    font-size: 0.8rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.2s;
}

.filter-opt.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-slider {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    position: relative;
    margin-top: 12px;
}

.filter-slider::after {
    content: '';
    position: absolute;
    left: 15%;
    right: 25%;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
}

.mockup-main {
    flex: 1;
    padding: 24px;
}

.mockup-area-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.area-title {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 600;
}

.median-amount {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.median-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mockup-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rent-card {
    padding: 18px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.rent-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.rent-street {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.rent-price {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
}

.rent-details {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: var(--primary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 100% 80% at 50% 100%, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

.cta-title {
    font-family: var(--font-body);
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 14px;
    position: relative;
    letter-spacing: -0.02em;
}

.cta-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    position: relative;
}

.cta .input-wrapper {
    max-width: 460px;
    margin: 0 auto;
    background: white;
    position: relative;
}

.cta .submit-btn {
    background: var(--text);
}

.cta .submit-btn:hover {
    background: var(--accent);
}

/* Footer */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

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

.footer-divider {
    color: var(--border);
}

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

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out);
    z-index: 1000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    padding: 48px;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 400px;
    margin: 24px;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.4s var(--ease-out);
    box-shadow: var(--shadow-xl);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.modal-content h3 {
    font-family: var(--font-body);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.modal-close {
    background: var(--text);
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
}

.modal-close:hover {
    background: var(--primary);
}

/* Responsive */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 72px 0 56px;
    }

    .hero-subtitle br {
        display: none;
    }

    .input-wrapper {
        flex-direction: column;
        padding: 8px;
    }

    .submit-btn {
        width: 100%;
    }

    .stats-preview {
        flex-direction: column;
        gap: 32px;
        padding-top: 40px;
        margin-top: 56px;
    }

    .stat {
        padding: 0;
    }

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

    .problem-stats {
        flex-direction: column;
        gap: 40px;
    }

    .problem-number {
        font-size: 2.5rem;
    }

    .mockup-content {
        flex-direction: column;
    }

    .mockup-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 20px;
    }

    .mockup-area-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

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

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

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

/* Selection color */
::selection {
    background: rgba(13, 148, 136, 0.2);
    color: var(--text);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}
