/* Cost Plus Energy: gedeelde stijl voor alle pagina's.
   De site leest als het rapport: lichte papiergrond, witte rapportvellen,
   cijfers in JetBrains Mono. Groen alleen voor de ene actie of uitkomst per scherm. */

@font-face { font-family: 'Hanken Grotesk'; src: url('/fonts/hanken-grotesk-var.woff2') format('woff2'); font-weight: 300 800; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-var.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }

:root {
  --papier: #F7F9F6;      /* paginagrond */
  --vel: #FFFFFF;         /* rapportvel */
  --inkt: #16252A;        /* tekst, koppen, donkere vlakken */
  --inkt-2: #46574F;      /* lopende tekst */
  --inkt-3: #5E6F67;      /* bijschriften (4.9:1 op papier) */
  --lijn: #D5E0D8;        /* haarlijnen */
  --lijn-zacht: #E6EDE8;
  --teal: #0C8089;        /* links, grafieklijnen */
  --teal-donker: #0A6A72;
  --groen: #16A06A;       /* de ene actie of uitkomst */
  --groen-donker: #0F7A50;
  --groen-licht: #E4F3EB;
  --tint: #F1F8F4;
  --fout: #B42318;

  --sans: 'Hanken Grotesk', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  --rand: clamp(20px, 5vw, 64px);
  --breed: 1200px;
  --sectie: clamp(72px, 9vw, 136px);

  --t-display: clamp(44px, 6.2vw, 84px);
  --t-h2: clamp(30px, 3.6vw, 48px);
  --t-h3: clamp(20px, 1.7vw, 23px);
  --t-lead: clamp(18px, 1.5vw, 21px);
  --t-body: 17px;
  --t-klein: 15px;
  --t-tussen: 18px;       /* lijstkoppen, vraagkoppen */
  --t-kop-klein: 20px;    /* kleine koppen, namen, bevestigingen */
  --t-klein-2: 14.5px;    /* formulierlabels, foutmeldingen, bijschriften */
  --t-mini: 13px;         /* mono-labels, assen, metaregels, legenda's */

  --schaduw-vel: 0 1px 2px rgba(22, 37, 42, .06), 0 18px 40px -12px rgba(22, 37, 42, .18);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* een sprong naar een anker (#contact, #demo, #en) laat de kop van dat stuk onder de vaste kopbalk vandaan komen
   (audit 16 okt, 85): de balk is breed 69-70 px en op de telefoon twee regels, tot ~99 px */
html { scroll-padding-top: 88px; }
@media (max-width: 860px) { html { scroll-padding-top: 116px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--papier); color: var(--inkt);
  font-family: var(--sans); font-size: var(--t-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
h2 { font-size: var(--t-h2); line-height: 1.08; }
h3 { font-size: var(--t-h3); letter-spacing: -0.015em; line-height: 1.25; }
p { text-wrap: pretty; }

a { color: var(--teal-donker); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--inkt); }
::selection { background: var(--groen-licht); color: var(--inkt); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.cijfer { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--breed); margin: 0 auto; padding-inline: var(--rand); }
.sectie { padding-block: var(--sectie); }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--inkt-2); max-width: 34em; }
.tekst { color: var(--inkt-2); max-width: 36em; }
.klein { font-size: var(--t-klein); color: var(--inkt-3); }

/* ---- Knoppen ---------------------------------------------------------- */
.knop {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 650; font-size: var(--t-body); line-height: 1.2;
  padding: 17px 26px; border: 0; border-radius: 3px; cursor: pointer;
  background: var(--groen-donker); color: #fff; text-decoration: none;
  transition: background-color .18s ease, transform .18s cubic-bezier(.2,.8,.2,1);
}
.knop:hover { background: var(--inkt); color: #fff; }
.knop:active { transform: translateY(1px); }
.knop svg { width: 18px; height: 18px; flex: none; }
.knop--stil { background: transparent; color: var(--inkt); box-shadow: inset 0 0 0 1px var(--inkt); }
.knop--stil:hover { background: var(--inkt); color: #fff; }
.knop[disabled] { opacity: .6; cursor: progress; }

/* ---- Kopbalk ---------------------------------------------------------- */
.kop {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--papier) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--lijn);
}
.kop .wrap { display: flex; align-items: center; gap: 16px 32px; min-height: 68px; }
.merk { display: flex; align-items: center; gap: 11px; color: var(--inkt); text-decoration: none; font-weight: 650; font-size: var(--t-body); letter-spacing: -0.01em; flex: none; }
.merk:hover { color: var(--inkt); }
.merk-teken { width: 32px; height: 32px; border-radius: 22%; background: var(--groen); display: grid; place-items: center; flex: none; }
.merk-teken svg { width: 21px; height: 21px; }
.nav { display: flex; gap: 4px 26px; margin-left: auto; font-size: var(--t-klein); }
.nav a { color: var(--inkt-2); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--inkt); }
.nav a[aria-current="page"] { color: var(--inkt); border-bottom-color: var(--teal); font-weight: 600; }
.kop-actie { font-size: var(--t-klein); padding: 11px 16px; }
@media (max-width: 860px) {
  .kop .wrap { flex-wrap: wrap; min-height: 0; padding-block: 10px 0; gap: 8px 16px; }
  .kop-actie { margin-left: auto; padding: 9px 13px; font-size: var(--t-klein-2); }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; gap: 22px; font-size: var(--t-klein); padding-bottom: 2px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 8px 0 9px; }
}

/* ---- Rapportvel: het terugkerende bewijsstuk -------------------------- */
.vel {
  background: var(--vel); border-radius: 2px; box-shadow: var(--schaduw-vel);
  padding: clamp(22px, 3vw, 40px); position: relative; color: var(--inkt);
}
.vel-kop {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: var(--t-mini); color: var(--inkt-3); letter-spacing: .02em;
  padding-bottom: 12px; border-bottom: 1px solid var(--inkt); margin-bottom: clamp(18px, 2.4vw, 28px);
}
.vel-voet { margin-top: 18px; font-family: var(--mono); font-size: var(--t-mini); color: var(--inkt-3); }

/* ---- Strook van 96 kwartieren ---------------------------------------- */
.dag { position: relative; }
/* uitlezing boven het aangewezen staafje, met een kort streepje ernaartoe (.aan en --q komen uit kwartieren.js) */
.dag-meter { position: relative; height: 22px; margin-bottom: 10px; }
/* 20 okt: de uitlezing staat vast links boven de strook; tot dan schoof hij bij elk kwartier mee en centreerde hij zich
   opnieuw, wat onrustig was (Jan-Willem: 'doet leip als je er overheen gaat met je muis') */
.dag-meter .kwartier-info { position: absolute; bottom: 0; left: 0; text-align: left; white-space: nowrap; font-family: var(--mono); font-size: var(--t-mini); color: var(--inkt); font-variant-numeric: tabular-nums; }
.dag-meter::after { content: ""; position: absolute; left: calc((var(--q, 0) + .5) / 96 * 100%); bottom: -10px; width: 1px; height: 8px; background: var(--inkt); opacity: 0; }
.dag.aan .dag-meter::after { opacity: 1; }
/* uitleg onder de strook, op de grond, alleen zolang de strook wordt aangewezen */
.dag-uitleg { max-width: 46em; margin: 12px 0 0; font-size: var(--t-klein); line-height: 1.55; color: var(--inkt-2); opacity: 0; transition: opacity .2s; }
.dag.gezien .dag-uitleg { opacity: 1; }
.kwartieren { display: grid; grid-template-columns: repeat(96, 1fr); gap: 2px; align-items: end; height: 44px; cursor: crosshair; touch-action: pan-y; }
.kwartieren:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.kwartieren i { display: block; background: var(--teal); opacity: .5; border-radius: 2px 2px 0 0; }
.kwartieren i.piek { opacity: .9; }
.kwartieren i.actief { background: var(--inkt); opacity: 1; }
.kwartieren-bijschrift { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-family: var(--mono); font-size: var(--t-mini); color: var(--inkt-3); }
@media (max-width: 640px) {
  .dag-meter { height: auto; min-height: 3em; display: flex; align-items: flex-end; justify-content: flex-start; }
  .dag-meter .kwartier-info { position: static; width: auto; white-space: normal; }
}

/* ---- Haarlijnlijsten (in plaats van kaartjes) -------------------------- */
.regels { list-style: none; padding: 0; border-top: 1px solid var(--inkt); }
.regels > li { border-bottom: 1px solid var(--lijn); padding: 20px 0; }

/* ---- Voet ------------------------------------------------------------- */
.voet { border-top: 1px solid var(--lijn); background: var(--papier); color: var(--inkt-3); font-size: var(--t-klein); }
.voet .wrap { display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; align-items: center; padding-block: 32px; }
.voet nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.voet a { color: var(--inkt-3); text-decoration: none; }
.voet a:hover { color: var(--inkt); text-decoration: underline; }
.voet .merk { font-size: var(--t-klein); }
.voet .merk-teken { width: 26px; height: 26px; }
.voet .merk-teken svg { width: 17px; height: 17px; }
.voet-regel { width: 100%; padding-top: 16px; border-top: 1px solid var(--lijn-zacht); font-size: var(--t-klein-2); }

/* ---- Verschijnen (één moment, standaard zichtbaar) -------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .groei rect.staaf { transform-box: fill-box; transform: scaleY(0); transition: transform .9s cubic-bezier(.16,1,.3,1); }
  .js .groei.klaar rect.staaf { transform: scaleY(1); }
  .js .groei rect.staaf.op { transform-origin: 50% 100%; }
  .js .groei rect.staaf.neer { transform-origin: 50% 0%; }
}
