@font-face {
  font-family: "Schibsted";
  src: url("fonts/schibsted.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
/* Metric-matched fallback so the swap does not shift the layout. */
@font-face {
  font-family: "Schibsted Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans");
  size-adjust: 104.5%;
  ascent-override: 93.8%;
  descent-override: 24.9%;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plexmono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plexmono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #EEF0EC;
  --bg-2: #F6F7F4;
  --grid: #DFE3DC;
  --line: #CBD1C9;
  --line-2: #9AA59D;
  --text: #0E1A16;
  --text-2: #26332D;
  --muted: #525E56;
  --signal: #2433D6;
  --signal-hi: #1A27B0;
  --signal-bg: #DCDFF8;

  --sans: "Schibsted", "Schibsted Fallback", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --r: 3px;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.6rem, 1.25rem + 1.2vw, 2.25rem);
  --step-3: clamp(2.3rem, 1.5rem + 2.8vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: var(--signal); color: #fff; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.fine { font-size: var(--step--1); color: var(--muted); }
.fine a { text-underline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  background: var(--text); color: var(--bg); padding: .6em 1em; border-radius: var(--r);
}
.skip:focus { top: 12px; }

/* Wordmark: herr|ia */
.wordmark {
  display: inline-flex; align-items: baseline;
  font-weight: 760; font-size: 1.75rem; letter-spacing: -0.045em; line-height: 1;
}
.wordmark-cut {
  display: inline-block; width: 2px; height: .82em; margin: 0 .07em 0 .09em;
  background: var(--signal); align-self: center; transform: translateY(.02em);
}
.wordmark.small { font-size: 1.15rem; }

/* Header */
.top {
  position: relative; z-index: 2;
  max-width: var(--max); margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-sub {
  font-size: .75rem; line-height: 1.3; color: var(--muted);
  border-left: 1px solid var(--line-2); padding-left: 14px;
}
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; font-size: .95rem; color: var(--text-2); }
.nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--text); border: 1.5px solid var(--text); border-radius: var(--r); padding: 0 1em;
  min-height: 40px !important;
}
.nav-cta:hover { background: var(--text); color: var(--bg); }

/* Hero with technical grid */
.hero-wrap { position: relative; }
.hero-wrap::before {
  content: ""; position: absolute; inset: -90px 0 0 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
          mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.hero {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto;
  padding: clamp(32px, 6vw, 88px) var(--gutter) clamp(64px, 9vw, 128px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px; row-gap: 48px; align-items: center;
}
.hero-body { grid-column: 1 / span 6; }
h1 {
  font-size: var(--step-3); font-weight: 680;
  letter-spacing: -0.035em; line-height: 1.02;
  max-width: 17ch; text-wrap: balance;
}
.lede { margin-top: 1.1em; font-size: var(--step-1); line-height: 1.5; max-width: 31em; color: var(--text-2); }
.hero-actions { margin-top: 2em; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.5em;
  text-decoration: none; font-weight: 600;
  background: var(--text); color: var(--bg); border-radius: var(--r);
  transition: background-color .15s;
}
.btn:hover { background: var(--signal); }
.link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 600; text-underline-offset: 6px; text-decoration-thickness: 1px;
  text-decoration-color: var(--line-2);
}
.link:hover { text-decoration-color: var(--signal); }

/* Neural network figure */
.net { grid-column: 7 / -1; }
.net-stage {
  position: relative; aspect-ratio: 5 / 4;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-2);
}
.net-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.net-in, .net-out {
  position: absolute; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-around;
  font-family: var(--mono); font-size: .8rem; padding: 9% 0;
}
.net-in { left: 14px; color: var(--text-2); }
.net-out { right: 14px; justify-content: center; }
.net-out span {
  color: var(--text); border: 1.5px solid var(--signal); background: var(--signal-bg);
  padding: .3em .6em; border-radius: var(--r);
  opacity: 0; transition: opacity .4s ease;
}
.net-out.is-on span { opacity: 1; }
.net-axis {
  display: flex; justify-content: space-between; margin-top: 10px;
  font-family: var(--mono); font-size: .72rem; color: var(--muted);
}

/* Content blocks */
.block {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(56px, 7vw, 104px) var(--gutter);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  border-top: 1px solid var(--line);
}
.block-head { grid-column: 1 / span 4; padding-right: 16px; }
.block-head h2 { font-size: var(--step-2); font-weight: 680; letter-spacing: -0.028em; line-height: 1.1; }
.block-head p { margin-top: .9em; color: var(--muted); max-width: 30em; }

/* Training programmes */
.programs { grid-column: 5 / -1; display: grid; gap: 24px; justify-items: start; }
.prog { width: 100%; border-collapse: collapse; }
.prog thead th {
  text-align: left; font-family: var(--mono); font-weight: 400; font-size: .75rem; color: var(--muted);
  padding: 0 24px 10px 0; border-bottom: 1px solid var(--line-2);
}
.prog tbody th, .prog td { text-align: left; vertical-align: top; padding: 24px 24px 24px 0; border-bottom: 1px solid var(--line); }
.prog tbody th { width: 34%; font-size: var(--step-1); font-weight: 620; letter-spacing: -0.015em; line-height: 1.3; }
.prog td p { color: var(--text-2); max-width: 40em; }
.lvl {
  display: flex; align-items: center; gap: 3px; margin-top: 10px;
  font-family: var(--mono); font-size: .72rem; font-weight: 400; letter-spacing: 0; color: var(--muted);
}
.lvl i { display: block; width: 14px; height: 4px; background: var(--line-2); border-radius: 1px; }
.lvl i:last-of-type { margin-right: 8px; }
.lvl[data-l="1"] i:nth-of-type(1),
.lvl[data-l="3"] i { background: var(--signal); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags li {
  font-family: var(--mono); font-size: .75rem; color: var(--text-2);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: .2em .55em;
}

/* Learning path: a real sequence, drawn as connected nodes. */
.path {
  grid-column: 5 / -1;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  position: relative;
}
.path::before {
  content: ""; position: absolute; left: 6px; right: 0; top: 6px; height: 1px;
  background: var(--line-2);
}
.path li { position: relative; padding-top: 30px; }
.path li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--signal);
}
.path li:first-child::before { background: var(--signal); }
.path-n { font-family: var(--mono); font-size: .75rem; color: var(--signal); }
.path h3 { margin-top: 6px; font-size: var(--step-1); font-weight: 620; letter-spacing: -0.015em; line-height: 1.3; }
.path p { margin-top: 8px; color: var(--text-2); font-size: .95rem; }
.path-k { display: block; margin-top: 12px; font-family: var(--mono); font-size: .72rem; color: var(--muted); }

/* Association */
.who { grid-column: 5 / -1; }
.who h3 { font-family: var(--mono); font-size: .75rem; font-weight: 400; color: var(--muted); margin-bottom: 14px; }
.who-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.who-list > div { background: var(--bg-2); padding: 22px; }
.who-list dt { font-weight: 620; font-size: var(--step-1); letter-spacing: -0.015em; line-height: 1.3; }
.who-list dd { margin-top: .5em; color: var(--text-2); }

/* Association */
.assoc-body { grid-column: 5 / -1; }
.assoc-body p { font-size: var(--step-1); line-height: 1.5; max-width: 36em; color: var(--text-2); }

/* Contact */
.contact-body { grid-column: 5 / -1; display: grid; gap: 14px; justify-items: start; }
.contact-body > p:first-child { font-size: var(--step-1); line-height: 1.5; max-width: 34em; color: var(--text-2); }
.mail {
  font-size: clamp(1.6rem, .9rem + 2.6vw, 2.75rem); font-weight: 680; letter-spacing: -0.03em; line-height: 1.2;
  color: var(--signal); text-underline-offset: .16em; text-decoration-thickness: 2px;
  overflow-wrap: anywhere;
}
.mail:hover { color: var(--text); }

/* Footer */
.foot {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter) 44px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px;
  border-top: 1px solid var(--line);
  font-size: var(--step--1); color: var(--muted);
}
.foot-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.foot-id .wordmark { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.foot-links a { display: inline-flex; min-height: 44px; align-items: center; text-underline-offset: 3px; }
.foot-links a:hover { color: var(--text); }

/* Legal pages */
.legal { max-width: 46rem; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 96px; }
.legal h1 { max-width: none; font-size: var(--step-2); }
.legal > .fine { margin-top: .6em; }
.legal h2 { font-size: var(--step-1); font-weight: 620; letter-spacing: -0.015em; margin-top: 2.2em; }
.legal p { margin-top: .6em; color: var(--text-2); }
.legal-id { margin-top: 1em; display: grid; gap: 8px; }
.legal-id div { display: grid; grid-template-columns: 9rem 1fr; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.legal-id dt { color: var(--muted); }

/* Responsive */
@media (max-width: 1080px) {
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .path::before { display: none; }
}
@media (max-width: 960px) {
  .hero { row-gap: 40px; }
  .hero-body, .net { grid-column: 1 / -1; }
  .net { max-width: 640px; }
  .block-head { grid-column: 1 / -1; margin-bottom: 32px; padding-right: 0; }
  .programs, .path, .who, .assoc-body, .contact-body { grid-column: 1 / -1; }
  .who-list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .top { padding-top: 16px; padding-bottom: 8px; }
  .brand-sub { font-size: .7rem; }
  .nav { width: 100%; gap: 0 18px; font-size: .9rem; }
  .nav-cta { border: 0; padding: 0; min-height: 44px !important; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--signal); font-weight: 600; }
  .lede, .contact-body > p:first-child { font-size: 1.125rem; }
  .net-in, .net-out { font-size: .7rem; }
  .prog thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prog tbody tr { display: grid; border-bottom: 1px solid var(--line); padding: 20px 0; }
  .prog tbody th, .prog td { width: auto; padding: 0; border: 0; }
  .prog td { margin-top: 10px; }
  .path { grid-template-columns: 1fr; row-gap: 0; }
  .path li { padding: 0 0 28px 30px; }
  .path li::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line-2); }
  .path li:last-child::after { display: none; }
}
@media (max-width: 400px) {
  .nav { gap: 0 14px; font-size: .85rem; }
}

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