/* Cast and Count – Gestaltung der Website
   Farben aus dem App-Icon. Schriften kommen vom Gerät: keine Schriftdateien, keine fremden Server. */

:root {
  color-scheme: light dark;

  /* Markenfarben */
  --beige: #EEE6D9;
  --wollweiss: #F8F1E6;
  --senf: #F5C44B;
  --orange: #F47C30;
  --tiefgruen: #1C4000;
  --oliv: #949760;
  --oliv-faden: #7C7F49;

  /* Rollen im hellen Modus */
  --grund: var(--beige);
  --band: var(--wollweiss);
  --text: #2B3A1F;
  --text-leise: #4E5B3C;
  --titel: var(--tiefgruen);
  --linie: rgb(28 64 0 / 0.2);
  --feld: var(--senf);
  --feld-titel: var(--tiefgruen);
  --feld-text: var(--tiefgruen);
  --fuss: var(--tiefgruen);
  --fuss-text: var(--beige);
  --nadel: var(--tiefgruen);
  --knopf: var(--orange);
  --knaeuel: var(--oliv);
  --faden: var(--oliv-faden);
  --markierer: var(--orange);
  --fokus: var(--tiefgruen);

  --schrift-anzeige: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --breite: 72rem;
  --rand: clamp(1.25rem, 4vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #15220D;
    --band: #1B2B11;
    --text: #E2D9CA;
    --text-leise: #B8B09F;
    --titel: var(--beige);
    --linie: rgb(238 230 217 / 0.18);
    --feld: var(--tiefgruen);
    --feld-titel: var(--senf);
    --feld-text: var(--beige);
    --nadel: var(--beige);
    --fokus: var(--senf);
  }
}

/* Grundlagen */

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

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--schrift-text);
  -webkit-hyphens: auto;
  hyphens: auto;
}

@media (min-width: 48em) {
  body {
    font-size: 1.125rem;
  }
}

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

img {
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--schrift-anzeige);
  color: var(--titel);
  line-height: 1.12;
  -webkit-hyphens: manual;
  hyphens: manual;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1875rem;
  font-weight: 750;
}

p,
ul,
ol,
dl,
address {
  margin: 0;
}

p + p {
  margin-top: 0.9em;
}

address {
  font-style: normal;
}

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

a:hover {
  text-decoration-color: var(--markierer);
}

:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 3px;
  border-radius: 3px;
}

.springen {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--titel);
  color: var(--grund);
  font-weight: 700;
  text-decoration: none;
}

.springen:focus {
  top: 1rem;
}

/* Kopf */

.kopf {
  border-bottom: 1px solid var(--linie);
}

.kopf__innen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: var(--breite);
  margin-inline: auto;
  padding: 0.85rem var(--rand);
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--titel);
  text-decoration: none;
}

.marke__name {
  font: 800 1.25rem/1 var(--schrift-anzeige);
  letter-spacing: -0.01em;
}

.navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.navigation a {
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.navigation a:hover,
.navigation a[aria-current="page"] {
  border-bottom-color: var(--markierer);
}

/* Zeichen oben links: Wollknäuel mit zwei Nadeln, die sich wie beim Stricken bewegen */

.logo {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  overflow: visible;
}

.logo__schaft {
  stroke: var(--nadel);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.logo__knopf {
  fill: var(--knopf);
}

.logo__knaeuel {
  fill: var(--knaeuel);
}

.logo__faeden,
.logo__ende {
  fill: none;
  stroke: var(--faden);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.logo__nadel {
  transform-box: view-box;
  transform-origin: 24px 17px;
}

@media (prefers-reduced-motion: no-preference) {
  .logo__nadel--a {
    animation: nadel-a 1.7s ease-in-out infinite alternate;
  }

  .logo__nadel--b {
    animation: nadel-b 1.7s ease-in-out -0.45s infinite alternate;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@keyframes nadel-a {
  from {
    transform: rotate(-6deg);
  }

  to {
    transform: rotate(5deg);
  }
}

@keyframes nadel-b {
  from {
    transform: rotate(6deg);
  }

  to {
    transform: rotate(-5deg);
  }
}

/* Startseite: Kopfbereich */

.held {
  background: var(--feld);
  color: var(--feld-text);
}

.held__innen {
  display: grid;
  align-items: center;
  gap: 2.5rem;
  max-width: var(--breite);
  margin-inline: auto;
  padding: clamp(2.75rem, 7vw, 5.5rem) var(--rand);
}

.held__text {
  container-type: inline-size;
}

/* Schriftgröße folgt der Breite der Textspalte, damit „Der Reihenzähler“ in einer Zeile bleibt */
.held h1 {
  max-width: 18ch;
  color: var(--feld-titel);
  font-size: clamp(2.125rem, 1rem + 3.4vw, 3.75rem);
  font-size: clamp(2.125rem, 10cqi, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.held__lead {
  max-width: 34em;
  margin-top: 1.4rem;
  font-size: 1.125rem;
}

.held__hinweis {
  margin-top: 1.5rem;
  font: 750 1.0625rem/1.4 var(--schrift-anzeige);
}

.held__bild img {
  width: min(80%, 22rem);
}

.held :focus-visible {
  outline-color: var(--feld-titel);
}

@media (min-width: 48em) {
  .held__lead {
    font-size: 1.25rem;
  }
}

@media (min-width: 56em) {
  .held__innen {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 3.5rem;
  }

  .held__bild img {
    width: min(100%, 26.5rem);
    margin-inline: auto;
  }
}

/* Abschnitte */

.abschnitt {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.abschnitt--band {
  background: var(--band);
}

.innen {
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: var(--rand);
}

.abschnitt h2 {
  margin-bottom: 1.5rem;
}

.schmal > * {
  max-width: 40rem;
}

/* Ablauf in drei Schritten; die Ziffern sitzen in einem Maschenmarkierer */

.ablauf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem 3rem;
  padding: 0;
  list-style: none;
  counter-reset: schritt;
}

.ablauf li {
  counter-increment: schritt;
}

.ablauf li::before {
  content: counter(schritt);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border: 0.2rem solid var(--markierer);
  border-radius: 50%;
  color: var(--titel);
  font: 800 1.25rem/1 var(--schrift-anzeige);
}

.ablauf h3 {
  margin-bottom: 0.4rem;
}

/* Funktionen */

.funktionen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2.5rem 3.5rem;
}

.gruppe {
  padding-top: 1.1rem;
  border-top: 2px solid var(--linie);
}

.gruppe h3 {
  margin-bottom: 0.6rem;
}

.liste {
  padding: 0;
  list-style: none;
}

.liste li {
  position: relative;
  padding-left: 1.55em;
}

.liste li + li {
  margin-top: 0.5em;
}

.liste li::before {
  content: "";
  position: absolute;
  top: 0.5em;
  left: 0.1em;
  width: 0.62em;
  height: 0.62em;
  border: 0.15em solid var(--markierer);
  border-radius: 50%;
}

.zwei-spalten {
  display: grid;
  gap: 2.5rem 4rem;
}

@media (min-width: 48em) {
  .zwei-spalten {
    grid-template-columns: 1fr 1fr;
  }
}

/* Rechtstexte und Hilfe */

.rechtstext {
  max-width: 46rem;
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--rand) clamp(3rem, 7vw, 5.5rem);
}

.rechtstext h1 {
  font-size: clamp(2rem, 1.35rem + 2.6vw, 3rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.rechtstext h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
}

.rechtstext h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.35rem;
  font-size: 1.125rem;
}

.rechtstext .einleitung {
  margin-top: 1.25rem;
  font-size: 1.125em;
}

.rechtstext ul {
  padding-left: 1.2em;
}

.rechtstext li + li {
  margin-top: 0.4em;
}

.rechtstext address + p,
.rechtstext p + address,
.rechtstext dl + p {
  margin-top: 0.9em;
}

.angaben dt {
  margin-top: 1.1rem;
  color: var(--titel);
  font-weight: 700;
}

.angaben dt:first-child {
  margin-top: 0;
}

.angaben dd {
  margin: 0.2rem 0 0;
}

.stand {
  margin-top: 2.5rem;
  color: var(--text-leise);
  font-size: 0.9375rem;
}

/* Fuß */

.fuss {
  background: var(--fuss);
  color: var(--fuss-text);
}

.fuss__innen {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  max-width: var(--breite);
  margin-inline: auto;
  padding: 2.5rem var(--rand) 3rem;
}

.fuss__marke {
  font: 750 1rem/1.4 var(--schrift-anzeige);
}

.fuss__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.fuss a {
  color: inherit;
}

.fuss a[aria-current="page"] {
  text-decoration-color: var(--senf);
  text-decoration-thickness: 0.14em;
}

.fuss :focus-visible {
  outline-color: var(--senf);
}

@media print {
  .kopf,
  .fuss,
  .springen {
    display: none;
  }

  body,
  .held {
    background: none;
    color: #000;
  }
}
