/*
  Inter Commitment — discovery site
  Design tokens, layout and components.
  System-font stack only: no external font downloads (privacy + performance).
*/

:root {
  /* Color tokens — verified for WCAG AA contrast on dark backgrounds. */
  --bg-base: #0b0d10;
  --bg-elevated: #14171c;
  --bg-elevated-2: #1b1f26;
  --border: #262b33;
  --border-strong: #383f4a;

  --text-primary: #f2f4f7;
  --text-secondary: #a6aebb;
  --text-tertiary: #838b99;

  --accent: #8fb0ff;          /* links, small text on dark */
  --accent-strong: #3b5edb;   /* button fills, large icons */
  --accent-strong-hover: #2e4fc4;
  --accent-soft: rgba(143, 176, 255, 0.12);
  --amber: #e8b04b;           /* sparing decorative accent only */

  --focus-ring: #ffffff;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, monospace;

  --max-width: 1160px;

  --transition: 160ms ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 var(--space-4);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.25rem);
}

h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.5rem);
}

p {
  margin: 0 0 var(--space-4);
  color: var(--text-secondary);
  max-width: 68ch;
}

ul,
ol {
  margin: 0 0 var(--space-4);
  padding-left: 1.25em;
  color: var(--text-secondary);
}

li {
  margin-bottom: var(--space-2);
}

a {
  color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong {
  color: var(--text-primary);
  font-weight: 700;
}

::selection {
  background: var(--accent-strong);
  color: #ffffff;
}

/* ---------- Focus visibility ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Fallback for browsers without :focus-visible */
a:focus,
button:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  background: var(--text-primary);
  color: var(--bg-base);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 1000;
  transition: top var(--transition);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

section {
  padding-block: var(--space-9);
}

.section-tight {
  padding-block: var(--space-8);
}

.section-header {
  max-width: 46rem;
  margin-bottom: var(--space-6);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-strong);
  flex-shrink: 0;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}

/*
  The frosted-glass background lives on ::before, not on .site-header
  itself. A `filter`/`backdrop-filter` on an element makes THAT element the
  containing block for its own `position: fixed` descendants (same effect
  as `transform`) — .nav-links is fixed and nested inside .site-header, so
  having backdrop-filter directly on .site-header silently confined the
  "full-screen" mobile menu to the header's own ~73px-tall box instead of
  the viewport. Keeping .site-header filter-free avoids that trap.
*/
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(11, 13, 16, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
}

@supports not (backdrop-filter: blur(1px)) {
  .site-header::before {
    background: var(--bg-base);
  }
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 72px;
}

/*
  The header is position:sticky (~73px tall including its border). Without
  this, jumping to an in-page anchor (#onderzoek, #voor-wie, #visie, ...)
  scrolls the section title flush behind it. 96px = header height + ~24px
  breathing room.
*/
section[id] {
  scroll-margin-top: 96px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-2);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--text-primary);
}

/*
  Header brand lockup: logo-horizontal-dark.svg (Logo Pakket v1.1) by default.
  Below 400px viewport width — our narrowest tested phones — the header swaps
  to icon-badge.svg alone so the wordmark is never rendered smaller than a
  comfortable size. height:auto scales from the SVG's own viewBox ratio
  (682:164), so the image is never stretched or distorted. 160px width is
  well above the 120px brand-spec minimum.
*/
.brand-logo-full {
  width: 160px;
  height: auto;
  flex-shrink: 0;
}

.brand-logo-compact {
  display: none;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

@media (max-width: 400px) {
  .brand-logo-full {
    display: none;
  }

  .brand-logo-compact {
    display: block;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover {
  color: var(--text-primary);
  border-bottom-color: var(--border-strong);
}

.nav-cta {
  display: none;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
  line-height: 1.2;
}

.btn:active {
  transform: translateY(1px);
}

/*
  Compound .btn.btn-primary / .btn.btn-secondary selectors (specificity 0,2,0)
  are used deliberately so button colors always win over ambient link styling
  from an ancestor like ".nav-links a" or ".footer-col a" (specificity 0,1,1)
  when a button sits inside nav or footer markup.
*/
.btn.btn-primary {
  background: var(--accent-strong);
  color: #ffffff;
}

.btn.btn-primary:hover {
  background: var(--accent-strong-hover);
  color: #ffffff;
}

.btn.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn.btn-secondary:hover {
  background: var(--bg-elevated-2);
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

.btn-icon-external {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--space-9) var(--space-8);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-8);
  align-items: center;
}

.hero-copy p.lede {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.hero-note {
  margin-top: var(--space-5);
  font-size: 0.875rem;
  color: var(--text-tertiary);
  max-width: 44ch;
}

.hero-visual {
  position: relative;
}

.hero-visual svg {
  width: 100%;
  height: auto;
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: var(--space-5);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  height: 100%;
}

.card h3 {
  margin-bottom: var(--space-3);
}

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

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
}

/* ---------- Question list (problem section) ---------- */
.question-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.question-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
}

.question-list .q-mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---------- Recommendation tag chips ---------- */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: var(--space-2) var(--space-4);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.tag-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

/* ---------- Callout / transparency panel ---------- */
.callout {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.callout blockquote {
  margin: var(--space-4) 0 0;
  padding: 0;
  border-left: none;
  font-style: italic;
  color: var(--text-primary);
  font-size: 1.05rem;
}

/* ---------- Section divider visuals ---------- */
.divider-pattern {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin-block: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-7);
  background: var(--bg-elevated);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-6);
}

.footer-brand {
  display: inline-flex;
  padding-block: var(--space-2);
  margin-bottom: var(--space-2);
  text-decoration: none;
}

/* Footer lockup: same official logo-horizontal-dark.svg, smaller than the
   header. height:auto preserves the intrinsic 682:164 ratio (no distortion);
   132px rendered width stays above the 120px brand-spec minimum. */
.footer-logo {
  width: auto;
  height: 32px;
}

.footer-tagline {
  color: var(--text-tertiary);
  font-size: 0.9rem;
  max-width: 32ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6) var(--space-7);
}

.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-1);
}

.footer-col a {
  display: inline-block;
  padding: 0.7rem 0;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-col a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  align-items: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

/* ---------- Final CTA band ---------- */
.cta-band {
  background: linear-gradient(180deg, var(--bg-elevated), var(--bg-elevated-2));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.cta-band .container {
  max-width: 760px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.cta-secondary-line {
  margin-top: var(--space-5);
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

.cta-secondary-line a {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ---------- Utility / simple pages (privacy, 404) ---------- */
.prose {
  max-width: 70ch;
}

.prose h2 {
  margin-top: var(--space-7);
}

.prose h2:first-child {
  margin-top: 0;
}

.notice-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.notice-box strong {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.error-page {
  min-height: calc(100vh - 72px - 260px);
  display: flex;
  align-items: center;
}

.error-code {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ---------- Visually hidden (for a11y-only text) ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Responsive ---------- */
@media (min-width: 641px) {
  .nav-cta {
    display: inline-flex;
  }
}

@media (max-width: 900px) {
  /*
    Mobile hero order follows source order (copy, then illustration) — no
    `order` reversal. padding-top is shortened so the eyebrow/heading start
    just below the sticky header instead of after the full desktop spacing.
  */
  .hero {
    padding-top: var(--space-6);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 40px;
  }

  .hero-visual {
    max-width: 340px;
    margin-inline: auto;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  /*
    Progressive enhancement: without JavaScript, the nav links stay in
    normal flow (always visible, stacked under the logo) and the toggle
    button stays hidden — a button that can't do anything shouldn't be
    shown. Only once main.js runs and tags <html class="js"> does the menu
    become a collapsible overlay driven by data-open.
  */
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: var(--space-3);
  }

  .js .nav-links {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--bg-base);
    padding: var(--space-5);
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }

  .js .nav-links[data-open="true"] {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: var(--space-4) var(--space-2);
    font-size: 1.05rem;
    border-bottom: none;
  }

  .nav-links .nav-cta {
    display: inline-flex;
    margin: var(--space-4) var(--space-2) 0;
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  section {
    padding-block: var(--space-7);
  }
}

@media (max-width: 480px) {
  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-grid {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* No horizontal scroll on narrow viewports */
@media (max-width: 400px) {
  .container {
    padding-inline: var(--space-4);
  }
}
