/* Voor de tijd van het jaar: the JustBee look (paper, ink, yellow; Fredoka and Nunito Sans, as on
   justbee.nl) with a header that turns from ice blue to warm red with the weather. */
:root {
  --paper: #faf7ee;
  --panel: #fffdf6;
  --ink: #1f1f1f;
  --muted: #6a665d;
  --line: #e8dfc9;
  --yellow: #ffc629;
  --yellow-soft: #fff0b7;
  --gold: #b38b10;
  --cold-3: #2c5aa0;
  --cold-2: #5c8fd6;
  --cold-1: #a9c6ec;
  --neutral: #efe6cf;
  --warm-1: #ffc46b;
  --warm-2: #f08a3c;
  --warm-3: #d9472b;
  --mood-bg: #fff0b7;
  --mood-glow: rgba(255, 198, 41, .45);
  --mood-accent: #8a6a00;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Nunito Sans', sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

h1,
h2,
h3 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-decoration-color: #d5a400;
  text-underline-offset: 4px;
}

button,
select,
input {
  font: inherit;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: .17em;
  font-weight: 800;
  text-transform: uppercase;
  color: #73654c;
}

/* ---------- JustBee return bar (as on the other subdomains) */

.justbee-return {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 8px max(24px, calc((100vw - 1180px) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font: 800 14px 'Nunito Sans', sans-serif;
}

.justbee-return a {
  color: var(--ink);
  text-decoration: none;
}

.justbee-return .brand {
  display: block;
  width: 156px;
  line-height: 0;
}

.justbee-return .brand img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- moods: one per verdict level, from ice cold to hot */

.mood-ijskoud { --mood-bg: #c9dcf5; --mood-glow: rgba(44, 90, 160, .35); --mood-accent: var(--cold-3); }
.mood-koud { --mood-bg: #d9e6f7; --mood-glow: rgba(92, 143, 214, .35); --mood-accent: #2f5f9e; }
.mood-fris { --mood-bg: #e6eef6; --mood-glow: rgba(169, 198, 236, .5); --mood-accent: #3d6597; }
.mood-normaal { --mood-bg: #f6efd9; --mood-glow: rgba(255, 198, 41, .3); --mood-accent: #7a6420; }
.mood-zacht { --mood-bg: #fff0c4; --mood-glow: rgba(255, 196, 107, .55); --mood-accent: #8a6000; }
.mood-warm { --mood-bg: #ffe2b8; --mood-glow: rgba(240, 138, 60, .45); --mood-accent: #a24a12; }
.mood-heet { --mood-bg: #ffd2bf; --mood-glow: rgba(217, 71, 43, .45); --mood-accent: #a52a14; }

/* ---------- hero */

.hero {
  background:
    radial-gradient(circle at 82% 30%, var(--mood-glow), transparent 46%),
    var(--mood-bg);
  border-bottom: 1px solid var(--line);
  transition: background-color .6s ease;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 24px 52px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero .eyebrow {
  color: var(--mood-accent);
}

.hero h1 {
  font-size: clamp(36px, 5.6vw, 68px);
  max-width: 15ch;
}

.subline {
  margin: 14px 0 0;
  font: 500 clamp(21px, 2.4vw, 27px) 'Fredoka', sans-serif;
  color: var(--mood-accent);
  max-width: 34ch;
}

.today-card {
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .62);
  border: 1px solid rgba(31, 31, 31, .08);
  max-width: 540px;
}

.today-label {
  margin: 0 0 8px;
  font-weight: 800;
  font-size: 13px;
  color: var(--muted);
}

.today-label::first-letter {
  text-transform: uppercase;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.today-grid dt {
  font-size: 13px;
  color: var(--muted);
}

.today-grid dd {
  margin: 2px 0 0;
  font: 600 clamp(22px, 3vw, 30px) 'Fredoka', sans-serif;
  white-space: nowrap;
}

.today-grid dd small {
  display: block;
  font: 700 12px 'Nunito Sans', sans-serif;
  color: var(--muted);
}

.today-rarity {
  margin: 12px 0 0;
  font-weight: 700;
}

.today-rarity:empty {
  display: none;
}

.load-error {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px dashed #d9b25a;
}

.load-error[hidden] {
  display: none;
}

.load-error p {
  margin: 0 0 10px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 22px;
}

.control {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.control select {
  min-height: 44px;
  min-width: 200px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(31, 31, 31, .2);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

button.ghost {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

button.ghost:hover,
button.ghost:focus-visible {
  background: var(--ink);
  color: var(--yellow);
}

button.ghost:disabled {
  opacity: .6;
  cursor: wait;
}

/* ---------- the meter: today among all days around this date */

.meter-wrap {
  margin: 0;
  text-align: center;
}

.meter {
  width: min(100%, 440px);
  height: auto;
}

.meter-wrap figcaption {
  margin: 8px auto 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 38ch;
}

.meter-track { fill: rgba(255, 255, 255, .7); stroke: rgba(31, 31, 31, .12); }
.meter-band { fill: rgba(31, 31, 31, .1); }
.meter-normal { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 4 3; }
.meter-label { fill: var(--muted); font: 700 11px 'Nunito Sans', sans-serif; }
.meter-label--strong { fill: var(--ink); }
.meter-value { font: 600 50px 'Fredoka', sans-serif; fill: var(--ink); }
.meter-unit { font: 600 20px 'Fredoka', sans-serif; fill: var(--muted); }
.meter-dot { stroke: #fff; stroke-width: 4; }
.meter-pointer { stroke: var(--ink); stroke-width: 2; }

/* ---------- page */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  gap: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  min-width: 0;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 70ch;
}

.fact-card {
  background: var(--yellow-soft);
  border-color: #f2d77c;
}

.fact {
  margin: 0;
  font: 500 clamp(20px, 2.4vw, 26px) 'Fredoka', sans-serif;
  line-height: 1.35;
  max-width: 60ch;
}

.credit {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- the week */

.week {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.week-row {
  display: grid;
  grid-template-columns: 150px 86px minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.week-row.is-past {
  opacity: .6;
}

.week-row.is-today {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 0 0 3px var(--yellow-soft);
}

.week-day {
  font-weight: 800;
  line-height: 1.2;
}

.week-day::first-letter {
  text-transform: uppercase;
}

.week-day small {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
}

.week-temp {
  font: 600 24px 'Fredoka', sans-serif;
  text-align: right;
  white-space: nowrap;
}

.week-temp small {
  display: block;
  font: 700 12px 'Nunito Sans', sans-serif;
  color: var(--muted);
}

.week-bar {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: #f1ead6;
}

.week-bar::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  width: 2px;
  margin-left: -1px;
  background: rgba(31, 31, 31, .35);
}

.week-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.week-verdict {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
}

.week-verdict small {
  display: block;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- year chart */

.chart-wrap {
  position: relative;
}

.chart {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
  cursor: crosshair;
}

.chart-band { fill: #ffd98a; }
.chart-mean { fill: none; stroke: #b0700f; stroke-width: 2.5; }
.chart-grid { stroke: rgba(31, 31, 31, .1); stroke-width: 1; }
.chart-grid--zero { stroke: rgba(44, 90, 160, .45); stroke-dasharray: 5 4; }
.chart-label { fill: var(--muted); font: 700 13px 'Nunito Sans', sans-serif; }
.chart-dot { stroke: var(--ink); stroke-width: 1.5; }
.chart-dot--today { stroke-width: 3; }
.chart-today { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 4; }
.chart-hover { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 3; }

.chart-tip {
  position: absolute;
  top: 8px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  font-size: 14px;
  pointer-events: none;
  display: grid;
  text-align: center;
  white-space: nowrap;
}

.chart-tip[hidden] {
  display: none;
}

.legend {
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
  color: var(--muted);
}

.key {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.key-band { background: #ffd98a; }
.key-line { height: 3px; background: #b0700f; margin-left: 8px; }
.key-dot { border-radius: 50%; background: linear-gradient(90deg, var(--cold-2), var(--warm-2)); border: 1.5px solid var(--ink); margin-left: 8px; }

/* ---------- text */

.small-print {
  font-size: 15px;
  color: var(--muted);
}

.small-print p {
  max-width: 80ch;
}

.small-print p:first-child {
  margin-top: 0;
}

.small-print p:last-child {
  margin-bottom: 0;
}

/* ---------- small screens */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 32px;
  }

  .week-row {
    grid-template-columns: 120px 76px minmax(0, 1fr);
  }

  .week-verdict {
    grid-column: 1 / -1;
    font-size: 14px;
  }

  .week-verdict small {
    display: inline;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .justbee-return {
    padding-inline: 16px;
  }

  .justbee-return .brand {
    width: 126px;
  }

  .justbee-return > a:last-child {
    font-size: 12px;
  }

  .hero-inner,
  .page {
    padding-inline: 16px;
  }

  .card {
    padding: 22px 16px;
  }

  .today-card {
    padding: 14px;
  }

  .today-grid {
    gap: 8px;
  }

  .control,
  .control select {
    width: 100%;
  }

  .week-row {
    grid-template-columns: 92px 64px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 8px;
  }

  .week-temp {
    font-size: 21px;
  }

  .chart-label {
    font-size: 34px;
  }

  .chart-dot {
    stroke-width: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
