/* ==========================================================================
   BERLINMOMENTE – Stadtmagazin
   Palette: #ffffff / #111111 / Akzent #e63946 / Sekundär #1d3557 / #f2f2f2 / #6c757d
   Fonts: Archivo Black (Display), Inter (Text)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --red: #e63946;
  --blue: #1d3557;
  --grey: #f2f2f2;
  --muted: #6c757d;
  --line: #e2e2e2;
  --font-display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1200px;
  --gutter: 20px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 7vw, 5.5rem); text-transform: uppercase; }
h2 { font-size: clamp(1.7rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
p { margin: 0 0 1.2em; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--red); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------------------------
   Top-Leiste
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--red);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  white-space: nowrap;
}
.brand:hover { color: #fff; }
.brand::before {
  content: "";
  width: 12px; height: 12px;
  background: var(--red);
  display: inline-block;
}
.dateline {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #bdbdbd;
  display: none;
}
.topnav {
  display: none;
}
.topnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.topnav a {
  color: #fff;
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
}
.topnav a:hover, .topnav a[aria-current="page"] { border-bottom-color: var(--red); color: #fff; }

.menu-btn {
  background: none; border: 2px solid #fff; color: #fff;
  font: inherit; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700;
  padding: .45rem .8rem; cursor: pointer; display: inline-flex; align-items: center; gap: .5rem;
}
.menu-btn .bars { display: inline-flex; flex-direction: column; gap: 3px; }
.menu-btn .bars span { width: 16px; height: 2px; background: #fff; display: block; }

.mobile-nav {
  display: none;
  background: var(--ink);
  border-top: 1px solid #333;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: .5rem 0; }
.mobile-nav a {
  display: block; padding: .85rem var(--gutter);
  color: #fff; text-decoration: none;
  font-family: var(--font-display); font-size: 1.25rem; text-transform: uppercase; letter-spacing: .04em;
  border-left: 6px solid transparent;
}
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { border-left-color: var(--red); color: #fff; }

@media (min-width: 900px) {
  .dateline { display: block; }
  .topnav { display: block; }
  .menu-btn, .mobile-nav { display: none !important; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: end;
  color: #fff;
  background: var(--ink);
  overflow: hidden;
}
.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .78;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(17,17,17,.1) 0%, rgba(17,17,17,.35) 45%, rgba(17,17,17,.92) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding: 4rem 0 2.5rem; }
.hero h1 { color: #fff; margin-bottom: .4rem; }
.hero .lede {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  max-width: 48rem;
  color: #f2f2f2;
  margin-bottom: 1.2rem;
}
.hero .credit {
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #bdbdbd; margin: 0;
}
.hero .credit a { color: #fff; }
.hero--short { min-height: 56vh; }

.kicker {
  display: inline-block;
  background: var(--red);
  color: #fff;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: .35rem .6rem;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Allgemeine Abschnitte
   -------------------------------------------------------------------------- */
main > section, main > article { padding: 3.5rem 0; }
section.alt { background: var(--grey); }
section.dark { background: var(--ink); color: #fff; }
section.dark h2, section.dark h3 { color: #fff; }
section.dark a { color: #fff; }
section.blue { background: var(--blue); color: #fff; }
section.blue h2, section.blue h3 { color: #fff; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-top: 4px solid var(--ink);
  padding-top: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
section.dark .section-head, section.blue .section-head { border-top-color: #fff; }
.section-head h2 { margin: 0; }
.section-head .label {
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: var(--red);
}

.rubrik {
  display: inline-block;
  color: var(--red);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.intro {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.5;
  max-width: 44rem;
  color: var(--ink);
}
.intro::first-letter {
  font-family: var(--font-display);
  font-size: 3.2em;
  float: left;
  line-height: .8;
  padding: .08em .12em 0 0;
  color: var(--red);
}

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }

.two-col {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 900px) {
  .two-col { grid-template-columns: 1.4fr 1fr; align-items: start; }
}

/* --------------------------------------------------------------------------
   Magazin-Raster / Karten
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } .grid.two { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: #fff;
  border-top: 4px solid var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease;
}
.card:hover { transform: translateY(-3px); }
.card:hover .card-title a { color: var(--red); }
.card figure { margin: 0; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card figcaption { font-size: .7rem; color: var(--muted); padding: .4rem 0 0; letter-spacing: .04em; }
.card figcaption a { color: var(--muted); }
.card-body { padding: 1rem 0 1.25rem; }
.card-title { font-size: 1.35rem; margin: 0 0 .5rem; }
.card-title a { color: var(--ink); text-decoration: none; }
.card p { margin: 0 0 .8rem; color: #333; font-size: .97rem; }
.more {
  font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--red);
}
.more:hover { color: var(--red); }

.card--text { border-top-color: var(--red); background: var(--grey); padding: 1.5rem; }
.card--text .card-body { padding: 0; }

/* --------------------------------------------------------------------------
   Zahlenblock
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  gap: 1px;
  background: #333;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--ink);
  padding: 2rem 1.25rem;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  color: var(--red);
  line-height: 1;
  display: block;
  margin-bottom: .5rem;
}
.stat .num small { font-size: .45em; color: #fff; }
.stat .lbl { font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; display: block; }
.stat .src { font-size: .75rem; color: #9a9a9a; margin: .4rem 0 0; }

/* --------------------------------------------------------------------------
   Pull-Quote
   -------------------------------------------------------------------------- */
.pullquote {
  border-left: 10px solid var(--red);
  padding: .5rem 0 .5rem 1.5rem;
  margin: 2.5rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.25;
  color: var(--ink);
}
.pullquote cite { display: block; font-family: var(--font-text); font-style: normal; font-size: .8rem; color: var(--muted); margin-top: .8rem; letter-spacing: .08em; text-transform: uppercase; }
section.dark .pullquote, section.blue .pullquote { color: #fff; }

/* --------------------------------------------------------------------------
   Nummerierte Abschnitte (Kieze, Architektur, Parks)
   -------------------------------------------------------------------------- */
.numbered { counter-reset: abschnitt; }
.entry {
  counter-increment: abschnitt;
  display: grid;
  gap: 1.25rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  grid-template-columns: 1fr;
}
.entry:first-of-type { border-top: 0; padding-top: 0; }
.entry .num {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  color: var(--red);
  line-height: .9;
}
.entry .num::before { content: counter(abschnitt, decimal-leading-zero); }
.entry h2, .entry h3 { margin-top: .2rem; }
.entry .meta {
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--blue); margin-bottom: .6rem;
}
.entry .body p:last-child { margin-bottom: 0; }
@media (min-width: 800px) {
  .entry { grid-template-columns: 90px 1fr; align-items: start; }
  .entry.with-aside { grid-template-columns: 90px 1.5fr 1fr; }
}

.places {
  list-style: none; padding: 0; margin: 1rem 0 0;
  display: flex; flex-wrap: wrap; gap: .5rem;
}
.places li {
  border: 1.5px solid var(--ink);
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  padding: .3rem .65rem;
}

/* Fakten-Kästen */
.factbox {
  background: var(--grey);
  border-left: 6px solid var(--blue);
  padding: 1.1rem 1.25rem;
  font-size: .92rem;
}
.factbox h4 { font-family: var(--font-text); font-weight: 800; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: .6rem; }
.factbox dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; }
.factbox dt { font-weight: 700; color: var(--muted); }
.factbox dd { margin: 0; }

/* --------------------------------------------------------------------------
   Zeitleiste
   -------------------------------------------------------------------------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.5rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute; left: 6px; top: 0; bottom: 0;
  width: 4px; background: var(--ink);
}
.timeline li {
  position: relative;
  padding: 0 0 2.75rem 1.75rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.5rem; top: .45rem;
  width: 16px; height: 16px;
  background: var(--red);
  border: 4px solid #fff;
  box-shadow: 0 0 0 2px var(--ink);
}
.timeline .year {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--red);
  line-height: 1;
  display: block;
  margin-bottom: .4rem;
}
.timeline h3 { margin-bottom: .5rem; }
.timeline p { max-width: 42rem; }
.timeline p:last-child { margin-bottom: 0; }
@media (min-width: 800px) {
  .timeline { padding-left: 11rem; }
  .timeline::before { left: 9.5rem; }
  .timeline li { padding-left: 2.5rem; }
  .timeline li::before { left: -1.5rem; left: calc(-1.5rem - 6px + 2px); }
  .timeline .year {
    position: absolute;
    left: -11rem; width: 8.5rem; text-align: right; top: 0;
  }
}

/* --------------------------------------------------------------------------
   Bilder / Figures
   -------------------------------------------------------------------------- */
figure.full { margin: 0 0 2rem; }
figure.full img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; }
figure.inset img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
figure.inset { margin: 0; }
figcaption { font-size: .78rem; color: var(--muted); padding: .5rem 0 0; }
figcaption a { color: var(--muted); }
figcaption .cap { color: var(--ink); font-weight: 600; margin-right: .4rem; }

/* --------------------------------------------------------------------------
   Rubriken-Leiste (Teaser-Reihe mit Nummern)
   -------------------------------------------------------------------------- */
.rubriken {
  display: grid;
  gap: 0;
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
}
@media (min-width: 900px) { .rubriken { grid-template-columns: repeat(4, 1fr); } }
.rubriken a {
  display: block;
  padding: 1.5rem 1.25rem;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .rubriken a { border-bottom: 0; border-right: 1px solid var(--line); } .rubriken a:last-child { border-right: 0; } }
.rubriken a:hover { background: var(--grey); color: var(--ink); }
.rubriken .idx { font-family: var(--font-display); color: var(--red); font-size: 1.8rem; display: block; margin-bottom: .3rem; }
.rubriken strong { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; display: block; margin-bottom: .3rem; }
.rubriken span.desc { font-size: .9rem; color: #444; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer {
  background: var(--ink);
  color: #d6d6d6;
  padding: 3rem 0 2rem;
  border-top: 6px solid var(--red);
  font-size: .92rem;
}
footer .cols { display: grid; gap: 2rem; }
@media (min-width: 800px) { footer .cols { grid-template-columns: 2fr 1fr 1fr; } }
footer .brand { margin-bottom: .8rem; }
footer h4 { font-family: var(--font-text); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: .8rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: .4rem; }
footer a { color: #fff; }
footer a:hover { color: var(--red); }
footer .bottom {
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid #333;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
  font-size: .8rem; color: #9a9a9a;
}
footer .bottom a { color: #d6d6d6; }

/* --------------------------------------------------------------------------
   Legal / Textseiten / 404
   -------------------------------------------------------------------------- */
.page-head {
  padding: 3.5rem 0 2rem;
  border-bottom: 4px solid var(--ink);
}
.page-head h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.page-head p { max-width: 44rem; color: #333; margin: 0; }

.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal h3 { font-size: 1.1rem; font-family: var(--font-text); font-weight: 800; margin-top: 1.5rem; }
.legal address { font-style: normal; }
.placeholder { background: #fff3cd; padding: 0 .25rem; font-family: monospace; font-size: .9em; }

.notfound { text-align: center; padding: 6rem 0; }
.notfound .big { font-family: var(--font-display); font-size: clamp(5rem, 20vw, 14rem); color: var(--red); line-height: .9; margin: 0; }

.sources li { margin-bottom: .6rem; }
.btn {
  display: inline-block;
  background: var(--ink); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .85rem 1.4rem; border-bottom: 4px solid var(--red);
}
.btn:hover { background: var(--red); color: #fff; border-bottom-color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card:hover { transition: none; transform: none; }
}
