/* ==========================================================================
   Collecting Joy e.V. — Stylesheet
   Reihenfolge: Tokens → Reset → Typografie → Layout → Sektionen → Consent
   Mobile-First ist bewusst NICHT verwendet: die Desktop-Ansicht ist die
   Referenz, Breakpoints räumen nach unten auf.
   ========================================================================== */

/* --- Schrift (selbst gehostet, kein Google-Fonts-Aufruf) ----------------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/manrope-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* --- Tokens ------------------------------------------------------------- */
:root {
  --cj-blue: #539dba;
  --cj-text: #ffffff;
  --cj-max: 1140px;
  --cj-gutter: 42px;

  --fs-heading: 28px;
  --fs-body: 15px;
  --fs-small: 14px;

  --consent-bg: #ffffff;
  --consent-text: #222222;
  --consent-muted: #555555;
  --consent-line: #e4e4e4;
}

/* --- Reset -------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cj-blue);
  color: var(--cj-text);
  font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Hilfsklassen ------------------------------------------------------- */
.skip-link {
  position: fixed;
  z-index: 999;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: #fff;
  color: #111;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

/* --- Grundlayout -------------------------------------------------------- */
.section {
  width: 100%;
}

.section__inner {
  width: min(100%, var(--cj-max));
  margin-inline: auto;
  display: flex;
  align-items: center;
}

.col {
  width: 50%;
  padding: var(--cj-gutter);
}
.col--full {
  width: 100%;
}
.col--center {
  text-align: center;
}

.block + .block {
  margin-top: 20px;
}

/* --- Typografie --------------------------------------------------------- */
.heading {
  margin: 0;
  font-size: var(--fs-heading);
  font-weight: 600;
  line-height: 1.18;
}

.text {
  font-size: var(--fs-body);
  font-weight: 400;
}
.text p {
  margin: 0;
}
.text--sm {
  font-size: var(--fs-small);
}

/* --- Logo --------------------------------------------------------------- */
.section--logo .section__inner {
  min-height: 250px;
}
.logo img {
  width: min(440px, 78vw);
  margin-inline: auto;
}

/* --- Inhalts-Sektionen -------------------------------------------------- */
.section--content .section__inner {
  min-height: 760px;
}

.col--media img {
  width: min(100%, 520px);
  max-height: 650px;
  margin-inline: auto;
  object-fit: cover;
}

/* Das Nepal-Motiv ist freigestellt und darf nicht beschnitten werden. */
.section--who .col--media img {
  width: 100%;
  object-fit: contain;
}

/* --- Link-Kacheln ------------------------------------------------------- */
.section--links {
  padding: var(--cj-gutter) 20px 8px;
}
.section--links .section__inner {
  flex-direction: column;
  gap: 34px;
}

.link-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.link-tile__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.link-tile__title {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}
.link-tile__title a {
  text-underline-offset: 2px;
}

/* --- Spendenkonto ------------------------------------------------------- */
.section--donation {
  padding: 36px 20px 18px;
}
.section--donation .section__inner {
  width: min(620px, calc(100% - 32px));
  flex-direction: column;
  justify-content: center;
  min-height: 215px;
  padding: 30px 32px 22px;
  border: 2px solid #fff;
  text-align: center;
}
.donation__title {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 5px;
}
.donation__account {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 400;
  line-height: 1.65;
}
.donation__note {
  max-width: 720px;
  margin-inline: auto;
  font-size: 10px;
  line-height: 1.4;
}

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  padding: 14px 20px 30px;
  text-align: center;
}
.site-footer__links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
}
.site-footer a {
  text-decoration: none;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}
.site-footer__credit {
  margin-top: 16px;
  font-size: 9px;
  opacity: 0.88;
}

/* --- Rechtsseiten (Impressum / Datenschutz) ----------------------------- */
.legal {
  width: min(100% - 40px, 760px);
  margin-inline: auto;
  padding: 40px 0 60px;
}
.legal__logo img {
  width: min(300px, 70vw);
  margin: 0 auto 48px;
}
.legal h1 {
  margin: 0 0 28px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
}
.legal h2 {
  margin: 36px 0 10px;
  font-size: 17px;
  font-weight: 600;
}
.legal p,
.legal ul {
  margin: 0 0 14px;
  font-size: var(--fs-small);
}
.legal ul {
  padding-left: 20px;
}
.legal address {
  font-style: normal;
  font-size: var(--fs-small);
}
.legal__back {
  display: inline-block;
  margin-top: 36px;
  font-size: 12px;
}

/* --- 404 ---------------------------------------------------------------- */
.notfound {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}
.notfound img {
  width: min(320px, 72vw);
  margin: 0 auto 48px;
}
.notfound h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 600;
}

/* --- Consent-Banner ----------------------------------------------------- */
.consent {
  position: fixed;
  z-index: 900;
  right: 20px;
  bottom: 20px;
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  border-radius: 12px;
  background: var(--consent-bg);
  color: var(--consent-text);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.28);
  font-size: 13px;
  line-height: 1.45;
}
.consent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.consent__title {
  font-size: 20px;
  font-weight: 700;
}
.consent__close {
  width: 34px;
  height: 34px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: #333;
  cursor: pointer;
}
.consent__close svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.consent__divider {
  height: 1px;
  margin: 15px 0;
  background: var(--consent-line);
}
.consent__message {
  margin-bottom: 14px;
}
.consent__category {
  border-top: 1px solid var(--consent-line);
}
.consent__category summary {
  cursor: pointer;
  list-style: none;
}
.consent__category summary::-webkit-details-marker {
  display: none;
}
.consent__category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
}
.consent__category-title {
  font-weight: 700;
}
.consent__state {
  margin-left: auto;
  color: var(--consent-muted);
  font-size: 11px;
}
.consent__checkbox {
  margin-left: auto;
}
.consent__checkbox input {
  width: 17px;
  height: 17px;
}
.consent__chevron svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.consent__description {
  padding-bottom: 13px;
  color: var(--consent-muted);
  font-size: 12px;
}
.consent__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.consent__btn {
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #fff;
  color: #111;
  cursor: pointer;
}
.consent__btn--accept {
  background: #222;
  color: #fff;
}
.consent__links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 11px;
}
.consent-reopen {
  position: fixed;
  z-index: 890;
  left: 12px;
  bottom: 12px;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: var(--cj-blue);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
}

/* ==========================================================================
   Breakpoints
   ========================================================================== */

/* Tablet */
@media (max-width: 1050px) {
  :root {
    --cj-gutter: 30px;
    --fs-heading: 24px;
    --fs-body: 14px;
  }
  .section--content .section__inner {
    min-height: 620px;
  }
}

/* Telefon und Tablet-Hochformat: eine Spalte, Bild über Text,
   lesbare Schriftgrößen. */
@media (max-width: 860px) {
  :root {
    --cj-gutter: 24px;
    --fs-heading: 22px;
    --fs-body: 15px;
    --fs-small: 14px;
  }

  .section__inner {
    flex-direction: column;
    align-items: stretch;
  }
  .section--content .section__inner {
    min-height: 0;
    padding-block: 8px 32px;
  }
  .col {
    width: 100%;
    padding: 16px var(--cj-gutter);
  }
  .col--media {
    order: -1;
  }
  .col--media img {
    width: min(100%, 420px);
    max-height: none;
  }

  .section--logo .section__inner {
    min-height: 0;
    padding: 40px 0 24px;
  }
  .logo img {
    width: min(300px, 72vw);
  }

  .section--links {
    padding: 24px 20px 4px;
  }
  .section--links .section__inner {
    gap: 26px;
  }
  .link-tile__title {
    font-size: 13px;
  }

  .section--donation .section__inner {
    width: 100%;
    min-height: 0;
    padding: 24px 18px 18px;
  }
  .donation__title {
    font-size: 14px;
    letter-spacing: 3.5px;
  }
  .donation__account {
    font-size: 13px;
  }
  .donation__note {
    font-size: 10px;
  }

  .site-footer__links {
    gap: 20px;
    font-size: 12px;
  }
  .site-footer__credit {
    font-size: 10px;
  }

  .consent {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    padding: 18px;
  }
  .consent__title {
    font-size: 17px;
  }
  .consent__buttons {
    grid-template-columns: 1fr;
  }
}
