:root {
  --sterk-geel: #FFC42E;
  --sterk-terracotta: #C2611E;
  --sterk-terracotta-hover: #A94F12;
  --sterk-bruin: #6E4C41;
  --sterk-bruin-zacht: #8f746b;
  --sterk-goud: #E9A13B;
  --sterk-groen-accent: #B7DBA1;
  --creme: #FDFBF8;
  --wit: #FFFFFF;
  --lijn: #EFE9E4;
  --perzik: #f3dccb;
  --font-display: 'Marcellus', Georgia, serif;
  --font-body: 'Jost', system-ui, sans-serif;
  --radius-hero: 24px;
  --radius-card: 12px;
  --radius-pill: 999px;
  --schaduw-zacht: 0 4px 24px rgba(110, 76, 65, .10);
  --schaduw-zweef: 0 8px 32px rgba(110, 76, 65, .18);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--creme);
  color: var(--sterk-bruin);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.05;
  margin: 0;
}
a { color: inherit; }

.bar {
  background: var(--sterk-geel);
  font-size: 14px;
  text-align: center;
  padding: 6px 16px;
}
.nav {
  background: var(--wit);
  border-radius: 0 0 var(--radius-hero) var(--radius-hero);
  padding: 16px 32px;
  box-shadow: var(--schaduw-zacht);
}
.logo { text-decoration: none; display: inline-flex; align-items: baseline; gap: 10px; }
.logo-mark { font-family: var(--font-display); font-size: 28px; letter-spacing: .08em; color: var(--sterk-goud); }
.logo-sub { text-transform: uppercase; letter-spacing: .12em; font-size: 14px; font-weight: 400; }

main { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

/* ---------- hero ---------- */
.hero { padding: 88px 0 72px; max-width: 860px; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); }
.lead { font-size: 19px; max-width: 62ch; margin: 24px 0 32px; }
.accent-onderstreept {
  background: linear-gradient(transparent 72%, var(--sterk-groen-accent) 72%, var(--sterk-groen-accent) 92%, transparent 92%);
  padding: 0 .08em;
}
.search { position: relative; display: flex; gap: 12px; flex-wrap: wrap; }
.search input {
  flex: 1 1 320px;
  font: inherit; font-weight: 400; color: inherit;
  padding: 16px 24px;
  border: 1px solid var(--lijn);
  border-radius: var(--radius-pill);
  background: var(--wit);
  box-shadow: var(--schaduw-zacht);
  outline: none;
}
.search input:focus { border-color: var(--sterk-goud); }
.suggest {
  position: absolute; top: 64px; left: 0; right: 0; z-index: 10;
  list-style: none; margin: 0; padding: 8px;
  background: var(--wit); border-radius: var(--radius-card); box-shadow: var(--schaduw-zweef);
}
.suggest li { padding: 10px 16px; border-radius: 8px; cursor: pointer; }
.suggest li:hover, .suggest li[aria-selected="true"] { background: var(--lijn); }
.examples { font-size: 14px; margin-top: 16px; }

/* ---------- knoppen ---------- */
.btn {
  font-family: var(--font-body); font-weight: 400; font-size: 15px;
  text-transform: uppercase; letter-spacing: .06em;
  border-radius: var(--radius-pill);
  padding: 15px 28px;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none; display: inline-block;
}
.btn--primair { background: var(--sterk-terracotta); color: var(--wit); }
.btn--primair:hover { background: var(--sterk-terracotta-hover); }
.btn--ghost { background: transparent; color: var(--sterk-bruin); border-color: var(--sterk-bruin); }
.btn--ghost:hover { background: var(--lijn); }
.btn--klein { padding: 8px 16px; font-size: 13px; white-space: nowrap; }

/* ---------- laden / fout ---------- */
.loading { padding: 80px 0; }
.loading ol { list-style: none; padding: 0; margin: 0; max-width: 520px; }
.loading li { padding: 10px 0; border-bottom: 1px solid var(--lijn); display: flex; gap: 12px; }
.loading li::before { content: '○'; color: var(--sterk-goud); }
.loading li.done::before { content: '●'; }
.loading li.busy { font-weight: 400; }
.error { padding: 48px 0; }
.error .box { background: var(--wit); border-radius: var(--radius-card); padding: 24px; box-shadow: var(--schaduw-zacht); max-width: 640px; }
.address-choice { list-style: none; margin: 12px 0 20px; padding: 0; }
.address-choice a { display: block; padding: 12px 0; border-bottom: 1px solid var(--lijn); color: var(--sterk-bruin); text-decoration: none; }
.address-choice a:hover { color: var(--sterk-terracotta); }

/* ---------- resultaat ---------- */
.result {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  padding: 32px 0 64px;
  align-items: start;
}
.viewer-col { position: sticky; top: 16px; }
.viewer {
  position: relative;
  height: min(68vh, 640px);
  border-radius: var(--radius-hero);
  overflow: hidden;
  background: #f7f1ea;
  box-shadow: var(--schaduw-zacht);
}
.viewer canvas { display: block; cursor: crosshair; }
.model-source { position: absolute; top: 16px; left: 16px; z-index: 1; max-width: 240px; padding: 7px 10px; border-radius: 12px; background: rgba(255,255,255,.94); font-size: 11px; line-height: 1.4; box-shadow: var(--schaduw-zacht); }
.model-source a { text-decoration: none; }
.view-actions { position: absolute; left: 12px; bottom: 14px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.view-actions .btn--ghost { background: var(--creme); }
.view-actions [aria-pressed="true"], .street-actions [aria-pressed="true"] { background: var(--sterk-bruin); color: #fff; }
.viewer > .legend { bottom: 68px; }
.result.is-street .model-source, .result.is-street #heatmap, .result.is-street .home-view { display: none; }
.result.is-street .view-actions { z-index: 6; bottom: 54px; }
.compass {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--wit); box-shadow: var(--schaduw-zacht);
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 15px;
}
.compass span { display: block; transform-origin: 50% 50%; }
.compass::after {
  content: ''; position: absolute; top: 4px; left: 50%; margin-left: -4px;
  border: 4px solid transparent; border-bottom: 7px solid var(--sterk-terracotta);
}
.legend {
  position: absolute; left: 16px; bottom: 16px;
  background: rgba(255, 255, 255, .92); border-radius: var(--radius-card);
  padding: 10px 14px; font-size: 13px; box-shadow: var(--schaduw-zacht);
}
.legend .scale { height: 8px; width: 180px; border-radius: 4px; margin: 6px 0 2px; }
.legend .ends { display: flex; justify-content: space-between; }

.controls { margin-top: 16px; display: grid; gap: 12px; }
.months { display: flex; flex-wrap: wrap; gap: 6px; }
.months button {
  font: inherit; font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .06em;
  background: var(--wit); color: var(--sterk-bruin);
  border: 1px solid var(--lijn); border-radius: var(--radius-pill);
  padding: 4px 12px; cursor: pointer;
}
.months button[aria-selected="true"] { background: var(--sterk-bruin); color: var(--wit); border-color: var(--sterk-bruin); }
.time { display: flex; align-items: center; gap: 12px; }
.time input { flex: 1; accent-color: var(--sterk-terracotta); }
.clock { min-width: 210px; font-size: 14px; }
.toggle { font-size: 15px; display: flex; gap: 8px; align-items: center; }
.toggle input { accent-color: var(--sterk-terracotta); width: 18px; height: 18px; }
.hint { font-size: 14px; margin: 0; color: var(--sterk-bruin-zacht); }

/* ---------- paneel ---------- */
.panel { display: grid; gap: 20px; }
.card {
  background: var(--wit);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--schaduw-zacht);
}
.card h2 { font-size: clamp(26px, 3vw, 34px); }
.card h3 { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.meta { font-size: 14px; color: var(--sterk-bruin-zacht); }
.summary p { margin: 12px 0 0; }
.customer-field { display: grid; gap: 5px; margin: 16px 0; }
.customer-field label { font-weight: 400; }
.customer-field input, .customer-field select { width: 100%; min-width: 0; min-height: 44px; padding: 9px 14px; border: 1px solid var(--lijn); border-radius: 12px; background: var(--creme); color: var(--sterk-bruin); font: inherit; font-size: 16px; }
.customer-field input:focus, .customer-field select:focus { outline: 2px solid var(--sterk-goud); outline-offset: 2px; }
.selected-floor { text-decoration: underline; text-underline-offset: 3px; }
.facade { cursor: pointer; transition: box-shadow .2s; }
.facade:hover { box-shadow: var(--schaduw-zweef); }
.arrow { width: 28px; height: 28px; flex: none; }
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 8px; }
.figure .num { font-family: var(--font-display); font-size: 40px; line-height: 1; }
.figure .lbl { font-size: 14px; }
.badge {
  display: inline-block; border-radius: var(--radius-pill);
  padding: 2px 12px; font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .06em;
  border: 1px solid var(--sterk-bruin);
}
.badge.l0 { background: var(--wit); }
.badge.l1 { background: #f8e9d0; border-color: #f8e9d0; }
.badge.l2 { background: #f1cf8f; border-color: #f1cf8f; }
.badge.l3 { background: var(--sterk-terracotta); border-color: var(--sterk-terracotta); color: var(--wit); }
.section-lbl { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; font-weight: 400; margin: 18px 0 6px; }
.floors { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.floors b { font-weight: 500; }
.heat { margin-top: 6px; }
.heat p { margin: 6px 0; }
.advice {
  margin-top: 16px; padding: 14px 16px;
  background: var(--creme); border-left: 3px solid var(--sterk-goud); border-radius: 0 8px 8px 0;
}
.advice strong { font-weight: 500; }
.shared { font-size: 15px; }
.cta { text-align: left; }
.cta p { margin: 12px 0 20px; }

svg.chart text { font-family: var(--font-body); font-size: 11px; fill: var(--sterk-bruin-zacht); }
svg.chart .val { fill: var(--sterk-bruin); font-weight: 400; }
svg.chart rect.hit { fill: transparent; }

.tip {
  position: fixed; pointer-events: none; z-index: 50;
  background: var(--sterk-bruin); color: var(--wit);
  font-size: 13px; padding: 6px 10px; border-radius: 8px;
  box-shadow: var(--schaduw-zweef); white-space: nowrap;
}

.foot { max-width: 1400px; margin: 0 auto; padding: 24px; font-size: 13px; color: var(--sterk-bruin-zacht); border-top: 1px solid var(--lijn); }
.foot p { margin: 0 0 4px; font-size: 12px; line-height: 1.5; }

@media (max-width: 960px) {
  .result { grid-template-columns: minmax(0, 1fr); }
  .viewer-col { position: static; }
  .viewer { height: 56vh; }
  .hero { padding: 48px 0; }
  .nav { padding: 12px 16px; }
  main { padding: 0 16px; }
  .time { flex-wrap: wrap; }
  .clock { min-width: 0; flex-basis: 100%; }
  .figures { grid-template-columns: 1fr; }
}

/* ---------- straatbeeld ---------- */
.street { position: absolute; inset: 0; z-index: 3; background: #2b2420; }
.street .pano { position: absolute; inset: 0; }
.street-actions { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; }
.street-actions .btn { background: var(--creme); }
.street-choice { max-width: 180px; min-height: 36px; padding: 8px 12px; border: 1px solid var(--lijn); border-radius: var(--radius-pill); color: var(--sterk-bruin); background: var(--creme); font: 400 12px Jost, sans-serif; }
.street-actions .btn[aria-pressed="true"] { background: var(--sterk-bruin); color: #fff; }
.street-sun:disabled { opacity: .6; cursor: default; }
.street canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.street-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 3;
  background: rgba(255, 255, 255, .92); border-radius: var(--radius-pill);
  padding: 6px 12px; font-size: 12px; display: flex; align-items: center; gap: 6px;
  box-shadow: var(--schaduw-zacht);
}
.sl-sun { width: 18px; height: 4px; border-radius: 2px; background: var(--sterk-geel); display: inline-block; }
.sl-dash { width: 18px; height: 0; border-top: 3px dotted var(--sterk-bruin-zacht); display: inline-block; margin-left: 8px; }
.street-msg {
  position: absolute; inset: 0; z-index: 4;
  display: grid; place-items: center; padding: 24px;
  background: var(--creme); text-align: center;
}
.street-msg .box { max-width: 320px; }
.street-msg h3 { margin-bottom: 8px; }

.viewswitch {
  display: inline-flex; background: var(--wit); border-radius: var(--radius-pill);
  padding: 4px; box-shadow: var(--schaduw-zacht); gap: 2px; justify-self: start;
}
.viewswitch button {
  font: inherit; font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .06em;
  border: 0; background: transparent; color: var(--sterk-bruin);
  padding: 7px 16px; border-radius: var(--radius-pill); cursor: pointer;
}
.viewswitch button[aria-selected="true"] { background: var(--sterk-bruin); color: var(--wit); }
