/* css/tokens.css */
/* Design tokens of the site. Blocks use these names and never a raw value. */
:root {
  /* Colour */
  --red: #C51315;
  --red-hover: #A30F11;
  --navy: #0A1E45;
  --navy-hover: #E6EBF2;
  --footer: #06132D;
  --sub: #465679;
  --on-navy: #B8C4D6;
  --field: #7A8494;
  --line: #D5DBE3;
  --alt: #F3F5F8;
  --image-bg: #E6EBF2;
  --hero-lead: #E3E9F2;
  --card-on-dark: rgba(255, 255, 255, .07);
  --line-on-dark: rgba(255, 255, 255, .2);
  --night-overlay: rgba(10, 30, 69, .86);
  --night-image: url("/media/nacht-autobahn.jpg");

  /* Type */
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --text: 16px;
  --text-lh: 1.6;
  --lead: 19px;
  --h1-hero: 32px;
  --h1: 30px;
  --h2: 28px;
  --h3: 20px;
  --numeral: 74px;

  /* Space and shape */
  --edge: 20px;
  --section: 56px;
  --gap: 16px;
  --split-gap: 28px;
  --content: 1280px;
  --radius: 2px;
  --header: 68px;
}

@media (min-width: 600px) {
  :root { --gap: 20px; }
}

@media (min-width: 768px) {
  :root { --edge: 32px; --section: 72px; }
}

@media (min-width: 900px) {
  :root {
    --gap: 24px;
    --split-gap: 64px;
    --text: 17px;
    --lead: 21px;
    --h1-hero: 56px;
    --h1: 44px;
    --h2: 42px;
    --h3: 24px;
    --numeral: 108px;
  }
}

@media (min-width: 1024px) {
  :root { --header: 76px; }
}

@media (min-width: 1280px) {
  :root { --edge: 48px; --section: 96px; }
}

/* css/base.css */
/* Fonts: IBM Plex, hosted on the site itself (SIL Open Font License). */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/media/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("/media/fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/media/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/media/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/media/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 500; font-style: normal; font-display: swap; src: url("/media/fonts/ibm-plex-sans-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("/media/fonts/ibm-plex-sans-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/media/fonts/ibm-plex-sans-condensed-latin-700-normal.woff2") format("woff2"); }

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

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

body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font: 400 var(--text)/var(--text-lh) var(--font);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-cond);
  font-weight: 500;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: break-word;
}
h1 { font-size: var(--h1); line-height: 1.1; letter-spacing: -.01em; }
h2 { font-size: var(--h2); line-height: 1.1; letter-spacing: -.005em; max-width: 26ch; }
h3 { font-size: var(--h3); line-height: 1.2; font-weight: 600; }

.lead { font-size: var(--lead); line-height: 1.5; color: var(--sub); max-width: 62ch; }
.sub { color: var(--sub); }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Section: the outer frame every block uses. */
.section { padding-block: var(--section); }
.section--grey { background: var(--alt); }
.section--dark {
  background: linear-gradient(var(--night-overlay), var(--night-overlay)), var(--navy) var(--night-image) center 62% / cover no-repeat;
  color: #fff;
}
.section--dark .sub, .section--dark .lead { color: var(--on-navy); }
.section--dark :focus-visible { outline-color: #fff; }

.wrap {
  width: 100%;
  max-width: calc(var(--content) + 2 * var(--edge));
  margin-inline: auto;
  padding-inline: var(--edge);
}

.stack { display: flex; flex-direction: column; gap: 28px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 2px solid var(--red); border-radius: var(--radius);
  background: var(--red); color: #fff;
  font: 700 16px/1 var(--font); text-decoration: none; text-align: center;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--red-hover); border-color: var(--red-hover); }
.btn--outline { padding: 0 25px; border-width: 1px; border-color: var(--navy); background: transparent; color: var(--navy); }
.btn--outline:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

/* No red on dark: the primary button turns white there. */
.on-dark .btn, .section--dark .btn { border-color: #fff; background: #fff; color: var(--navy); }
.on-dark .btn:hover, .section--dark .btn:hover { border-color: var(--navy-hover); background: var(--navy-hover); }
.on-dark .btn--outline, .section--dark .btn--outline { border-color: #fff; background: transparent; color: #fff; }
.on-dark .btn--outline:hover, .section--dark .btn--outline:hover { border-color: #fff; background: #fff; color: var(--navy); }

.btns { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  font-weight: 700; color: var(--navy);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  transition: text-decoration-thickness .15s;
}
.text-link:hover { text-decoration-thickness: 2px; }
.section--dark .text-link { color: #fff; }

/* Site frame: placeholder until navigation is built (stage 4). */
.site-header { position: relative; z-index: 5; border-bottom: 1px solid var(--line); background: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--header); }
.site-header__logo img { height: 44px; width: auto; }
.site-header nav { display: none; flex: 1; justify-content: center; }
.site-header nav ul { display: flex; gap: 4px; }
.site-header nav a { display: block; padding: 14px; font-size: 15px; text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
.site-header__contact { margin-left: auto; min-height: 44px; padding: 0 18px; font-size: 15px; }
@media (min-width: 1024px) {
  .site-header__logo img { height: 51px; }
  .site-header nav { display: flex; }
  .site-header__contact { margin-left: 0; }
}

.site-footer { padding-block: 56px 32px; background: var(--footer); color: #C9D1DC; font-size: 15px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.site-footer img { height: 64px; width: auto; }
.site-footer small { font-size: 14px; color: #9AA6B8; }

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

/* blocks/cards/cards.css */
.cards {
  display: grid;
  gap: var(--gap);
  grid-template-columns: minmax(0, 1fr);
}

.card {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
  background: var(--alt);
}
.section--grey .card { background: #fff; }
.section--dark .card { background: var(--card-on-dark); }

/* Line that draws across the lower edge on hover. */
.card::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  height: 2px; background: var(--navy);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.section--dark .card::before { background: #fff; }
.card:hover::before { transform: scaleX(1); }

.card__image { overflow: hidden; background: var(--image-bg); aspect-ratio: var(--ratio); }
.section--dark .card__image { background: rgba(255, 255, 255, .1); }
.card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__image img { transform: scale(1.03); }

.card__body {
  display: flex; flex-direction: column; gap: 8px; flex: 1;
  min-width: 0; padding: 20px;
}
.card__link { margin-top: auto; padding-top: 8px; align-self: flex-start; }

/* The whole card is the click target of its link. */
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 2; }

@media (max-width: 599px) {
  .cards--compact .card:has(.card__image) { flex-direction: row; }
  .cards--compact .card__image { flex: none; width: 104px; aspect-ratio: auto; min-height: 104px; }
  .cards--compact .card__body { padding: 14px 16px; }
  .cards--compact .card__body .sub { font-size: 15px; }

  .cards--swipe {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 80%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--edge));
    padding-inline: var(--edge);
    scroll-padding-inline: var(--edge);
    padding-bottom: 6px;
  }
  .cards--swipe > .card { scroll-snap-align: start; }
}

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  /* --cols comes from the layout rule «balanced rows». */
  .cards { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
  .card__body { padding: 24px; }
}

/* blocks/contact-cta/contact-cta.css */
.contact-cta__grid {
  display: grid;
  gap: var(--split-gap);
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

.contact-cta__text { display: flex; flex-direction: column; gap: 16px; }
.contact-cta__text h2 { max-width: 30ch; }
.contact-cta__text .btns { margin-top: 8px; }

.contact-cta__person {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  max-width: 360px;
  padding-top: 20px;
  border-top: 1px solid var(--line-on-dark);
}

.contact-cta__photo {
  display: grid; place-items: center;
  aspect-ratio: 1; overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
}
.contact-cta__photo img { width: 100%; height: 100%; object-fit: cover; }
.contact-cta__photo .contact-cta__logo { width: 62%; height: auto; object-fit: contain; }

.contact-cta__person figcaption {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0; font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.contact-cta__person b { font-size: 17px; font-weight: 700; }
.contact-cta__person a {
  display: flex; align-items: center; min-height: 36px;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.contact-cta__person a:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 599px) {
  .contact-cta .btns { flex-direction: column; align-items: stretch; }
}

@media (min-width: 900px) {
  .contact-cta__grid:has(.contact-cta__person) { grid-template-columns: 7fr 5fr; }
  .contact-cta__person { justify-self: end; }
}

/* blocks/hero/hero.css */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}

.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%; }
.hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 30, 69, .35) 0%, rgba(10, 30, 69, .82) 70%);
}

.hero__inner {
  position: relative;
  display: flex; flex-direction: column; gap: 20px;
  padding-block: 48px;
}
.hero--large .hero__inner { padding-block: 150px 120px; }

.hero h1 { max-width: 30ch; }
.hero--large h1 { font-size: var(--h1-hero); line-height: 1.05; max-width: 22ch; }
.hero__lead { max-width: 50ch; font-size: var(--lead); line-height: 1.6; color: var(--hero-lead); }

/* Without an image the small hero uses the site's night image, like a dark section. */
.hero--small:not(:has(.hero__media)) {
  background: linear-gradient(var(--night-overlay), var(--night-overlay)), var(--navy) var(--night-image) center 62% / cover no-repeat;
}
.hero--small .hero__media::after {
  background: linear-gradient(90deg, rgba(10, 30, 69, .92) 0%, rgba(10, 30, 69, .7) 45%, rgba(10, 30, 69, .35) 100%);
}

@media (max-width: 599px) {
  .hero .btns { flex-direction: column; align-items: stretch; }
}

@media (min-width: 900px) {
  .hero__inner { padding-block: 88px 80px; }
  .hero--large .hero__inner { padding-block: 200px 210px; }
  .hero__media img { object-position: center 58%; }
  .hero--large .hero__media::after {
    background: linear-gradient(90deg, rgba(10, 30, 69, .88) 0%, rgba(10, 30, 69, .55) 50%, rgba(10, 30, 69, 0) 82%);
  }
}

/* blocks/logo-grid/logo-grid.css */
.logo-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.logo-grid > li {
  display: grid; place-items: center;
  aspect-ratio: 3 / 2;
  padding: 14% 16%;
  background: var(--alt);
}
.section--grey .logo-grid > li { background: #fff; }
.logo-grid img { width: 100%; height: 100%; object-fit: contain; }

/* A single logo does not stretch over the whole width. */
.logo-grid > li:only-child { max-width: 280px; }

@media (min-width: 600px) {
  .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  /* --cols comes from the layout rule «balanced rows»: 10 → 5 + 5, 11 → 4 + 4 + 3, 12 → 4 + 4 + 4. */
  .logo-grid { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
}

/* blocks/strengths/strengths.css */
.strengths__head {
  display: grid;
  gap: var(--split-gap);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.strengths__title {
  display: flex; align-items: flex-start; gap: .42em;
  max-width: none;
  line-height: 1.15;
}
.strengths__title > span:last-child { max-width: 24ch; }

/* The numeral spans two lines of the title. */
.strengths__numeral {
  flex: none;
  font-size: var(--numeral);
  line-height: .86;
  letter-spacing: -.04em;
  font-variant-numeric: lining-nums tabular-nums;
}

.strengths__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.strengths__list > li {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 24px 24px 0;
  border-bottom: 1px solid var(--line);
}
.section--dark .strengths__list,
.section--dark .strengths__list > li { border-color: var(--line-on-dark); }

@media (min-width: 600px) {
  .strengths__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .strengths__head:has(> .sub) { grid-template-columns: 7fr 5fr; }
  .strengths__title { line-height: 1.1; }
  /* --cols comes from the layout rule «balanced rows». */
  .strengths__list { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
}

