/* Site stylesheet. Tokens first, then base, then one block per component. No framework. */

@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/static/fonts/open-sans-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 300 800; font-display: swap;
  src: url(/static/fonts/open-sans-latin-wght-italic.woff2) format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* Colour. Values from the purity_iii template and the Impreza /ak theme, checked for AA contrast. */
  --red: #b40404;
  --red-dark: #8f0303;
  --grey: #747474;        /* headline grey, 4.6:1 on white */
  --icon-grey: #575756;   /* the icon circles */
  --text: #444;
  --text-strong: #222;
  --muted: #f5f5f5;       /* alternating bands, footer */
  --border: #e5e5e5;
  --white: #fff;

  /* Type */
  --font: "Open Sans", Arial, sans-serif;
  --fs-body: 15px;
  --fs-small: 13px;
  --fs-h1: clamp(28px, 4vw, 40px);
  --fs-h2: clamp(22px, 2.6vw, 26px);
  --fs-h3: 20px;
  --lh: 1.7;

  /* Layout */
  --container: 1170px;
  --gutter: 16px;
  --band-pad: clamp(28px, 4vw, 48px);
  --header-h: 84px;
  --radius: 0;
  --shadow: 0 1px 4px rgba(0, 0, 0, .12);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px) }
body { margin: 0; font: var(--fs-body)/var(--lh) var(--font); color: var(--text); background: var(--white) }
img { max-width: 100%; height: auto; display: block }
a { color: var(--red) }
a:hover { color: var(--red-dark) }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px }
h1, h2, h3 { font-weight: 400; line-height: 1.25; margin: 0 0 .6em }
h1 { font-size: var(--fs-h1); color: var(--grey) }
h2 { font-size: var(--fs-h2); color: var(--red) }
h3 { font-size: var(--fs-h3) }
h2 a { color: inherit; text-decoration: none }
p, ul { margin: 0 0 1em }
svg { width: 1em; height: 1em; vertical-align: -.125em; flex: none }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter) }
.center { text-align: center }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0 }
.skip { position: absolute; left: 8px; top: -64px; z-index: 30; background: var(--white); color: var(--text-strong);
  padding: 10px 16px; border: 2px solid var(--red) }
.skip:focus { top: 8px }

/* Bands: full-width stripes that alternate white and grey, like the Joomla features-intro layout. */
.band { padding: var(--band-pad) 0; border-top: 1px solid var(--border) }
.band.muted, main > .band.article:nth-of-type(even), main > .band.block:nth-of-type(even) { background: var(--muted) }
.band-title { font-size: var(--fs-h2); color: var(--red) }
.split { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start }
.split.media-left, .split.media-right { grid-template-columns: 1fr 1fr; align-items: center }
.split.media-left .media { order: -1 }
.split.media-right .media { order: 2 }
@media (max-width: 768px) {
  .split, .split.media-left, .split.media-right { grid-template-columns: 1fr }
  .split .media { order: 2 !important }
}
.prose :last-child { margin-bottom: 0 }
.prose table, .prose table:last-child { margin-bottom: 1.5em }

/* Hero image band. image_small takes over below 992px through <picture>. */
.hero { height: clamp(180px, 34vw, 440px); overflow: hidden }
.hero picture, .hero img { width: 100%; height: 100%; object-fit: cover }
.masthead { background: #d0d0d0; padding: var(--band-pad) 0 }
.masthead h2 { color: var(--text-strong) }

/* Home */
.headline { padding: var(--band-pad) var(--gutter) }
.headline .subtitle { font-size: clamp(19px, 2.2vw, 24px); color: var(--grey); margin-bottom: 20px }
.headline .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px }
.headline .actions .btn { margin: 0; justify-content: center }
.intro .portrait { width: 100%; max-width: 380px; justify-self: end }
.intro { padding-bottom: 0 }
.intro .prose { padding-bottom: var(--band-pad) }
@media (max-width: 768px) { .intro .portrait { justify-self: center } }

.cards { display: grid; gap: 32px 24px; text-align: center }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) }
.cards.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) }
.card { color: var(--text); text-decoration: none; display: flex; flex-direction: column; align-items: center }
.card h2 { color: var(--text-strong); margin: 12px 0 8px }
.card.small h2 { font-size: var(--fs-h3) }
.card:hover h2 { color: var(--red) }
/* Flat icon circle: a grey disc with an inline glyph, red on hover. */
.cardicon { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  background: var(--icon-grey); color: var(--white); font-size: 44px; transition: background .15s;
  box-shadow: 0 6px 8px -4px rgba(0, 0, 0, .35) }
.card.small .cardicon { width: 76px; height: 76px; font-size: 34px }
.card:hover .cardicon { background: var(--red) }
.cardicon svg { stroke-width: 1.6 }

/* Lead articles (the old *-header articles) */
.article.lead .lead-title { font-size: var(--fs-h2); color: var(--grey); margin-bottom: 20px }
.article.lead { border-top: 0 }

/* Team */
.people { display: flex; flex-wrap: wrap; gap: 32px; justify-content: center }
.person { text-align: center; width: 200px }
.person img { margin: 0 auto 12px }
.person h2 { font-size: var(--fs-h3); margin-bottom: .3em }
.person h2 a { color: var(--red) }
.person p { margin: 0 0 8px }
.icons { display: flex; gap: 8px; justify-content: center }
.icons a { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border);
  border-radius: 50%; color: var(--text-strong) }
.icons a:hover { color: var(--white); background: var(--red); border-color: var(--red) }

/* Karriere landing (/ak/) */
.landing-hero { padding: 0 0 0; margin-bottom: 64px; position: relative }
.landing-hero .hero { height: clamp(220px, 34vw, 440px) }
.callout { max-width: 790px; margin: 64px auto 0; background: #f3f3f3; border: 6px solid var(--white);
  padding: 40px clamp(16px, 4vw, 36px); text-align: center; position: relative; z-index: 1 }
.callout h1 { color: var(--text-strong); font-size: clamp(24px, 3vw, 28px) }
.callout .actions { margin: 28px 0 0; justify-content: center }
.landing { display: grid; grid-template-columns: 2fr 1fr; gap: 40px }
.landing .prose h2 { font-size: 22px }
.landing .prose li { margin-bottom: .6em }
.landing .prose li a, .landing .prose p a { text-decoration: none }
.landing .actions { display: flex; flex-direction: column; align-items: flex-start }
.landing aside { border-left: 1px solid var(--border); padding-left: 32px; text-align: center }
.landing aside img { margin: 0 auto 24px }
.landing blockquote { margin: 0 0 32px; font-style: italic; color: var(--grey) }
.landing .name { color: var(--red); font-size: 18px; margin: 0 }
@media (max-width: 768px) {
  .landing { grid-template-columns: 1fr }
  .landing aside { border-left: 0; padding-left: 0 }
  .landing-hero { margin-bottom: 48px }
  .callout { margin-top: 48px }
}

/* Job postings */
.job-meta { color: var(--grey); margin-bottom: 1em }
.job-list { list-style: none; padding: 0 }
.job-list li { padding: 16px 0; border-top: 1px solid var(--border) }

.totop { position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--icon-grey); color: var(--white); z-index: 4 }
.totop:hover { background: var(--red); color: var(--white) }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0 }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--red); color: var(--white);
  text-decoration: none; border: 1px solid var(--red); border-radius: var(--radius); font-size: 16px; line-height: 1.3 }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white) }
/* Buttons inside article bands are the quiet kind: white with a border, like Joomla's "readmore". */
.article:not(.lead) .btn { background: var(--white); color: var(--text-strong); border-color: var(--border) }
.article:not(.lead) .btn:hover { border-color: var(--red); color: var(--red) }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--white); box-shadow: var(--shadow) }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--header-h) }
.brand { flex: none }
.mainnav { margin-left: auto }
.mainnav ul { list-style: none; margin: 0; padding: 0 }
.mainnav > ul { display: flex; align-items: center; gap: 4px }
.mainnav li { position: relative }
.mainnav > ul > li > a, .mainnav > ul > li > button { display: block; padding: 6px 12px; color: #555; font: inherit; font-size: 15px;
  text-decoration: none; cursor: pointer; background: none; border: 0 }
.mainnav > ul > li > a:hover, .mainnav > ul > li > button:hover, .mainnav a[aria-current="page"] { color: var(--red) }
.mainnav .sub { display: none; position: absolute; left: 0; top: 100%; min-width: 220px; background: var(--white);
  box-shadow: var(--shadow); padding: 8px 0 }
.mainnav .info .sub { left: auto; right: 0 }
.mainnav li:hover > .sub, .mainnav li:focus-within > .sub { display: block }
.mainnav .sub a { display: block; padding: 6px 16px; color: var(--text-strong); text-decoration: none; font-size: 14px }
.mainnav .sub a:hover { color: var(--red); background: var(--muted) }
.mainnav .hl > a { background: var(--red); color: var(--white); padding: 8px 14px }
.mainnav .hl > a:hover { background: var(--red-dark); color: var(--white) }
.mainnav .info > button { padding: 0 }
.dot { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--red);
  color: var(--white); font: 700 16px/1 var(--font) }
@media (max-width: 1100px) {
  .mainnav > ul > li > a, .mainnav > ul > li > button { padding: 6px 8px; font-size: 14px }
}

/* ---------- Mobile navigation (below 992px), no JavaScript ---------- */
.mnav { display: none }
@media (max-width: 991px) {
  :root { --header-h: 64px }
  .brand img { width: 120px }
  .mainnav { display: none }
  .mnav { display: block; margin-left: auto }
  .mnav summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center;
    font-size: 26px; color: var(--text-strong) }
  .mnav summary::-webkit-details-marker { display: none }
  .mnav .close, .mnav[open] .open { display: none }
  .mnav[open] .close { display: inline }
  .mnav-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto }
  .mnav-panel ul { list-style: none; margin: 0; padding: 0 }
  .mnav-panel a, .mnav-panel span { display: block; padding: 12px var(--gutter); color: var(--text-strong);
    text-decoration: none; border-bottom: 1px solid var(--border) }
  .mnav-panel span { color: var(--grey); font-size: var(--fs-small); text-transform: uppercase; padding-bottom: 6px }
  .mnav-panel ul ul a { padding-left: calc(var(--gutter) + 20px); font-size: 14px }
  .mnav-panel .hl > a { color: var(--red); font-weight: 600 }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--muted); border-top: 1px solid var(--border); font-size: 14px }
.site-footer a { text-decoration: none }
.site-footer .grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 40px;
  padding: 48px var(--gutter) }
.site-footer h2 { color: var(--red); font-size: 18px; margin-bottom: 16px }
.site-footer .logos { display: flex; flex-direction: column; align-items: flex-start; gap: 20px }
.site-footer .legal { background: var(--white); text-align: center; margin: 0; padding: 32px var(--gutter) }

/* ---------- Embeds and consent ---------- */
.map { margin: 24px 0 0 }
.map img { display: block; width: 100%; max-width: 560px; height: auto; border: 1px solid var(--border) }
.map figcaption { margin-top: 6px; font-size: var(--fs-small); color: var(--text) }
.video-frame { position: relative; aspect-ratio: 16 / 9; width: 100% }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0 }
.video-placeholder { background: var(--muted); border: 1px solid var(--border) }
.video-thumb { position: relative }
.video-play { position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 0;
  border: 3px solid var(--white); border-radius: 50%; background: rgba(0, 0, 0, .65); cursor: pointer }
.video-play::before { content: ""; position: absolute; top: 50%; left: 50%; margin: -14px 0 0 -9px;
  border-style: solid; border-width: 14px 0 14px 24px; border-color: transparent transparent transparent var(--white) }
.video-play:hover, .video-play:focus-visible { background: var(--red) }
.video-placeholder img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover }
.video-note { padding: 12px 16px 16px; font-size: var(--fs-small) }
.video-title { margin: 0 0 6px; font-weight: 700; color: var(--text-strong); font-size: 16px }
.video-note p { margin: 0 0 8px }
.video-note .actions { margin: 12px 0 8px }
.video-note .btn { background: var(--white); color: var(--text-strong); border-color: var(--border) }
.video-note .btn:hover { border-color: var(--red); color: var(--red) }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--red); text-decoration: underline; cursor: pointer }
.linklike:hover { color: var(--red-dark) }
.consent-cat { border: 1px solid var(--border); margin: 0 0 16px; padding: 8px 16px }
.consent-cat legend { font-weight: 700; padding: 0 6px }
.consent-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 24px; padding: 16px max(var(--gutter), 72px) 16px var(--gutter); background: var(--white); border-top: 3px solid var(--red);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .15) }
.consent-banner p { margin: 0 }
.consent-banner .actions { margin: 0 }

/* ---------- Contact form ---------- */
.form-band { background: var(--muted) }
.contact-form { max-width: 640px }
.contact-form .field { margin: 0 0 16px }
.contact-form label { display: block; font-weight: 600; color: var(--text-strong); margin-bottom: 4px }
.contact-form .optional { font-weight: 400; color: var(--text) }
.contact-form input, .contact-form textarea { width: 100%; padding: 10px 12px; font: inherit; color: var(--text-strong);
  background: var(--white); border: 1px solid #8a8a8a; border-radius: var(--radius) }
.contact-form [aria-invalid="true"] { border-color: var(--red); border-width: 2px }
.field-error { display: block; margin-top: 4px; color: var(--red-dark); font-weight: 600 }
.form-notice { padding: 10px 14px; border-left: 4px solid var(--red); background: var(--white); color: var(--red-dark); font-weight: 600 }
.form-ok { padding: 12px 16px; border-left: 4px solid #2e7d32; background: var(--white); font-weight: 600 }
.form-privacy { font-size: var(--fs-small) }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden }
.htmx-indicator { opacity: 0; margin-left: 8px; color: var(--grey) }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1 }
#formular { scroll-margin-top: calc(var(--header-h) + 8px) }

/* Stand-alone links need a 24px target (WCAG 2.2 AA, target size). */
.video-settings a, .linklike { display: inline-block; padding: 4px 0; min-height: 24px }
