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

:root {
    --brand:        #4b5563;
    --brand-dark:   #374151;
    --brand-light:  #f4f4f5;
    --brand-border: #d4d4d8;
    --text:         #374151;
    --text-soft:    #6b7280;
    --muted:        #9ca3af;
    --border:       #e4e4e7;
    --bg:           #f8f8f9;
    --white:        #ffffff;
    --radius-sm:    6px;
    --radius:       10px;
    --radius-lg:    16px;
    --shadow-xs:    0 1px 3px rgba(0,0,0,.05);
    --shadow:       0 2px 16px rgba(0,0,0,.06);
    --shadow-md:    0 4px 32px rgba(0,0,0,.09);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: .9rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-xs);
}

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

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
}

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

.site-nav { display: flex; gap: 1.75rem; }

.nav-link {
    font-size: .9rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
}
.nav-link:hover { color: var(--text); }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(160deg, #ffffff 0%, #f1f3f6 100%);
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding: 5rem 0 4rem;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: .85rem;
    color: var(--text);
}

.hero p {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 520px;
    margin: 0 auto 1.75rem;
    font-weight: 400;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-soft);
}

.hero-badges span {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.hero-badges span::before {
    content: '✓';
    font-weight: 800;
    font-size: .75rem;
    background: var(--brand);
    color: var(--white);
    border-radius: 50%;
    width: 1.3rem;
    height: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── Valuation section ──────────────────────────────────────────────────── */
.valuation-section {
    padding: 2.5rem 0 5rem;
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    max-width: 660px;
    margin: 0 auto;
    border: 1px solid var(--border);
}

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

/* ── Form ───────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .4rem;
}

.label-optional {
    font-size: .72rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-soft);
    opacity: .65;
    margin-left: .3rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: .7rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(24,24,27,.08);
}

/* ── Autocomplete ───────────────────────────────────────────────────────── */
.autocomplete-wrapper { position: relative; }

.suggestions-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    list-style: none;
    z-index: 200;
    max-height: 240px;
    overflow-y: auto;
}

.suggestions-list li {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: .55rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background .1s;
    color: var(--text);
}

.suggestions-list li:last-child { border-bottom: none; }
.suggestions-list li:hover,
.suggestions-list li.active {
    background: var(--brand-light);
    color: var(--text);
}

.ac-main { font-size: .9rem; font-weight: 500; flex-shrink: 0; }
.ac-sub  { font-size: .78rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestions-list li:hover .ac-sub,
.suggestions-list li.active .ac-sub { color: var(--text-soft); opacity: .75; }

.suggestions-list li.ac-disabled {
    opacity: .5;
    cursor: default;
    background: none !important;
}
.ac-hint { color: var(--muted) !important; font-style: italic; }

/* Loading spinner on the input */
@keyframes ac-spin { to { transform: rotate(360deg); } }
.ac-loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%2318181b' stroke-width='3' stroke-dasharray='40 20'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='.7s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 16px;
    padding-right: 2.5rem;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary {
    display: block;
    width: 100%;
    padding: .85rem 1.25rem;
    background: var(--brand);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background .15s, transform .1s, box-shadow .15s;
    letter-spacing: .01em;
}

.btn-primary:hover  { background: var(--brand-dark); box-shadow: 0 2px 10px rgba(0,0,0,.22); }
.btn-primary:active { transform: scale(.99); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-secondary {
    flex: 1;
    padding: .85rem 1rem;
    background: var(--white);
    color: var(--text-soft);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.btn-secondary:hover { background: var(--brand-light); border-color: var(--brand-border); color: var(--text); }

/* ── Result box ─────────────────────────────────────────────────────────── */
.result-box {
    margin-top: 2rem;
    padding: 1.75rem;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
}

.result-box h3 {
    font-size: .75rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .5rem;
}

.result-estimate {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: .45rem;
    letter-spacing: -1px;
}

.result-range {
    font-size: .9rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.result-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: .82rem;
    color: var(--muted);
    padding-top: .9rem;
    border-top: 1px solid var(--border);
}

.result-meta strong { color: var(--text-soft); }

.result-disclaimer {
    margin-top: 1rem;
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.55;
}

.result-source {
    margin-top: .75rem;
    font-size: .78rem;
    color: var(--muted);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .4rem .75rem;
}

/* ── Error ──────────────────────────────────────────────────────────────── */
.error-box {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: var(--radius-sm);
    color: #b91c1c;
    font-size: .875rem;
}

/* ── Wizard progress bar ────────────────────────────────────────────────── */
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    font-size: .75rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .03em;
}

.wizard-step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    font-weight: 700;
    transition: background .2s, color .2s;
}

.wizard-step.active .wizard-step-num  { background: var(--brand); color: var(--white); }
.wizard-step.active                   { color: var(--text); }
.wizard-step.completed .wizard-step-num { background: #52525b; color: var(--white); }
.wizard-step.completed                { color: var(--text-soft); }

.wizard-connector {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 .5rem;
    margin-bottom: 1.35rem;
}

/* ── Wizard panels ──────────────────────────────────────────────────────── */
.wizard-panel { display: none; }
.wizard-panel.active { display: block; }

/* ── Type cards ─────────────────────────────────────────────────────────── */
.type-cards {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: .3rem;
}

.type-card {
    flex: 1;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    padding: 1rem .75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    cursor: pointer;
    font-size: .85rem;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-soft);
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}

.type-card-icon { font-size: 1.7rem; line-height: 1; color: var(--muted); }
.type-card-icon svg { display: block; }
.type-card:hover .type-card-icon,
.type-card.active .type-card-icon { color: var(--text); }

.type-card:hover {
    border-color: var(--brand-border);
    color: var(--text);
    background: var(--brand-light);
}

.type-card.active {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--text);
    box-shadow: 0 0 0 2px rgba(24,24,27,.10);
}

/* ── Form row ────────────────────────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row[hidden],
.form-group[hidden] { display: none; }

/* ── Chip grid ──────────────────────────────────────────────────────────── */
.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .3rem;
}

.chip {
    display: inline-flex;
    cursor: pointer;
    position: relative;
}

.chip input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.chip span {
    padding: .42rem .85rem;
    border: 1.5px solid var(--border);
    border-radius: 2rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
    background: var(--white);
    cursor: pointer;
    transition: border-color .12s, background .12s, color .12s;
    user-select: none;
}

.chip:hover span           { border-color: var(--brand-border); color: var(--text); background: var(--brand-light); }
.chip input:checked + span {
    border-color: var(--brand);
    background: var(--brand);
    color: var(--white);
}

/* ── Checkbox group ─────────────────────────────────────────────────────── */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: .3rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    cursor: pointer;
    font-size: .9rem;
    color: var(--text-soft);
    font-weight: 500;
}

.checkbox-item input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--brand);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Wizard nav ─────────────────────────────────────────────────────────── */
.wizard-nav {
    display: flex;
    gap: .75rem;
    margin-top: 1.75rem;
}

.btn-primary { flex: 2; margin-top: 0; }

/* ── Divider ────────────────────────────────────────────────────────────── */
.form-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* ── GDPR note ──────────────────────────────────────────────────────────── */
.gdpr-note {
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: .75rem;
}

.gdpr-note a {
    color: var(--text-soft);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gdpr-note a:hover { color: var(--text); }

/* ── GDPR consent checkbox ──────────────────────────────────────────────── */
.gdpr-consent {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    cursor: pointer;
    margin-bottom: .85rem;
}

.gdpr-consent input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--brand);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: .15rem;
}

.gdpr-consent span {
    font-size: .8rem;
    color: var(--text-soft);
    line-height: 1.5;
}

.gdpr-consent a {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gdpr-consent a:hover { color: var(--brand); }

/* ── GDPR policy page ───────────────────────────────────────────────────── */
.hero--small { padding: 2.5rem 0; }

.gdpr-section { padding: 3rem 0 5rem; }

.gdpr-content {
    max-width: 760px;
    margin: 0 auto;
}

.gdpr-content h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 2rem 0 .5rem;
}

.gdpr-content p,
.gdpr-content li {
    font-size: .9rem;
    color: var(--text-soft);
    line-height: 1.7;
    margin-bottom: .5rem;
}

.gdpr-content ul {
    padding-left: 1.25rem;
    margin-bottom: .75rem;
}

.gdpr-content a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

/* ── How it works ───────────────────────────────────────────────────────── */
.how-section {
    padding: 5rem 0;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.how-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    text-align: center;
    margin-bottom: 2.5rem;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.how-step {
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg);
}

.how-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--border);
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 1rem;
}

.how-step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .5rem;
}

.how-step p {
    font-size: .875rem;
    color: var(--muted);
    line-height: 1.65;
}

/* ── Trust bar ──────────────────────────────────────────────────────────── */
.trust-section {
    padding: 3.5rem 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    text-align: center;
}

.trust-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
    margin-bottom: .25rem;
}

.trust-desc {
    font-size: .82rem;
    color: var(--muted);
}

@media (max-width: 640px) {
    .how-grid,
    .trust-grid { grid-template-columns: 1fr; gap: 1rem; }
    .how-section { padding: 3rem 0; }
    .trust-section { padding: 2.5rem 0; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    font-size: .8rem;
    color: var(--muted);
    background: var(--white);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .card { padding: 1.5rem; border-radius: var(--radius); }
    .hero { padding: 3rem 0 2.5rem; }
    .hero-badges { gap: 1rem; }
    .result-meta { flex-direction: column; gap: .4rem; }
    .form-row { grid-template-columns: 1fr; }
    .type-cards { gap: .5rem; }
    .type-card { min-width: calc(50% - .25rem); padding: .75rem .5rem; font-size: .78rem; }
    .wizard-nav { flex-direction: column-reverse; }
    .btn-primary, .btn-secondary { flex: unset; width: 100%; }
    .site-nav { display: none; }
    .result-estimate { font-size: 1.9rem; }
}

/* ── Contact form ───────────────────────────────────────────────────────── */
.contact-header {
    margin-bottom: 1.25rem;
}

.contact-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .3rem;
}

.contact-intro {
    color: var(--muted);
    font-size: .875rem;
    margin-bottom: 0;
}

/* ── Result summary (step 4) ────────────────────────────────────────────── */
.result-summary {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: .4rem;
}

.label-required {
    color: var(--text);
    font-weight: 600;
}

.contact-success {
    background: var(--bg);
    color: var(--text-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .75rem 1rem;
    font-size: .875rem;
    margin-top: 1rem;
}

/* ── Curious (no-estimate) result ─────────────────────────────────────── */
.curious-summary {
    text-align: center;
    padding: 2rem 1.5rem;
}

.curious-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--primary, #2563eb);
}

.curious-summary h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: .75rem;
}

.curious-message {
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto;
}

/* ── Nav CTA button ───────────────────────────────────────────────────── */
.nav-link--cta {
    background: var(--primary, #2563eb);
    color: #fff !important;
    padding: .4rem .95rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background .15s, color .15s;
}
.nav-link--cta:hover {
    background: #1d4ed8;
    color: #fff !important;
}

/* ── Contact page ─────────────────────────────────────────────────────── */
.contact-hero {
    background: linear-gradient(135deg, #f8f8f9 0%, #eef0f4 100%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.contact-hero-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 420px;
    position: relative;
    padding-top: 3rem;
}

.contact-hero-text {
    flex: 1;
    padding-bottom: 3.5rem;
    max-width: 480px;
}

.contact-name-block {
    border-left: 4px solid var(--brand);
    padding-left: 1.25rem;
    margin-bottom: 1.75rem;
}

.contact-name {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.15;
    display: flex;
    flex-direction: column;
}

.contact-name-first {
    color: var(--brand);
}

.contact-name-last {
    color: var(--text);
}

.contact-role {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.contact-detail-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.contact-detail-list li {
    display: flex;
    align-items: center;
    gap: .7rem;
}

.contact-detail-icon {
    color: var(--brand);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.contact-detail-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: color .15s;
}
.contact-detail-link:hover { color: var(--brand-dark); }

.contact-hero-photo {
    flex-shrink: 0;
    align-self: flex-end;
    margin-right: -1.5rem;
}

.agent-photo {
    width: 320px;
    display: block;
}

@media (max-width: 640px) {
    .contact-hero-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 2.5rem;
        min-height: unset;
    }
    .contact-hero-text { max-width: 100%; padding-bottom: 1.5rem; }
    .contact-name-block { border-left: none; border-top: 4px solid var(--brand); padding-left: 0; padding-top: .75rem; }
    .contact-detail-list li { justify-content: center; }
    .contact-hero-photo { margin-right: 0; }
    .agent-photo { width: 220px; }
}
