/*
 * Bald-Seite: Stile für Startseite, Impressum, Datenschutz und das Bild zum Teilen.
 * Farben und Maße kommen aus grund.css (eine Kopie von website/styles/grund.css, beim Bauen mitgeschrieben).
 *
 * Gestaltung wie auf der Website: Nachtfahrt mit Chrom und türkisem Ambientelicht. Türkis ist Licht und zeigt
 * hier nur zwei Dinge: die Drehzahl unter dem Countdown (der nächste Schritt ist der Start) und den Weg,
 * uns zu schreiben. Die Felder der Drehzahl haben die Schräge der Logo-Buchstaben.
 */

@font-face {
  font-family: "Anybody";
  font-style: italic;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url("schriften/anybody-kursiv.woff2") format("woff2");
}

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("schriften/archivo.woff2") format("woff2");
}

:root {
  /* Auf der Website setzt next/font diese beiden Namen, hier die eigenen Dateien oben */
  --schrift-anzeige: "Anybody";
  --schrift-text: "Archivo";
}

::selection {
  background: var(--tuerkis);
  color: var(--nacht);
}

a {
  color: inherit;
}

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

/* ------------------------------------------------------------------ */
/* Rahmen aller Seiten                                                 */
/* ------------------------------------------------------------------ */

.seite-start,
.seite-recht {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.kopf {
  position: relative;
  z-index: 2;
  padding: var(--a4) var(--a4) 0;
}

.kopf .logo {
  display: block;
  width: auto;
  height: 40px;
}

.heim {
  display: inline-block;
}

.fuss {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--a2) var(--a5);
  padding: var(--a5) var(--a4);
  border-top: 1px solid var(--linie);
  color: var(--grau);
  font-size: 0.875rem;
}

.fuss nav {
  display: flex;
  gap: var(--a5);
}

.fuss a {
  color: var(--chrom);
  text-decoration: none;
}

.fuss a:hover {
  color: var(--weiss);
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Startseite                                                          */
/* ------------------------------------------------------------------ */

.buehne {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.foto {
  position: relative;
  margin: 0;
}

.foto picture,
.foto img {
  display: block;
  width: 100%;
}

.foto img {
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: 62% 50%;
  background-color: var(--nacht-2);
  /* Die Bildbeschreibung soll nicht aufblitzen, bevor das Foto da ist */
  color: transparent;
}

/* Das Foto läuft nach unten in die Nacht aus, die Überschrift beginnt darin */
.foto picture {
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 62%, transparent 100%);
}

/* Schild „Mit KI erstellt“, wie auf der Website (app/_teile/Bild.module.css) */
.ki {
  position: absolute;
  right: var(--a3);
  top: var(--a3);
  z-index: 1;
  padding: 3px var(--a2);
  border-radius: var(--rund);
  background: color-mix(in srgb, var(--nacht) 78%, transparent);
  color: var(--weiss);
  font-family: var(--schrift-fliess);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: nowrap;
  pointer-events: none;
}

.text {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * var(--a7));
  padding: 0 var(--a4) var(--a7);
}

.titel {
  font-family: var(--schrift-kopf);
  font-style: italic;
  font-weight: 900;
  font-stretch: 128%;
  font-variation-settings: "wdth" 128;
  text-transform: uppercase;
  /* Höchstens so groß, dass „BALD FÜR“ am breiten Bildschirm vor dem Logo im Foto endet */
  font-size: clamp(2.2rem, 1.2rem + 6.4vw, 5.25rem);
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: normal;
  color: var(--weiss);
  text-shadow: 0 0.04em 0.4em rgba(0, 0, 0, 0.55);
}

.unterzeile {
  margin-top: var(--a4);
  max-width: 42ch;
  color: var(--chrom);
  font-size: clamp(1.0625rem, 0.95rem + 0.6vw, 1.375rem);
  line-height: 1.4;
}

.start {
  margin-top: var(--a6);
}

.noch {
  margin-bottom: var(--a2);
  color: var(--grau);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ziffern {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  column-gap: clamp(14px, 3.4vw, 44px);
}

.teil {
  display: flex;
  flex-direction: column;
}

.teil b {
  font-family: var(--schrift-kopf);
  font-style: italic;
  font-weight: 800;
  font-stretch: 118%;
  font-variation-settings: "wdth" 118;
  font-size: clamp(2.4rem, 1.4rem + 5vw, 5.25rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--weiss);
}

.teil span {
  margin-top: var(--a2);
  color: var(--grau);
  font-size: clamp(0.5625rem, 0.45rem + 0.6vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.los {
  font-family: var(--schrift-kopf);
  font-style: italic;
  font-weight: 900;
  font-stretch: 128%;
  font-variation-settings: "wdth" 128;
  text-transform: uppercase;
  font-size: clamp(2rem, 1rem + 4vw, 4rem);
  line-height: 1;
  color: var(--weiss);
}

/* Drehzahl: 60 schräge Felder, eins je Sekunde der laufenden Minute */
.drehzahl {
  display: flex;
  gap: 3px;
  width: 100%;
  max-width: 600px;
  height: 12px;
  margin-top: var(--a4);
  padding-inline: 2px;
}

.drehzahl i {
  flex: 1;
  min-width: 0;
  border-radius: 1px;
  background: var(--linie);
  transform: skewX(var(--neigung));
  transition:
    background-color var(--kurz) linear,
    box-shadow var(--kurz) linear;
}

.drehzahl i.an {
  background: var(--tuerkis);
  box-shadow: 0 0 8px var(--tuerkis-schein);
}

/* Volle Drehzahl: einmal kurz hell wie ein Schaltblitz */
.drehzahl.blitz i {
  background: var(--tuerkis-hell);
  box-shadow: 0 0 14px var(--tuerkis);
}

/* Ohne Starttermin: Leerlauf, die ersten Felder leuchten ruhig auf und ab */
.drehzahl--leerlauf i:nth-child(-n + 9) {
  background: var(--tuerkis);
  box-shadow: 0 0 8px var(--tuerkis-schein);
  animation: leerlauf 2.4s ease-in-out infinite;
}

@keyframes leerlauf {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
}

.termin {
  margin-top: var(--a4);
  color: var(--chrom);
}

.termin strong {
  color: var(--weiss);
  font-weight: 600;
}

.kontakte {
  margin-top: var(--a6);
  display: grid;
  gap: var(--a2);
  color: var(--grau);
}

.kontakte a {
  color: var(--weiss);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--tuerkis);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.kontakte a:hover {
  color: var(--tuerkis-hell);
}

@media (min-width: 960px) {
  .kopf {
    padding: var(--a5) clamp(var(--a7), 5vw, var(--a8)) 0;
  }

  .kopf .logo {
    height: 52px;
  }

  .buehne {
    justify-content: center;
  }

  /* Das Foto steht rechts über die ganze Höhe und läuft nach links und unten in die Nacht aus */
  .foto {
    position: absolute;
    inset: 0 0 0 auto;
    width: 64%;
  }

  .foto picture,
  .foto img {
    height: 100%;
  }

  .foto img {
    aspect-ratio: auto;
  }

  .foto picture {
    -webkit-mask-image:
      linear-gradient(90deg, transparent 0, #000 34%, #000 100%),
      linear-gradient(180deg, #000 0, #000 80%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(90deg, transparent 0, #000 34%, #000 100%),
      linear-gradient(180deg, #000 0, #000 80%, transparent 100%);
    mask-composite: intersect;
  }

  .ki {
    top: auto;
    right: var(--a5);
    bottom: var(--a7);
  }

  .text {
    width: min(62%, 860px);
    margin-top: 0;
    padding: var(--a7) 0 var(--a8) clamp(var(--a7), 5vw, var(--a8));
  }

  /* Überschrift und Countdown wachsen mit der Breite: So enden sie auch an kleineren Laptops vor dem Logo
     und dem Auto im Foto, das ja mit der Breite mitwächst. Die Überschrift steht immer in drei Zeilen,
     sonst passte bei kleinerer Schrift mehr in eine Zeile und sie liefe doch ins Logo. */
  .titel {
    max-width: 8em;
    font-size: min(5.25rem, 5.4vw);
  }

  .drehzahl {
    max-width: min(600px, 32vw);
  }

  .teil b {
    font-size: min(4.5rem, 4.4vw);
  }

  .ziffern {
    column-gap: min(28px, 2vw);
  }

  .fuss {
    padding-inline: clamp(var(--a7), 5vw, var(--a8));
  }
}

@media (prefers-reduced-motion: reduce) {
  .drehzahl i {
    transition: none;
  }

  .drehzahl--leerlauf i:nth-child(-n + 9) {
    animation: none;
    opacity: 1;
  }
}

/* ------------------------------------------------------------------ */
/* Impressum und Datenschutz                                           */
/* ------------------------------------------------------------------ */

.recht {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: var(--a6) var(--a4) var(--a8);
}

.recht h1 {
  font-family: var(--schrift-kopf);
  font-style: italic;
  font-weight: 800;
  font-stretch: 128%;
  font-variation-settings: "wdth" 128;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 1.1rem + 3.4vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.015em;
  /* Lange Wörter trennen nur an der weichen Trennstelle im Titel („Datenschutz­erklärung“) */
  overflow-wrap: normal;
  hyphens: manual;
}

.recht .vorspann {
  margin-top: var(--a4);
  color: var(--chrom);
}

.recht h2 {
  margin: var(--a6) 0 var(--a3);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
}

.recht h3 {
  margin: var(--a5) 0 var(--a2);
  font-size: 1.0625rem;
  font-weight: 700;
}

.recht p,
.recht ul,
.recht dl,
.recht address {
  margin-top: var(--a3);
}

.recht h2 + p,
.recht h2 + address,
.recht h2 + dl,
.recht h3 + p {
  margin-top: 0;
}

.recht ul {
  padding-left: 1.25em;
  list-style: disc;
}

.recht li + li {
  margin-top: var(--a1);
}

.recht address {
  font-style: normal;
}

.recht dl {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: var(--a1) var(--a4);
}

.recht dt {
  color: var(--grau);
}

.recht a {
  color: var(--weiss);
  text-decoration-color: var(--tuerkis);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.recht .stand {
  margin-top: var(--a7);
  color: var(--grau);
  font-size: 0.875rem;
}

.recht .zurueck {
  margin-top: var(--a5);
}

@media (min-width: 960px) {
  .recht {
    padding-top: var(--a7);
  }
}

/* ------------------------------------------------------------------ */
/* Bild zum Teilen (1200 × 630 px, nur für den Bildschirmabzug)        */
/* ------------------------------------------------------------------ */

.seite-teilen {
  width: 1200px;
  height: 630px;
  min-height: 0;
  overflow: hidden;
}

.leinwand {
  position: relative;
  width: 1200px;
  height: 630px;
  overflow: hidden;
  background: var(--nacht);
}

.leinwand .foto {
  position: absolute;
  inset: 0 0 0 auto;
  width: 820px;
}

.leinwand .foto picture,
.leinwand .foto img {
  height: 100%;
}

.leinwand .foto img {
  aspect-ratio: auto;
  object-position: 58% 50%;
}

.leinwand .foto picture {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 40%, #000 100%);
}

/* Groß genug, dass es auch in einer kleinen Link-Vorschau lesbar bleibt */
.leinwand .ki {
  top: auto;
  right: 28px;
  bottom: 26px;
  padding: 5px 12px;
  font-size: 22px;
}

.leinwand .text {
  position: absolute;
  inset: 52px auto 52px 64px;
  width: 700px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.leinwand .logo {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: 76px;
}

.leinwand .titel {
  font-size: 82px;
}

.leinwand .unterzeile {
  margin-top: 18px;
  max-width: none;
  font-size: 26px;
}

.leinwand .drehzahl {
  max-width: 470px;
  margin-top: 26px;
}

.leinwand .adresse {
  margin-top: 18px;
  color: var(--weiss);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
