/* RenewLab – Projektwebsite. Ruhig, hell, eine Akzentfarbe. */

:root {
  --paper: #f6f3ee;
  --paper-2: #ede8e0;
  --paper-3: #e3ddd2;
  --ink: #1b1b1a;
  --ink-2: #55524c;
  --ink-3: #8a857d;
  --line: rgba(27, 27, 26, 0.12);
  /* Akzent = Prioritätsfarbe Pr1 des Programms (Innovation und Unternehmen) */
  --clay: #18baa8;
  --clay-2: #12907f;      /* dunkler, für Text auf Papier (Kontrast) */
  --eu: #003399;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --header-h: 72px;

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
::selection { background: var(--clay-2); color: var(--paper); }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Typografie ---------- */
.display {
  font-size: clamp(2.5rem, 7.2vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 600;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(2rem, 4.4vw, 3.9rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}
.h3 { font-size: clamp(1.25rem, 1.8vw, 1.6rem); letter-spacing: -0.015em; line-height: 1.2; }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); text-wrap: pretty; }
.muted { color: var(--ink-2); }
.small { font-size: 0.9rem; }
.kicker {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
}
.kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--clay); flex: none; }
.kicker { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.header.is-scrolled { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; height: 48px; flex: none; }
.brand img { height: 40px; width: auto; }
.brand .brand-stack { display: none; height: 48px; }
.nav { display: flex; gap: clamp(14px, 2vw, 30px); }
.nav-lang { display: none; }
.nav a { font-size: 0.92rem; font-weight: 500; color: var(--ink-2); padding: 6px 0; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a:hover, .nav a.is-active { color: var(--ink); }
.header-right { display: flex; align-items: center; gap: 18px; flex: none; }
.funding { display: flex; align-items: center; flex: none; }
.funding img { height: 36px; width: auto; }
.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang a { font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: var(--ink-3); }
.lang a[aria-current] { background: var(--ink); color: var(--paper); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--ink); font-weight: 600; font-size: 0.85rem; }

@media (max-width: 980px) {
  .nav { display: none; }
  .header.is-open .nav { display: flex; position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; }
  .header.is-open .nav a { font-size: 1.4rem; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: inline-block; }
  .lang { display: none; }
  .header.is-open .nav-lang { display: flex; gap: 18px; padding-top: 18px; font-size: 0.9rem; font-weight: 600; color: var(--ink-3); }
  .header.is-open .nav-lang a { border: 0; font-size: 0.9rem; padding: 0; }
  .header.is-open .nav-lang a[aria-current] { color: var(--ink); }
}
@media (max-width: 720px) {
  .brand .brand-wide { display: none; }
  .brand .brand-stack { display: block; }
}

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(48px, 9vh, 120px)); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: clamp(28px, 4vw, 56px); }
.hero h1 { margin-top: 18px; max-width: 16ch; }
.hero .lead { max-width: 52ch; margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-media { margin-top: clamp(40px, 7vh, 88px); }
.hero-media.frame { aspect-ratio: 16 / 8.2; }
@media (max-width: 720px) { .hero-media.frame { aspect-ratio: 4 / 3.4; } }

/* Bildrahmen mit Parallax-Innenbild */
.frame { position: relative; overflow: hidden; border-radius: 6px; background: var(--paper-3); }
.frame img { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; will-change: transform; }
.frame.plain img { position: static; height: 100%; inset: auto; }
.frame figcaption { position: absolute; left: 14px; bottom: 12px; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255,255,255,0.85); background: rgba(0,0,0,0.28); padding: 5px 9px; border-radius: 999px; backdrop-filter: blur(6px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--clay-2); border-color: var(--clay-2); }
.btn .arr { transition: transform 0.3s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

/* ---------- Abschnitte ---------- */
.section { padding-block: clamp(72px, 11vw, 160px); }
.section.tight { padding-block: clamp(48px, 7vw, 96px); }
.section-head { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(36px, 5vw, 72px); }
.section-head .h2 { max-width: 20ch; margin-top: 14px; }
.section-head .lead { max-width: 56ch; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1.1fr 0.9fr; align-items: end; }
  .section-head .lead { justify-self: end; }
}
.cols > *, .feature > *, .wps > *, .contact > *, .section-head > *, .centers > *, .hero-grid > * { min-width: 0; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Zahlenleiste */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { padding: clamp(22px, 3vw, 40px) 0; border-bottom: 1px solid var(--line); }
.stats .value { font-size: clamp(2.2rem, 4.5vw, 4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.stats .value sup { font-size: 0.4em; vertical-align: top; top: 0.35em; position: relative; letter-spacing: 0; }
.stats .label { margin-top: 10px; color: var(--ink-2); font-size: 0.92rem; max-width: 22ch; }
@media (min-width: 760px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats > div { border-bottom: 0; padding-right: 24px; }
  .stats > div + div { border-left: 1px solid var(--line); padding-left: 28px; }
}

/* Drei Prinzipien */
.principles { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.principles > div { background: var(--paper); padding: clamp(24px, 3vw, 40px); }
.principles .h3 { margin: 18px 0 12px; }
.principles .idx { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; color: var(--clay-2); }
.principles p { color: var(--ink-2); margin: 0; }
@media (min-width: 820px) { .principles { grid-template-columns: repeat(3, 1fr); } }

/* Zwei-Spalten-Text */
.cols { display: grid; gap: clamp(24px, 4vw, 64px); }
@media (min-width: 900px) { .cols { grid-template-columns: 5fr 7fr; } }
.cols .lead + p, .prose p { color: var(--ink-2); }
.prose p { max-width: 62ch; }

/* Zentren */
.centers { display: grid; gap: clamp(24px, 3vw, 40px); }
@media (min-width: 900px) { .centers { grid-template-columns: repeat(3, 1fr); } }
.center .frame { aspect-ratio: 4 / 5; margin-bottom: 20px; }
.center .place { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-top: 1px solid var(--ink); padding-top: 14px; }
.center .place .h3 { font-size: 1.35rem; }
.center .place .region { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.center .meta { margin-top: 10px; color: var(--ink-2); font-size: 0.95rem; }
.center .meta strong { color: var(--ink); font-weight: 600; }
.center .desc { margin-top: 12px; color: var(--ink-2); font-size: 0.95rem; }

/* Arbeitspakete */
.wps { display: grid; gap: clamp(24px, 4vw, 64px); }
@media (min-width: 900px) { .wps { grid-template-columns: 4fr 8fr; align-items: start; } .wps .sticky { position: sticky; top: calc(var(--header-h) + 24px); } }
.wp-list { border-top: 1px solid var(--line); }
.wp { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: clamp(22px, 3vw, 36px) 0; border-bottom: 1px solid var(--line); }
.wp .no { font-size: 0.85rem; font-weight: 600; color: var(--clay-2); letter-spacing: 0.06em; padding-top: 6px; }
.wp .h3 { margin-bottom: 10px; }
.wp p { color: var(--ink-2); margin: 0; max-width: 60ch; }
.wp .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
@media (min-width: 640px) { .wp { grid-template-columns: 96px 1fr; } }

/* Bild + Text (CUBO) */
.feature { display: grid; gap: clamp(28px, 4vw, 64px); align-items: center; }
@media (min-width: 900px) { .feature { grid-template-columns: 7fr 5fr; } .feature.flip > .frame { order: 2; } }
.feature .frame { aspect-ratio: 4 / 3; }
.feature .h2 { margin: 14px 0 20px; }
.feature p { color: var(--ink-2); }
.feature .facts { margin-top: 24px; border-top: 1px solid var(--line); }
.feature .facts li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.feature .facts li span:last-child { text-align: right; color: var(--ink-2); }

/* Formate */
.formats { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 760px) { .formats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .formats { grid-template-columns: repeat(4, 1fr); } }
.formats > div { background: var(--paper); padding: clamp(22px, 3vw, 36px) clamp(18px, 2vw, 28px); }
.formats .value { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.formats .h3 { font-size: 1.05rem; margin: 14px 0 8px; }
.formats p { color: var(--ink-2); font-size: 0.93rem; margin: 0; }

/* Materialkacheln */
.materials { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 2vw, 26px); }
@media (min-width: 700px) { .materials { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1120px) { .materials { grid-template-columns: repeat(6, 1fr); } }
.mat img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--paper-3); }
.mat figcaption { display: block; margin-top: 14px; }
.mat .name { display: block; font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.mat .note { display: block; margin-top: 5px; color: var(--ink-2); font-size: 0.85rem; line-height: 1.4; }

/* Entwurfshinweis im Footer */
.footer .draft { color: rgba(246, 243, 238, 0.4); }

/* Partner */
.partners { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
@media (min-width: 640px) { .partners { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .partners { grid-template-columns: repeat(4, 1fr); } }
.partner { background: var(--paper); padding: 24px; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; transition: background-color 0.3s var(--ease); }
.partner:hover { background: #fff; }
.partner .role { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.partner .role.lead { color: var(--clay-2); }
.partner .name { font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; margin-top: 10px; line-height: 1.25; }
.partner .loc { color: var(--ink-2); font-size: 0.9rem; margin-top: 6px; }
.partner .link { margin-top: 18px; font-size: 0.85rem; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
.assoc { margin-top: 28px; display: grid; gap: 8px 32px; }
@media (min-width: 760px) { .assoc { grid-template-columns: auto 1fr; } }
.assoc .label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.assoc ul { display: flex; flex-wrap: wrap; gap: 8px; }
.assoc li { font-size: 0.9rem; color: var(--ink-2); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }

/* Aktuelles */
.news { display: grid; gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 820px) { .news { grid-template-columns: repeat(3, 1fr); } }
.news article { background: var(--paper); padding: clamp(22px, 3vw, 36px) 0; }
@media (min-width: 820px) { .news article { padding-inline: 28px; } .news article:first-child { padding-left: 0; } }
.news time { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.news .h3 { margin: 12px 0 10px; font-size: 1.2rem; }
.news p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }

/* Kontakt */
.contact { display: grid; gap: clamp(28px, 4vw, 64px); }
@media (min-width: 900px) { .contact { grid-template-columns: 6fr 6fr; } }
.contact .h2 { margin-top: 14px; }
.contact address { font-style: normal; color: var(--ink-2); line-height: 1.7; }
.contact address strong { color: var(--ink); }
.contact .mail { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); border-bottom: 2px solid var(--clay); display: inline-block; margin-top: 8px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: clamp(56px, 8vw, 110px) 0 36px; margin-top: clamp(40px, 6vw, 80px); }
.footer .top { display: grid; gap: 36px; align-items: start; }
@media (min-width: 900px) { .footer .top { grid-template-columns: 1fr 1fr; } }
.footer .eu { background: #fff; border-radius: 6px; padding: 18px 22px; display: inline-block; }
.footer .eu img { height: 80px; width: auto; }
.footer .statement { margin-top: 22px; max-width: 58ch; color: rgba(246,243,238,0.78); font-size: 0.95rem; }
.footer .statement strong { color: var(--paper); font-weight: 600; }
.footer .disclaimer { margin-top: 14px; max-width: 58ch; color: rgba(246,243,238,0.55); font-size: 0.82rem; }
.footer .brand img { height: 30px; }
.footer .cols3 { display: grid; gap: 28px; margin-top: 28px; }
@media (min-width: 640px) { .footer .cols3 { grid-template-columns: repeat(3, 1fr); } }
.footer .cols3 h4 { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(246,243,238,0.5); margin-bottom: 12px; font-weight: 600; }
.footer .cols3 li { margin-bottom: 8px; font-size: 0.95rem; color: rgba(246,243,238,0.85); }
.footer .cols3 a:hover { color: var(--clay); }
.footer-name { font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em; }
.footer-name span { color: rgba(246,243,238,0.5); font-weight: 500; font-size: 0.95rem; letter-spacing: 0; }
.footer .bottom { margin-top: clamp(40px, 6vw, 72px); padding-top: 22px; border-top: 1px solid rgba(246,243,238,0.14); display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: 0.82rem; color: rgba(246,243,238,0.5); }
.footer .bottom a:hover { color: var(--paper); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.frame.reveal img { transform: scale(1.06); transition: transform 1.4s var(--ease); }
.frame.reveal.in img { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .frame.reveal img { transform: none; transition: none; }
  .frame img { position: static; height: 100%; }
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
