/* Site design, used by all pages generated from templates/base.html.
   The hand-written pages in events/ and recordings/ keep using style.css. */

@font-face {
  font-family: Manrope;
  src: url(fonts/manrope/manrope-variable.ttf);
  font-weight: 200 800;
}
@property --nav-fg { syntax: "<color>"; inherits: true; initial-value: #5b6676; }
@property --nav-bg { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --nav-active { syntax: "<color>"; inherits: true; initial-value: #213fa8; }
@property --nav-accent { syntax: "<color>"; inherits: true; initial-value: #3b67f3; }
:root {
  --ink: #1b2533;
  --muted: #5b6676;
  --blue: #3b67f3;
  --blue-deep: #213fa8;
  --band: #f1f4fb;
  --rule: #e1e6ee;
  --nav-h: 64px;
  --bs-body-font-family: Manrope, system-ui, sans-serif;
  --bs-body-color: var(--ink);
  --bs-link-color-rgb: 33, 63, 168;
  --bs-link-hover-color-rgb: 59, 103, 243;
}
body { background: #fff; font-size: 1.0625rem; line-height: 1.65; }
a { text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.banner a:focus-visible { outline-color: #fff; }

/* navigation: a solid white bar by default; see the scroll-driven version further down */
.main-nav { position: sticky; top: 0; z-index: 20; height: var(--nav-h); margin-bottom: calc(-1 * var(--nav-h)); background: var(--nav-bg); border-bottom: 1px solid var(--rule); }
.main-nav .wrap { height: 100%; display: flex; align-items: center; }
.main-nav ul { display: flex; justify-content: space-between; gap: 12px; flex: 1; height: 100%; margin: 0; padding: 0; list-style: none; }
.main-nav li { height: 100%; }
.main-nav a { display: flex; align-items: center; height: 100%; padding: 3px 2px 0; color: var(--nav-fg); font-weight: 600; font-size: 0.9rem; white-space: nowrap; text-decoration: none; border-bottom: 3px solid transparent; }
.main-nav a:hover { color: var(--nav-active); text-decoration: none; }
.main-nav a.active { color: var(--nav-active); border-bottom-color: var(--nav-accent); }
.nav-toggle { display: none; }

/* banner: the banner image, deepened; its lower edge bends while scrolling (see below) */
.banner { --bend: 64px; color: #fff; background: linear-gradient(100deg, rgba(18, 30, 110, 0.85) 0%, rgba(30, 50, 170, 0.6) 55%, rgba(30, 50, 170, 0.35) 100%), url(../img/banner2.jpg) center / cover; }
.banner .wrap { padding-top: calc(var(--nav-h) + 36px); padding-bottom: 52px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 56px; align-items: center; }
.hero .crc { font-weight: 700; font-size: 1rem; margin: 0 0 10px; }
.hero .crc a { color: inherit; }
.hero h1 { font-size: clamp(2rem, 1rem + 2.8vw, 3.4rem); font-weight: 720; line-height: 1.06; letter-spacing: -0.03em; margin: 0 0 16px; max-width: 19ch; text-wrap: balance; }
.hero p { font-size: 1.05rem; margin: 0; opacity: 0.88; }
.hero .logo { width: 200px; height: auto; transform-origin: 50% 60%; }
/* the subpages carry their title in a shorter banner */
.banner-compact .wrap { padding-top: calc(var(--nav-h) + 28px); padding-bottom: 44px; }
.banner-compact .hero h1 { font-size: clamp(2rem, 1.2rem + 2.2vw, 3rem); margin: 0; }
.banner-compact .hero .logo { width: 128px; }

/* page body */
.page { padding-top: 72px; padding-bottom: 96px; }
.page h2 { font-size: 1.75rem; font-weight: 720; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 16px; text-wrap: balance; }
.page h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.3; margin: 0 0 10px; }
.lead-text { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem); line-height: 1.65; }
.muted { color: var(--muted); }
.button { display: inline-block; padding: 8px 20px; border-radius: 999px; background: var(--blue-deep); color: #fff; font-weight: 600; font-size: 0.92rem; }
.button:hover { background: var(--blue); color: #fff; text-decoration: none; }

/* sections with their heading on the left, kept in view while the content passes */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; padding: 64px 0; border-top: 1px solid var(--rule); }
.page > .split:first-child { padding-top: 0; border-top: 0; }
.split-head { position: sticky; top: calc(var(--nav-h) + 32px); }
.split-head p { color: var(--muted); margin: 0; }

/* overview: intro, photo and news */
.intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 72px; align-items: center; padding: 88px 0 72px; }
.intro p { margin: 0 0 1em; }
.intro p:last-child { margin-bottom: 0; }
.intro figure { margin: 0; }
.zoom-trigger { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoom-trigger img { width: 100%; height: auto; }
.zoom-modal { display: none; position: fixed; inset: 0; z-index: 50; padding: 6vh 4vw; background: rgba(12, 18, 40, 0.92); overflow: auto; cursor: zoom-out; }
.zoom-modal img { display: block; width: 100%; max-width: 760px; margin: 0 auto; background: #fff; border-radius: 8px; padding: 24px; }
.zoom-close { position: absolute; top: 12px; right: 20px; padding: 0 8px; border: 0; background: none; color: #fff; font-size: 2.4rem; line-height: 1; }

.photo { margin: 0 0 88px; }
.photo img { width: 100%; height: auto; display: block; border-radius: 8px; }
.photo figcaption { color: var(--muted); font-size: 0.875rem; margin-top: 10px; }

.news { background: var(--band); padding: 80px 0 88px; }
.news .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; }
.news-head { position: sticky; top: calc(var(--nav-h) + 32px); }
.news h2 { font-size: 2.2rem; font-weight: 720; letter-spacing: -0.025em; line-height: 1.1; margin: 0 0 14px; }
.news-head a { font-weight: 600; }
.news-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 28px; padding: 28px 0; border-top: 1px solid var(--rule); }
.news-item:first-child { border-top: 0; padding-top: 0; }
.date { color: var(--blue-deep); line-height: 1; }
.date .d { display: flex; font-size: 3.4rem; font-weight: 250; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
/* each digit is a reel of 0-9; site.js sets --to so it rests on the right one */
.date .reel { display: block; height: 1em; overflow: hidden; mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.date .reel b { display: block; font-weight: inherit; white-space: pre-line; transform: translateY(calc(var(--to) * -1em)); }
.date .m { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-top: 6px; }
.news-text { max-width: 42em; }

/* news archive */
.news-list { max-width: 860px; }
.pagination { --bs-pagination-color: var(--blue-deep); --bs-pagination-hover-color: var(--blue-deep); --bs-pagination-active-bg: var(--blue-deep); --bs-pagination-active-border-color: var(--blue-deep); --bs-pagination-border-color: var(--rule); --bs-pagination-focus-box-shadow: none; flex-wrap: wrap; margin: 48px 0 0; }

/* locations: map of Germany, one marker per site; its card opens on hover or click */
.split-head .map-hint { font-size: 0.92rem; margin-top: 20px; }
.map { position: relative; width: min(100%, 520px); margin-inline: auto; }
.map-de { display: block; width: 100%; height: auto; }
.site { position: absolute; left: var(--x); top: var(--y); z-index: 1; }
.site-marker { position: absolute; z-index: 2; top: calc(var(--h) / -2); left: -6px; display: flex; align-items: center; gap: 10px; height: var(--h); padding: 0; border: 0; background: none; cursor: pointer; }
.site.left .site-marker { left: auto; right: -6px; flex-direction: row-reverse; }
.site-marker img { flex: none; height: 100%; width: auto; max-width: none; padding: 2px 3px; background: #fff; border-radius: 3px; }
.site-dot { position: relative; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #fff; transition: transform 0.15s; }
.site-dot::after { content: ""; position: absolute; inset: 0; border: 1.5px solid var(--blue); border-radius: 50%; opacity: 0; }
.site-card { width: 300px; padding: 16px; background: #fff; border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 18px 40px -18px rgba(27, 37, 51, 0.35); opacity: 0; visibility: hidden; transition: opacity 0.15s, transform 0.15s, visibility 0s 0.15s; }
.site-card h2 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin: 0 0 4px; }
.site-card p { margin: 0; }
.site-card .site-meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; }
.site.open, .site:has(:focus-visible) { z-index: 3; }
.site.open .site-dot, .site:has(:focus-visible) .site-dot { transform: scale(1.25); }
.site.open .site-card, .site:has(:focus-visible) .site-card { opacity: 1; visibility: visible; transform: none; transition: opacity 0.15s, transform 0.15s; }
@media (hover: hover) {
  .site:hover { z-index: 4; }
  .site:hover .site-dot { transform: scale(1.25); }
  .site:hover .site-card { opacity: 1; visibility: visible; transform: none; transition: opacity 0.15s, transform 0.15s; }
}
@media (min-width: 901px) {
  /* the card grows out of the marker: it sits behind it and holds the text below (or above) it */
  .site-card { position: absolute; z-index: 1; top: calc(var(--h) / -2 - 14px); left: -22px; padding-top: calc(var(--h) + 28px); transform: translateY(-4px); }
  .site.left .site-card { left: auto; right: -22px; }
  .site.up .site-card { top: auto; bottom: calc(var(--h) / -2 - 14px); padding-top: 16px; padding-bottom: calc(var(--h) + 28px); transform: translateY(4px); }
}

/* people */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 44px 28px; }
.person img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; background: var(--band); }
.person h5 { font-size: 1.05rem; font-weight: 700; line-height: 1.3; margin: 14px 0 6px; }
.person p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin: 0; }

/* projects */
.area-intro { margin-bottom: 32px; }
.area-intro img { display: block; max-width: 100%; margin-bottom: 20px; }
.project { border-top: 1px solid var(--rule); }
.project:last-child { border-bottom: 1px solid var(--rule); }
.project-toggle { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) 12px; gap: 2px 20px; align-items: baseline; width: 100%; padding: 18px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.project-code { grid-row: span 2; font-weight: 700; color: var(--blue-deep); font-variant-numeric: tabular-nums; }
.project-title { font-weight: 650; line-height: 1.4; }
.project-names { grid-column: 2; color: var(--muted); font-size: 0.92rem; }
.project-toggle::after { content: ""; grid-column: 3; grid-row: 1; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-3px) rotate(45deg); transition: transform 0.2s; }
.project-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.project-toggle:hover .project-title { color: var(--blue-deep); }
.project-text { margin: 0; padding: 0 32px 24px calc(3.5rem + 20px); }

/* workshops and equality events */
.subscribe { margin-top: 28px; color: var(--muted); font-size: 0.92rem; }
.subscribe .button { margin-right: 12px; }
.events-table { width: 100%; border-collapse: collapse; }
.events-table th { padding: 0 20px 10px 0; border-bottom: 1px solid var(--ink); font-size: 0.85rem; font-weight: 700; color: var(--muted); text-align: left; }
.events-table td { padding: 16px 20px 16px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.events-table td:first-child { white-space: nowrap; font-weight: 600; color: var(--blue-deep); font-variant-numeric: tabular-nums; }
.events-table td:nth-child(2) { font-weight: 650; }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 48px 32px; }
.contact-grid h5 { font-size: 0.9rem; font-weight: 700; color: var(--blue-deep); margin: 0 0 8px; }
.contact-grid p { line-height: 1.55; margin: 0; }
.contact-grid p::first-line { font-weight: 700; }

/* data management */
.prose { max-width: 46rem; }
.prose h2 { margin-top: 56px; }
.prose h3 { margin-top: 40px; }
.prose ul { margin-bottom: 1em; }
.prose-figure { float: right; width: min(360px, 45%); margin: 4px 0 24px 40px; }
.clear { clear: both; }
.ref-table td { padding: 4px 16px 4px 0; vertical-align: top; }

/* publications */
.pub-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid var(--rule); }
.publication-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; flex: 1 1 520px; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.filter-label { font-weight: 600; margin-right: 6px; }
.filterbtn { padding: 3px 14px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.filterbtn:hover { border-color: var(--blue); }
.filterbtn.active { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.publication-search-input { flex: 1 1 14rem; min-width: 0; padding: 6px 16px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; }
.publication-search-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59, 103, 243, 0.2); }
.pub-notify { color: var(--muted); font-size: 0.92rem; }
.pub-notify .button { margin-left: 8px; }
.publication-list { padding-left: 3.2rem; margin: 0; }
.publication { overflow-wrap: anywhere; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.publication::marker { color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.publication.hidden { display: none; }
.pub-title { font-weight: 650; color: var(--ink); }
.pub-title:hover { color: var(--blue-deep); }
.pub-proj-num { float: right; margin: 0 0 8px 16px; padding: 1px 10px; border-radius: 999px; background: var(--band); color: var(--blue-deep); font-size: 0.8rem; font-weight: 700; }
.data-report ul { list-style: none; padding-left: 0; margin: 6px 0 0; }
.data-report summary { color: var(--muted); font-size: 0.92rem; cursor: pointer; }
.data-report .report-detail { margin-left: 2ch; }

/* equality */
.equality-quote { font-style: italic; }
.goals { list-style: none; padding: 0; margin: 20px 0 0; }
.goals li { display: grid; grid-template-columns: 2.5em minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 14px; }
.goals img { width: 2.5em; height: 2.5em; }
.tell-us { display: inline-flex; align-items: center; gap: 14px; margin-top: 12px; padding: 14px 24px; border-radius: 999px; background: var(--band); color: var(--blue-deep); font-weight: 700; }
.tell-us img { height: 1.8em; }
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.panel { padding: 24px 28px; border-radius: 8px; background: var(--band); }
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.members { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.member { padding: 20px 24px; border: 1px solid var(--rule); border-radius: 8px; }
.member .name { font-weight: 700; }
.member .function, .member .place { color: var(--muted); font-size: 0.92rem; }

.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.875rem; }
main:has(> .news:last-child) + .site-footer { border-top: 0; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer img { height: 48px; width: auto; }

/* scroll-driven effects, only where supported and wanted */
@supports (animation-timeline: scroll()) {
  /* the menu starts transparent on the banner and turns into a frosted bar */
  .main-nav { --nav-bg: rgba(255, 255, 255, 0); --nav-fg: rgba(255, 255, 255, 0.82); --nav-active: #ffffff; --nav-accent: #ffffff; border-bottom-color: transparent;
    animation: nav-solid linear both; animation-timeline: scroll(root); animation-range: 0 160px; }
  @keyframes nav-solid {
    to { --nav-bg: rgba(255, 255, 255, 0.9); --nav-fg: #5b6676; --nav-active: #213fa8; --nav-accent: #3b67f3; border-bottom-color: #e1e6ee; backdrop-filter: blur(12px); }
  }
}
@media (prefers-reduced-motion: no-preference) {
  /* a faint ring flashes out of each location marker, one location after the other */
  .site-dot::after { animation: ping 5s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; animation-delay: calc(var(--i) * 0.8s); }
  @keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 40%, 100% { transform: scale(3.4); opacity: 0; } }

  @supports (animation-timeline: view()) {
    /* the banner's straight lower edge bends as the page scrolls */
    .banner { animation: bend linear both; animation-timeline: scroll(root); animation-range: 0 320px; }
    @keyframes bend {
      from { border-bottom-left-radius: 50% 0; border-bottom-right-radius: 50% 0; }
      to { border-bottom-left-radius: 50% var(--bend); border-bottom-right-radius: 50% var(--bend); }
    }

    /* the logo shears slightly, as if under strain, while the banner scrolls away */
    .hero .logo { animation: strain linear both; animation-timeline: scroll(root); animation-range: 0 520px; }
    @keyframes strain { to { transform: translateY(40px) skewX(-10deg) scale(0.86, 0.94); opacity: 0.35; } }

    /* the photo opens from the sides as it comes into view */
    .photo img { animation: open-up linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
    @keyframes open-up { from { clip-path: inset(0 14% round 8px); } to { clip-path: inset(0 0 round 8px); } }

    .news-text { animation: settle linear both; animation-timeline: view(); animation-range: entry 20% cover 35%; }
    @keyframes settle { from { opacity: 0.25; } to { opacity: 1; } }
  }

  /* day numbers wait at 00, then spin once onto the date when the entry comes into view */
  .news-item .reel b { transform: translateY(0); transition: transform 1.6s cubic-bezier(0.15, 0.6, 0.2, 1); }
  .news-item .reel:last-child b { transition-duration: 2.1s; }
  .news-item.spun .reel b { transform: translateY(calc(var(--to) * -1em)); }
}

/* the nine menu items need about 1060px side by side */
@media (max-width: 1060px) {
  .main-nav .wrap { justify-content: flex-end; }
  .nav-toggle { display: block; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 4px 16px; font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--nav-fg); }
  .main-nav ul { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; height: auto; flex-direction: column; gap: 0; background: #fff; padding: 8px 28px 16px; border-bottom: 1px solid var(--rule); box-shadow: 0 12px 24px rgba(27, 37, 51, 0.08); }
  .main-nav ul.open { display: flex; }
  .main-nav ul li { height: auto; }
  .main-nav ul a { height: auto; padding: 8px 12px; color: var(--muted); border-bottom: 0; border-left: 3px solid transparent; }
  .main-nav ul a.active { color: var(--blue-deep); border-left-color: var(--blue); }
}

@media (max-width: 900px) {
  :root { --nav-h: 56px; }
  .wrap { padding: 0 20px; }
  .banner { --bend: 28px; }
  .banner .wrap { padding-top: calc(var(--nav-h) + 20px); padding-bottom: 40px; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero .logo { order: -1; width: 112px; }
  .banner-compact .hero { grid-template-columns: minmax(0, 1fr) auto; }
  .banner-compact .hero .logo { order: 0; width: 64px; }
  .page { padding-top: 48px; padding-bottom: 64px; }
  .intro, .news .wrap, .split { grid-template-columns: 1fr; gap: 28px; }
  .intro { padding: 56px 0 48px; }
  .intro figure { max-width: 300px; }
  .split { padding: 48px 0; }
  .split-head, .news-head { position: static; }
  .news { padding: 56px 0 64px; }
  .news-item { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .date { display: flex; align-items: baseline; gap: 8px; }
  .date .d { font-size: 2rem; }
  .panels, .members { grid-template-columns: 1fr; }
  .site-marker { height: calc(var(--h) * 0.8); top: calc(var(--h) * -0.4); gap: 7px; }
  .site-card { position: fixed; z-index: 3; left: 16px; right: 16px; bottom: 16px; width: auto; padding: 18px 20px; transform: translateY(8px); }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 32px 20px; }
  .project-text { padding-left: 0; padding-right: 0; }
  .prose-figure { float: none; width: auto; max-width: 360px; margin: 0 0 24px; }
  .publication-list { padding-left: 2.2rem; }
  .pub-proj-num { float: none; display: inline-block; margin: 0 0 6px; }
  /* tables become stacked entries */
  .events-table thead { display: none; }
  .events-table tr { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .events-table td { display: block; padding: 0; border: 0; }
  .events-table td:empty { display: none; }
  .events-table td:first-child { white-space: normal; }
}
