/* ================= FONTS ================= */
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ================= BASIS ================= */
:root {
  --schwarz: #000;
  --weiss: #f5f5f5;
  --grau: #888;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--schwarz);
  color: var(--weiss);
  font-family: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  line-height: 1.6;
}

a { color: var(--weiss); text-underline-offset: 0.2em; }

:focus-visible { outline: 2px solid var(--weiss); outline-offset: 3px; }

/* ================= FUSSZEILE ================= */
.fusszeile {
  padding: 3rem clamp(1rem, 4vw, 3rem);
  color: var(--grau);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
}
.fusszeile a { color: var(--grau); }
.fusszeile a:hover { color: var(--weiss); }
.fusszeile nav { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }

/* ================= HERO (Task 3) ================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.hero-media,
.hero-media .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media .slide {
  object-fit: cover;
  filter: grayscale(1); /* erzwingt s/w auch bei späteren Farb-Fotos */
  opacity: 0;
  animation: crossfade 24s linear infinite;
}
.hero-media .slide:nth-of-type(1) { animation-delay: 0s; }
.hero-media .slide:nth-of-type(2) { animation-delay: 8s; }
.hero-media .slide:nth-of-type(3) { animation-delay: 16s; }

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1); /* erzwingt s/w wie beim Slider */
}

/* Hero-Medium-Umschalter: data-hero am .hero-media steuert Video vs. Slider */
.hero-media[data-hero="video"] .slide { display: none; }
.hero-media[data-hero="slider"] .hero-video { display: none; }

/* 24s-Zyklus je Bild: 2s einblenden, 6s stehen, 2s ausblenden */
@keyframes crossfade {
  0%     { opacity: 0; }
  8.33%  { opacity: 1; }
  33.33% { opacity: 1; }
  41.66% { opacity: 0; }
  100%   { opacity: 0; }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero .wortmarke {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  left: clamp(1rem, 4vw, 3rem);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.35em;
}

.hero-nav {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 4vw, 3rem);
}
.hero-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-decoration: none;
  border-bottom: 1px solid var(--weiss);
  padding-bottom: 0.2em;
}

.hero-titel {
  position: absolute;
  left: clamp(1rem, 6vw, 5rem);
  top: 50%;
  transform: translateY(-50%);
}
.hero-titel h1 {
  font-size: clamp(1.6rem, 6.5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.15;
}
.hero-titel .claim {
  margin-top: 1rem;
  font-size: clamp(0.8rem, 1.8vw, 1.1rem);
  letter-spacing: 0.22em;
  color: var(--weiss);
}

/* ================= LEISTUNGEN-ANIMATION (Task 4) ================= */
.leistungen {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  bottom: clamp(1rem, 4vw, 3rem);
  list-style: none;
  text-align: right;
  text-transform: uppercase;
  font-size: clamp(0.75rem, 1.9vw, 1.2rem);
  letter-spacing: 0.2em;
  line-height: 2;
}

.leistungen li {
  /* startet komplett links außerhalb des Viewports, gleitet zur Endposition */
  animation: einlaufen 5.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.leistungen li:nth-child(1) { animation-delay: 0.8s; }
.leistungen li:nth-child(2) { animation-delay: 1.8s; }
.leistungen li:nth-child(3) { animation-delay: 2.8s; }
.leistungen li:nth-child(4) { animation-delay: 3.8s; }
.leistungen li:nth-child(5) { animation-delay: 4.8s; }
.leistungen li:nth-child(6) { animation-delay: 5.8s; }
.leistungen li:nth-child(7) { animation-delay: 6.8s; }

@keyframes einlaufen {
  from { transform: translateX(-100vw); opacity: 0.9; }
  to   { transform: translateX(0);      opacity: 1; }
}

/* ================= KONTAKT (Task 5) ================= */
.kontakt {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) 1.5rem;
}
.kontakt h2 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  margin-bottom: 3rem;
}
.kontakt label {
  display: block;
  margin: 1.5rem 0 0.5rem;
  color: var(--grau);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.kontakt input,
.kontakt textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--grau);
  border-radius: 0;
  color: var(--weiss);
  font: inherit;
  padding: 0.75rem;
}
.kontakt input:focus-visible,
.kontakt textarea:focus-visible {
  border-color: var(--weiss);
  outline: 2px solid var(--weiss);
  outline-offset: 3px;
}
.kontakt .checkbox {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-top: 2rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.85rem;
  color: var(--grau);
}
.kontakt .checkbox input { width: auto; margin-top: 0.3em; }
.kontakt .checkbox a { color: var(--weiss); }
.kontakt button {
  margin-top: 2.5rem;
  background: var(--weiss);
  color: var(--schwarz);
  border: 0;
  padding: 0.9rem 2.5rem;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.25em;
  cursor: pointer;
}
.kontakt button:hover { background: var(--grau); }
.form-status { margin-top: 1.5rem; min-height: 1.6em; color: var(--grau); }
.gotcha { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* ================= RECHTSTEXTE (Task 6) ================= */
.rechtstext {
  max-width: 70ch;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
}
.rechtstext .wortmarke {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  margin-bottom: 4rem;
}
.rechtstext .wortmarke a { text-decoration: none; }
.rechtstext h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}
.rechtstext h2 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  margin: 2.5rem 0 1rem;
}
.rechtstext p, .rechtstext ul { margin-bottom: 1rem; color: #ccc; }
.rechtstext ul { padding-left: 1.5rem; }
.rechtstext .stand { color: var(--grau); font-size: 0.8rem; margin-top: 3rem; }

/* ================= REDUCED MOTION (Task 4) ================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .leistungen li { animation: none; }
  .hero-media .slide { animation: none; }
  .hero-media .slide:first-of-type { opacity: 1; }
  /* Video anhalten unmöglich per CSS — stattdessen ausblenden und erstes Standbild zeigen */
  .hero-video { display: none; }
  .hero-media[data-hero="video"] .slide:first-of-type { display: block; }
}
