/* CLARA delivery page for Immoweb.
   Brand tokens and the light-only rule mirror the report itself. */

:root {
  color-scheme: only light;
  --paper: #f4f7f5; --card: #ffffff;
  --panel: #0d3b2b; --panel-2: #0a2e22;
  --ink: #15211b; --ink-2: #4c5a52; --muted: #64716a;
  --line: #e2e8e2; --accent: #0e7c5b; --accent-ink: #0a5b43;
  --on-panel: #eaf6ef;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 59, 43, .05), 0 8px 24px rgba(13, 59, 43, .07);
  --shadow-lift: 0 2px 4px rgba(13, 59, 43, .07), 0 14px 36px rgba(13, 59, 43, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
  line-height: 1.12;
  margin: 0;
}
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── hero ─────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(165deg, #f0f7f2 20%, #d8e9df);
  color: var(--ink);
  padding: 34px 0 148px;
}
.hero-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 54px; flex-wrap: wrap;
}
.wordmark {
  height: 30px; width: 180px;
  background: var(--panel);
  -webkit-mask: url(assets/clara-wordmark.png) no-repeat left center / contain;
  mask: url(assets/clara-wordmark.png) no-repeat left center / contain;
}
.hero-tag {
  font-size: 13px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-ink);
  border: 1px solid #b7d2c4;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 640;
  letter-spacing: -0.015em;
  max-width: 17em;
}
.hero-sub {
  max-width: 44em; margin: 18px 0 0;
  font-size: clamp(15px, 1.6vw, 17.5px);
  color: var(--ink-2);
}
.hero-stats { display: flex; gap: 44px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 30px; font-weight: 620; line-height: 1.1;
}
.hero-stats span {
  font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); margin-top: 2px;
}

/* ── histogram cards, overlapping the hero ───────────────────────── */
.charts { margin-top: -108px; }
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.chart-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 14px;
  display: flex; flex-direction: column;
}
.chart-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; min-height: 46px;
}
.chart-card h3 { font-size: 19.5px; font-weight: 620; }
.chart-median { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.chart-median b { color: var(--ink); font-weight: 700; }
.chart-def {
  margin: 6px 0 14px; font-size: 13.5px; line-height: 1.5;
  color: var(--muted); min-height: 3.1em;
}
.chart-def a { color: var(--accent-ink); text-decoration: underline; }
.chart-def a:hover { color: var(--accent); }
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-card details {
  margin-top: 8px; font-size: 12.5px; color: var(--muted);
}
.chart-card summary { cursor: pointer; user-select: none; }
.chart-card summary:hover { color: var(--accent-ink); }
.chart-card table { border-collapse: collapse; margin-top: 8px; width: 100%; }
.chart-card td, .chart-card th {
  text-align: right; padding: 2px 8px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.chart-card th { color: var(--ink-2); border-bottom: 1px solid var(--line); }

.chart-caption {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin: 16px 4px 0; flex-wrap: wrap;
}
.chart-caption p { margin: 0; font-size: 13px; color: var(--muted); max-width: 56em; }
.scale-legend {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); flex: 0 0 auto;
}
.scale-strip {
  width: 180px; height: 10px; border-radius: 3px;
  /* ten discrete one-point steps, same ramp the score boxes use */
  background: linear-gradient(90deg,
    hsl(14.85, 62%, 34%) 0 10%,  hsl(28.55, 62%, 34%) 10% 20%,
    hsl(42.25, 62%, 34%) 20% 30%, hsl(55.95, 62%, 34%) 30% 40%,
    hsl(69.65, 62%, 34%) 40% 50%, hsl(83.35, 62%, 34%) 50% 60%,
    hsl(97.05, 62%, 34%) 60% 70%, hsl(110.75, 62%, 34%) 70% 80%,
    hsl(124.45, 62%, 34%) 80% 90%, hsl(138.15, 62%, 34%) 90% 100%);
}

/* ── address groups ──────────────────────────────────────────────── */
.addresses { margin: 58px auto 0; }
.addresses h2 {
  font-size: clamp(24px, 3vw, 32px); font-weight: 620;
  letter-spacing: -0.01em;
}
.section-sub { margin: 10px 0 0; color: var(--ink-2); max-width: 46em; }
.group { margin-top: 34px; }
.group h3 {
  font-size: 15px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent-ink);
  display: flex; align-items: center; gap: 14px;
}
.group h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px; margin-top: 16px;
}
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  color: inherit; text-decoration: none;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.card:hover, .card:focus-visible {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
  border-color: #cfdcd4;
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.street {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18.5px; font-weight: 620; line-height: 1.2;
}
.commune { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.badge {
  flex: 0 0 auto; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap; margin-top: 2px;
}
.badge.highres { color: var(--accent-ink); background: #e2f1ea; }
.badge.nationwide { color: var(--muted); background: #edf0ee; }
.desc { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); min-height: 2.6em; }
.ratings {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 14px;
}
.rating { display: flex; flex-direction: column; gap: 5px; }
.rating .chip, .rating .chip-band { margin-top: auto; }
.rlabel {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.chip {
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; padding: 7px 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 21px; font-weight: 660; color: #fff;
  font-variant-numeric: tabular-nums;
}
.card-cta {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 13.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-view { color: var(--accent-ink); text-decoration: none; }
.card-view::after { content: ""; position: absolute; inset: 0; }
.card:hover .card-view { color: var(--accent); }
.card-dl {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink-2); text-decoration: none;
}
.card-dl:hover { color: var(--accent-ink); }
.card-dl svg { width: 15px; height: 15px; display: block; }

/* ── footer ──────────────────────────────────────────────────────── */
footer {
  margin-top: 70px; padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
footer p { margin: 0 0 8px; max-width: 62em; }

/* ── tooltip ─────────────────────────────────────────────────────── */
.tooltip {
  position: fixed; z-index: 10; pointer-events: none;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-lift);
  padding: 8px 12px; font-size: 13px; line-height: 1.45;
  color: var(--ink-2); max-width: 240px;
}
.tooltip b { color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .hero { padding-bottom: 120px; }
  .hero-top { margin-bottom: 38px; }
  .hero-stats { gap: 30px; }
  .charts { margin-top: -88px; }
  .chart-head { min-height: 0; }
  .chart-def { min-height: 0; }
  .desc { min-height: 0; }
}
