/* ==========================================================================
   Medienresearch e. V. – Stylesheet
   Statisch, ohne externe Ressourcen (Schriften selbst gehostet, keine Cookies)
   ========================================================================== */

/* ---------- Schriften (SIL Open Font License, siehe assets/fonts/LIZENZEN.txt)
   Poppins = Schrift des Logos (Überschriften, Navigation, Buttons)
   Source Sans 3 = Fließtext, Lora Italic = Zitate (wie das mR-Monogramm) */
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3.woff") format("woff");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("../fonts/poppins-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-italic.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* ---------- Farben & Maße (abgeleitet aus dem Logo) */
:root {
  --blue-900: #12304a;
  --blue-800: #1d4469;
  --blue-700: #2e628e;   /* Logo, dunkel */
  --blue-600: #3f709b;
  --blue-500: #4d7ea8;   /* Logo, mittel */
  --blue-300: #8faec5;
  --blue-200: #b8ccd9;   /* Logo, hell */
  --blue-100: #d6e4ee;
  --blue-50:  #eef4f8;

  --ink:    #16212c;
  --text:   #2f3d4a;
  --muted:  #5d6b78;
  --line:   #dfe6ec;
  --paper:  #fbfcfd;
  --white:  #ffffff;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(18, 48, 74, .06), 0 8px 24px rgba(18, 48, 74, .06);
  --shadow-hover: 0 2px 4px rgba(18, 48, 74, .08), 0 14px 36px rgba(18, 48, 74, .12);

  --wrap: 1120px;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-head: "Poppins", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

/* ---------- Basis */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-700); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-900); }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { color: var(--ink); line-height: 1.18; margin: 0 0 .5em; font-family: var(--font-head); font-weight: 700; }
h1, h2 { letter-spacing: -.02em; text-wrap: balance; color: var(--blue-900); }
h1 { font-size: clamp(2rem, 1.35rem + 2.7vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 46rem; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--blue-800); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Kopfbereich */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 252, 253, .88);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; min-height: 84px; flex-wrap: wrap; padding-block: .6rem;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 54px; width: auto; }

.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--text); font-family: var(--font-head); font-weight: 500; font-size: .98rem;
  padding: .45rem .9rem; border-radius: 999px; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--blue-50); color: var(--blue-800); }
.nav a[aria-current="page"] { background: var(--blue-700); color: #fff; }

/* ---------- Abschnitte */
.section { padding-block: clamp(3.5rem, 2rem + 5vw, 6rem); }
.section + .section { padding-top: 0; }
.section--tint { background: var(--blue-50); border-block: 1px solid var(--line); }
.section + .section--tint,
.section--tint + .section { padding-top: clamp(3.5rem, 2rem + 5vw, 6rem); }
.eyebrow {
  display: inline-flex; align-items: center;
  font-family: var(--font-head); font-size: .82rem; font-weight: 500; letter-spacing: .1em;
  text-transform: uppercase; color: var(--blue-600); margin-bottom: 1rem;
}
/* Pixel-Akzent aus dem Logo: drei Quadrate, die heller werden */
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 1.5px; background: var(--blue-700);
  box-shadow: 10px 0 0 #678fb1, 20px 0 0 var(--blue-200);
  margin-right: 34px; flex: none;
}
.lead { font-size: clamp(1.15rem, 1rem + .5vw, 1.35rem); color: var(--muted); line-height: 1.55; }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }

/* ---------- Hero */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(4rem, 2rem + 7vw, 7.5rem) clamp(3.5rem, 2rem + 5vw, 6rem);
  background:
    radial-gradient(60rem 30rem at 100% 0%, rgba(184, 204, 217, .45), transparent 60%),
    linear-gradient(180deg, var(--white), var(--paper));
  border-bottom: 1px solid var(--line);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-content { max-width: 40rem; }
.hero h1 { margin-bottom: .45em; }
.hero .subtitle {
  font-family: var(--font-head); font-size: clamp(1.1rem, .95rem + .7vw, 1.35rem); font-weight: 500; color: var(--blue-600);
  margin-bottom: 1.5rem;
}
.hero-art {
  position: absolute; z-index: 0; right: max(0rem, calc((100vw - var(--wrap)) / 2 - 2rem));
  bottom: 0; width: min(40vw, 500px); pointer-events: none;
}
@media (max-width: 960px) {
  .hero-art { width: 64vw; right: -14vw; opacity: .13; }
}
.page-hero { padding-block: clamp(3.5rem, 2rem + 5vw, 5rem) clamp(2.5rem, 1.5rem + 3vw, 3.5rem); }
.page-hero .hero-content { max-width: 40rem; }
.page-hero .hero-art { width: min(24vw, 270px); }

/* ---------- Karten / Raster */
.grid { display: grid; gap: 1.25rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.5rem; box-shadow: var(--shadow);
}
.card p:last-child { margin-bottom: 0; }

/* Schwerpunkte (Startseite) */
.focus-list { list-style: none; margin: 0; padding: 0; counter-reset: focus; }
.focus-list li {
  counter-increment: focus; position: relative;
  display: flex; flex-direction: column; gap: .9rem;
}
.focus-list li::before {
  content: counter(focus, decimal-leading-zero);
  font-family: var(--font-head); font-size: .95rem; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  width: 2.6rem; height: 2.6rem; border-radius: 9px;
  display: grid; place-items: center;
}
.focus-list p { font-size: 1.1rem; color: var(--ink); line-height: 1.5; }
.focus-list .cta { background: var(--blue-800); border-color: var(--blue-800); justify-content: space-between; }
.focus-list .cta::before { display: none; }
.focus-list .cta h3 { color: #fff; margin: 0; }
.focus-list .cta p { color: #dbe7f0; font-size: 1.02rem; margin: 0; }
.focus-list .cta a { color: #fff; font-family: var(--font-head); font-weight: 500; text-decoration: none; }
.focus-list .cta a:hover .arrow { transform: translateX(3px); }
.pixels { display: flex; gap: 4px; }
.pixels i { width: 9px; height: 9px; border-radius: 2px; }
.pixels i:nth-child(1) { background: #fff; }
.pixels i:nth-child(2) { background: var(--blue-200); }
.pixels i:nth-child(3) { background: var(--blue-300); }
.pixels i:nth-child(4) { background: var(--blue-500); }

/* Systeme (Projektseite) */
.system {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.system-top { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.system-icon {
  flex: none; width: 3rem; height: 3rem; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); color: #fff;
}
.system-icon svg { width: 1.5rem; height: 1.5rem; }
.system h3 { margin: 0; font-size: 1.2rem; }
.system .tag { display: block; font-size: .95rem; color: var(--muted); font-style: italic; line-height: 1.3; }
.system p { font-size: 1.03rem; }
.system .more {
  margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-weight: 700; color: var(--blue-700); font-size: 1rem;
}
.system .more .url { font-weight: 400; color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
a.system:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--blue-200); }
a.system:hover .more .arrow { transform: translateX(3px); }
.arrow { display: inline-block; transition: transform .2s ease; }

.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--blue-800); background: var(--blue-50); border: 1px solid var(--blue-100);
  padding: .15rem .55rem; border-radius: 999px; margin-left: auto; white-space: nowrap;
}

/* Hinweisbox */
.notice {
  display: flex; gap: 1.1rem; align-items: flex-start;
  background: var(--white); border: 1px solid var(--blue-200); border-left: 5px solid var(--blue-700);
  border-radius: var(--radius); padding: 1.4rem 1.6rem; box-shadow: var(--shadow);
}
.notice svg { flex: none; width: 1.75rem; height: 1.75rem; color: var(--blue-700); margin-top: .1rem; }
.notice h2 { font-size: 1.1rem; margin-bottom: .35rem; letter-spacing: -.01em; }
.notice p { margin: 0; font-size: 1.05rem; }

/* Fließtext-Block */
.prose { font-size: 1.15rem; }
.prose p { margin-bottom: 1.1em; }

.extra {
  display: flex; gap: 1rem; align-items: flex-start; margin-top: 1.25rem;
  padding: 1.4rem 1.6rem; border-radius: var(--radius); background: var(--blue-50); border: 1px solid var(--blue-100);
}
.extra p { margin: 0; }
.extra svg { flex: none; width: 1.6rem; height: 1.6rem; color: var(--blue-700); margin-top: .15rem; }

/* Zitat */
.quote {
  margin: 0 0 3rem; padding: 2.2rem 2.4rem; position: relative;
  background: var(--blue-800); color: #eaf1f6; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.quote::before {
  content: "“"; position: absolute; top: -.3rem; left: 1.4rem;
  font-family: var(--font-serif); font-size: 6rem; line-height: 1; color: var(--blue-300); opacity: .5;
}
.quote p {
  position: relative; font-family: var(--font-serif); font-style: italic;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.65rem); line-height: 1.45; color: #fff; margin-bottom: 1.1rem;
}
.quote p strong { font-weight: 600; color: var(--blue-100); }
.quote footer { font-size: 1rem; color: var(--blue-200); }
.quote cite { font-style: normal; }

/* Danksagung */
.thanks .card { display: flex; flex-direction: column; gap: .5rem; }
.thanks .name { font-family: var(--font-head); font-weight: 700; color: var(--blue-900); font-size: 1.08rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55rem; text-decoration: none;
  font-family: var(--font-head); font-weight: 500; font-size: 1rem; padding: .8rem 1.4rem; border-radius: 999px;
  background: var(--blue-700); color: #fff; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--blue-800); color: #fff; }
.btn:hover .arrow { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--blue-700); border: 1.5px solid var(--blue-200); }
.btn--ghost:hover { background: var(--blue-50); color: var(--blue-800); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* Vorstand */
.person { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.person .photo {
  aspect-ratio: 4 / 5; background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
  position: relative; overflow: hidden;
}
.person .photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.person .photo .initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-serif); font-style: italic; font-weight: 700; font-size: 3.5rem; color: var(--blue-500);
}
.person .photo img { position: relative; z-index: 1; }
.person .info { padding: 1.3rem 1.5rem 1.5rem; }
.person .role {
  display: block; font-size: .85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue-600); margin-bottom: .25rem;
}
.person .name { font-family: var(--font-head); font-size: 1.3rem; font-weight: 700; color: var(--blue-900); letter-spacing: -.01em; }

/* Impressum */
.legal dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.25rem; }
.legal dt { font-weight: 700; color: var(--ink); }
.legal dd { margin: 0; }
.legal h2 { font-size: 1.5rem; }
@media (max-width: 480px) {
  .legal dl { grid-template-columns: 1fr; gap: .1rem; }
  .legal dd { margin-bottom: .6rem; }
}

/* ---------- Kontakt-Band & Fußbereich */
.contact-band { background: var(--blue-800); color: #dfe9f1; }
.contact-band .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem;
  padding-block: 2.75rem;
}
.contact-band h2 { color: #fff; letter-spacing: -.01em; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); margin: 0 0 .25rem; }
.contact-band p { margin: 0; color: var(--blue-200); }
.contact-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.contact-links a {
  display: inline-flex; align-items: center; gap: .6rem; text-decoration: none;
  color: #fff; font-weight: 600; padding: .75rem 1.2rem; border-radius: 999px;
  border: 1.5px solid rgba(184, 204, 217, .45); transition: background .15s, border-color .15s;
}
.contact-links a:hover { background: rgba(255, 255, 255, .08); border-color: var(--blue-200); color: #fff; }
.contact-links svg { width: 1.15rem; height: 1.15rem; }

.site-footer { background: var(--white); color: var(--muted); font-size: .98rem; border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem 2rem;
  padding-block: 2rem;
}
.footer-brand { display: flex; flex-direction: column; gap: .6rem; }
.footer-brand img { height: 46px; width: auto; }
.footer-brand p { margin: 0; font-size: .92rem; }
.site-footer a { color: var(--blue-800); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; }

/* ---------- Kleine Bildschirme */
@media (max-width: 640px) {
  body { font-size: 1.06rem; }
  .site-header { position: static; }
  .site-header .wrap { justify-content: center; }
  .nav { justify-content: center; }
  .brand img { height: 46px; }
  .card { padding: 1.35rem; }
  .quote { padding: 2rem 1.5rem 1.6rem; }
  .notice { flex-direction: column; gap: .6rem; }
}

/* ---------- Druck */
@media print {
  .site-header { position: static; backdrop-filter: none; }
  .hero-art, .contact-band, .skip-link { display: none; }
  .card, .notice { box-shadow: none; }
  body { background: #fff; }
}

/* Vorstand: Karten ohne Innenabstand, auf Mobilgeräten quadratische Fotos */
.card.person { padding: 0; }
@media (max-width: 640px) { .person .photo { aspect-ratio: 1 / 1; } }

/* ---------- Dynamik (assets/js/dynamik.js) */
.hero-grid { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
svg.hero-art { overflow: visible; height: auto; }
.px rect { will-change: transform; }
a.system { position: relative; overflow: hidden; transition: transform .18s ease-out, box-shadow .2s ease, border-color .2s ease; }
a.system::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(77, 126, 168, .13), transparent 65%);
}
a.system.is-lit::after { opacity: 1; }
a.system > * { position: relative; z-index: 1; }
