/* I-BUK-I – Grundgerüst
   Layout, Raster, Formulare und Bausteine. Farben, Schriften und Muster setzt assets/css/lombok.css,
   das danach geladen wird und die Variablen unten überschreibt. */

:root {
  --ink: #263248;         /* Text, Footer (aus dem dunkelblauen Bogen im Logo) */
  --ink-soft: #55607a;    /* gedämpfter Text */
  --paper: #fffdf9;       /* Grundfläche, warmes Weiß */
  --sand: #f5efe4;        /* Pastell: helles Beige für einzelne Abschnitte */
  --sage: #e6efe4;        /* Pastell: zartes Salbeigrün für einzelne Abschnitte */
  --peach: #f8dccb;       /* Spenden-Button: freundlich, nicht aufdringlich */
  --peach-strong: #f2c7ad;
  --mengkudu: #a8432f;    /* Morinda-Rot: Hover, Listenpunkte, Webband */
  --kunyit: #d9a441;      /* Kurkuma: nur im Webband */
  --daun: #3f6b4f;        /* Blatt: nur im Webband */
  --line: #e6e0d6;

  --display: Georgia, serif;
  --text: system-ui, sans-serif;

  --step--1: 0.9rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.55rem, 1.3rem + 1vw, 2.05rem);
  --step-3: clamp(2rem, 1.55rem + 2vw, 3.1rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.4vw, 3.6rem);

  --radius: 18px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --max: 76rem;
  --measure: 38rem;
  --space: clamp(4rem, 2.5rem + 5vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.7 var(--text);
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1.5px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { color: var(--mengkudu); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--mengkudu); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 560;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
/* Silbentrennung in Überschriften nur bei sehr langen Wörtern und nie mit kurzen Resten (z. B. nicht „Grundschul-kinder“) */
@media (max-width: 52rem) { h1, h2, h3 { hyphens: auto; hyphenate-limit-chars: 14 7 7; } }
figure { margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; padding: .75rem 1rem; background: var(--ink); color: var(--paper); z-index: 10; }
.skip:focus { left: var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Webband ---------- */
.weave {
  height: 12px;
  background:
    repeating-linear-gradient(90deg,
      var(--ink) 0 22px, var(--mengkudu) 22px 30px, var(--kunyit) 30px 34px,
      var(--ink) 34px 52px, var(--daun) 52px 58px, var(--paper) 58px 60px,
      var(--mengkudu) 60px 76px, var(--ink) 76px 80px, var(--kunyit) 80px 92px,
      var(--ink) 92px 104px);
  -webkit-mask: repeating-linear-gradient(0deg, #000 0 3px, rgba(0,0,0,.82) 3px 4px);
          mask: repeating-linear-gradient(0deg, #000 0 3px, rgba(0,0,0,.82) 3px 4px);
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  background: var(--ink); color: #fff;
  font: 700 1rem/1.2 var(--text); text-decoration: none;
  transition: background-color .15s ease;
}
.button:hover { background: #1a2335; color: #fff; }
.button--donate { background: var(--peach); color: var(--ink); }
.button--donate:hover { background: var(--peach-strong); color: var(--ink); }
.button--donate svg { width: 1.05em; height: 1.05em; color: var(--mengkudu); flex: none; }
.button--quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.button--quiet:hover { background: var(--ink); color: var(--paper); }

/* ---------- Kopf ---------- */
.header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { width: 3.25rem; height: auto; }
.brand span { font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.35rem; }
.nav__list { display: flex; gap: clamp(1rem, 2vw, 1.75rem); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a { text-decoration: none; font-weight: 600; }
.nav a[aria-current] { color: var(--mengkudu); }
.nav .button { padding: .55rem 1.1rem; }
.nav .button[aria-current] { color: var(--ink); }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.75rem); }
.languages { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0 0 0 clamp(.75rem, 1.5vw, 1.25rem); border-left: 1px solid var(--line); }
.languages a { display: block; padding: .3rem .45rem; border-radius: 6px; font-size: var(--step--1); font-weight: 700; text-decoration: none; color: var(--ink-soft); }
.languages a[aria-current] { background: var(--sand); color: var(--ink); }
.menu-toggle { display: none; }

@media (max-width: 52rem) {
  .menu-toggle { display: inline-flex; background: none; border: 1.5px solid var(--ink); color: var(--ink); font: 700 1rem var(--text); padding: .5rem 1rem; border-radius: 999px; }
  .nav { display: none; position: absolute; inset: 100% 0 auto; background: var(--paper); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; flex-direction: column; align-items: flex-start; }
  .languages { border-left: 0; padding: 0 var(--gutter) 1.25rem; }
  .nav__list { flex-direction: column; align-items: flex-start; padding: 1rem var(--gutter) 1.5rem; gap: 1rem; }
}

/* ---------- Startseite: großes Foto mit Begrüßungskarte ---------- */
.hero { padding-block: clamp(1rem, 1rem + 2vw, 2.5rem) clamp(3rem, 2rem + 4vw, 5rem); }
.hero__image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: calc(var(--radius) * 1.4); }
.hero__bottom { display: grid; grid-template-columns: minmax(0, 50rem) minmax(12.5rem, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.hero__card {
  position: relative;
  margin: clamp(-11rem, -12vw, -4rem) 0 0 clamp(1rem, 4vw, 3.5rem);
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -40px rgba(38, 50, 72, .45);
}
.hero h1 { font-size: var(--step-4); }
.hero__text { max-width: var(--measure); margin-top: 1.25rem; font-size: var(--step-1); color: var(--ink-soft); line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
/* Neuigkeiten neben der Begrüßungskarte */
.news { padding-top: clamp(1.25rem, 3vw, 2.25rem); padding-right: clamp(0rem, 2vw, 1.5rem); }
.news h2 { font-size: var(--step-1); margin-bottom: 1rem; hyphens: manual; }
.news ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.news li { padding-left: 1rem; border-left: 3px solid var(--peach-strong); line-height: 1.5; }
.news__when { display: block; font-size: var(--step--1); font-weight: 700; color: var(--ink-soft); }
.news a { text-decoration: none; }
.news a:hover { text-decoration: underline; }
@media (max-width: 52rem) {
  .hero__image img { aspect-ratio: 4 / 3; }
  .hero__bottom { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(1.55rem, .85rem + 4vw, 2.2rem); }
  .hero__card { margin: -2.5rem .75rem 0; }
  .news { padding: .5rem .75rem 0; min-width: 0; max-width: 100%; }
  .hero__bottom > * { min-width: 0; }
}

/* ---------- Videos ---------- */
.section--tight { padding-top: 0; }
.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.videos > :first-child { grid-column: span 2; grid-row: span 2; }
.videos--single { grid-template-columns: minmax(0, 52rem); }
.videos--single > :first-child { grid-column: auto; grid-row: auto; }
.video-card { margin: 0; }
.video-card__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg, var(--sage), var(--sand)); }
.video-card__frame img, .video-card__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-card__play {
  position: absolute; inset: 50% auto auto 50%; translate: -50% -50%;
  width: 4.5rem; height: 4.5rem; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--paper); color: var(--mengkudu);
  box-shadow: 0 12px 30px -12px rgba(38, 50, 72, .5); transition: transform .15s ease;
}
.video-card__play svg { width: 1.9rem; height: 1.9rem; margin-left: .2rem; }
.video-card__play:hover { transform: scale(1.06); }
.video-card figcaption { margin-top: .75rem; font-weight: 700; line-height: 1.4; }
.videos > :first-child figcaption { font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 560; font-size: var(--step-1); }
.prose .videos { grid-template-columns: 1fr 1fr; margin: 2.5rem 0; }
.prose .videos > :first-child { grid-column: 1 / -1; grid-row: auto; }
.prose .videos figure { margin: 0; }
.prose .videos > :first-child figcaption { font-family: inherit; font-size: var(--step--1); font-weight: 700; }
.prose .video-card figcaption { color: var(--ink); }
.videos__note { margin-top: 1.25rem; font-size: var(--step--1); color: var(--ink-soft); }
@media (max-width: 52rem) {
  .videos { grid-template-columns: 1fr 1fr; }
  .videos > :first-child { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- Name als Typografie (Sand) ---------- */
.name { background: var(--sand); padding-block: var(--space); }
.name .wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(2.5rem, 8vw, 8rem); align-items: center; }
.acronym { list-style: none; margin: 0; padding: 0; font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 500; }
.acronym li { font-size: var(--step-3); line-height: 1.15; }
.acronym b { font-weight: 700; color: var(--mengkudu); }
.name__text { max-width: var(--measure); font-size: var(--step-1); line-height: 1.65; }
@media (max-width: 52rem) { .name .wrap { grid-template-columns: 1fr; } }

/* ---------- Projekte ---------- */
.section { padding-block: var(--space); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head h2 { font-size: var(--step-3); }
.section__head a { font-weight: 700; }
.projects { display: grid; grid-template-columns: 1fr; gap: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 52rem) { .projects { grid-template-columns: repeat(2, 1fr); } }
.card { position: relative; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.card__meta { margin: 1.1rem 0 .35rem; font-size: var(--step--1); color: var(--ink-soft); font-weight: 600; }
.card h3 { font-size: var(--step-2); }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin-top: .6rem; color: var(--ink-soft); max-width: 34rem; }
.card:hover h3 { color: var(--mengkudu); }

/* ---------- Aktuelles Projekt (Salbei) ---------- */
.current { background: var(--sage); }
.current .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding-block: var(--space); align-items: start; }
.current h2 { font-size: var(--step-3); }
.current__text { font-size: var(--step-1); line-height: 1.65; margin-top: 1.25rem; max-width: var(--measure); color: var(--ink-soft); }
.current__aside { background: var(--paper); border-radius: var(--radius); padding: 1.75rem 2rem; }
.current__aside h3 { font-size: var(--step-1); margin-bottom: 1rem; }
.bank { margin: 0; line-height: 1.7; }
.bank dt { color: var(--ink-soft); font-size: var(--step--1); font-weight: 600; }
.bank dd { margin: 0 0 .7rem; }
.bank dd:last-child { margin-bottom: 0; }
@media (max-width: 52rem) { .current .wrap { grid-template-columns: 1fr; } }

/* ---------- Unterseiten ---------- */
.page-head { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(2rem, 4vw, 3rem); }
.page-head h1 { font-size: var(--step-4); max-width: 20ch; }
.page-head p { max-width: var(--measure); font-size: var(--step-1); color: var(--ink-soft); margin-top: 1.25rem; }
.page-head--tinted { background: var(--sand); margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.prose { max-width: var(--measure); padding-bottom: var(--space); }
.prose h2 { font-size: var(--step-2); margin: 2.25em 0 .5em; }
.prose h3 { font-size: var(--step-1); font-family: var(--text); font-weight: 800; margin: 1.75em 0 .35em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose li::marker { color: var(--mengkudu); }
.prose figure { margin: 2.5rem 0; }
.prose figure img { border-radius: var(--radius); }
.prose figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: .6rem; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .75rem; }
.gallery__grid img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 12px; }
.prose .video { position: relative; aspect-ratio: 16 / 9; background: var(--sand); border-radius: var(--radius); overflow: hidden; }
.prose .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose .video-consent { position: absolute; inset: 0; display: grid; place-content: center; gap: 1rem; padding: 2rem; text-align: center; }
.project-meta { display: flex; flex-wrap: wrap; gap: .5rem 2rem; font-size: var(--step--1); color: var(--ink-soft); font-weight: 600; margin-top: 1.25rem; }
.project-cover img { width: 100%; max-height: 38rem; object-fit: cover; border-radius: calc(var(--radius) * 1.4); }
.project-cover { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.donate-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 6rem); padding-bottom: var(--space); align-items: start; }
.donate-grid h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.donate-grid .bank-box { background: var(--sage); border-radius: var(--radius); padding: 1.75rem 2rem; }
.donate-grid iframe { border: 0; width: 320px; max-width: 100%; height: 320px; }
@media (max-width: 52rem) { .donate-grid { grid-template-columns: 1fr; } }

/* ---------- Fuß ---------- */
.footer { background: var(--ink); color: #d5d9e3; font-size: var(--step--1); }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-block: 4rem 3rem; }
.footer h2 { font-family: var(--text); font-weight: 800; font-size: var(--step--1); color: var(--paper); margin-bottom: .75rem; font-variation-settings: normal; }
.footer a { color: #d5d9e3; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; margin: 0; padding: 0; line-height: 2; }
.footer__brand { font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 560; font-size: var(--step-2); color: var(--paper); line-height: 1.2; margin-bottom: 1rem; }
.footer__bottom { border-top: 1px solid #3e4963; padding-block: 1.25rem; }
@media (max-width: 52rem) { .footer .wrap { grid-template-columns: 1fr; } }

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

/* ---------- Partnerseite ---------- */
.partners { background: var(--sand); padding-block: var(--space); }
.partners h2 { font-size: var(--step-3); margin-bottom: clamp(2rem, 4vw, 3rem); }
.partners__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 1.25rem; }
.partner { background: var(--paper); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: .35rem; }
.partner a { text-decoration: none; display: flex; flex-direction: column; gap: .75rem; }
.partner__logo { display: grid; place-items: center; height: 6.5rem; }
.partner__logo img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; }
.partner__initial { width: 4rem; height: 4rem; border-radius: 50%; display: grid; place-items: center; background: var(--sage); font-family: var(--display); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 1.75rem; }
.partner__name { font-weight: 700; line-height: 1.35; }
.partner a:hover .partner__name { color: var(--mengkudu); }
.partner__note { font-size: var(--step--1); color: var(--ink-soft); line-height: 1.45; }


/* großes Logo im Fuß, nur in Varianten, die es zeigen */
.footer__logo { display: none; }

/* mehrere betterplace-Widgets auf der Spendenseite */
.donate-widgets { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1.5rem; }

/* Sehr schmale Handys (unter 360 px): Titel aller Varianten so klein, dass „Grundschulkinder“ in eine Zeile passt.
   !important, weil die Varianten ihre Titelgrößen mit spezifischeren Selektoren setzen. */
@media (max-width: 22.4rem) { main h1 { font-size: 1.6rem !important; } }

/* Hinweis „Erstellt mit Kirby“ (Bedingung der kostenlosen Lizenz) */
.footer .footer__bottom-row { padding: 0; display: flex; grid-template-columns: none; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.footer__kirby { opacity: .75; }

/* Weicher Seitenwechsel (View Transitions, Chrome/Edge/Safari; andere Browser wechseln normal) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
