* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ink: #0a0a0a;
    --paper: #faf9f7;
    --accent: #1a5cff;
    --accent-glow: #4d82ff;
    --accent-light: #e8eeff;
    --muted: #6b6b6b;
    --border: #e2e0dc;
    --surface: #f0efec;
    --green: #16a34a;
    --yellow: #ca8a04;
    --orange: #ea580c;
    --red: #dc2626;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; line-height: 1.15; }

.accent { color: var(--accent); }

/* NAV */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}
.logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    color: var(--ink);
}
.logo span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-tag {
    font-size: 0.75rem;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
}

/* BUTTONS */
.btn {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.btn-sm:hover { background: var(--border); }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-glow); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26, 92, 255, 0.3); }
.btn-lg { padding: 0.9rem 2rem; font-size: 1.05rem; }

/* HERO */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2.5rem 4rem;
    text-align: center;
}
.hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 600;
    font-family: 'Space Grotesk', sans-serif;
}
.hero h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -2px;
    margin-top: 0.75rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.hero-sub {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 600px;
    margin: 1.5rem auto 0;
    line-height: 1.7;
}
.hero-actions { margin-top: 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.hero-note { font-size: 0.8rem; color: var(--muted); }

/* HOW IT WORKS */
.how-it-works {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2.5rem;
}
.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    letter-spacing: -1px;
}
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}
.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.step h3 { font-size: 1.15rem; margin-bottom: 0.5rem; letter-spacing: -0.5px; }
.step p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* STATS */
.stats-section { max-width: 1200px; margin: 0 auto; padding: 3rem 2.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat {
    text-align: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}
.stat-num { font-family: 'Space Grotesk', sans-serif; font-size: 2.5rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }

/* SCORING SECTION */
.scoring-section { max-width: 1200px; margin: 0 auto; padding: 5rem 2.5rem; }
.scoring-section h2 { text-align: center; font-size: 2rem; margin-bottom: 3rem; letter-spacing: -1px; }
.scoring-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.score-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
}
.score-weight {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.15;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}
.score-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; letter-spacing: -0.3px; }
.score-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* CTA */
.cta-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5rem 2.5rem;
    text-align: center;
}
.cta-section h2 { font-size: 2rem; margin-bottom: 1rem; letter-spacing: -1px; }
.cta-section p { color: var(--muted); margin-bottom: 2rem; font-size: 1.05rem; }

/* FOOTER */
footer {
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-text { color: var(--muted); font-size: 0.85rem; }

/* FORM */
.form-section { max-width: 800px; margin: 0 auto; padding: 3rem 2.5rem 5rem; }
.form-header { margin-bottom: 2.5rem; }
.form-header h1 { font-size: 2rem; letter-spacing: -1px; margin-bottom: 0.5rem; }
.form-header p { color: var(--muted); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { margin-bottom: 0.5rem; }
.form-group-full { grid-column: 1 / -1; margin-top: 0.5rem; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--ink);
}
.label-hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.label-sm { font-weight: 500 !important; font-size: 0.8rem !important; }

input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    background: white;
    color: var(--ink);
    transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.1);
}
textarea { resize: vertical; min-height: 100px; }

.traction-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.traction-grid .form-group { margin-bottom: 0; }

.form-actions { margin-top: 2rem; text-align: center; }
.form-disclaimer { font-size: 0.8rem; color: var(--muted); margin-top: 1rem; }

/* RESULTS */
.results-section { max-width: 1200px; margin: 0 auto; padding: 2rem 2.5rem 5rem; }
.results-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.results-header h1 { font-size: 1.8rem; letter-spacing: -1px; }
.results-header p { color: var(--muted); margin-top: 0.25rem; font-size: 0.95rem; }

.score-legend { display: flex; gap: 1.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-great { background: var(--green); }
.dot-good { background: var(--accent); }
.dot-moderate { background: var(--yellow); }
.dot-weak { background: var(--red); }

/* MATCH CARDS */
.match-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 0.75rem;
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1.25rem;
    align-items: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.match-card:hover { border-color: var(--accent); box-shadow: 0 2px 12px rgba(26, 92, 255, 0.08); }

.match-rank {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-align: center;
}
.match-score-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    margin: 0 auto 0.25rem;
}
.score-great { background: var(--green); }
.score-good { background: var(--accent); }
.score-moderate { background: var(--yellow); }
.score-weak { background: var(--red); }

.match-info h3 { font-size: 1.05rem; letter-spacing: -0.3px; margin-bottom: 0.15rem; }
.match-firm { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.match-reasoning { font-size: 0.85rem; color: var(--muted); line-height: 1.5; margin-bottom: 0.5rem; }
.match-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.match-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--muted);
}

.match-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    min-width: 180px;
}
.mini-score { text-align: center; }
.mini-score-label { font-size: 0.65rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.mini-score-bar {
    height: 4px;
    background: var(--surface);
    border-radius: 2px;
    margin-top: 0.25rem;
    overflow: hidden;
}
.mini-score-fill { height: 100%; border-radius: 2px; transition: width 0.5s; }
.mini-score-val { font-family: 'Space Grotesk', sans-serif; font-size: 0.75rem; font-weight: 600; margin-top: 0.15rem; }

/* LOADING */
#loading {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(250, 249, 247, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}
.loading-content { text-align: center; }
.loading-content h2 { font-size: 1.5rem; margin-top: 1.5rem; letter-spacing: -0.5px; }
.loading-content p { color: var(--muted); margin-top: 0.5rem; }
.spinner {
    width: 48px; height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* RESPONSIVE */
@media (max-width: 768px) {
    nav { padding: 1rem 1.5rem; }
    .hero { padding: 3rem 1.5rem 2rem; }
    .hero h1 { font-size: 2rem; letter-spacing: -1px; }
    .steps { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .scoring-grid { grid-template-columns: 1fr; }
    .form-section { padding: 2rem 1.5rem; }
    .form-grid { grid-template-columns: 1fr; }
    .traction-grid { grid-template-columns: 1fr 1fr; }
    .match-card { grid-template-columns: 50px 1fr; }
    .match-scores { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
    .results-header { flex-direction: column; gap: 1rem; }
    .footer-content { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
    .traction-grid { grid-template-columns: 1fr; }
    .match-scores { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: 1fr; }
    .nav-right { gap: 0.5rem; }
    .nav-tag { display: none; }
}
