/*
  Farben, Maße und Bewegung folgen `.simple-aurora` und den Tokens in
  src/app/globals.css des Studios; ändert sich die Aurora dort, hier nachziehen.

  Kein url() und kein @import: Das Studio schreibt beim Ausliefern nur HTML um,
  CSS nicht, root-relative Adressen hier liefen dort ins Leere.
*/

:root {
  color-scheme: light dark;

  --deepsea: #0088a6;
  --lagoon: #4bd8d9;
  --breeze: #a7dcf2;
  --iceblue: #b7d1f1;
  --lavender: #bbb5da;
  --flamingo: #f4869b;
  --coral: #fc4c4b;

  --grund: #ffffff;
  --text-dark: #17233b;
  --text-mid: #3a4a66;
  --blatt: rgb(255 255 255 / 0.94);
  --blatt-rand: #e6e9ef;
  --blatt-schatten: 0 1px 3px 0 rgb(23 35 59 / 0.06), 0 1px 2px 0 rgb(23 35 59 / 0.04);
  --hover-grund: #f4f6fa;
  --fokus: #0088a6;
  --knopf-grund: #17233b;
  --knopf-text: #ffffff;
  --knopf-hover-grund: #fc4c4b;
  --knopf-hover-text: #17233b;
  --knopf-hover-schatten: 0 12px 24px -12px rgb(252 76 75 / 0.55);
  --blob-oben: 0.85;
  --blob-unten: 0.55;
  --bewegung-schnell: 120ms;
  --kurve-aus: cubic-bezier(0.22, 1, 0.36, 1);

  /* Maßeinheit der Blobs: 1px bei 1440 × 900 wie im Studio, wächst mit dem Fenster. */
  --u: clamp(0.4px, min(calc(100vw / 1440), calc(100vh / 900)), 2.6px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #171d2b;
    --text-dark: #eef1f7;
    --text-mid: #aeb7c7;
    --blatt: rgb(23 29 43 / 0.94);
    --blatt-rand: #2e374a;
    --blatt-schatten: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --hover-grund: #202838;
    --fokus: #4bd8d9;
    --knopf-grund: #e6e9ef;
    --knopf-text: #17233b;
    --knopf-hover-schatten: 0 12px 24px -12px rgb(252 76 75 / 0.45);
    --blob-oben: 0.38;
    --blob-unten: 0.28;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --blatt: var(--grund);
  }
}

@media (prefers-contrast: more) {
  :root {
    --blatt: var(--grund);
    --text-mid: var(--text-dark);
  }
}

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

html {
  background-color: var(--grund);
  color: var(--text-dark);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif;
  font-size: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Seitengrund: zwei weich gezeichnete Kegelverläufe, oben rechts und unten links. */
.aurora {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  pointer-events: none;
}

.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.aurora::before {
  top: calc(-320 * var(--u));
  right: calc(-260 * var(--u));
  width: calc(1150 * var(--u));
  height: calc(1000 * var(--u));
  background: conic-gradient(
    from 200deg at 50% 50%,
    var(--lagoon),
    var(--breeze),
    var(--iceblue),
    var(--lavender),
    var(--flamingo),
    var(--coral),
    var(--deepsea),
    var(--lagoon)
  );
  filter: blur(max(56px, calc(90 * var(--u))));
  opacity: var(--blob-oben);
}

.aurora::after {
  bottom: calc(-220 * var(--u));
  left: calc(-223 * var(--u));
  width: calc(900 * var(--u));
  height: calc(800 * var(--u));
  background: conic-gradient(
    from 40deg at 50% 50%,
    var(--flamingo),
    var(--coral),
    var(--lavender),
    var(--iceblue),
    var(--lagoon),
    var(--deepsea),
    var(--flamingo)
  );
  filter: blur(max(68px, calc(110 * var(--u))));
  opacity: var(--blob-unten);
}

/*
  Standard ist das Atmen der Flecken wie im Studio. `aurora--drift` dreht die
  Farben einmal ganz herum; dabei wandert Coral hinter das Logo.
*/
@media (prefers-reduced-motion: no-preference) {
  .aurora::before,
  .aurora::after {
    will-change: transform;
  }

  .aurora::before {
    animation: ort-aurora-wobble 26s ease-in-out infinite;
  }

  .aurora::after {
    animation: ort-aurora-wobble 30s ease-in-out infinite;
  }

  .aurora--drift::before,
  .aurora--drift::after {
    animation-name: ort-aurora-drift;
    animation-timing-function: linear;
  }

  .aurora--drift::before {
    animation-duration: 36s;
  }

  .aurora--drift::after {
    animation-duration: 48s;
    animation-direction: reverse;
  }
}

@keyframes ort-aurora-wobble {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    border-radius: 52% 48% 44% 56% / 50% 54% 46% 50%;
  }
  25% {
    transform: translate3d(-2.5%, 2.5%, 0) rotate(6deg) scale(1.06);
    border-radius: 44% 56% 58% 42% / 56% 44% 56% 44%;
  }
  50% {
    transform: translate3d(1.5%, 4%, 0) rotate(-3deg) scale(1.02);
    border-radius: 58% 42% 46% 54% / 42% 58% 42% 58%;
  }
  75% {
    transform: translate3d(3%, -2%, 0) rotate(4deg) scale(1.05);
    border-radius: 48% 52% 55% 45% / 53% 47% 53% 47%;
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    border-radius: 52% 48% 44% 56% / 50% 54% 46% 50%;
  }
}

@keyframes ort-aurora-drift {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate3d(-7%, 5%, 0) rotate(90deg) scale(1.08);
  }
  50% {
    transform: translate3d(3%, 8%, 0) rotate(180deg) scale(1.03);
  }
  75% {
    transform: translate3d(8%, -4%, 0) rotate(270deg) scale(1.07);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(360deg) scale(1);
  }
}

.buehne {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 40px 24px 24px;
}

.marke {
  margin: 0;
  line-height: 0;
}

.logo {
  display: block;
  width: clamp(160px, min(25vw, 40vh), 480px);
  max-width: 100%;
  height: auto;
}

.fehlt .logo {
  width: clamp(120px, min(18vw, 28vh), 200px);
}

/* Blatt: Text steht nie direkt auf dem Verlauf. */
.blatt {
  border: 1px solid var(--blatt-rand);
  background-color: var(--blatt);
  box-shadow: var(--blatt-schatten);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hinweis {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 100%;
  padding: 28px 32px;
  border-radius: 28px;
  text-align: center;
}

.hinweis h1 {
  margin: 0;
  color: var(--text-dark);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
}

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  background-color: var(--knopf-grund);
  color: var(--knopf-text);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    color var(--bewegung-schnell) var(--kurve-aus),
    background-color var(--bewegung-schnell) var(--kurve-aus),
    box-shadow var(--bewegung-schnell) var(--kurve-aus),
    transform var(--bewegung-schnell) var(--kurve-aus);
}

.knopf:hover {
  background-color: var(--knopf-hover-grund);
  color: var(--knopf-hover-text);
  box-shadow: var(--knopf-hover-schatten);
}

.knopf:active {
  transform: scale(0.98);
}

.fuss {
  display: flex;
  justify-content: center;
  padding: 0 16px 20px;
  padding-bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
}

.rechtliches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
}

.rechtliches a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--text-mid);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition:
    color var(--bewegung-schnell) var(--kurve-aus),
    background-color var(--bewegung-schnell) var(--kurve-aus);
}

.rechtliches a:hover {
  background-color: var(--hover-grund);
  color: var(--text-dark);
}

@media (pointer: coarse) {
  .rechtliches a {
    min-height: 44px;
  }
}

@media (max-width: 400px) {
  .hinweis {
    padding: 24px 20px;
  }

  .hinweis h1 {
    font-size: 1.25rem;
  }
}

@media (max-height: 480px) {
  .buehne {
    gap: 20px;
    padding-top: 24px;
    padding-bottom: 16px;
  }
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .blatt {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (forced-colors: active) {
  .aurora {
    display: none;
  }
}

@media print {
  .aurora {
    display: none;
  }

  .blatt {
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
