@import url("https://fonts.googleapis.com/css2?family=Lora:wght@500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Lora:wght@500;600;700&family=Source+Sans+3:wght@400;500;600;700;800&display=swap");

:root {
    color-scheme: light;

    --bg-main: #f6f1e8;
    --bg-secondary: #efe7da;
    --card-bg: #fbf8f2;
    --input-bg: #fffdf9;

    --text-primary: #443a33;
    --text-secondary: #766b63;
    --charcoal: #3a332d;

    --accent-sage: #7e8b67;
    --accent-sage-dark: #6f7a59;
    --accent-sage-deep: #566046;
    --accent-clay: #a66a4c;
    --success: #6f8c6b;

    --border: #d8ccbc;
    --border-deep: #c7b79f;
    /* --cream: #fcf8f3; */
    --cream: #f1ece1;
    --beige: #e7dccb;
    --sand: #cdbda7;
    --olive-light: #a7b08a;
    --olive-dark: #59634b;
    /* --wood: #8b6b4a; */
    /* --wood: #8f6d63; */
    --wood: #97786f;
    --danger: #9c4f3f;
    --danger-bg: #f4dfd6;

    --shadow: 0 18px 48px rgba(60, 40, 20, 0.08);
    --shadow-soft: 0 8px 24px rgba(60, 40, 20, 0.06);
    --focus-ring: rgba(126, 139, 103, 0.18);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 18px;
    --page-max: 1080px;
    --form-max: 980px;

    --font-body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Lora", Georgia, "Times New Roman", Times, serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    background:
        linear-gradient(rgba(246, 241, 232, 0.54), rgba(246, 241, 232, 0.60)),
        radial-gradient(circle at 20% 10%, rgba(252, 248, 243, 0.55), transparent 10%),
        url("images/wp3.jpg") center / 480px auto repeat fixed,
        var(--bg-main);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    line-height: 1.55;
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body::before {
    background:
        radial-gradient(circle at 18% 8%, rgba(166, 106, 76, 0.10), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(126, 139, 103, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 45%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: -1;
}

a {
    color: inherit;
}

::selection {
    background: var(--accent-sage);
    color: #ffffff;
}

:focus-visible {
    border-radius: 4px;
    outline: 3px solid var(--focus-ring);
    outline-offset: 2px;
}

.site-header {
    background:
        linear-gradient(180deg, rgba(255, 253, 249, 0.12), rgba(255, 253, 249, 0)),
        var(--accent-sage-deep);
    border-bottom: 1px solid rgba(255, 253, 249, 0.22);
    color: var(--cream);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav,
.page {
    margin: 0 auto;
    max-width: var(--page-max);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    width: 100%;
}

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

.nav-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.brand {
    color: var(--cream);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.brand::after {
    color: var(--sand);
    content: " / Estimate Your Belgian Home's Value";
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.nav-link {
    border: 1px solid rgba(252, 248, 243, 0.32);
    border-radius: 999px;
    color: var(--cream);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.62rem 1rem;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-link:hover {
    background: rgba(252, 248, 243, 0.12);
    border-color: rgba(252, 248, 243, 0.58);
}

.page {
    flex: 1;
    padding-bottom: 5rem;
    padding-top: 2.25rem;
}

.home-page {
    padding-bottom: 1.5rem;
    padding-top: 1.5rem;
}

.hero {
    align-items: center;
    display: grid;
    min-height: calc(100vh - 104px);
}

.home-page .hero {
    min-height: calc(100vh - 72px - 86px - 3rem);
}

.hero-content,
.form-shell,
.result-panel {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.52), transparent 42%),
        var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: relative;
}

.hero-content::before,
.form-shell::before,
.result-panel::before {
    border: 1px solid rgba(139, 107, 74, 0.16);
    border-radius: calc(var(--radius-lg) - 4px);
    content: "";
    inset: 8px;
    pointer-events: none;
    position: absolute;
}

.hero-content {
    margin: 0 auto;
    max-width: 780px;
    padding: clamp(4rem, 5vw, 8rem);
    text-align: center;
}

.home-page .hero-content {
    padding: clamp(3rem, 5vw, 5.5rem);
}

.form-shell {
    display: grid;
    gap: 1.25rem;
    margin: 0 auto;
    max-width: var(--form-max);
    padding: clamp(1rem, 3vw, 1.75rem);
    width: 100%;
}

.steps-shell {
    padding-top: clamp(1.25rem, 3vw, 1.75rem);
}

.shell-title {
    color: var(--accent-sage-dark);
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    padding-left: 0.15rem;
    margin: 0;
    position: relative;
    z-index: 1;
}

.how-page fieldset legend {
    background: var(--wood);
    border-color: var(--wood);
    color: var(--card-bg);
}

.result-panel {
    margin: 1.5rem auto 0;
    max-width: var(--form-max);
    padding: clamp(2rem, 5vw, 3.25rem);
    text-align: center;
}

.eyebrow {
    color: var(--accent-clay);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin: 0 0 0.85rem;
    text-transform: uppercase;
}

h1 {
    color: var(--charcoal);
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 7vw, 5rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 0.98;
    margin: 0 0 1rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.6rem);
}

.page-title {
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    margin-bottom: 0.8rem;
}

.page-heading {
    margin: 0 auto;
    max-width: var(--form-max);
    width: 100%;
}

.lead,
.page-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0 0 1.65rem;
    max-width: 68ch;
}

.page-intro {
    border-left: 2px solid var(--accent-sage);
    margin-bottom: 1.25rem;
    margin-left: 0.05rem;
    padding-left: 1rem;
}

.required-note {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-style: italic;
    margin: 0;
}

.required-mark {
    color: var(--text-primary);
    font-weight: 700;
}

.how-page .page-title {
    margin-bottom: 2rem;
}

.how-page .form-shell .field h2 {
    margin: 0 0 0.25rem;
}

.how-page .form-shell .field p {
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

.how-note {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    margin: 0 auto 1.25rem;
    max-width: var(--form-max);
    padding: 1rem 1.15rem;
}

.button,
button {
    align-items: center;
    background: var(--wood);
    border: 1px solid var(--wood);
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 800;
    justify-content: center;
    letter-spacing: 0.02em;
    min-height: 2.9rem;
    padding: 0.72rem 1.35rem;
    text-decoration: none;
    transition:
        background 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease;
}

.button:hover,
button:hover {
    background: var(--accent-sage-dark);
    box-shadow: 0 10px 24px rgba(89, 99, 75, 0.18);
    transform: translateY(-1px);
}

.button-secondary {
    background: var(--cream);
    border-color: var(--border-deep);
    color: var(--olive-dark);
}

.button-secondary:hover {
    background: var(--bg-secondary);
    color: var(--charcoal);
}

.alert {
    background: var(--danger-bg);
    border: 1px solid rgba(156, 79, 63, 0.28);
    border-radius: var(--radius);
    color: var(--danger);
    margin: 0 auto 1rem;
    max-width: var(--form-max);
    padding: 0.9rem 1rem;
}

form {
    display: grid;
    gap: 1.25rem;
}

fieldset {
    background:
        /* linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent), */
        var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    gap: 1rem 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin: 0;
    padding: 1.2rem;
    position: relative;
}

legend {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--wood);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 0.36rem 0.78rem;
    text-transform: uppercase;
}

.field {
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    font-size: 0.88rem;
    gap: 0.34rem;
}

label {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 700;
}

.form-hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.25;
}

input,
select {
    background: var(--input-bg);
    border: 1px solid var(--border-deep);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font: inherit;
    min-height: 2.75rem;
    padding: 0.58rem 0.72rem;
    width: 100%;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

input[type="number"] {
    appearance: textfield;
}

input::placeholder {
    color: #a5998f;
}

input:hover,
select:hover {
    border-color: var(--sand);
}

input:focus,
select:focus {
    border-color: var(--accent-sage);
    box-shadow: 0 0 0 4px var(--focus-ring);
    outline: none;
}

input:disabled,
select:disabled {
    background: #eee6da;
    color: #9c9188;
    cursor: not-allowed;
    opacity: 0.78;
}

.checkbox-grid {
    display: grid;
    gap: 0.75rem 1rem;
    grid-column: 1 / -1;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.checkbox {
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    display: flex;
    gap: 0.7rem;
    justify-content: space-between;
    min-height: 2.85rem;
    padding: 0.48rem 0.72rem;
}

.checkbox input {
    appearance: none;
    background: var(--sand);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    flex: 0 0 auto;
    height: 22px;
    min-height: 22px;
    padding: 0;
    position: relative;
    transition: background 0.15s ease;
    width: 42px;
}

.checkbox input::after {
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(60, 40, 20, 0.18);
    content: "";
    height: 18px;
    left: 2px;
    position: absolute;
    top: 2px;
    transition: transform 0.15s ease;
    width: 18px;
}

.checkbox input:checked {
    background: var(--accent-sage);
}

.checkbox input:checked::after {
    transform: translateX(20px);
}

.actions {
    background:
        linear-gradient(180deg, rgba(252, 248, 243, 0.72), rgba(252, 248, 243, 0.96)),
        var(--card-bg);
    border-top: 1px solid var(--border);
    bottom: 0;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin: 0 calc(clamp(1rem, 3vw, 1.75rem) * -1) calc(clamp(1rem, 3vw, 1.75rem) * -1);
    padding: 1rem clamp(1rem, 3vw, 1.75rem);
    position: sticky;
    z-index: 2;
}

.form-shell .actions {
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.result-label {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0 0 0.6rem;
    text-transform: uppercase;
}

.result-price {
    color: var(--olive-dark);
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 10vw, 5rem);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 1.6rem;
}

.result-summary {
    border-top: 1px solid var(--border);
    margin: 1.4rem 0 1.6rem;
    padding-top: 1.4rem;
    text-align: left;
}

.summary-title {
    color: var(--charcoal);
    font-family: var(--font-display);
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.summary-grid {
    display: grid;
    gap: 0.7rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-item {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: grid;
    gap: 0.15rem;
    padding: 0.8rem 0.9rem;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.summary-value {
    color: var(--charcoal);
    font-size: 1rem;
    font-weight: 700;
}

.loading-overlay {
    align-items: center;
    background: rgba(58, 51, 45, 0.42);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1.25rem;
    position: fixed;
    z-index: 100;
}

.loading-overlay[hidden] {
    display: none;
}

.loading-panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-width: 420px;
    padding: 1.5rem;
    text-align: center;
}

.loading-title {
    color: var(--charcoal);
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
}

.loading-text {
    color: var(--text-secondary);
    margin: 0;
}

.footer-banner {
    background:
        linear-gradient(180deg, rgba(252, 248, 243, 0.08), rgba(252, 248, 243, 0)),
        var(--accent-sage-dark);
    border-top: 1px solid rgba(252, 248, 243, 0.24);
    color: var(--cream);
}

.footer-inner {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 0 auto;
    max-width: var(--page-max);
    padding: 1rem 1.25rem;
    text-align: center;
}

.footer-inner p {
    color: rgba(252, 248, 243, 0.86);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 720px) {
    .nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
        padding-bottom: 1rem;
        padding-top: 1rem;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .brand::after {
        display: block;
        margin-top: 0.1rem;
    }

    .page {
        padding-top: 1.25rem;
    }

    .hero {
        min-height: auto;
    }

    .hero-content,
    .form-shell,
    .result-panel {
        border-radius: var(--radius);
    }

    .hero-content::before,
    .form-shell::before,
    .result-panel::before {
        display: none;
    }

    fieldset {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .actions {
        justify-content: stretch;
    }

    .actions button,
    .button {
        width: 100%;
    }

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

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}
