/* makelaar — warm, friendly Dutch real-estate look.
   Palette: Holland orange + canal-house brick + a calm sky, on warm cream. */

:root {
    --bg: #fbf4e9;
    --bg-2: #f4e8d4;
    --ink: #2a2118;
    --ink-soft: #6b5d4a;
    --paper: #fffdf8;
    --line: #e4d6bd;
    --orange: #ff6b1a;
    --orange-deep: #e6550a;
    --brick: #b4452b;
    --sky: #2e6f9e;
    --green: #2f9e6f;
    --shadow: 0 18px 50px -22px rgba(80, 50, 10, 0.45);
    --radius: 18px;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'Space Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
/* Keep the host page scrollable even while a Webfuse session is live (the
   Widget otherwise locks body scroll). JS re-asserts this if the Widget fights
   back — see keepHostScrollable(). */
html, body { overflow-y: auto !important; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(255, 107, 26, 0.10), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(46, 111, 158, 0.10), transparent 55%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── floating decor ───────────────────────────────────────────────────── */
.decor { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.float {
    position: absolute; font-size: 38px; opacity: 0.16;
    animation: drift 22s ease-in-out infinite;
    filter: saturate(0.9);
}
.f1 { left: 6%;  top: 18%; animation-delay: 0s; }
.f2 { left: 86%; top: 24%; animation-delay: -4s; font-size: 30px; }
.f3 { left: 14%; top: 74%; animation-delay: -8s; font-size: 44px; }
.f4 { left: 78%; top: 70%; animation-delay: -12s; }
.f5 { left: 48%; top: 12%; animation-delay: -16s; font-size: 28px; }
.f6 { left: 60%; top: 84%; animation-delay: -20s; font-size: 32px; }
@keyframes drift {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-26px) rotate(5deg); }
}

/* ── top bar ──────────────────────────────────────────────────────────── */
.topbar {
    position: relative; z-index: 2;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px clamp(16px, 4vw, 40px);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; cursor: pointer; }
.brand:hover .brand-name { opacity: .8; }
.brand-glyph { font-size: 26px; }
.brand-name {
    font-family: var(--font-display); font-weight: 700; font-size: 26px;
    letter-spacing: -0.02em; color: var(--brick);
}
.brand-tag {
    font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--ink-soft);
}
.session-toggle {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 13px; color: var(--ink-soft);
    background: var(--paper); border: 1px solid var(--line);
    padding: 8px 12px; border-radius: 999px; box-shadow: var(--shadow);
    transition: transform .15s ease;
}
.session-toggle:hover { transform: translateY(-1px); }
.session-toggle input { accent-color: var(--orange); }

/* ── layout ───────────────────────────────────────────────────────────── */
.wrap {
    position: relative; z-index: 1;
    max-width: 720px; margin: 10px auto 60px; padding: 0 clamp(16px, 4vw, 24px);
}
.card {
    background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: clamp(22px, 4vw, 38px); margin-bottom: 26px;
}

/* ── hero / brief (full-bleed landing) ────────────────────────────────── */
.hero {
    position: relative; z-index: 1;
    min-height: calc(100vh - 86px);
    display: grid; place-items: center;
    padding: 12px clamp(20px, 6vw, 64px) 40px;
    overflow: hidden;
}
.hero-house {
    position: absolute; right: -4vw; bottom: -6vh; font-size: clamp(220px, 40vw, 560px);
    opacity: 0.05; pointer-events: none; transform: rotate(-6deg); z-index: -1;
}
.hero-inner { max-width: 900px; width: 100%; text-align: center; }

.hoi {
    font-family: var(--font-mono); color: var(--orange-deep); margin: 0 0 12px;
    font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em;
}
.headline {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(40px, 8vw, 88px); line-height: 0.98; letter-spacing: -0.025em;
    margin: 0 0 34px;
}

.brief { display: block; max-width: 800px; margin: 0 auto; }
.brief-line {
    font-family: var(--font-display); font-weight: 500;
    font-size: clamp(20px, 3.2vw, 32px); line-height: 1.7; color: var(--ink);
    margin: 0 0 22px;
}
.inq {
    font: inherit; color: var(--brick); text-align: center;
    background: rgba(255, 107, 26, 0.10);
    border: none; border-bottom: 2.5px dashed var(--orange);
    border-radius: 7px 7px 0 0; padding: 0 6px 2px; margin: 0 2px;
    transition: background .15s, border-color .15s;
}
.inq::placeholder { color: #c9a98f; }
.inq:focus { outline: none; background: rgba(255, 107, 26, 0.18); border-bottom-style: solid; border-color: var(--orange-deep); }
.inq.pc { width: 5.5ch; }
.inq.eur { width: 6.5ch; }

.wish-quote { position: relative; max-width: 640px; margin: 0 auto 30px; padding-left: 30px; text-align: left; }
.quote-mark {
    position: absolute; left: -6px; top: -14px;
    font-family: var(--font-display); font-size: 64px; line-height: 1; color: var(--orange);
    opacity: 0.5;
}
.wish {
    font-family: var(--font-display); font-style: italic; font-weight: 500;
    font-size: clamp(18px, 2.6vw, 24px); line-height: 1.45; color: var(--brick);
    width: 100%; resize: none; overflow: hidden;
    background: rgba(255, 107, 26, 0.10);
    border: none; border-bottom: 2.5px dashed var(--orange);
    border-radius: 7px 7px 0 0; padding: 6px 10px;
    transition: background .15s, border-color .15s;
}
.wish::placeholder { color: #c9a98f; }
.wish:focus { outline: none; background: rgba(255, 107, 26, 0.18); border-bottom-style: solid; border-color: var(--orange-deep); color: var(--ink); }

.foot code {
    font-family: var(--font-mono); font-size: 0.92em;
    background: var(--bg-2); padding: 1px 5px; border-radius: 5px;
}

.cta {
    margin-top: 6px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font-display); font-weight: 600; font-size: 18px;
    color: #fff; background: linear-gradient(180deg, var(--orange), var(--orange-deep));
    border: none; border-radius: 14px; padding: 15px 22px; cursor: pointer;
    box-shadow: 0 12px 26px -10px rgba(230, 85, 10, 0.7);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -10px rgba(230, 85, 10, 0.75); }
.cta:active { transform: translateY(0); }
.cta:disabled { filter: grayscale(0.4) opacity(0.7); cursor: progress; transform: none; }
.cta-emoji { font-size: 20px; }
.cta.ghost {
    background: #fff; color: var(--brick); border: 1.5px solid var(--line);
    box-shadow: var(--shadow); font-size: 15px; margin: 8px auto 0; display: flex;
}
.cta-sub { text-align: center; font-size: 12.5px; color: var(--ink-soft); margin: 10px 0 0; }

/* ── capability checks (slim inline row) ──────────────────────────────── */
.checks {
    list-style: none; margin: 34px auto 0; padding: 0; max-width: 760px;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px;
}
.check {
    display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-soft);
    background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
    padding: 6px 12px; box-shadow: var(--shadow);
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #c9bda6; }
.dot.pending { background: #d8b24a; animation: pulse 1.3s ease-in-out infinite; }
.dot.ready { background: var(--green); }
.dot.warn { background: var(--brick); }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ── hunt feed ────────────────────────────────────────────────────────── */
.hunt-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.spinner { font-size: 34px; animation: hop 0.9s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(4deg); } }
#hunt-title { font-family: var(--font-display); font-size: 24px; margin: 0 0 2px; }
.hunt-sub { margin: 0; color: var(--ink-soft); font-size: 14px; }

.hunt-stats { display: flex; align-items: stretch; gap: 8px; margin: 4px 0 20px; }
.stat {
    flex: 1;
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
    padding: 12px; text-align: center;
    transition: border-color .25s, box-shadow .25s, background .25s;
}
.stat b { display: block; font-family: var(--font-display); font-size: 26px; color: var(--brick); line-height: 1.1; }
.stat span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }

/* the funnel: found → peeked inside → summarised */
.stat-arrow {
    flex: none; align-self: center;
    font-size: 18px; color: var(--line);
    transition: color .25s, transform .25s;
}

/* whichever stage is doing work right now */
.stat.active {
    background: #fff; border-color: var(--brick);
    animation: statpulse 1.4s ease-in-out infinite;
}
.stat.complete { border-color: #c9b98f; background: #fff; }
.stat-arrow.flow { color: var(--brick); animation: arrowflow 1s ease-in-out infinite; }

@keyframes statpulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(180, 69, 43, 0.14); }
    50%      { box-shadow: 0 0 0 7px rgba(180, 69, 43, 0.04); }
}
@keyframes arrowflow {
    0%, 100% { transform: translateX(0); opacity: .55; }
    50%      { transform: translateX(4px); opacity: 1; }
}
@keyframes statbump {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.35); color: var(--orange-deep); }
    100% { transform: scale(1); }
}
.stat b.bump { animation: statbump .45s ease; }

@media (max-width: 480px) {
    .hunt-stats { gap: 4px; }
    .stat { padding: 10px 6px; }
    .stat b { font-size: 22px; }
    .stat span { font-size: 9.5px; }
    .stat-arrow { font-size: 14px; }
}

.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed li {
    display: flex; gap: 10px; align-items: flex-start; font-size: 14px;
    color: var(--ink); line-height: 1.45;
    padding: 10px 12px; background: var(--bg); border: 1px solid var(--line);
    border-radius: 10px; animation: slidein .3s ease;
}
.feed li .ic { flex: none; }
.feed li.done { color: var(--ink-soft); }
.feed li.err { background: #fbeeea; border-color: #e6b8a8; color: var(--brick); }
@keyframes slidein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── results ──────────────────────────────────────────────────────────── */
.results { position: relative; z-index: 1; }
.verdict { text-align: center; margin-bottom: 22px; }
#verdict-title { font-family: var(--font-display); font-size: clamp(26px, 4vw, 34px); margin: 0 0 8px; }
.verdict-intro { color: var(--ink-soft); font-size: 15.5px; line-height: 1.55; max-width: 60ch; margin: 0 auto; }

/* ── honest reality-check banner (above the picks) ───────────────────────── */
.honesty {
    display: flex; gap: 14px; align-items: flex-start;
    max-width: 64ch; margin: 0 auto 24px;
    padding: 16px 18px; border-radius: var(--radius);
    border: 1px solid var(--line); border-left-width: 5px;
    background: var(--paper); box-shadow: var(--shadow);
    animation: slidein .4s ease;
}
.honesty .honesty-ic { font-size: 26px; line-height: 1; flex: none; margin-top: 1px; }
.honesty .honesty-body { display: grid; gap: 3px; }
.honesty .honesty-label {
    font-family: var(--font-display); font-size: 15px; letter-spacing: 0.01em;
}
.honesty p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink); }

/* tone by how well the results match the brief */
.honesty[data-fit="spot-on"]  { border-left-color: #4f8a3d; background: #f3f8ee; }
.honesty[data-fit="spot-on"]  .honesty-label { color: #3f7530; }
.honesty[data-fit="decent"]   { border-left-color: var(--orange); }
.honesty[data-fit="decent"]   .honesty-label { color: var(--orange-deep); }
.honesty[data-fit="stretch"]  { border-left-color: #d08a1e; background: #fbf3e3; }
.honesty[data-fit="stretch"]  .honesty-label { color: #b3741a; }
.honesty[data-fit="mismatch"] { border-left-color: var(--brick); background: #fbeeea; }
.honesty[data-fit="mismatch"] .honesty-label { color: var(--brick); }

.grid { display: grid; gap: 20px; }
.home {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; display: grid;
    grid-template-columns: 230px 1fr; animation: slidein .4s ease;
}
.home .photo { background: var(--bg-2) center/cover no-repeat; min-height: 190px; position: relative; }
.home .rank {
    position: absolute; top: 12px; left: 12px;
    font-family: var(--font-display); font-weight: 700; font-size: 14px;
    background: var(--orange); color: #fff; border-radius: 999px;
    padding: 4px 12px; box-shadow: var(--shadow);
}
.home .body { padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.home .addr { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin: 0; line-height: 1.15; }
.home .price { font-family: var(--font-mono); color: var(--brick); font-weight: 700; font-size: 15px; }
.home .why { font-size: 14.5px; line-height: 1.55; color: var(--ink); margin: 4px 0 0; }
.home .why b { color: var(--orange-deep); }
.home .tldr { font-size: 13px; color: var(--ink-soft); line-height: 1.5; border-top: 1px dashed var(--line); padding-top: 8px; }
.home .match { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--green); }
.home .open {
    justify-self: start; margin-top: 6px; font-size: 13px; font-weight: 600;
    color: var(--sky); text-decoration: none; border-bottom: 1.5px solid transparent;
}
.home .open:hover { border-color: var(--sky); }

@media (max-width: 560px) {
    .home { grid-template-columns: 1fr; }
    .home .photo { min-height: 160px; }
    .field-row { grid-template-columns: 1fr 1fr; }
}

/* ── live session panel ───────────────────────────────────────────────── */
.session-panel {
    position: fixed; z-index: 40; right: 18px; bottom: 18px;
    width: min(440px, 92vw); height: min(560px, 70vh);
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 30px 70px -20px rgba(40, 25, 5, 0.6); overflow: hidden;
    display: flex; flex-direction: column;
    transform: translateY(calc(100% + 30px)); opacity: 0; pointer-events: none;
    transition: transform .3s cubic-bezier(.2,.8,.2,1), opacity .3s;
}
.session-panel[data-open="true"] { transform: translateY(0); opacity: 1; pointer-events: auto; }
.session-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; background: var(--bg-2); border-bottom: 1px solid var(--line);
    font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft);
}
.session-bar button {
    border: none; background: none; cursor: pointer; font-size: 16px; color: var(--ink-soft); line-height: 1;
}
.session-frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot {
    position: relative; z-index: 1; text-align: center; padding: 8px 16px 36px;
    font-size: 12px; color: var(--ink-soft); display: flex; gap: 10px;
    justify-content: center; flex-wrap: wrap; align-items: center;
}

[hidden] { display: none !important; }
