/* ==========================================================================
   IDaP+ - project completion website
   One typeface only: Arial. The hierarchy is carried by weight and style -
   bold for structure, headings and measured values; regular for reading text;
   italic for captions, annotations and every secondary line.
   Colours taken from the project slide set. White ground, single theme.
   ========================================================================== */

:root {
  --paper:  #FFFFFF;
  --ink:    #0B1520;
  --navy:   #003359;
  --blue:   #0064C1;
  --melt:   #B4540E;
  --grey:   #6B7C89;
  --hair:   #DCE3E9;
  --hair-2: #EEF2F5;

  --measure: 62ch;
  --wrap: 1240px;
  --text-col: 700px;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --s--1: clamp(.78rem, .76rem + .1vw, .84rem);
  --s-0:  clamp(1rem, .97rem + .15vw, 1.08rem);
  --s-1:  clamp(1.2rem, 1.12rem + .35vw, 1.42rem);
  --s-2:  clamp(1.5rem, 1.32rem + .8vw, 2.05rem);
  --s-3:  clamp(2rem, 1.64rem + 1.5vw, 3.1rem);
  --s-4:  clamp(2.5rem, 1.8rem + 3.1vw, 4.8rem);

  --sans: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  counter-reset: fig;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--s-0);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--sans);
  color: var(--navy);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.022em;
  text-wrap: balance;
}

p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.col  { max-width: var(--text-col); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; top: .5rem; }

/* the three voices ------------------------------------------------------- */

/* fat: eyebrows, plate numbers, units, table headers */
.label {
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--grey);
  font-variant-numeric: tabular-nums;
}

/* cursive: captions, annotations, everything secondary */
.hero__lede, .hero__art figcaption, .spec dd small, .shead__intro,
.fig-cap, .plate figcaption, .wp p,
.person__id p, .person__names small, .roster li span, .note {
  font-style: italic;
}

/* ---------------------------------------------------------- masthead --- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.brand { display: flex; align-items: baseline; gap: .7rem; text-decoration: none; }
.brand__mark { font-weight: 700; font-size: 1.4rem; color: var(--navy); letter-spacing: -.04em; }
.brand__ref { font-weight: 700; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }

.nav { display: flex; gap: clamp(.9rem, 2vw, 2rem); }
.nav a {
  font-weight: 700; font-size: .7rem; letter-spacing: .13em;
  text-transform: uppercase; color: var(--grey); text-decoration: none;
  padding: .3rem 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav a:hover { color: var(--navy); }
.nav a.is-active { color: var(--navy); border-bottom-color: var(--navy); }
@media (max-width: 820px) { .nav--main { display: none; } .nav--mobile { display: flex; overflow-x: auto; padding: .15rem 0 .6rem; } }
@media (min-width: 821px) { .nav--mobile { display: none; } }

/* -------------------------------------------------------------- hero --- */

.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.hero__grid {
  display: grid; gap: clamp(1.5rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
}
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } }

.hero__eyebrow { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.4rem; }
.hero__eyebrow::after { content: ""; height: 1px; flex: 1; background: var(--hair); }

.hero h1 { font-size: var(--s-4); letter-spacing: -.035em; }
.hero h1 .plus { color: var(--blue); }
.hero__lede { margin-top: 1.4rem; font-size: var(--s-1); line-height: 1.38; max-width: 32ch; color: var(--ink); }
.hero__sub { margin-top: 1.1rem; max-width: 48ch; color: var(--grey); font-size: .93rem; line-height: 1.62; }

.hero__art { margin: 0; }
.hero__art img { width: min(100%, 420px); margin-inline: auto; }
.hero__art figcaption {
  margin-top: 1rem; text-align: center; font-size: .78rem; color: var(--grey);
  letter-spacing: .04em; text-transform: none;
}

/* the specification row under the hero */
.spec {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  border-top: 1px solid var(--navy); border-bottom: 1px solid var(--hair);
  margin: clamp(2rem, 5vw, 3.5rem) 0 0;
}
.spec > div { padding: 1rem 1.4rem 1.1rem 0; }
.spec dt { margin-bottom: .35rem; }
.spec dd {
  margin: 0; font-weight: 700; font-size: 1.02rem;
  color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.28; letter-spacing: -.01em;
}
.spec dd small { display: block; font-weight: 400; font-size: .8rem; color: var(--grey); margin-top: .2rem; letter-spacing: 0; }

/* ---------------------------------------------------------- sections --- */

.section { padding-block: clamp(3rem, 7vw, 5.5rem); border-top: 1px solid var(--hair); }

.shead { margin-bottom: clamp(1.8rem, 4vw, 2.6rem); }
.shead .label { display: block; margin-bottom: 1rem; }
.shead h2 { font-size: var(--s-3); }
.shead__intro { margin-top: 1.2rem; max-width: var(--measure); color: var(--grey); font-size: 1rem; }

.text-2 { columns: 2 300px; column-gap: clamp(2rem, 5vw, 4rem); max-width: 1000px; }
.text-2 p { margin-bottom: 1.1rem; break-inside: avoid; }

.lead-in::first-letter {
  float: left; font-weight: 700; color: var(--navy);
  font-size: 3.4rem; line-height: .8; padding: .07em .12em 0 0;
}

/* ------------------------------------------------------------- plate --- */

figure { margin: 0; }

.plate { margin: clamp(2rem, 5vw, 3rem) 0 0; }
.plate img { width: 100%; }
.plate figcaption, .fig-cap {
  margin-top: .8rem; padding-top: .6rem; border-top: 1px solid var(--hair);
  font-size: .83rem; color: var(--grey); line-height: 1.5; max-width: 62ch;
}
.fig-num {
  font-style: normal; font-weight: 700; font-size: .69rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--navy); margin-right: .7rem; font-variant-numeric: tabular-nums;
}
.fig-num::before { counter-increment: fig; content: "Fig. " counter(fig, decimal-leading-zero); }

/* a row of figures for activities that need more than one picture */
.figrow {
  display: grid; gap: clamp(1.2rem, 2.5vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: .6rem;
}
.figrow img { width: 100%; }
.figrow figure.is-contain img { background: var(--paper); }



/* ------------------------------------------------------------- chain --- */

.chain { overflow-x: auto; margin-top: clamp(1.5rem, 4vw, 2.4rem); }
.chain svg { min-width: 720px; width: 100%; height: auto; }

/* ------------------------------------------------------ work packages -- */

.wps { border-top: 1px solid var(--navy); margin-top: clamp(1.4rem, 3vw, 2rem); }
.wp {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.4rem; padding: 1.1rem 0 1.2rem; border-bottom: 1px solid var(--hair); align-items: baseline;
}
@media (max-width: 800px) { .wp { grid-template-columns: 3.6rem minmax(0, 1fr); } .wp p { grid-column: 2; } }
.wp__code { font-weight: 700; font-size: .76rem; letter-spacing: .1em; color: var(--blue); font-variant-numeric: tabular-nums; }
.wp__title { font-weight: 700; font-size: 1.08rem; color: var(--navy); line-height: 1.25; letter-spacing: -.015em; }
.wp p { font-size: .91rem; color: var(--grey); }

/* ----------------------------------------------------------- finding --- */

.findings { margin-top: clamp(1.4rem, 4vw, 2.2rem); counter-reset: finding; }

.finding {
  display: grid; gap: clamp(1.2rem, 3vw, 3rem);
  grid-template-columns: 4.5rem minmax(0, 1fr);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--hair);
}
.finding:first-child { border-top: 1px solid var(--navy); }
@media (max-width: 720px) { .finding { grid-template-columns: 1fr; gap: 1rem; } }

.finding__no {
  font-weight: 700; font-size: .78rem; letter-spacing: .12em;
  color: var(--navy); font-variant-numeric: tabular-nums; padding-top: .35rem;
}
.finding__no::before { counter-increment: finding; content: counter(finding, decimal-leading-zero); }
.finding__no::after { content: ""; display: block; width: 24px; height: 2px; background: var(--blue); margin-top: .6rem; }
.finding--heat .finding__no::before { counter-increment: finding; content: counter(finding, decimal-leading-zero); }
.finding__no::after { background: var(--melt); }

.finding__body { display: grid; gap: 1rem; }
.finding h3 { font-size: var(--s-2); max-width: 22ch; }
.finding__stage { color: var(--grey); }
.finding--heat .finding__stage { color: var(--melt); }
.finding p { max-width: var(--measure); }

.finding__split { display: grid; gap: clamp(1.4rem, 3vw, 2.6rem); grid-template-columns: minmax(0, 1fr) minmax(0, .82fr); align-items: start; }
@media (max-width: 860px) { .finding__split { grid-template-columns: 1fr; } }
.prose { display: grid; gap: 1rem; }
.finding__split figure img { width: auto; max-width: 100%; max-height: 460px; }
.finding__split figure.is-contain img { background: var(--paper); }


/* ------------------------------------------------------------- table --- */

.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 420px; font-size: .9rem; }
caption { text-align: left; padding-bottom: .9rem; }
th, td { text-align: left; padding: .65rem 1rem .65rem 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
thead th { border-bottom: 1px solid var(--navy); }
td.date { font-size: .8rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--grey); font-style: italic; }

.two-col { display: grid; gap: clamp(1.8rem, 4vw, 3.5rem); grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); align-items: start; }

.callout {
  border-left: 3px solid var(--navy); padding: .2rem 0 .2rem 1.2rem;
  font-size: .93rem; color: var(--ink); max-width: 54ch;
}
.callout strong { font-weight: 700; color: var(--navy); }

/* ------------------------------------------------------- participants -- */

.people { border-top: 1px solid var(--navy); margin-top: clamp(1.4rem, 3vw, 2rem); }
.person {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem); padding: 1.5rem 0 1.6rem; border-bottom: 1px solid var(--hair);
}
@media (max-width: 900px) { .person { grid-template-columns: 1fr; gap: .8rem; } }

.person__id h3 { font-size: 1.3rem; letter-spacing: -.03em; }
.person__id p { font-size: .84rem; color: var(--grey); margin-top: .35rem; line-height: 1.45; }
.person__role { font-size: .93rem; }
.person__names { display: grid; gap: .6rem; align-content: start; }
.person__names div { font-size: .88rem; line-height: 1.35; }
.person__names .label { display: block; margin-bottom: .18rem; }
.person__names b { font-weight: 700; color: var(--navy); font-size: .92rem; letter-spacing: -.01em; }
.person__names small { display: block; margin-top: .22rem; font-size: .83rem; color: var(--grey); }

.roster { display: grid; gap: clamp(1.6rem, 4vw, 3rem); grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); margin-top: 1.8rem; }
.roster h3 {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  font-weight: 700; font-size: .7rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--grey); letter-spacing: .16em;
  padding-bottom: .7rem; border-bottom: 1px solid var(--navy);
}
.roster h3 b { font-weight: 700; font-variant-numeric: tabular-nums; }
.roster ul { list-style: none; margin: 0; padding: 0; }
.roster li { padding: .5rem 0; border-bottom: 1px solid var(--hair-2); font-size: .87rem; line-height: 1.35; }
.roster li span { display: block; font-size: .78rem; color: var(--grey); margin-top: .12rem; }

.note { margin-top: 1.8rem; font-size: .84rem; color: var(--grey); max-width: var(--measure); }

/* ------------------------------------------------------------ footer --- */

.footer { border-top: 1px solid var(--navy); padding-block: clamp(2.2rem, 5vw, 3.4rem); }
/* funding block: programme logos and the funding note in both languages */
.funding { padding-bottom: clamp(1.8rem, 4vw, 2.6rem); }

.funding__logos {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1.4rem clamp(1.8rem, 4vw, 3.2rem);
  padding-bottom: clamp(1.4rem, 3vw, 2rem);
}
.funding__logos img { width: auto; }
.funding__logos img.is-bmwe { height: 84px; }
.funding__logos img.is-igf { height: 42px; }
.funding__logos img.is-cornet { height: 32px; }
.funding__logos img.is-fqs { height: 46px; }

.funding__text {
  display: grid; gap: clamp(1rem, 3vw, 2.4rem);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items: start;
}
.funding__text p { font-size: .84rem; line-height: 1.6; color: var(--grey); }
.funding__text p[lang="de"] { font-style: italic; }
.logos {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: clamp(1.4rem, 4vw, 3rem); padding-bottom: clamp(1.8rem, 4vw, 2.6rem);
  border-bottom: 1px solid var(--hair);
}
.logos img { height: clamp(28px, 4vw, 38px); width: auto; }
.logos img.is-tall { height: clamp(36px, 5vw, 48px); }

.footer__meta {
  display: grid; gap: 1.8rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: clamp(1.8rem, 4vw, 2.6rem); font-size: .86rem; color: var(--grey);
}
.footer__meta h4 { font-weight: 700; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); margin-bottom: .6rem; }
.footer__meta p { line-height: 1.6; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: 2.4rem; padding-top: 1.1rem; border-top: 1px solid var(--hair);
  font-weight: 700; font-size: .66rem; letter-spacing: .13em; text-transform: uppercase; color: var(--grey);
}

/* ------------------------------------------------------------ reveal --- */

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
