@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --rot: #e8413f;
  --schwarz: #000;
  --weiss: #fff;
  --breite: 1300px;
  --zeile: 80px; /* Höhe der SVP-Parteizeile am Seitenende */
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--schwarz);
  background: var(--weiss);
  overflow-x: hidden;
}

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

h1, h2 { margin: 0; }

.inhalt {
  width: 100%;
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: 10px;
}

/* ---------- Fixe Elemente ---------- */

.wallis-fahne {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: 120px;
  height: 120px;
  pointer-events: none;
}

/* SVP-Parteizeile: steht fest am Ende der Seite, unter dem Fuss */
.parteizeile {
  display: block;
  height: var(--zeile);
  background: var(--rot);
}

.parteizeile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: #cfd6dc url("../img/hero.jpg") center top / cover no-repeat;
  border-top: 4px solid var(--rot);
  box-shadow: inset 0 0 20px rgb(0 0 0 / .5);
  overflow: hidden;
}

.hero__name {
  position: absolute;
  right: 8.5%;
  bottom: 13%;
  width: min(41%, 540px);
  animation: von-rechts 1s ease-out both;
}

.hero__kante {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 120px;
  fill: var(--weiss);
}

@keyframes von-rechts {
  from { transform: translateX(60%); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ---------- Rote Abschnitte mit Votum ---------- */

.votum {
  position: relative;
  background: var(--rot);
  color: var(--weiss);
}

/* Weisse Linien trennen das Votum von den roten Abschnitten darüber und darunter */
.votum--linien {
  border-block: 4px solid var(--weiss);
  box-shadow: 0 0 10px rgb(0 0 0 / .5);
}

.votum__inhalt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  padding-block: 14px;
}

.votum__text { padding: 40px; }

.votum__text h2,
.votum__text p,
.portraet h1,
.portraet__amt,
.fuss h2 {
  font-size: 1.68rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.votum__text p { margin: 20px 0 0; }

.votum .video { margin: 40px; }

/* Schräge Oberkante: rot steigt nach rechts an */
.oben-schraeg { position: relative; }

.oben-schraeg::before {
  content: "";
  position: absolute;
  inset: auto 0 calc(100% - 1px) 0;
  height: 9vw;
  background: var(--rot);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* ---------- Videos ---------- */

.video {
  position: relative;
  display: block;
  background: var(--schwarz);
  overflow: hidden;
}

.video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease, opacity .4s ease;
}

.video--quer { aspect-ratio: 16 / 9; }
.video--hoch { aspect-ratio: 9 / 16; }

.video::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-color: transparent transparent transparent var(--weiss);
  border-width: 34px 0 34px 58px;
  filter: drop-shadow(0 2px 8px rgb(0 0 0 / .45));
  transition: transform .2s ease;
}

.video--hoch::after { border-width: 18px 0 18px 30px; }

/* Hochformat-Videos sind wie im Original abgedunkelt */
.video--hoch::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgb(0 0 0 / .64);
  transition: background-color .3s ease;
}

.video--hoch::after { z-index: 2; }

.video--hoch:hover::before,
.video--hoch:focus-visible::before { background: rgb(0 0 0 / .45); }

.video:hover img,
.video:focus-visible img { transform: scale(1.04); opacity: .85; }

.video:hover::after,
.video:focus-visible::after { transform: translate(-35%, -50%) scale(1.15); }

/* ---------- Porträt mit Galerie ---------- */

.portraet__inhalt {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-block: 10px;
}

.portraet__text { padding: 10px; }

.portraet h1 { color: var(--rot); }

.portraet__amt { margin: 0 0 10px; }

.portraet dl { margin: 0; font-size: 1.44rem; }
.portraet dl div { margin: 0; }
.portraet dt,
.portraet dd { display: inline; margin: 0; }
.portraet dd { font-weight: 700; }

.galerie {
  display: flex;
  gap: 11px;
  padding: 40px;
}

.galerie__spalte {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.galerie a { display: block; overflow: hidden; }

.galerie img {
  width: 100%;
  transition: transform .4s ease;
}

.galerie a:hover img,
.galerie a:focus-visible img { transform: scale(1.08); }

.portraet { padding-bottom: 9vw; }

/* ---------- Video-Stimmen ---------- */

.stimmen {
  background: var(--rot);
  padding-block: 10px 40px;
}

.stimmen__raster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-inline: 20px;
}

/* ---------- Fuss ---------- */

.fuss {
  background: var(--rot);
  color: var(--weiss);
  text-align: center;
  padding: 130px 10px 150px;
}

.fuss ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  font-size: 1.2rem;
}

.fuss a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  transition: color .3s;
}

.fuss svg {
  width: 17.5px;
  height: 17.5px;
  fill: currentColor;
  transition: fill .3s;
}

.fuss a:hover,
.fuss a:focus-visible { color: #e5e5e5; }

.fuss a:hover svg,
.fuss a:focus-visible svg { fill: #b7b7b7; }

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 50px 16px 16px;
  border: 0;
  background: rgb(0 0 0 / .9);
  opacity: 0;
  transition: opacity .3s ease;
}

.lightbox.offen { opacity: 1; }

.lightbox__inhalt > * {
  transform: scale(.9);
  transition: transform .3s ease, opacity .3s ease;
}

.lightbox.offen .lightbox__inhalt > * { transform: none; }

.lightbox__inhalt img:not(.geladen) { opacity: 0; }

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop { background: none; }

.lightbox__inhalt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lightbox__inhalt img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 0 30px rgb(0 0 0 / .3);
}

.lightbox__inhalt iframe {
  border: 0;
  background: #000;
  max-width: 100%;
  max-height: 100%;
}

.lightbox__inhalt iframe.quer { width: min(100%, 1100px); aspect-ratio: 16 / 9; }
.lightbox__inhalt iframe.hoch { height: 100%; aspect-ratio: 9 / 16; }

.lightbox__zu {
  position: absolute;
  top: 6px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: .9;
  transition: opacity .3s;
}

.lightbox__zu:hover { opacity: 1; }

:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.portraet :focus-visible { outline-color: var(--rot); }

/* ---------- Tablet / Mobile ---------- */

@media (max-width: 1024px) {
  .votum__text { padding: 20px; }
  .votum .video { margin: 20px; }
  .galerie { padding: 20px; }
  .stimmen__raster { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  :root { --zeile: 56px; }

  body { font-size: 1.05rem; }
  .portraet dl { font-size: 1.1rem; }

  .wallis-fahne { width: 80px; height: 80px; }

  .hero { background-position: 58% top; }

  .hero__name {
    right: 5%;
    bottom: 16%;
    width: 70%;
  }

  .hero__kante { height: 60px; }

  .votum__inhalt,
  .portraet__inhalt { grid-template-columns: 1fr; gap: 0; }

  .votum__text { padding: 30px 10px 10px; }

  .votum__text h2,
  .votum__text p,
  .portraet h1,
  .portraet__amt,
  .fuss h2 { font-size: 1.35rem; line-height: 1.1; }

  .votum__text p { margin-top: 12px; }

  .votum .video { margin: 10px 10px 20px; }

  .portraet__text { padding: 40px 10px 10px; }

  .galerie { padding: 20px 10px; gap: 10px; }
  .galerie__spalte { gap: 10px; }

  .portraet { padding-bottom: 12vw; }
  .oben-schraeg::before { height: 12vw; }

  .stimmen__raster { gap: 10px; padding-inline: 10px; }

  .video--quer::after { border-width: 24px 0 24px 40px; }

  .fuss { padding: 70px 10px 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__name { animation: none; }
  .video img,
  .galerie img,
  .video::after,
  .video::before,
  .lightbox,
  .lightbox__inhalt > * { transition: none; }
}

/* ---------- Kandidaturtext ---------- */

.kandidatur { padding-block: 50px 30px; }

.kandidatur__inhalt { max-width: 800px; padding-inline: 20px; }

.fassung + .fassung {
  margin-top: 50px;
  padding-top: 50px;
  border-top: 4px solid var(--rot);
}

.fassung h1,
.fassung h2 {
  margin-bottom: 20px;
  font-size: 1.68rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--rot);
}

.fassung p { margin: 0 0 1em; }

.fassung__gruss { font-weight: 700; }

@media (max-width: 767px) {
  .kandidatur { padding-top: 30px; }
  .fassung + .fassung { margin-top: 36px; padding-top: 36px; }
  .fassung h1,
  .fassung h2 { font-size: 1.35rem; }
}

.fassung a,
.kandidatur__kontakt a { color: var(--rot); }

.kandidatur__kontakt {
  margin: 50px 0 0;
  padding-top: 30px;
  border-top: 4px solid var(--rot);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.kandidatur :focus-visible { outline-color: var(--rot); }

/* ---------- Links in der Fusszeile ---------- */

.fuss__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 40px 0 0;
  font-size: 1rem;
}

/* ---------- Kopf der Unterseiten ---------- */

.kopf {
  border-top: 4px solid var(--rot);
  padding: 34px 20px 0;
}

.kopf a {
  display: block;
  max-width: 760px;
  margin-inline: auto;
  padding-right: 130px;
  font-size: 1.68rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--schwarz);
}

.kopf a:hover,
.kopf a:focus-visible { color: var(--rot); outline-color: var(--rot); }

@media (max-width: 767px) {
  .kandidatur__kontakt { margin-top: 36px; padding-top: 24px; }
  .kopf { padding-top: 26px; }
  .kopf a { padding-right: 90px; }
  .kopf a { font-size: 1.35rem; }
}

/* ---------- Sprunglinks über dem Kandidaturtext ---------- */

.sprachen {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-bottom: 36px;
  font-size: 1rem;
  font-weight: 700;
}

.sprachen a { color: var(--rot); text-decoration: none; }

.sprachen a:hover,
.sprachen a:focus-visible { text-decoration: underline; }

.fassung { scroll-margin-top: 24px; }

/* ---------- Titel über den Video-Stimmen ---------- */

.stimmen__titel {
  max-width: var(--breite);
  margin-inline: auto;
  padding: 30px 20px 34px;
  font-size: 1.68rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--weiss);
}

@media (max-width: 767px) {
  .sprachen { margin-bottom: 26px; }
  .stimmen__titel { padding: 20px 10px 22px; font-size: 1.35rem; }
}
