/* Homepage (taste-skill 2.5 page, ADR-024). Palette from `start.mjs brand` with the Veldboek colours;
   type = the house fonts (Barlow, Barlow Condensed), self-hosted. Page CSS only inside visuals. */
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 500; font-display: swap; src: url("fonts/barlow-condensed-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --p-bg: #e6ebe2; --p-surface: #f5f7f2; --p-ink: #26321f; --p-muted: #566152;
  --p-accent: #f2641e; --p-accent-ink: #111111; --p-action: #f2641e; --p-action-ink: #111111;
  --p-inv-bg: #26321f; --p-inv-surface: #313d2b; --p-inv-ink: #e6ebe2; --p-inv-muted: #a3aa9e;
  --p-inv-accent: #f2641e; --p-inv-accent-ink: #111111; --p-inv-action: #f2641e; --p-inv-action-ink: #111111;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --font-text: "Barlow", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.005em;
  --display-tracking-xl: -0.01em;
  --display-stretch: 100%;
  --ly-scale: 0.9;
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav__logo img { flex: none; }

/* language switch in the bar */
.lang-switch ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.lang-switch a { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; font: 500 13px/1 var(--font-text);
  color: var(--muted); text-decoration: none; border-radius: var(--r-sm); }
.lang-switch a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--action); }
.lang-switch a:hover { color: var(--ink); }
@media (max-width: 1199px) { .nav__actions .lang-switch { display: none; } }

/* the tally sheet: the app's own count grid, drawn as live HTML (hero window + app frame) */
.tally-win { background: var(--p-surface); color: var(--p-ink); border-radius: 8px; border-top: 5px solid var(--p-ink);
  box-shadow: 0 30px 70px -30px rgb(0 0 0 / .45); font: 400 15px/1.3 var(--font-text); overflow: hidden; }
.tally-win__bar { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #c9d2c3; }
.tally-win__bar b { font: 500 19px/1 var(--font-display); }
.tally-win__bar span { color: var(--p-muted); font-size: 13px; }
.tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; padding: 6px 18px 0; }
.tally__cell { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; border-bottom: 1px solid #c9d2c3; }
.tally__cell span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tally__cell b { flex: none; display: grid; place-items: center; width: 52px; height: 34px; border: 1.5px solid #7a8772; border-radius: 4px;
  font: 600 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.tally__cell b:not(:empty), .tally__cell.is-filled b { border-color: var(--p-accent); background: color-mix(in srgb, var(--p-accent) 10%, transparent); }
.tally__total { display: flex; justify-content: flex-end; align-items: baseline; gap: 10px; padding: 10px 18px 16px; font-weight: 500; }
.tally__total b { font: 600 34px/1 var(--font-display); color: #b8430f; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) { .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tally-win__bar span { display: none; } }

/* app-frame (sections-library.md app-frame, page CSS of the recipe, with the client's own panes) */
.app.ui { --u-bg: #f5f7f2; --u-border: #c9d2c3; --u-line: #c9d2c3; --u-r: 8px; --u-shadow: 0 24px 60px -36px rgb(0 0 0 / .35);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg);
  border: 1px solid var(--u-border); border-top: 5px solid var(--p-ink); border-radius: var(--u-r); box-shadow: var(--u-shadow); color: var(--p-ink); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) { .app.ui { grid-template-rows: minmax(0, 1fr); } .app > .app__pane--list { display: none; } .app > .app__pane + .app__pane { border-top: 0; } }
.applist { font: 400 15px/1.3 var(--font-text); }
.applist__bar, .appopen__head { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #c9d2c3; }
.applist__bar b, .appopen__head b { font: 500 19px/1 var(--font-display); }
.applist__bar span, .appopen__head span { color: var(--p-muted); font-size: 13px; }
.applist__cols, .applist__rows li { display: grid; grid-template-columns: 5.5rem 1fr 4rem; gap: 12px; padding: 0 18px; align-items: center; }
.applist__cols { font-size: 13px; color: var(--p-muted); min-height: 36px; border-bottom: 1px solid #c9d2c3; }
.applist__cols span:last-child, .applist__rows b { text-align: right; }
.applist__rows { list-style: none; margin: 0; padding: 0; }
.applist__rows li { min-height: 46px; border-bottom: 1px solid #dde3d8; font-variant-numeric: tabular-nums; }
.applist__rows li.is-on { background: color-mix(in srgb, var(--p-accent) 10%, transparent); box-shadow: inset 3px 0 0 var(--p-accent); }
.applist__rows b { font: 600 18px/1 var(--font-display); }
.appopen { font: 400 15px/1.3 var(--font-text); }
.tally--open { padding-top: 8px; }

/* split frame and feature panels holding the client's own screens */
.frame--shot { background: var(--p-surface); border: 1px solid #c9d2c3; overflow: hidden; aspect-ratio: 1 / 1; max-height: 640px; }
.frame--shot .frame__img, .shot .frame__img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
#functies .panel { --p-h: 240px; background: var(--p-surface); height: var(--p-h); }
#functies .panel .frame__img { position: absolute; inset: 0; }
@media (max-width: 639px) { #functies .panel { --p-h: 200px; } }
.facts { list-style: none; margin: var(--s-5) 0; padding: 0; }
.facts li { padding: 12px 0; border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }
.facts li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); }

/* regions: a ruled table on the inverse ground, the stats strip under it */
.regions { margin-top: var(--s-7); display: grid; gap: var(--s-6); }
.regions table { width: 100%; border-collapse: collapse; font-size: 18px; }
.regions th, .regions td { text-align: left; padding: 14px 0; border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.regions thead th { font: 500 13px/1 var(--font-text); color: var(--muted); }
.regions tbody th { font: 500 24px/1.1 var(--font-display); }
.regions td:nth-child(2) { font-variant-numeric: tabular-nums; }
.regions__shot { border-radius: 8px; overflow: hidden; border: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.regions__shot img { display: block; width: 100%; }

/* contact form (legacy ids and messages, the kit's field look) */
.contact { margin-top: var(--s-5); }
.contact-form textarea { min-height: 96px; }
.contact-form { display: grid; gap: var(--s-4); }
.contact-form .field label { display: block; font: 500 14px/1.3 var(--font-text); margin-bottom: 6px; }
.contact-form input, .contact-form textarea { width: 100%; font: 400 16px/1.4 var(--font-text); color: var(--ink); background: var(--p-surface);
  border: 1px solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius: var(--r-sm); padding: 12px 14px; min-height: 48px; }
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form [aria-invalid="true"] { border-color: #a1352b; }
.contact-form .field__error { color: #a1352b; font-size: 14px; margin: 6px 0 0; }
.contact-form .form-status { margin: 0; font-size: 15px; }
.contact-form .form-status[data-state="success"] { color: #2f6b35; } .contact-form .form-status[data-state="error"] { color: #a1352b; }
.turnstile-box { min-height: 65px; }
.footer__legal .credits { color: var(--muted); font-size: 13px; }
@media (max-width: 639px) { #vragen { --hm: 2; } }

/* body text in ink (7:1); the hero lead too */
.hero--field .hero__lead { color: var(--ink); }

/* hero: the words left, a roebuck at a field edge on the right, and the app's tally sheet laid
   over the photograph's foot, breaking out over the column line so the product sits in the field */
.hero--field .hero__text { align-self: center; padding-bottom: var(--s-6); }
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 460px; gap: var(--s-5);
  margin: var(--s-8) 0 0; padding-top: var(--s-5); border-top: 1px solid var(--line); }
.hero__stats > div { display: grid; gap: 2px; }
.hero__stats dt { font: 600 clamp(28px, 2.6vw, 38px)/1 var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.hero__stats dd { margin: 0; font-size: var(--t-small); color: var(--muted); max-width: 16ch; }
.hero__media--field { overflow: visible; background: none; border-radius: 0; }
.hero__media--field > picture > img { border-radius: var(--r-lg); --ly-pos: 50% 40%; object-position: 50% 40%; }
.tally-win--hero .ui-pause { top: 7px; right: 12px; bottom: auto; left: auto; }
.tally-win--hero .tally-win__bar { padding-right: 56px; }
.tally-win--hero { position: absolute; z-index: 2; left: calc(-1 * clamp(40px, 9vw, 140px)); bottom: var(--s-7);
  width: min(560px, 88%); box-shadow: 0 18px 50px -18px rgb(20 30 15 / .45); }
.tally-win--hero .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1439px) { .tally-win--hero { left: 0; } }
@media (max-width: 1279px) {
  .hero--field h1 { font-size: clamp(40px, 4.8vw, 60px); }
}
/* tablet and phone: words, then the photograph, then the tally sheet sliding up over its foot */
@media (max-width: 1023px) {
  main > .hero.hero--field { height: auto; min-height: 0; }
  .hero--field > .wrap, .hero--field > .wrap > .hero-text { height: auto; }
  .hero--field .hero__text { padding-bottom: 0; }
  .hero--field .hero__media.hero__media--field { flex: none; height: auto; min-height: 0; overflow: visible; margin-top: var(--s-7); }
  .hero--field .hero__media--field > picture > img { position: relative; inset: auto; display: block; height: clamp(240px, 46vw, 420px); object-position: 70% 35%; }
  .hero--field .tally-win--hero { position: relative; left: auto; right: auto; bottom: auto; width: auto; max-width: 620px; margin: -72px auto 0; }
}
@media (max-width: 639px) {
  .hero__stats { gap: var(--s-4); margin-top: var(--s-6); }
  .hero--field .tally-win--hero { margin: -56px 12px 0; }
}

/* focus ring: the orange accent is 2.6:1 on the sage ground, so the ring is drawn in the ink (11:1) */
:focus-visible { outline-color: var(--ink) !important; }
.ground-inverse :focus-visible { outline-color: var(--p-inv-ink) !important; }

/* #heatmap: a working example of the heatmap (site/heatdemo.js): satellite picture, the density field
   on a canvas over it, a season slider under it, and the reach per species beside it */
.heatdemo { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: var(--r-lg); }
.heatdemo > .frame__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heatdemo__field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.heatdemo__bar { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: baseline; margin-top: var(--s-4);
  padding: 14px 18px 12px; background: var(--p-surface); border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); border-radius: var(--r-md); }
.heatdemo__bar label { font-weight: 500; }
.heatdemo__bar output { font: 600 22px/1 var(--font-display); margin-left: 4px; }
.heatdemo__n { font-size: var(--t-small); font-variant-numeric: tabular-nums; }
.heatdemo__bar input[type="range"] { grid-column: 1 / -1; width: 100%; height: 28px; margin: 0; accent-color: var(--p-accent); cursor: pointer; }
.heatdemo__ends { grid-column: 1 / -1; display: flex; justify-content: space-between; font-size: var(--t-small); }
.heatdemo__note { margin-top: var(--s-3); color: var(--ink); max-width: 68ch; }
.heatdemo__note strong { font-weight: 500; }
.ranges { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.ranges caption { text-align: left; font: 600 20px/1.2 var(--font-display); padding-bottom: 6px; }
.ranges th, .ranges td { text-align: left; padding: 5px 0; border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); font-weight: 400; }
.ranges thead th { border-top: 0; font-size: 13px; color: var(--muted); }
.ranges td, .ranges thead th:not(:first-child) { text-align: right; }
.ranges tbody th { font-weight: 500; }
#heatmap .facts { margin: 0; }
#heatmap .facts li { padding: 8px 0; }
/* the working example needs its full height: on a low screen the section grows instead of running into the next one */
main > section#heatmap { height: auto; min-height: 100vh; min-height: 100svh; }
main > section#heatmap > .wrap { height: auto; }
