/* arbeidsmarkt.ai — uurwerk, geen vuurwerk.
   Koel papier, inkt, grafiet en één routekleur voor de lijn van de reis. */

@font-face {
  font-family: 'Archivo';
  src: url('/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/sourceserif4-latin.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/sourceserif4-italic-latin.woff2') format('woff2');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- tokens ---------- */

:root {
  --papier: #f5f6f6;
  --vlak: #ebeeef;
  --inkt: #13181d;
  --grafiet: #48525b;
  --route: #2c6882;
  --lijn: rgba(19, 24, 29, 0.16);
  --rand: rgba(19, 24, 29, 0.1);

  --grotesk: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --wrap: 60rem;
  --gutter: clamp(1rem, 5vw, 3rem);
  --stop: 2.5rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --papier: #0f1417;
    --vlak: #161c20;
    --inkt: #e6eaed;
    --grafiet: #a1acb5;
    --route: #86b8cd;
    --lijn: rgba(230, 234, 237, 0.18);
    --rand: rgba(230, 234, 237, 0.1);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --papier: #0f1417;
  --vlak: #161c20;
  --inkt: #e6eaed;
  --grafiet: #a1acb5;
  --route: #86b8cd;
  --lijn: rgba(230, 234, 237, 0.18);
  --rand: rgba(230, 234, 237, 0.1);
  color-scheme: dark;
}

/* ---------- basis ---------- */

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

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

body {
  margin: 0;
  background: var(--papier);
  color: var(--inkt);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--grotesk);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-color: var(--route);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

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

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--papier);
  color: var(--inkt);
  font-family: var(--grotesk);
  border: 1px solid var(--inkt);
}

/* ---------- kop ---------- */

.kop__binnen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}

.merk {
  font-family: var(--grotesk);
  font-weight: 600;
  font-stretch: 112%;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.merk__ai {
  color: var(--route);
}
.merk--klein {
  font-size: inherit;
}

.thema {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--rand);
  border-radius: 50%;
  background: transparent;
  color: var(--inkt);
  cursor: pointer;
}
.thema:hover {
  border-color: var(--lijn);
  background: var(--vlak);
}
.thema svg {
  transition: transform 0.4s ease;
}
:root[data-theme='dark'] .thema svg {
  transform: rotate(180deg);
}

/* ---------- opening ---------- */

.opening {
  padding-block: clamp(4rem, 12vh, 9rem) clamp(4rem, 10vh, 7rem);
  border-bottom: 1px solid var(--rand);
}

.bovenregel {
  margin-bottom: 1.75rem;
  font-family: var(--grotesk);
  font-size: 0.8125rem;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grafiet);
}

.opening h1 {
  max-width: 18ch;
  font-size: clamp(2.25rem, 1.2rem + 4.6vw, 4.75rem);
  font-stretch: 94%;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.inleiding {
  max-width: 36rem;
  margin-top: 2rem;
  color: var(--grafiet);
  font-size: 1.125em;
}

/* route-overzicht: dezelfde zeven haltes als stippen op een lijn */

.route {
  margin-top: clamp(3rem, 8vh, 5rem);
}

.route__lijst {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  position: relative;
}

.route__lijst::before {
  content: '';
  position: absolute;
  top: 0.9rem;
  left: calc(100% / 14);
  right: calc(100% / 14);
  height: 1px;
  background: var(--lijn);
}

.route__lijst a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.25rem 0.25rem;
  text-align: center;
  text-decoration: none;
  color: var(--grafiet);
}

.route__nr {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--route);
  border-radius: 50%;
  background: var(--papier);
  color: var(--route);
  font-family: var(--grotesk);
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.route__naam {
  font-family: var(--grotesk);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.route__lijst a:hover {
  color: var(--inkt);
}
.route__lijst a:hover .route__nr {
  background: var(--route);
  color: var(--papier);
}

@media (max-width: 40rem) {
  .route__lijst {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .route__lijst::before {
    top: 0.9rem;
    bottom: 0.9rem;
    left: 0.9rem;
    right: auto;
    width: 1px;
    height: auto;
  }
  .route__lijst a {
    flex-direction: row;
    gap: 0.9rem;
    padding: 0.2rem 0;
    text-align: left;
  }
  .route__naam {
    font-size: 0.9375rem;
  }
}

/* ---------- de reis ---------- */

.reis {
  padding-block: clamp(4rem, 10vh, 7rem) clamp(5rem, 14vh, 10rem);
}

.haltes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.halte {
  position: relative;
  display: grid;
  grid-template-columns: var(--stop) minmax(0, 1fr);
  column-gap: clamp(1.25rem, 4vw, 3rem);
  padding-bottom: clamp(4.5rem, 14vh, 9rem);
  scroll-margin-top: 2rem;
}

/* de doorlopende lijn: van deze stop naar de volgende */
.halte::before {
  content: '';
  position: absolute;
  top: var(--stop);
  bottom: 0;
  left: calc(var(--stop) / 2);
  width: 1px;
  background: var(--route);
  transform-origin: top;
}
.halte:last-child {
  padding-bottom: 0;
}
.halte:last-child::before {
  display: none;
}

.halte__stop {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--stop);
  height: var(--stop);
  border: 1.5px solid var(--route);
  border-radius: 50%;
  background: var(--route);
  color: var(--papier);
  font-family: var(--grotesk);
  font-weight: 600;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.halte__tekst {
  max-width: 38rem;
  padding-top: 0.35rem;
}

.halte__kop {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.halte__naam {
  font-size: 0.8125rem;
  font-weight: 500;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grafiet);
  line-height: 1.4;
}

.halte__stelling {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-stretch: 96%;
  letter-spacing: -0.02em;
}

.halte__tekst > p {
  color: var(--grafiet);
  max-width: 34rem;
}

/* voortgang, alleen met JS: nog niet bereikte stops zijn open */
.js .halte:not(.is-bereikt) .halte__stop {
  background: var(--papier);
  color: var(--route);
}
.js .halte::before {
  background: var(--lijn);
}
.js .halte.is-bereikt::before {
  background: var(--route);
}
.js .halte__stop,
.js .halte::before {
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* halte 7: aankomst en de enige doorverwijzing */
.halte--aankomst .halte__stop {
  box-shadow: 0 0 0 6px var(--papier), 0 0 0 7px var(--route);
}

.doorverwijzing {
  margin-top: 2.25rem;
}
.doorverwijzing a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--inkt);
  border-radius: 999px;
  font-family: var(--grotesk);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  color: var(--inkt);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.doorverwijzing a:hover {
  background: var(--inkt);
  color: var(--papier);
}

/* ---------- voet ---------- */

.voet {
  border-top: 1px solid var(--rand);
  font-family: var(--grotesk);
  font-size: 0.875rem;
  color: var(--grafiet);
}
.voet__binnen {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 2rem 2.5rem;
}
.voet p {
  margin: 0;
}
.voet .merk {
  color: var(--inkt);
}

/* ---------- beweging ---------- */

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

@media (max-width: 40rem) {
  :root {
    --stop: 2.125rem;
  }
  .halte__stop {
    font-size: 0.875rem;
  }
}
