/* Waarderingstool — publieke site voor pandeigenaren. Huisstijl volgt
   fokkemavastgoed.nl: antraciet, wit, Inter, hoekig. Mobiel eerst. */

:root {
  --bg: #1e2228;
  --bg-deep: #191c21;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --surface-on: rgba(255, 255, 255, 0.1);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #ffffff;
  --muted: #a7aebb;
  --subtle: #737c8b;
  --ink: #1e2228;
  --ornament: rgba(255, 255, 255, 0.028);
  --error: #e38b8b;
  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

/* Groot, bijna onzichtbaar F-teken: het merkornament van Fokkema. */
.ornament {
  display: none;
  position: fixed;
  right: -0.12em;
  bottom: -0.2em;
  font-size: min(130vw, 760px);
  font-weight: 300;
  line-height: 0.8;
  color: var(--ornament);
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ── kop: terug, logo, voortgang ─────────────────────────────────────── */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(var(--bg) 70%, rgba(30, 34, 40, 0));
  padding: max(14px, env(safe-area-inset-top)) 20px 10px;
}
.top-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  height: 44px;
}
.logo { justify-self: center; height: 28px; width: auto; display: block; opacity: 0.95; }
.terug {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  margin-left: -12px;
  background: none; border: 0; border-radius: 50%;
  color: var(--muted);
}
.terug:hover { color: var(--text); background: var(--surface); }
.terug[hidden] { display: grid; visibility: hidden; }
.voortgang {
  height: 2px;
  margin-top: 10px;
  background: var(--line);
  overflow: hidden;
}
.voortgang > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--text);
  transition: width 400ms var(--ease);
}
.voortgang[hidden] { display: block; visibility: hidden; }

/* ── inhoud ─────────────────────────────────────────────────────────── */

.stap {
  flex: 1;
  padding: 18px 20px 24px;
  animation: in 360ms var(--ease) both;
}
.stap:focus { outline: none; }
@keyframes in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--subtle);
}
h1, h2 {
  margin: 0 0 12px;
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.18;
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 8.4vw, 38px); }
h2 { font-size: clamp(25px, 7vw, 30px); }
.lead { margin: 0 0 26px; color: var(--muted); font-size: 16.5px; }
.klein { font-size: 13.5px; color: var(--subtle); }

.hand {
  font-family: 'Caveat', cursive;
  font-size: 27px;
  line-height: 1.1;
  color: #d9dde3;
  margin: 0 0 18px;
  transform: rotate(-2deg);
  transform-origin: left;
}

/* ── adreskaart ─────────────────────────────────────────────────────── */

.pand {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  margin: 0 0 22px;
}
.pand-label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--subtle); margin: 0 0 6px; }
.pand-adres { font-size: 20px; margin: 0; }
.pand-plaats { color: var(--muted); margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--subtle); font-size: 13.5px; margin: 0 0 8px; }
.meta span::before { content: "·"; margin-right: 14px; color: var(--line-strong); }
.meta span:first-child::before { content: none; }

/* ── formuliervelden ────────────────────────────────────────────────── */

.velden { display: grid; gap: 14px; margin: 0 0 18px; }
.velden-rij { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.veld { display: grid; gap: 6px; }
.veld > span { font-size: 14px; color: var(--muted); }
.veld input {
  width: 100%;
  height: 54px;
  padding: 0 14px;
  font-size: 17px;           /* ≥16px: iOS zoomt dan niet in */
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 160ms;
}
.veld input::placeholder { color: var(--subtle); }
.veld input:focus { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.fout { color: var(--error); font-size: 14.5px; margin: 0 0 14px; }
.fout:empty { display: none; }

/* ── keuzes ─────────────────────────────────────────────────────────── */

.keuzes { display: grid; gap: 10px; }
.keuze {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background 160ms, border-color 160ms, transform 120ms;
}
.keuze:hover { background: var(--surface-hover); }
.keuze:active { transform: scale(0.99); }
.keuze[aria-pressed="true"] { background: var(--surface-on); border-color: var(--text); }
.keuze-tekst { flex: 1; display: grid; gap: 2px; }
.keuze-titel { font-size: 16.5px; font-weight: 500; }
.keuze-sub { font-size: 14px; color: var(--muted); }
.rondje {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  transition: background 160ms, border-color 160ms;
}
.keuze[aria-pressed="true"] .rondje { background: var(--text); border-color: var(--text); color: var(--ink); }
.rondje svg { width: 12px; height: 12px; opacity: 0; }
.keuze[aria-pressed="true"] .rondje svg { opacity: 1; }

/* Staat: vier streepjes als niveau-aanduiding. */
.niveau { display: flex; gap: 3px; flex: none; }
.niveau i { width: 5px; height: 18px; border-radius: 1px; background: var(--line); }
.niveau i.aan { background: var(--text); }

/* Aantal kamers: één tik */
.getallen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.getal {
  height: 60px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 22px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  transition: background 160ms, border-color 160ms;
}
.getal:hover { background: var(--surface-hover); }
.getal[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); font-weight: 400; }

/* Kamerkaarten: maat + eigen voorzieningen per kamer */
.kamers { display: grid; gap: 12px; }
.kamer {
  padding: 14px 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 200ms;
}
.kamer.af { border-color: rgba(255, 255, 255, 0.18); }
.kamer-kop { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.kamer-nr { font-weight: 500; font-size: 16.5px; }
.kamer-samen { color: var(--subtle); font-size: 14px; text-align: right; }
.kamer.af .kamer-samen { color: var(--muted); }
.kamer-label { margin: 0 0 6px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); }
.maten { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.maten button {
  height: 44px;
  padding: 0 2px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;      /* "28+ m²" op één regel, ook op 320 px */
}
.maten button:hover { background: var(--surface-hover); }
.maten button[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); font-weight: 500; }
.eigen-rij { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.eigen-rij button {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 9px 2px 7px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12.5px;
}
.eigen-rij button svg { width: 24px; height: 24px; }
.eigen-rij button:hover { background: var(--surface-hover); }
.eigen-rij button[aria-pressed="true"] { background: var(--surface-on); border-color: var(--text); color: var(--text); }

/* Gesegmenteerde keuze (woonkamer) */
.segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segment-6 { grid-template-columns: repeat(3, 1fr); }
.segment-4 { grid-template-columns: repeat(4, 1fr); }
.segment button {
  height: 48px;
  padding: 0 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  white-space: nowrap;      /* "20+ m²" op één regel, ook op 320 px */
}
.segment button[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); font-weight: 500; }

/* Energielabels */
.labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.label {
  display: flex; align-items: center; gap: 10px;
  height: 54px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 18px; font-weight: 600;
}
.label i { width: 8px; height: 26px; border-radius: 2px; }
.label[aria-pressed="true"] { border-color: var(--text); background: var(--surface-on); }

/* ── tellers ────────────────────────────────────────────────────────── */

.tellers { border-top: 1px solid var(--line); }
.teller {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.teller-tekst { flex: 1; display: grid; }
.teller-titel { font-weight: 500; font-size: 16.5px; }
.teller-sub { color: var(--muted); font-size: 14px; }
.teller-knoppen { display: flex; align-items: center; gap: 4px; }
.teller-knoppen button {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: none;
  transition: background 140ms, opacity 140ms;
}
.teller-knoppen button:hover:not(:disabled) { background: var(--surface-hover); }
.teller-knoppen button:disabled { opacity: 0.25; cursor: default; }
.teller-knoppen output {
  min-width: 34px;
  text-align: center;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.teller.nul .teller-titel, .teller.nul output { color: var(--subtle); }
.totaal { display: flex; justify-content: space-between; padding: 16px 0 0; color: var(--muted); }
.totaal b { color: var(--text); font-weight: 500; }
.sectie { margin: 28px 0 10px; font-weight: 500; }
.sectie + .klein { margin: -6px 0 12px; }

/* ── huur-schuif ────────────────────────────────────────────────────── */

.bedrag-veld { position: relative; display: block; margin: 6px 0 10px; }
.bedrag-veld span {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 300; color: var(--muted);
}
.bedrag-veld input {
  width: 100%;
  height: 68px;
  padding: 0 16px 0 46px;
  font-size: 28px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}
.bedrag-veld input::placeholder { color: var(--subtle); }
.bedrag-veld input:focus { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.omrekening { margin: 0 0 14px; min-height: 1.5em; color: var(--muted); font-size: 14.5px; }

/* ── rekenen ────────────────────────────────────────────────────────── */

.stappen-lijst { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.stappen-lijst li {
  display: flex; align-items: center; gap: 14px;
  color: var(--subtle);
  transition: color 300ms;
}
.stappen-lijst li.klaar { color: var(--text); }
.stappen-lijst .bol {
  width: 24px; height: 24px; flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
}
.stappen-lijst li.bezig .bol { border-top-color: var(--text); animation: draai 800ms linear infinite; }
.stappen-lijst li.klaar .bol { background: var(--text); border-color: var(--text); color: var(--ink); }
.stappen-lijst .bol svg { width: 12px; height: 12px; opacity: 0; }
.stappen-lijst li.klaar .bol svg { opacity: 1; }
@keyframes draai { to { transform: rotate(360deg); } }

/* ── uitkomst ───────────────────────────────────────────────────────── */

.waarde {
  padding: 22px 20px 20px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.waarde.hoofd { background: var(--text); color: var(--ink); border-color: var(--text); }
.waarde-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.waarde.hoofd .waarde-label { color: #4a515c; }
.waarde:not(.hoofd) .waarde-label { color: var(--subtle); }
.waarde-bedrag {
  margin: 10px 0 6px;
  white-space: nowrap;
  font-size: clamp(24px, 7.4vw, 36px);
  font-weight: 300;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.waarde-bedrag .tot { color: inherit; opacity: 0.45; margin: 0 0.12em; }
.waarde-sub { margin: 0; font-size: 14.5px; }
.waarde.hoofd .waarde-sub { color: #4a515c; }
.waarde:not(.hoofd) .waarde-sub { color: var(--muted); }
.tip {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  margin: 4px 0 18px;
  border-left: 2px solid var(--text);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
}
.tip b { color: var(--text); font-weight: 500; }

details.uitleg { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 6px 0 22px; }
details.uitleg summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0;
  font-weight: 500;
  cursor: pointer;
}
details.uitleg summary::-webkit-details-marker { display: none; }
details.uitleg summary svg { transition: transform 200ms; color: var(--muted); }
details.uitleg[open] summary svg { transform: rotate(180deg); }
.uitleg-lijst { margin: 0; padding: 0 0 16px; list-style: none; display: grid; gap: 10px; color: var(--muted); font-size: 15px; }
.uitleg-lijst li { display: flex; justify-content: space-between; gap: 16px; }
.uitleg-lijst li b { color: var(--text); font-weight: 500; text-align: right; white-space: nowrap; }
.disclaimer { margin: 2px 0 18px; color: var(--subtle); font-size: 13.5px; line-height: 1.55; }

.vraag-verkoop { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.vraag-verkoop h2 { font-size: 24px; }

/* ── contact ────────────────────────────────────────────────────────── */

.momenten { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.momenten button {
  height: 46px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
}
.momenten button[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); font-weight: 500; }
.toestemming {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 20px 0 6px;
  color: var(--muted);
  font-size: 14.5px;
  cursor: pointer;
}
.toestemming input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: #ffffff; flex: none; }

/* ── knoppen onderin ────────────────────────────────────────────────── */

.voet {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 16px 20px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(rgba(30, 34, 40, 0), var(--bg) 28%);
  display: grid;
  gap: 10px;
}
.voet:empty { display: none; }
/* Op het uitkomstscherm staan de knoppen gewoon onder de inhoud. */
.voet.vrij { position: static; background: none; padding-top: 4px; }
.hint { margin: 14px 0 0; padding: 12px 14px; border-left: 2px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: 14.5px; }
.knop {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: opacity 160ms, transform 120ms;
}
.knop:active:not(:disabled) { transform: scale(0.99); }
.knop:disabled { opacity: 0.3; cursor: default; }
.knop.licht { background: transparent; color: var(--text); border-color: var(--line-strong); }
.knop svg { width: 18px; height: 18px; }
.tekstlink {
  background: none; border: 0; padding: 10px 0;
  color: var(--muted);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
}
.tekstlink:hover { color: var(--text); }
.voet .tekstlink { justify-self: center; }

.onderschrift {
  padding: 0 20px 22px;
  color: var(--subtle);
  font-size: 12.5px;
  text-align: center;
}

@media (min-width: 900px) {
  /* Alleen naast de kolom; erachter schemert het F-teken als een vlek door de kaarten. */
  .ornament { display: block; }
}
@media (min-width: 640px) {
  .shell { padding-top: 24px; }
  .stap { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
