:root {
  --base-10: #ffffff;
  --base-50: #eaeaeb;
  --base-100: #d8d8db;
  --base-200: #c1c1c4;
  --base-300: #a7a7ac;
  --base-400: #88888e;
  --base-500: #696970;
  --base-600: #525258;
  --base-700: #3d3d41;
  --base-800: #27272b;
  --base-900: #141417;
  --base-bg: #101013;
  --base-950: #060607;
  --base-970: #020202;
  --base-990: #010101;
  --base-999: #000000;

  --primary-50: #deeff2;
  --primary-100: #c6e1e6;
  --primary-200: #a5ccd4;
  --primary-300: #7eb5c1;
  --primary-400: #5198a7;
  --primary-500: #23798b;
  --primary-600: #045f71;
  --primary-700: #004756;
  --primary-800: #002f3c;
  --primary-900: #001922;
  --primary-950: #00080f;
  --primary-970: #000305;
  --primary-990: #000102;

  --accent-50: #fcfafb;
  --accent-100: #f7f0f3;
  --accent-200: #f3dbe5;
  --accent-300: #f1b9d1;
  --accent-400: #f483b4;
  --accent-500: #f84693;
  --accent-600: #f11f7a;
  --accent-700: #c81b66;
  --accent-800: #902050;
  --accent-900: #5d203a;
  --accent-950: #371825;
  --accent-970: #22141a;
  --accent-990: #181114;

  --border-color: var(--base-700);
}

::selection {
  background: var(--primary-700);
  color: var(--primary-50);
}

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

body {
  font-family: "Elms Sans", sans-serif;
  color: var(--base-50);
  background: var(--base-900);
  background-image: url("assets/bg.svg");
  background-size: 500px 500px;
  background-repeat: repeat;
  overflow-x: hidden;
}

main {
  padding: 2rem;
  max-width: 1350px;
  margin: 50px auto 0;
}

section {
  background: var(--base-900);
  margin-bottom: 15px;
}

footer {
  text-align: center;
  padding: 2rem;
}

footer .logo {
  width: 300px;
  margin: 150px auto;
}

h2 {
  font-weight: 900;
  text-transform: uppercase;
  position: relative;
  padding-top: 4rem;
  margin-bottom: 1rem;
}

h2::before {
  content: '';
  position: absolute;
  width: 55px;
  height: 7px;
  background: var(--accent-600);
  bottom: -7px;
}

h3 {
  font-weight: 700;
  text-transform: uppercase;
  position: relative;
  margin-bottom: 1rem;
}

h3::before {
  content: '';
  position: absolute;
  width: 40px;
  height: 4px;
  background: var(--primary-600);
  bottom: -4px;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  width: 100%;
  padding: 1rem 1rem 1rem 4rem;
  background: var(--base-bg);
  box-shadow: 0 0 20px var(--base-970);
  transition: all 0.4s;
}

nav:hover {
  background: var(--base-950);
}

nav .icon {
  height: 1.1rem;
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 2rem;
}

nav a.navLink {
  color: var(--base-50);
  padding: 3px 8px;
  background: var(--base-800);
}

nav a.navLink:hover {
  background: var(--accent-800);
}

.bg-icon {
  position: fixed;
  width: 180px;
  transform: translate(50%, 50%);
  opacity: 0.03;
  bottom: 35px;
  right: 35px;
}

a {
  text-decoration: none;
}

p {
  line-height: 1.5;
  font-weight: 200;
  font-family: system-ui, sans-serif;
}

.subheadline {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 200;
  font-family: "Elms Sans", sans-serif;
  margin-bottom: 0.4rem;
  opacity: 0.8;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
}

.cell {
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 2.5rem;
}

/* Spaltenbreiten */
.c-1 {
  grid-column: span 1;
}

.c-2 {
  grid-column: span 2;
}

.c-3 {
  grid-column: span 3;
}

.c-4 {
  grid-column: span 4;
}

.c-5 {
  grid-column: span 5;
}

.c-6 {
  grid-column: span 6;
}

.c-7 {
  grid-column: span 7;
}

.c-8 {
  grid-column: span 8;
}

.c-9 {
  grid-column: span 9;
}

.c-10 {
  grid-column: span 10;
}

.c-11 {
  grid-column: span 11;
}

.c-12 {
  grid-column: span 12;
}

@media (max-width: 700px) {
  .cell {
    grid-column: span 12 !important;
  }
}

button,
.btn {
  display: inline-block;
  font-family: "Elms Sans", sans-serif;
  background: var(--base-bg);
  border: 1px solid var(--base-50);
  color: var(--base-50);
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: background 0.1s, color 0.2s;
  margin-top: 1.5rem;
}

button:hover,
.btn:hover {
  background: var(--base-50);
  color: var(--base-900);
}

.vote-chart-cell {
  min-height: 560px;
}

.chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.chart-header p {
  color: var(--base-200);
}

.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-end;
}

.chart-controls label {
  display: grid;
  gap: 0.35rem;
  min-width: 180px;
  color: var(--base-200);
  font-family: "Elms Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.chart-controls select {
  width: 100%;
  background: var(--base-bg);
  border: 1px solid var(--base-50);
  color: var(--base-50);
  padding: 0.65rem 0.75rem;
  font: inherit;
  text-transform: none;
}

.bar-chart {
  width: 100%;
  min-height: 430px;
  overflow-x: auto;
}

.bar-chart svg {
  display: block;
  min-width: 720px;
}

.chart-axis text {
  fill: var(--base-100);
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
}

.chart-axis path,
.chart-axis line {
  stroke: var(--base-500);
}

.chart-grid line {
  stroke: var(--base-700);
  stroke-dasharray: 3 6;
}

.chart-grid path {
  stroke: transparent;
}

.bar {
  transition: opacity 0.15s;
}

.bar:hover {
  opacity: 0.78;
}

.bar-label {
  fill: var(--base-50);
  font-family: system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
}

.cell.c-12.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90vh;
}

.cell.c-12.empty {
  height: 18vh;
}

.cell.c-12.hero img {
  width: clamp(280px, 70vw, 850px);
  height: auto;
}

.hero-wrapper {
  position: relative;
}

.deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* Positionen – anpassen bis es passt */
.deco-ballot {
  width: clamp(100px, 28vw, 250px);
  top: -20px;
  left: -30px;
}

.deco-letter {
  width: clamp(180px, 30vw, 800px);
  top: -20px;
  right: 60px;
  transform: rotate(8deg);
}

.deco-pen {
  width: clamp(250px, 30vw, 400px);
  bottom: clamp(-20%, 2vw, -60%);
  ;
  right: clamp(-5%, 15vw, -10%);
  transform: rotate(-245deg);
}

.map-section {
  min-height: 600px;
}

.map-cell,
.map-info-cell {
  min-height: 600px;
}

#map-shell {
  width: 100%;
  height: 100%;
  max-height: 60vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--base-900);
}

#Bundesrepublik_Deutschland {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  padding: 20px;
  background: var(--base-bg);
  border: 1px solid var(--base-50);
}

.state {
  cursor: pointer;
  vector-effect: non-scaling-stroke;
}

.state:hover {
  stroke: var(--base-999) !important;
  stroke-width: 1.5 !important;
}

#info {
  overflow: scroll;
}

#info pre {
  margin-top: 0.75rem;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--base-100);
}

@media (max-width: 700px) {
  .chart-header,
  .chart-controls {
    display: grid;
    justify-content: stretch;
  }

  .map-section,
  .map-cell,
  .map-info-cell {
    min-height: auto;
  }

  #map-shell,
  #Bundesrepublik_Deutschland,
  #info {
    min-height: 520px;
  }
}

.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;
}
