/* bosjes.com — neutraal product-portaal
   "engineered index"-esthetiek: mono-labels, rustige grotesk-koppen. */

:root {
  color-scheme: light dark;

  /* Type-rollen */
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Type-schaal */
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.82rem);
  --step-0: clamp(0.95rem, 0.92rem + 0.15vw, 1.02rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3: clamp(2.2rem, 1.7rem + 2.4vw, 3.6rem);

  /* Ritme */
  --gap: clamp(1rem, 0.7rem + 1.4vw, 1.75rem);
  --pad: clamp(1.25rem, 0.9rem + 1.8vw, 2rem);
  --radius: 14px;
  --maxw: 74rem;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Tokens: licht (default) ---- */
:root {
  --bg: #f6f8f6;
  --bg-grain: #eef2ef;
  --surface: #ffffff;
  --surface-2: #f2f5f2;
  --ink: #161d1a;
  --ink-soft: #3c4a44;
  --muted: #66756e;
  --line: #dde4e0;
  --line-strong: #c6d0cb;

  --brand: #2e5a4e;
  --brand-ink: #234a40;

  --accent-schildpad: #b0742a;
  --accent-sportclimb: #bc4a38;

  --live: #2f7d5b;
  --live-bg: #e6f2ec;

  --shadow: 0 1px 2px rgba(22, 29, 26, 0.05), 0 8px 24px -12px rgba(22, 29, 26, 0.12);
  --shadow-lift: 0 2px 4px rgba(22, 29, 26, 0.06), 0 18px 40px -18px rgba(22, 29, 26, 0.22);
}

/* ---- Tokens: donker ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1512;
    --bg-grain: #131b17;
    --surface: #161f1b;
    --surface-2: #1b2621;
    --ink: #eaf1ed;
    --ink-soft: #c3d0ca;
    --muted: #8ba096;
    --line: #26332d;
    --line-strong: #33453d;

    --brand: #6fbfa4;
    --brand-ink: #8fd2ba;

    --accent-schildpad: #d89b52;
    --accent-sportclimb: #e0715f;

    --live: #57c98f;
    --live-bg: #172a22;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.5), 0 22px 48px -20px rgba(0, 0, 0, 0.7);
  }
}

/* ---- Expliciete toggle wint in beide richtingen ---- */
:root[data-theme="light"] {
  --bg: #f6f8f6; --bg-grain: #eef2ef; --surface: #ffffff; --surface-2: #f2f5f2;
  --ink: #161d1a; --ink-soft: #3c4a44; --muted: #66756e; --line: #dde4e0; --line-strong: #c6d0cb;
  --brand: #2e5a4e; --brand-ink: #234a40;
  --accent-schildpad: #b0742a; --accent-sportclimb: #bc4a38;
  --live: #2f7d5b; --live-bg: #e6f2ec;
  --shadow: 0 1px 2px rgba(22, 29, 26, 0.05), 0 8px 24px -12px rgba(22, 29, 26, 0.12);
  --shadow-lift: 0 2px 4px rgba(22, 29, 26, 0.06), 0 18px 40px -18px rgba(22, 29, 26, 0.22);
}
:root[data-theme="dark"] {
  --bg: #0f1512; --bg-grain: #131b17; --surface: #161f1b; --surface-2: #1b2621;
  --ink: #eaf1ed; --ink-soft: #c3d0ca; --muted: #8ba096; --line: #26332d; --line-strong: #33453d;
  --brand: #6fbfa4; --brand-ink: #8fd2ba;
  --accent-schildpad: #d89b52; --accent-sportclimb: #e0715f;
  --live: #57c98f; --live-bg: #172a22;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.5), 0 22px 48px -20px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, var(--bg-grain), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, var(--bg-grain), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

a { color: inherit; }

/* ---------- Topbar ---------- */
.topbar {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark .dot-com { color: var(--muted); font-weight: 500; }
.wordmark__mark {
  width: 22px; height: 22px; flex: none;
  color: var(--brand);
}
.topbar__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
}
.topbar__count { display: none; }
@media (min-width: 560px) { .topbar__count { display: inline; } }

.lang-select {
  height: 38px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-select:hover { color: var(--brand); border-color: var(--brand); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--brand); border-color: var(--brand); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Intro ---------- */
.intro { padding-top: clamp(2.5rem, 1.5rem + 5vw, 5.5rem); padding-bottom: clamp(1.5rem, 1rem + 3vw, 3rem); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 1rem;
}
.intro h1 {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 680;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}
.intro p {
  margin: 1.15rem 0 0;
  max-width: 58ch;
  font-size: var(--step-1);
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ---------- Sectiekop ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: clamp(1.5rem, 1rem + 2vw, 2.75rem) 0 var(--gap);
  padding-top: clamp(1rem, 0.5rem + 2vw, 2rem);
  border-top: 1px solid var(--line);
}
.section-head h2 {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}
.section-head .rule-count { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); }

/* ---------- Grid + kaarten ---------- */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  padding-bottom: clamp(2.5rem, 1.5rem + 4vw, 5rem);
}

.card {
  --accent: var(--brand);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--accent);
  opacity: 0.85;
  transform: scaleX(0.18);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.card[data-project="schildpad"] { --accent: var(--accent-schildpad); }
.card[data-project="sportclimb"] { --accent: var(--accent-sportclimb); }

/* ---------- Preview (browser-window met diepte) ---------- */
.preview {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.preview__bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.75rem;
  height: 34px;
  flex: none;
  background: color-mix(in srgb, var(--surface-2) 60%, var(--surface));
  border-bottom: 1px solid var(--line);
}
.preview__dots { display: inline-flex; gap: 6px; flex: none; }
.preview__dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.preview__url {
  flex: 1;
  min-width: 0;
  max-width: 20rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview__screen {
  position: relative;
  color: var(--accent);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
}
/* Alleen een dunne rand-ring voor definitie — geen vignette die de shot dof maakt. */
.preview__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  transition: box-shadow 0.3s var(--ease);
}
/* Bij hover een accent-ring rond de screenshot om de blik erop te trekken. */
.card[data-project]:hover .preview__screen::after,
.card--link:focus-visible .preview__screen::after {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}
.preview__screen svg,
.preview__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.5s var(--ease);
}
.preview__img {
  object-fit: cover;
  object-position: top center;
}
.preview__screen svg .ln { stroke: var(--line-strong); }
.preview__screen svg .mut { fill: var(--muted); opacity: 0.55; }
.preview__screen svg .node-fill { fill: currentColor; opacity: 0.1; }
.preview__screen svg .node2 { fill: var(--surface); stroke: var(--line-strong); }
.preview__screen svg .area { fill: currentColor; opacity: 0.12; }

@media (prefers-reduced-motion: reduce) {
  .card[data-project], .preview__screen::after { transition: none; }
}

/* Kaart-body (padding zit hier zodat de preview full-bleed is) */
.card__body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: var(--pad);
  flex: 1;
}

.card--link { cursor: pointer; }

/* Hover/focus: hele kaart tilt omhoog met een zachte gloed in de projectkleur. */
.card[data-project]:hover,
.card--link:focus-visible {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow:
    var(--shadow-lift),
    0 24px 50px -20px color-mix(in srgb, var(--accent) 55%, transparent),
    0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent);
  outline: none;
}
.card[data-project]:hover::before,
.card--link:focus-visible::before { transform: scaleX(1); }

.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.card__label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--live);
  background: var(--live-bg);
  border: 1px solid color-mix(in srgb, var(--live) 30%, transparent);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}
.status__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 60%, transparent); }
@media (prefers-reduced-motion: no-preference) {
  .status__dot { animation: pulse 2.4s var(--ease) infinite; }
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); }
    70% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--live) 0%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 0%, transparent); }
  }
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 640;
  margin: 0;
  text-wrap: balance;
}
.card__desc { margin: 0; color: var(--ink-soft); line-height: 1.55; }

.card__foot {
  margin-top: auto;
  padding-top: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.linkline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.linkline:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.linkline svg { width: 13px; height: 13px; flex: none; opacity: 0.7; }

/* Placeholder-kaart voor toekomstige projecten */
.card--soon {
  --accent: var(--muted);
  background: transparent;
  border-style: dashed;
  box-shadow: none;
  justify-content: center;
  align-items: flex-start;
  min-height: 12rem;
  padding: var(--pad);
  color: var(--muted);
}
.card--soon::before { display: none; }
.card--soon .card__title { font-size: var(--step-1); color: var(--muted); }
.card--soon p { margin: 0; font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.04em; }

/* ---------- Contact ---------- */
.contact { padding: clamp(1rem, 0.5rem + 2vw, 2rem) 0 clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.contact__panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.contact__panel .eyebrow { margin: 0 0 0.5rem; }
.contact__title {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 620;
  margin: 0;
  max-width: 24ch;
  text-wrap: balance;
}
.btn-mail {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: none;
  font-family: var(--font-mono);
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand);
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
:root[data-theme="dark"] .btn-mail { color: #0f1512; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-mail { color: #0f1512; } }
.btn-mail:hover,
.btn-mail:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  background: color-mix(in srgb, var(--brand) 88%, #000);
}
.btn-mail svg { width: 17px; height: 17px; }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 2.5rem;
}
.foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
}
.foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.foot a:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.foot__contact { display: inline-flex; align-items: center; gap: 0.4rem; }
.foot__contact svg { width: 14px; height: 14px; }

/* ---------- Reveal on load ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); }
  .reveal.is-in { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
}

:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
