/* ==========================================================================
   Berliner Sparkasse — Design System
   Placeholder brand values pending {{BRAND_ASSETS}} (official corporate
   design manual, exact HKS 13 value, brand typeface, logo files).
   ========================================================================== */

/* ---------- Custom properties -------------------------------------------- */
:root {
  /* Colour — Sparkassen-Rot placeholder (replace with client HKS 13 value) */
  --color-red: #e2001a;
  --color-red-dark: #a6000f;
  --color-red-tint: #fdecec;

  --color-ink: #1b1c22;
  --color-ink-soft: #4a4c58;
  --color-paper: #faf8f4;
  --color-paper-raised: #ffffff;
  --color-line: #e4e0d8;

  --color-grey-50: #f6f5f2;
  --color-grey-100: #ece9e2;
  --color-grey-600: #6b6d78;

  --color-success: #1e6b3e;
  --color-warn-bg: #fff4e0;
  --color-warn-border: #e0a52b;
  --color-warn-text: #6b4c05;

  /* Typography — system stacks (swap for brand webfonts via {{BRAND_ASSETS}}) */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-900: clamp(2.4rem, 1.9rem + 2.2vw, 4rem);
  --fs-800: clamp(1.9rem, 1.55rem + 1.5vw, 2.9rem);
  --fs-700: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --fs-600: clamp(1.2rem, 1.1rem + 0.4vw, 1.45rem);
  --fs-500: 1.125rem;
  --fs-400: 1rem;
  --fs-300: 0.9rem;
  --fs-200: 0.8rem;

  --lh-tight: 1.15;
  --lh-normal: 1.6;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;

  --shadow-soft: 0 10px 30px -12px rgba(27, 28, 34, 0.18);
  --shadow-red: 0 14px 34px -14px rgba(226, 0, 26, 0.35);

  --max-width: 1240px;
  --header-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

/* ---------- Reset ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: var(--lh-normal);
  color: var(--color-ink);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; }
table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  color: var(--color-ink);
}
h1 { font-size: var(--fs-900); }
h2 { font-size: var(--fs-800); }
h3 { font-size: var(--fs-600); }
h4 { font-size: var(--fs-500); }

.lede {
  font-size: var(--fs-500);
  color: var(--color-ink-soft);
  max-width: 62ch;
}

/* ---------- Accessibility helpers ------------------------------------------ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--color-ink);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--space-4); }

:focus-visible {
  /* A flat single-colour outline (even brand red) can fail contrast against
     a red button or a dark section. A white ring first, then an ink ring,
     stays visible on every background this site uses — paper, red, ink. */
  outline: none;
  box-shadow: 0 0 0 2px var(--color-paper-raised), 0 0 0 4.5px var(--color-ink);
  border-radius: var(--radius-sm);
}
.badge-18:focus-visible {
  box-shadow: 0 0 0 2px var(--color-paper-raised), 0 0 0 4.5px var(--color-ink);
  border-radius: 50%;
}
.switch input:focus-visible + .track {
  box-shadow: 0 0 0 2px var(--color-paper-raised), 0 0 0 4.5px var(--color-ink);
  border-radius: 999px;
}

/* ---------- Layout ---------------------------------------------------------- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
.section { padding-block: var(--space-8); }
.section--tight { padding-block: var(--space-6); }
.section--raised { background: var(--color-paper-raised); }
.section--ink {
  background:
    linear-gradient(195deg, rgba(14, 13, 16, 0.88), rgba(14, 13, 16, 0.94)),
    url("../img/texture-trust.jpg") center/cover no-repeat,
    var(--color-ink);
  color: #f2f1ec;
}
.section--ink h2, .section--ink h3 { color: #fff; }

/* Centered closing CTA — repeated pattern across content pages */
.cta-block { text-align: center; }
.cta-block .lede { margin-inline: auto; color: #c6c3ba; }
.cta-block .btn-row { justify-content: center; margin-top: var(--space-6); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-200);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-red);
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--color-red);
}

.section-head { max-width: 46rem; margin-bottom: var(--space-7); }

/* Subtle paper-grain texture for trust/security sections */
.texture-grain {
  position: relative;
  isolation: isolate;
}
.texture-grain::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: -1;
}

/* ---------- Utility bar (above main header) --------------------------------- */
.utility-bar {
  background: var(--color-paper-raised);
  border-bottom: 1px solid var(--color-line);
  font-size: var(--fs-200);
}
.utility-bar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
}
.utility-bar__tag {
  display: inline-flex;
  align-items: center;
  padding: 3px var(--space-3);
  border-radius: 999px;
  background: var(--color-red-tint);
  color: var(--color-red-dark);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.utility-bar__links { display: flex; align-items: center; gap: var(--space-5); list-style: none; }
.utility-bar__links a {
  color: var(--color-ink-soft);
  text-decoration: none;
  font-weight: 600;
}
.utility-bar__links a:hover { color: var(--color-red-dark); }

/* ---------- Header / Nav ---------------------------------------------------- */
.site-header {
  /* No backdrop-filter here: filter/backdrop-filter creates a CSS containing
     block, which would trap the fixed-position mobile nav panel inside the
     header's box instead of the full viewport. */
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(180deg, var(--color-red) 0%, var(--color-red-dark) 130%);
  box-shadow: 0 4px 16px -8px rgba(90, 0, 8, 0.45);
}
.site-header .container, .utility-bar .container {
  /* Wider than the content --max-width: with 8 nav items, the standard
     1240px content width isn't enough room and links wrap onto two lines
     unevenly ("dancing" nav). Give the header its own, roomier max-width
     (utility bar matches so both rows stay edge-aligned). */
  max-width: 1480px;
}
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-width: 0;
}
.nav > nav { min-width: 0; }
.brand { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.brand__mark {
  width: 42px; height: 42px; flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}
.brand:hover .brand__mark, .brand:focus-visible .brand__mark { transform: scale(1.08) rotate(-4deg); }
.brand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.05;
  color: #fff;
}
.brand__word small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffc7cc;
}

.nav__links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1.35rem;
  list-style: none;
  min-width: 0;
}
.nav__links li { flex-shrink: 0; }
.nav__links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  position: relative;
  padding-block: var(--space-2);
  white-space: nowrap;
}
.nav__links a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 2px; background: #fff;
  transition: right 0.25s var(--ease);
}
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { right: 0; }
.nav__links a[aria-current="page"] { color: #fff; }

.nav__actions { display: flex; align-items: center; gap: var(--space-4); }
.btn-label-short { display: none; }

.badge-18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px; height: 30px;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: -0.02em;
}

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--color-paper-raised);
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: var(--color-red-dark);
  position: relative;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), color 0.18s var(--ease);
}
.btn--primary { background: var(--color-red); color: #fff; box-shadow: var(--shadow-red); }
.btn--primary:hover { background: var(--color-red-dark); transform: translateY(-2px); }
.btn--secondary { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn--secondary:hover { background: var(--color-ink); color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--color-red-dark); border-color: var(--color-red); }
.btn--ghost:hover { background: var(--color-red-tint); }
.btn--on-dark { background: #fff; color: var(--color-ink); }
.btn--on-dark:hover { background: var(--color-red); color: #fff; transform: translateY(-2px); }
.btn--on-red { background: #fff; color: var(--color-red-dark); box-shadow: 0 8px 20px -10px rgba(0,0,0,0.35); }
.btn--on-red:hover { background: var(--color-ink); color: #fff; transform: translateY(-2px); }
.btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: 0.88rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* ---------- Hero ---------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: var(--space-9) var(--space-8);
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(226, 0, 26, 0.22), transparent 60%),
    linear-gradient(100deg, rgba(10, 9, 12, 0.82) 0%, rgba(10, 9, 12, 0.55) 42%, rgba(10, 9, 12, 0.32) 100%),
    url("../img/hero-berlin.jpg") center 38%/cover no-repeat,
    var(--color-ink);
  color: #f4f2ec;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 64px 100%;
  opacity: 0.4;
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-8);
  align-items: center;
}
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-200); letter-spacing: 0.14em; text-transform: uppercase;
  color: #ffb3ba; font-weight: 700; margin-bottom: var(--space-4);
}
.hero h1 { color: #fff; letter-spacing: -0.01em; }
.hero__lede { font-size: var(--fs-500); color: #cfccc3; max-width: 46ch; margin-top: var(--space-4); }
.hero__stats {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-7);
  flex-wrap: wrap;
}
.hero__stat strong { display: block; font-family: var(--font-display); font-size: var(--fs-700); color: #fff; }
.hero__stat span { font-size: var(--fs-300); color: #a9a69c; }

.hero__seal {
  position: relative;
  justify-self: end;
  width: min(280px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--color-red), var(--color-red-dark));
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-red), 0 0 0 10px rgba(255,255,255,0.06);
  animation: seal-in 0.8s var(--ease);
}
.hero__seal::before {
  content: "";
  position: absolute; inset: 12px;
  border: 1px dashed rgba(255,255,255,0.55);
  border-radius: 50%;
}
.hero__seal-text { font-family: var(--font-display); font-weight: 700; }
.hero__seal-text .big { display: block; font-size: 2.6rem; line-height: 1; }
.hero__seal-text .small { display: block; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; margin-top: var(--space-2); }

@keyframes seal-in {
  from { opacity: 0; transform: scale(0.85) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

.btn-row--hero .btn--primary { box-shadow: 0 14px 34px -14px rgba(226,0,26,0.55); }

/* ---------- Hero collage (photo strip + animated tower dividers) ------------ */
.hero-collage {
  position: relative;
  background: var(--color-ink);
  overflow: hidden;
}
.hero-collage__row {
  display: flex;
  height: clamp(420px, 58vw, 640px);
}
.hero-collage__panel {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}
.hero-collage__panel picture, .hero-collage__panel img {
  width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 20%;
}
.hero-collage__panel::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,9,11,0.05) 0%, rgba(10,9,11,0.45) 100%);
}
.hero-collage__divider {
  flex: 0 0 clamp(38px, 4.2vw, 60px);
  position: relative;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--color-red), var(--color-red-dark));
  box-shadow: 0 0 26px rgba(0,0,0,0.35);
}
.hero-collage__divider svg { width: 56%; height: auto; overflow: visible; }
.tower-part { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tower-base { stroke-dasharray: 60; stroke-dashoffset: 60; animation: tower-draw 0.5s var(--ease) forwards; animation-delay: calc(0.2s + var(--i, 0) * 0.3s); }
.tower-mast { stroke-dasharray: 90; stroke-dashoffset: 90; animation: tower-draw 0.8s var(--ease) forwards; animation-delay: calc(0.35s + var(--i, 0) * 0.3s); }
.tower-ring { stroke-dasharray: 60; stroke-dashoffset: 60; animation: tower-draw 0.6s var(--ease) forwards; animation-delay: calc(0.75s + var(--i, 0) * 0.3s); }
@keyframes tower-draw { to { stroke-dashoffset: 0; } }

.hero-collage__card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 5;
  background: var(--color-paper-raised);
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  max-width: 440px; width: calc(100% - 2 * var(--space-5));
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}
.hero-collage__card .hero__eyebrow { color: var(--color-red-dark); }
.hero-collage__card h1 { font-size: var(--fs-700); margin-bottom: var(--space-3); }
.hero-collage__card p { color: var(--color-ink-soft); margin-bottom: var(--space-5); }

.hero-collage__dots {
  position: absolute; left: 50%; bottom: var(--space-5); transform: translateX(-50%);
  z-index: 5;
  display: flex; align-items: center; gap: 8px;
}
.hero-collage__dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); }
.hero-collage__dots span:first-child { width: 22px; border-radius: 4px; background: #fff; }

.hero-stats-band { display: flex; justify-content: center; gap: var(--space-8); flex-wrap: wrap; }

/* ---------- Promo row (avatar + title + link) --------------------------------- */
.promo-row { grid-template-columns: repeat(3, 1fr); }
.promo-card { display: flex; flex-direction: column; }
.promo-card__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-soft);
}
.promo-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.promo-card h3 { margin-bottom: var(--space-2); }
.promo-card p { color: var(--color-ink-soft); margin-bottom: var(--space-5); flex-grow: 1; }
.promo-card__link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-weight: 700; color: var(--color-red-dark); text-decoration: none;
  border-top: 1px solid var(--color-line); padding-top: var(--space-4);
}
.promo-card__link svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.promo-card__link:hover svg { transform: translateX(4px); }

/* ---------- Link band (photo card + title + link) ----------------------------- */
.link-band { grid-template-columns: repeat(2, 1fr); }
.link-card {
  display: block;
  background: var(--color-paper-raised);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.link-card:hover { transform: translateY(-6px); box-shadow: 0 22px 40px -18px rgba(27,28,34,0.25); }
.link-card__media { aspect-ratio: 16 / 10; overflow: hidden; }
.link-card__media img { width: 100%; height: 100%; object-fit: cover; }
.link-card__body { padding: var(--space-6); }
.link-card__body h3 { margin-bottom: var(--space-2); }
.link-card__body p { color: var(--color-ink-soft); margin-bottom: var(--space-4); }
.link-card__link {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-weight: 700; color: var(--color-red-dark);
}
.link-card__link svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.link-card:hover .link-card__link svg { transform: translateX(4px); }

@media (max-width: 768px) {
  .promo-row, .link-band { grid-template-columns: 1fr; }
}

/* ---------- Hand-drawn hero doodles (chart / sun / heart) -------------------- */
.hero-collage__doodle {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 3;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 8px 18px -8px rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  animation: doodle-pop 0.4s var(--ease) forwards;
  animation-delay: calc(1.1s + var(--i, 0) * 0.25s);
}
@keyframes doodle-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: scale(1); } }
.hero-collage__doodle svg { width: 34px; height: 34px; overflow: visible; }
.doodle-part {
  fill: none;
  stroke: var(--color-red-dark);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doodle-chart .doodle-part { stroke-dasharray: 84; stroke-dashoffset: 84; animation: doodle-draw 0.9s var(--ease) forwards; animation-delay: calc(1.3s + var(--i, 0) * 0.25s); }
.doodle-heart .doodle-part { stroke-dasharray: 108; stroke-dashoffset: 108; animation: doodle-draw 1s var(--ease) forwards; animation-delay: calc(1.3s + var(--i, 0) * 0.25s); }
.doodle-sun .doodle-part--ring { stroke-dasharray: 46; stroke-dashoffset: 46; animation: doodle-draw 0.6s var(--ease) forwards; animation-delay: calc(1.3s + var(--i, 0) * 0.25s); }
.doodle-sun .doodle-part--rays { stroke-dasharray: 52; stroke-dashoffset: 52; animation: doodle-draw 0.7s var(--ease) forwards; animation-delay: calc(1.55s + var(--i, 0) * 0.25s); }
@keyframes doodle-draw { to { stroke-dashoffset: 0; } }

/* Large loose "marker" scribbles across each panel, bank-doodle vibe */
.hero-collage__scribble { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.hero-collage__scribble svg { width: 100%; height: 100%; }
.scribble-path {
  fill: none;
  stroke: rgba(255,255,255,0.5);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: doodle-draw 1.8s var(--ease) forwards;
  animation-delay: calc(0.85s + var(--i, 0) * 0.3s);
}

@media (max-width: 768px) {
  .hero-collage__row { overflow-x: auto; scroll-snap-type: x proximity; height: 380px; }
  .hero-collage__panel { flex: 0 0 88%; scroll-snap-align: start; }
  .hero-collage__divider { flex: 0 0 16px; }
  /* The tower-drawing + scribble + doodle stickers were tuned for a wide
     desktop strip with room to breathe. Squeezed onto a single ~88%-wide
     mobile card they just pile up on each other — drop them here and keep
     the divider as a plain colour break instead of a small illustration. */
  .hero-collage__divider svg,
  .hero-collage__scribble,
  .hero-collage__doodle { display: none; }
  .hero-collage__card {
    position: static; transform: none; margin: -2.5rem var(--space-5) 0; width: auto;
    max-width: none;
    padding: var(--space-6) var(--space-5);
  }
  .hero-collage__dots { display: none; }
  .hero-stats-band { gap: var(--space-6); }
}

/* ---------- Reveal-on-scroll (progressive enhancement) ---------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* ---------- Cards ---------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--color-paper-raised);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 40px -18px rgba(27,28,34,0.25); }
.card__icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--color-red-tint);
  color: var(--color-red-dark);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
}
.card__icon--img {
  width: 64px; height: 64px;
  background: none;
  overflow: hidden;
}
.card__icon--img img { width: 100%; height: 100%; object-fit: contain; }
.card h3 { margin-bottom: var(--space-2); }
.card p { color: var(--color-ink-soft); }

/* PS-Sparen breakdown cards */
.ps-breakdown { grid-template-columns: repeat(3, 1fr); }
.ps-breakdown .card { text-align: center; }
.card__figure {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-700);
  color: var(--color-red);
  margin-bottom: var(--space-2);
}

/* ---------- Prize-tier table ------------------------------------------------ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--color-line); }
.prize-table { min-width: 480px; background: var(--color-paper-raised); }
.prize-table caption { text-align: left; padding: var(--space-4) var(--space-5) 0; color: var(--color-ink-soft); font-size: var(--fs-300); }
.prize-table th, .prize-table td {
  text-align: left;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-line);
  font-variant-numeric: tabular-nums;
}
.prize-table thead th {
  background: var(--color-ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--fs-300);
}
.prize-table tbody tr:nth-child(even) { background: var(--color-grey-50); }
.prize-table tbody tr:hover { background: var(--color-red-tint); }
.prize-table td.amount { color: var(--color-red-dark); font-weight: 700; }
.prize-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Steps ------------------------------------------------------------ */
.steps { counter-reset: step; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { position: relative; padding-top: var(--space-3); }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--fs-700);
  color: var(--color-red);
  display: block;
  margin-bottom: var(--space-3);
}

/* ---------- Community band ---------------------------------------------------- */
.community-band {
  background: linear-gradient(120deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
}
.community-band::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 260px; height: 260px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
}
.community-band h2 { color: #fff; }
.community-band .lede { color: #ffe3e5; }

.kiez-list { list-style: none; display: grid; gap: var(--space-3); margin-top: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kiez-list li {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-weight: 600;
}

/* ---------- Trust / security section ------------------------------------------ */
.trust-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.trust-grid .card {
  background: var(--color-paper);
  border-style: dashed;
  box-shadow: none;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.trust-grid .card:hover { transform: translateY(-4px); box-shadow: none; border-color: var(--color-red); }
.trust-grid__icon { width: 32px; height: 32px; color: var(--color-red-dark); margin-bottom: var(--space-4); }

/* ---------- Accordion (FAQ) ----------------------------------------------------
   Uses native <details>/<summary> so questions & answers stay readable with
   JavaScript disabled (progressive enhancement, Lastenheft §2.1). */
.accordion { border-top: 1px solid var(--color-line); }
.accordion-item { border-bottom: 1px solid var(--color-line); }
.accordion-item > summary.accordion-trigger {
  list-style: none;
}
.accordion-item > summary.accordion-trigger::-webkit-details-marker { display: none; }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  font-family: var(--font-display);
  font-size: var(--fs-500);
  font-weight: 600;
  cursor: pointer;
  color: var(--color-ink);
}
.accordion-trigger__icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--color-red);
  color: var(--color-red-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  transition: transform 0.25s var(--ease);
}
.accordion-item[open] > .accordion-trigger .accordion-trigger__icon { transform: rotate(45deg); }
.accordion-panel__inner { padding-bottom: var(--space-5); color: var(--color-ink-soft); max-width: 68ch; }

/* ---------- Forms -------------------------------------------------------------- */
.form { max-width: 640px; }
.form-row { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); }
.form-row--split { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form label { font-weight: 600; font-size: var(--fs-300); }
.form .hint { font-size: var(--fs-200); color: var(--color-ink-soft); font-weight: 400; }
.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form select,
.form textarea {
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-paper-raised);
  font-family: var(--font-body);
  font-size: var(--fs-400);
  color: var(--color-ink);
}
.form textarea { min-height: 130px; padding-block: var(--space-3); resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus {
  border-color: var(--color-red);
}
.form input:invalid[data-touched="true"] { border-color: var(--color-red-dark); }

.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.form-check input {
  width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--color-red);
}
.form-check label { font-weight: 400; font-size: var(--fs-300); color: var(--color-ink); }

.form-error {
  color: var(--color-red-dark);
  font-size: var(--fs-200);
  min-height: 1.2em;
  display: block;
}

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

.form-status {
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  font-weight: 600;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status--success { background: #e6f4ea; color: var(--color-success); }
.form-status--error { background: var(--color-red-tint); color: var(--color-red-dark); }

/* ---------- Alerts / notices --------------------------------------------------- */
.notice {
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.notice__icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
}
.notice--rg {
  background: var(--color-warn-bg);
  border: 1px solid var(--color-warn-border);
  color: var(--color-warn-text);
}
.notice--rg .notice__icon { background: var(--color-warn-border); color: #fff; }
.notice--info {
  background: var(--color-grey-50);
  border: 1px solid var(--color-line);
  color: var(--color-ink-soft);
}
.notice--info .notice__icon { background: var(--color-ink); color: #fff; }
.notice a { color: var(--color-red-dark); font-weight: 700; }
.notice h3, .notice p { margin: 0; }
.notice p + p { margin-top: var(--space-2); }

.help-links { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); list-style: none; }
.help-links a {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: #fff; border: 1px solid var(--color-warn-border);
  border-radius: 999px; padding: var(--space-2) var(--space-4);
  font-size: var(--fs-300); font-weight: 700; text-decoration: none; color: var(--color-warn-text);
}

/* RG ribbon shown site-wide on lottery pages */
.rg-ribbon {
  background: var(--color-ink);
  color: #fff;
  font-size: var(--fs-300);
}
.rg-ribbon .container { display: flex; align-items: center; justify-content: center; gap: var(--space-3); padding-block: var(--space-2); text-align: center; flex-wrap: wrap; }
.rg-ribbon strong { color: #ffb3ba; }
.rg-ribbon a { color: #fff; text-decoration: underline; }

/* ---------- Breadcrumbs -------------------------------------------------------- */
.breadcrumbs { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--fs-200); color: var(--color-ink-soft); margin-bottom: var(--space-5); }
.breadcrumbs a { text-decoration: none; color: var(--color-ink-soft); }
.breadcrumbs a:hover { color: var(--color-red-dark); }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: var(--space-2); color: var(--color-line); }
.breadcrumbs li[aria-current="page"] { color: var(--color-ink); font-weight: 600; }

/* ---------- Page hero (interior pages) ----------------------------------------- */
.page-hero { background: var(--color-grey-50); border-bottom: 1px solid var(--color-line); padding-block: var(--space-8) var(--space-7); }
.page-hero h1 { max-width: 20ch; }
.page-hero__grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: var(--space-7); align-items: center; }

/* Reusable asymmetric 2-column content layout (Kontakt, Über uns, ...) —
   a CSS class so it can actually collapse on mobile, unlike an inline style. */
.split-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-8); align-items: start; }
.split-grid--reverse { grid-template-columns: 0.9fr 1.1fr; }
.page-hero__figure { justify-self: end; width: min(240px, 100%); }
.page-hero__figure img { width: 100%; height: auto; }

/* ---------- Content media frames (fixed aspect-ratio, never distorted) ------- */
.media-frame {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-frame--banner { aspect-ratio: 16 / 7; }
.media-frame--portrait { aspect-ratio: 4 / 5; }

/* ---------- Legal / long-form content ------------------------------------------ */
.legal { max-width: 74ch; }
.legal h2 { margin-top: var(--space-8); margin-bottom: var(--space-3); font-size: var(--fs-700); }
.legal h2:first-child, .reveal > h2:first-child { margin-top: 0; }
.legal h3 { margin-top: var(--space-6); margin-bottom: var(--space-2); }
.legal p, .legal li { color: var(--color-ink-soft); margin-bottom: var(--space-3); }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal table { margin: var(--space-5) 0; border: 1px solid var(--color-line); border-radius: var(--radius-sm); overflow: hidden; }
.legal th, .legal td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-line); text-align: left; font-size: var(--fs-300); }
.legal thead th { background: var(--color-grey-50); }
.placeholder { background: #fff3cd; padding: 0 4px; border-radius: 3px; font-family: monospace; font-size: 0.85em; }
.legal aside.meta { color: var(--color-ink-soft); font-size: var(--fs-300); margin-bottom: var(--space-7); }

/* ---------- Footer -------------------------------------------------------------- */
.site-footer { background: var(--color-ink); color: #d8d6cd; }
.footer-compliance { border-bottom: 1px solid rgba(255,255,255,0.12); padding-block: var(--space-6); }
.footer-compliance__row { display: flex; align-items: flex-start; gap: var(--space-4); flex-wrap: wrap; }
.footer-compliance .badge-18 { border-color: #ffb3ba; color: #ffb3ba; flex-shrink: 0; }
.footer-compliance p { margin: 0; font-size: var(--fs-300); color: #c6c3ba; }
.footer-compliance a { color: #ffb3ba; }
.footer-compliance__seal { flex-shrink: 0; margin-left: auto; opacity: 0.92; align-self: center; }
.footer-compliance__seal img { height: 34px; width: auto; display: block; }
@media (max-width: 768px) { .footer-compliance__seal { margin-left: 0; } }

.footer-main { padding-block: var(--space-8); display: grid; gap: var(--space-6); grid-template-columns: 1.4fr repeat(3, 1fr); }
.footer-col h4 { color: #fff; font-size: var(--fs-400); margin-bottom: var(--space-4); }
.footer-col ul { list-style: none; display: grid; gap: var(--space-2); }
.footer-col a { text-decoration: none; color: #c6c3ba; font-size: var(--fs-300); }
.footer-col a:hover { color: #fff; }
.footer-brand__word { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: #fff; }
.footer-brand p { color: #a9a69c; font-size: var(--fs-300); max-width: 34ch; margin-top: var(--space-3); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block: var(--space-5);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-3);
  font-size: var(--fs-200); color: #8f8c82;
}
.footer-bottom button.link-btn {
  background: none; border: none; color: #8f8c82; text-decoration: underline; cursor: pointer; font-size: inherit; padding: 0;
}
.footer-bottom button.link-btn:hover { color: #fff; }

/* ---------- Floating contact rail -------------------------------------------- */
.contact-rail {
  position: fixed;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-red);
}
.contact-rail__item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  background: var(--color-red);
  color: #fff;
  transition: background 0.2s var(--ease), width 0.2s var(--ease);
}
.contact-rail__item:hover { background: var(--color-red-dark); }
.contact-rail__item svg { width: 20px; height: 20px; }

@media (max-width: 1024px) {
  .contact-rail { display: none; }
}

/* ---------- Cookie consent banner ------------------------------------------------ */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 500;
  background: var(--color-paper-raised);
  border-top: 1px solid var(--color-line);
  box-shadow: 0 -10px 30px -12px rgba(0,0,0,0.25);
  padding: var(--space-6) 0;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner__grid { display: flex; gap: var(--space-6); align-items: center; flex-wrap: wrap; justify-content: space-between; }
.cookie-banner__text { max-width: 58ch; }
.cookie-banner__text h2 { font-size: var(--fs-500); margin-bottom: var(--space-2); }
.cookie-banner__text p { color: var(--color-ink-soft); font-size: var(--fs-300); }
.cookie-banner__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Cookie settings modal + Age gate modal share .modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(20, 19, 17, 0.6);
  display: none;
  align-items: center; justify-content: center;
  padding: var(--space-5);
}
.modal-overlay.is-visible { display: flex; }
.modal {
  background: var(--color-paper-raised);
  border-radius: var(--radius-lg);
  max-width: 560px; width: 100%;
  max-height: min(680px, 90vh);
  overflow-y: auto;
  padding: var(--space-7);
  box-shadow: var(--shadow-soft);
}
.modal h2 { margin-bottom: var(--space-3); }
.modal p { color: var(--color-ink-soft); margin-bottom: var(--space-4); }
.modal__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-6); }
.modal__close { position: sticky; top: 0; float: right; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--color-ink-soft); }

.consent-option {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-4) 0; border-bottom: 1px solid var(--color-line);
}
.consent-option:last-of-type { border-bottom: none; }
.consent-option__label strong { display: block; }
.consent-option__label span { color: var(--color-ink-soft); font-size: var(--fs-300); }

.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; background: var(--color-line); border-radius: 999px; transition: background 0.2s var(--ease); }
.switch .thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform 0.2s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.switch input:checked + .track { background: var(--color-red); }
.switch input:checked + .track + .thumb { transform: translateX(20px); }
.switch input:disabled + .track { background: var(--color-grey-600); opacity: 0.6; }

/* Age gate specific */
.age-gate .modal__seal { text-align: center; margin-bottom: var(--space-5); }
.age-gate .modal__seal .badge-18 { width: 56px; height: 56px; font-size: 1.1rem; margin-inline: auto; }
.age-gate h2 { text-align: center; }
.age-gate p { text-align: center; }
.age-gate .modal__actions { justify-content: center; }

/* Age-gate: hide protected page content until confirmed */
[data-age-gated] .age-gated-content { display: none; }

/* ---------- Sitemap-style link lists (registrierung success etc.) -------------- */
.stat-band { grid-template-columns: repeat(3, 1fr); text-align: center; }
.stat-band strong { display: block; font-family: var(--font-display); font-size: var(--fs-800); color: var(--color-red); }
.stat-band span { color: var(--color-ink-soft); font-size: var(--fs-300); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__seal { justify-self: start; width: 200px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__figure { justify-self: start; width: 160px; order: -1; }

  /* Below 1024px there isn't reliably enough room for 8 nav items on one
     line (was wrapping unevenly / "dancing"), so switch to the hamburger
     panel here instead of waiting for the 768px phone breakpoint. */
  .nav__links {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--color-paper);
    flex-direction: column; align-items: flex-start;
    padding: var(--space-6) var(--space-5);
    gap: var(--space-5);
    transform: translateX(100%);
    transition: transform 0.28s var(--ease);
    overflow-y: auto;
  }
  .nav__links.is-open { transform: translateX(0); }
  .nav__links a {
    font-size: var(--fs-600); width: 100%;
    color: var(--color-ink);
    white-space: normal;
  }
  .nav__links a::after { background: var(--color-red); }
  .nav__links a[aria-current="page"] { color: var(--color-red-dark); }
  .nav__toggle { display: inline-flex; }
  .utility-bar { display: none; }
  .nav__actions .btn--on-red .btn-label-full { display: none; }
  .nav__actions .btn--on-red .btn-label-short { display: inline; }
}

@media (max-width: 768px) {
  .ps-breakdown, .stat-band { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .form-row--split { grid-template-columns: 1fr; }
  .split-grid, .split-grid--reverse { grid-template-columns: 1fr; }
  .cookie-banner__grid { flex-direction: column; align-items: stretch; }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner__actions .btn { flex: 1; }
}

@media (max-width: 480px) {
  .section { padding-block: var(--space-7); }
  .modal { padding: var(--space-5); }
  .hero { padding-block: var(--space-7) var(--space-6); }

  /* Logo wordmark + 18+ badge + "Registrieren" button + hamburger don't all
     fit one row under ~450px wide — the row was overflowing and pushing
     the hamburger off the edge of the viewport. Drop the wordmark (keep
     just the logo mark) and tighten the gaps so everything fits on-screen. */
  .site-header .container { padding-inline: var(--space-4); }
  /* Visually hidden, not display:none: the logo <img> has alt="" because
     this text is what gives the home link its accessible name. */
  .brand__word {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
  }
  .nav { gap: var(--space-2); }
  .nav__actions { gap: var(--space-3); }
}
