/* 1 Milliarde – Version 03 unter /M
   Inhalte:
   - Textbausteine: /M/content/**/*.md
   - Slider: /M/data/slider.json
   - Medien: /M/data/media.json
   - Materialien: /M/data/materials.json
*/

:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #f0eee7;
  --text: #151515;
  --muted: #626262;
  --line: rgba(0, 0, 0, 0.12);
  --shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.12);
  --red: #df333b;
  --green: #55aa58;
  --blue: #314f87;
  --gold: #f0a23a;
  --link: #314f87;
  --cta: #df333b;
  --focus: #314f87;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050505;
  --surface: #111111;
  --surface-2: #191919;
  --text: #f3f3ee;
  --muted: #b8b8b0;
  --line: rgba(255, 255, 255, 0.16);
  --shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.42);
  --link: #8fb2ff;
  --focus: #8fb2ff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--green) 11%, transparent), transparent 36rem),
    radial-gradient(circle at top right, color-mix(in srgb, var(--gold) 10%, transparent), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-2);
  padding: .08rem .25rem;
  border-radius: .3rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 999;
  padding: 0.75rem 1rem;
  border-radius: 0.8rem;
  background: var(--surface);
  color: var(--text);
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  color: var(--text);
  text-decoration: none;
  min-width: max-content;
}

.brand-logo {
  display: block;
  width: 150px;
  height: 52px;
  object-fit: contain;
  object-position: left center;
}

.brand-text {
  display: none;
}

.nav-toggle { display: none; }

.primary-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.primary-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 680;
  font-size: 0.95rem;
  padding: 0.58rem 0.72rem;
  border-radius: 999px;
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  background: var(--surface-2);
}

.primary-nav .nav-cta {
  background: var(--red);
  color: #fff;
  margin-left: 0.2rem;
}

.primary-nav .nav-cta:hover {
  background: color-mix(in srgb, var(--red) 88%, #000);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.52rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  user-select: none;
}

.theme-label {
  font-size: 0.74rem;
  font-weight: 700;
}

.theme-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.theme-slider {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.36rem;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
}

.theme-slider::before {
  content: "";
  position: absolute;
  top: 0.16rem;
  left: 0.16rem;
  width: 1.04rem;
  height: 1.04rem;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0.1rem 0.45rem rgba(0,0,0,.22);
  transition: transform 180ms ease;
}

.theme-input:checked + .theme-slider::before {
  transform: translateX(1.13rem);
}

.theme-input:focus-visible + .theme-slider,
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.breadcrumb {
  padding: 1rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb span {
  color: var(--text);
}

.hero {
  display: grid;
  gap: clamp(1.4rem, 4vw, 3rem);
  padding: clamp(1rem, 3vw, 2.2rem) 0 clamp(3rem, 6vw, 5rem);
}

.hero-slider-wrap {
  width: 100%;
}

.slider {
  border: 1px solid var(--line);
  border-radius: clamp(1.1rem, 2vw, 1.8rem);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero .slider {
  width: 100%;
}

.slider-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #fff;
}

.hero .slider-frame {
  max-height: min(58svh, 660px);
}

.slider-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.slider-caption {
  padding: 0.86rem 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.slider-controls {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  display: flex;
  gap: 0.42rem;
}

.slider-controls button {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}

.hero-copy {
  max-width: 920px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.35rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-size: 0.9rem;
  font-weight: 720;
}

.eyebrow::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue), var(--red), var(--gold));
}

h1, h2, h3 {
  line-height: 1.05;
  letter-spacing: -0.055em;
}

h1 {
  margin: 1.1rem 0 1rem;
  font-size: clamp(2.55rem, 6.5vw, 5.8rem);
  max-width: 13ch;
}

.hero-subline {
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  color: var(--muted);
  max-width: 67ch;
}

.hero-subline strong {
  display: block;
  margin-top: 1.1rem;
  color: var(--text);
  font-size: clamp(1.18rem, 2.4vw, 1.72rem);
  line-height: 1.18;
  font-weight: 850;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.78rem 1.08rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 840;
  line-height: 1.1;
}

.button-primary {
  background: var(--cta);
  color: #fff;
  box-shadow: 0 0.7rem 1.7rem color-mix(in srgb, var(--cta) 24%, transparent);
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.button-tertiary {
  color: var(--text);
  border-color: var(--line);
}

.section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  border-top: 1px solid var(--line);
}

.section-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 4rem);
}

.lead {
  color: var(--muted);
  font-size: 1.12rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card,
.content-card {
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  padding: 1.15rem;
  background: var(--surface);
  box-shadow: 0 0.45rem 1.4rem rgba(0,0,0,.055);
}

.card h3,
.content-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.kicker {
  color: var(--muted);
  font-weight: 760;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.page-hero {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
}

.page-hero h1 {
  max-width: 13ch;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.sticky-note {
  position: sticky;
  top: 100px;
  border-left: 0.35rem solid var(--red);
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: var(--surface);
}

.check-list {
  padding-left: 1.2rem;
}

.check-list li {
  margin-bottom: 0.65rem;
}

.media-list,
.material-list {
  display: grid;
  gap: 1rem;
}

.media-card,
.material-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 1rem;
  background: var(--surface);
}

.media-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
  border-radius: 1rem;
  background: var(--surface-2);
  padding: 0.45rem;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-inner a {
  color: var(--muted);
}

@media (max-width: 920px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 0.7rem 0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    padding: 0.55rem 0.72rem;
    font-weight: 780;
  }

  .primary-nav {
    display: none;
    order: 3;
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.6rem;
  }

  .primary-nav.is-open {
    display: flex;
  }

  .primary-nav a {
    border-radius: 0.8rem;
  }

  .section-grid,
  .page-layout {
    grid-template-columns: 1fr;
  }

  h1 { max-width: 12ch; }

  .card-grid { grid-template-columns: 1fr; }

  .sticky-note { position: static; }
}

@media (max-width: 560px) {
  .brand-logo { width: 128px; height: 46px; }

  .brand-text { display: none; }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .cta-row .button { width: 100%; }

  .media-card,
  .material-card {
    grid-template-columns: 1fr;
  }

  .slider-caption {
    display: none;
  }
}


.card-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card-link:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--red) 42%, var(--line));
  box-shadow: 0 0.9rem 1.8rem rgba(0,0,0,.10);
}

.card-link .meta {
  margin-top: 1rem;
  font-weight: 800;
  color: var(--red);
}

.home-explainer {
  display: grid;
  gap: 1.3rem;
}

.home-explainer-copy {
  max-width: 980px;
}

.home-explainer-copy h2 {
  margin-bottom: 1rem;
}

.home-card-grid {
  margin-top: 0.8rem;
}


/* Version 05 – Layoutkorrekturen */
.header-inner {
  min-height: 82px;
}

.brand-logo {
  width: 192px;
  height: 70px;
  object-fit: contain;
  object-position: left center;
}

.hero-main-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.home-title {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(2.55rem, 5vw, 3.75rem);
  letter-spacing: -0.06em;
}

.hero-side-logo {
  justify-self: end;
  align-self: start;
  padding-top: 2.4rem;
}

.hero-side-logo img {
  display: block;
  width: min(220px, 100%);
  height: auto;
  opacity: 0.96;
}

.button.button-primary,
.hero .button.button-primary,
.cta-row .button.button-primary {
  background: #df333b !important;
  color: #ffffff !important;
  border-color: #df333b !important;
  box-shadow: 0 0.7rem 1.7rem rgba(223, 51, 59, 0.24);
}

.button.button-primary:hover,
.hero .button.button-primary:hover,
.cta-row .button.button-primary:hover {
  background: #c82931 !important;
  border-color: #c82931 !important;
}

.primary-nav .nav-cta {
  background: #df333b !important;
  color: #ffffff !important;
  border-color: #df333b !important;
}

@media (max-width: 1050px) {
  .hero-main-row {
    grid-template-columns: 1fr;
  }

  .hero-side-logo {
    display: none;
  }

  .home-title {
    white-space: normal;
    font-size: clamp(2.5rem, 8vw, 4.2rem);
  }
}

@media (max-width: 560px) {
  .brand-logo {
    width: 158px;
    height: 58px;
  }
}


/* Version 07 – neue Querformat-Slidergrafiken und Screenreader-Hilfen */
.slider-frame {
  aspect-ratio: 1180 / 360;
}

.hero .slider-frame {
  max-height: none;
}

.slider-frame img {
  object-fit: cover;
}

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