/* ==========================================================================
   Alici GmbH – Stylesheet
   Aufbau: Schrift · Grundwerte · Startseite · Unterseiten · Formular · Fußzeile
   ========================================================================== */

/* Inter Tight (SIL Open Font License, siehe assets/fonts/OFL.txt) –
   lokal eingebunden, damit keine Verbindung zu Google entsteht. */
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --grund: #000;
  --pille: #161616;
  --pille-hover: #1e1e1e;
  --weiss: #fff;
  --weiss-90: rgba(255, 255, 255, 0.9);
  --weiss-80: rgba(255, 255, 255, 0.8);
  --weiss-70: rgba(255, 255, 255, 0.7);
  --weiss-50: rgba(255, 255, 255, 0.5);
  --weiss-40: rgba(255, 255, 255, 0.4);
  --weiss-30: rgba(255, 255, 255, 0.3);
  --weiss-12: rgba(255, 255, 255, 0.12);
  --weiss-10: rgba(255, 255, 255, 0.1);
  --weiss-06: rgba(255, 255, 255, 0.06);
  --fehler: #ff8a80;
  --schatten-pille: 0 16px 32px 8px rgba(0, 0, 0, 0.35);
  --spalte: 36rem; /* 576px */
  --spalte-breit: 56rem; /* 896px */
  --schrift: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

html {
  background: var(--grund);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  /* Kein eigener Hintergrund: der Grund liegt auf <html>, sonst verdeckt
     body den bewegten Hintergrund (z-index < 0) der Startseite. */
  color: var(--weiss);
  font-family: var(--schrift);
  font-weight: 500;
  line-height: 1.5;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

img,
svg,
canvas {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(255, 255, 255, 0.85);
  color: #000;
}

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

.nur-screenreader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sprunglink {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--weiss);
  color: #000;
  font-size: 15px;
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.sprunglink:focus-visible {
  transform: none;
  outline: none;
}

/* --------------------------------------------------------------------------
   Pille (Knopf) – Formsprache der Vorlage: dunkle, runde Fläche mit Schatten
   -------------------------------------------------------------------------- */
.pille {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 12px 26px;
  border: 1px solid var(--weiss-06);
  border-radius: 32px;
  background: var(--pille);
  box-shadow: var(--schatten-pille);
  color: var(--weiss-80);
  font: inherit;
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.pille:hover {
  background: var(--pille-hover);
  border-color: var(--weiss-10);
  color: var(--weiss);
}

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

.pille:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--weiss), var(--schatten-pille);
}

.pille__pfeil {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 0.25s ease;
}

.pille:hover .pille__pfeil {
  transform: translateX(3px);
}

.pille[disabled] {
  cursor: progress;
  opacity: 0.6;
}

@media (min-width: 640px) {
  .pille {
    font-size: 20px;
  }
}

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

/* Bewegter Hintergrund: ein 32×32-Pixel-Canvas, vom Browser weich auf die
   ganze Fläche hochskaliert. Ohne JavaScript bleibt der Grund schwarz. */
.hintergrund {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  transform: scale(1.05);
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hintergrund.ist-bereit {
  opacity: 1;
}

/* Feines Korn gegen Farbstufen im dunklen Verlauf */
.koernung {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)'/%3E%3C/svg%3E");
}

@media (min-width: 1024px) {
  .hintergrund {
    transform: none;
  }
}

.start {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.start__kopf {
  display: flex;
  justify-content: center;
  padding: clamp(32px, 7vh, 72px) 24px 0;
}

.start__logo {
  width: clamp(168px, 44vw, 208px);
  height: auto;
}

@media (min-width: 768px) {
  .start__logo {
    width: clamp(208px, 24vw, 260px);
  }
}

.start__buehne {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--spalte);
  margin: 0 auto;
  padding: clamp(32px, 5vh, 56px) 24px;
}

.start__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  font-size: 18px;
  line-height: 1.18;
  text-wrap: pretty; /* keine einzelnen Wörter in der letzten Zeile */
}

.start__text p {
  color: var(--weiss-50);
}

.start__text .hervorgehoben {
  color: var(--weiss-80);
}

.start__aktion {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: clamp(36px, 6vh, 64px);
}

@media (max-width: 350px) {
  .start__text {
    font-size: 16px;
  }
}

@media (min-width: 768px) {
  .start__text {
    font-size: 24px;
    line-height: 1.12;
  }
}

@media (min-width: 1024px) {
  .start__buehne {
    max-width: var(--spalte-breit);
    padding-left: 0;
    padding-right: 0;
  }

  .start__text {
    font-size: 30px;
    line-height: 36px;
  }
}

/* Laptops mit wenig Höhe: etwas kleinere Schrift, damit alles auf einen Blick passt */
@media (min-width: 1024px) and (max-height: 820px) {
  .start__text {
    font-size: 26px;
    line-height: 31px;
  }

  .start__logo {
    width: 220px;
  }
}

@media (min-width: 1280px) {
  .start__text {
    gap: 32px;
  }
}

/* Einblenden wie in der Vorlage: leicht von unten, 0,38 s.
   Rein per CSS – ohne JavaScript ist der Inhalt trotzdem sichtbar. */
@keyframes einblenden {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes aufblenden {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.einblenden {
  animation: einblenden 0.38s ease-out both;
}

.einblenden--1 {
  animation-delay: 0.1s;
}

.einblenden--2 {
  animation-delay: 0.2s;
}

.einblenden--3 {
  animation-delay: 0.3s;
}

.einblenden--4 {
  animation-delay: 0.45s;
}

.aufblenden {
  animation: aufblenden 1s ease 0.5s both;
}

/* --------------------------------------------------------------------------
   Unterseiten (Kontakt, Impressum, Datenschutz)
   -------------------------------------------------------------------------- */
.unterseite {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.navigation {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.navigation .pille {
  pointer-events: auto;
  animation: pille-erscheint 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s both;
}

@keyframes pille-erscheint {
  from {
    opacity: 0;
    transform: scale(0.75);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Dezenter Verlauf hinter der Pille, damit Text beim Scrollen darunter verschwindet */
.unterseite::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9;
  height: 116px;
  background: linear-gradient(to bottom, #000 45%, rgba(0, 0, 0, 0));
  pointer-events: none;
}

@media (min-width: 1024px) {
  .navigation {
    top: 80px;
  }

  .unterseite::before {
    height: 172px;
  }
}

.inhalt {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: var(--spalte);
  margin: 0 auto;
  padding: 144px 24px 96px;
  text-align: left;
}

@media (min-width: 1024px) {
  .inhalt {
    max-width: var(--spalte-breit);
    padding: 208px 0 128px;
  }
}

.inhalt h1 {
  color: var(--weiss);
  font-size: 36px;
  font-weight: 500;
  line-height: 40px;
  letter-spacing: -0.01em;
}

.inhalt h2 {
  margin-top: 16px;
  color: var(--weiss-80);
  font-size: 28px;
  font-weight: 500;
  line-height: 36px;
}

.inhalt h3 {
  margin-top: 8px;
  color: var(--weiss-80);
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
}

.inhalt p,
.inhalt li {
  color: var(--weiss-50);
  font-size: 18px;
  line-height: 28px;
}

.inhalt ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 1.2em;
}

.inhalt li::marker {
  color: var(--weiss-30);
}

.inhalt strong {
  color: var(--weiss-70);
  font-weight: 500;
}

.inhalt a:not(.pille) {
  color: var(--weiss-70);
  text-decoration: underline;
  text-decoration-color: var(--weiss-30);
  text-underline-offset: 3px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
  overflow-wrap: anywhere;
}

.inhalt a:not(.pille):hover {
  color: var(--weiss);
  text-decoration-color: var(--weiss-70);
}

@media (min-width: 1024px) {
  .inhalt p,
  .inhalt li {
    font-size: 20px;
  }
}

.inhalt .stand {
  margin-top: -12px;
  color: var(--weiss-40);
  font-size: 16px;
}

/* Rechtstexte: Abschnittsüberschriften kleiner, mehr Luft davor */
.inhalt--recht h2 {
  margin-top: 32px;
  font-size: 22px;
  line-height: 30px;
}

.inhalt--recht .kasten {
  margin-top: 24px;
}

.inhalt--recht .kasten h2 {
  margin-top: 0;
}

/* Hervorgehobener Kasten (Widerspruchsrecht) */
.kasten {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--weiss-10);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

/* Inhaltsverzeichnis der Datenschutzerklärung */
.verzeichnis {
  display: block;
  column-gap: 32px;
  padding: 0;
  list-style: none;
  counter-reset: abschnitt;
}

.inhalt .verzeichnis {
  padding-left: 0;
}

.verzeichnis li {
  counter-increment: abschnitt;
  break-inside: avoid;
  padding: 2px 0;
}

.verzeichnis li::before {
  content: counter(abschnitt) ".";
  display: inline-block;
  min-width: 2em;
  color: var(--weiss-30);
}

.inhalt .verzeichnis a:not(.pille) {
  text-decoration: none;
  color: var(--weiss-50);
}

.inhalt .verzeichnis a:not(.pille):hover {
  color: var(--weiss);
}

@media (min-width: 768px) {
  .verzeichnis {
    columns: 2;
  }
}

/* Abschnitte mit Sprungmarke: Platz für die feste Pille oben lassen */
[id] {
  scroll-margin-top: 120px;
}

@media (min-width: 1024px) {
  [id] {
    scroll-margin-top: 160px;
  }
}

/* --------------------------------------------------------------------------
   Kontaktformular
   -------------------------------------------------------------------------- */
.formular {
  display: grid;
  gap: 20px;
  margin-top: 16px;
}

.formular__reihe {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .formular__reihe {
    grid-template-columns: 1fr 1fr;
  }
}

.feld {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feld label {
  color: var(--weiss-50);
  font-size: 15px;
  line-height: 20px;
}

.feld .optional {
  color: var(--weiss-30);
}

.feld input,
.feld textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--weiss-10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--weiss-90);
  font: inherit;
  font-size: 17px;
  line-height: 24px;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  appearance: none;
  -webkit-appearance: none;
}

.feld textarea {
  min-height: 180px;
  resize: vertical;
}

.feld input::placeholder,
.feld textarea::placeholder {
  color: var(--weiss-30);
}

.feld input:hover,
.feld textarea:hover {
  border-color: var(--weiss-12);
  background: rgba(255, 255, 255, 0.055);
}

.feld input:focus,
.feld textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.07);
}

.feld input:-webkit-autofill,
.feld input:-webkit-autofill:hover,
.feld input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--weiss-90);
  box-shadow: 0 0 0 1000px #0d0d0d inset;
  caret-color: var(--weiss);
}

.feld.hat-fehler input,
.feld.hat-fehler textarea {
  border-color: rgba(255, 138, 128, 0.7);
}

.inhalt .feld__fehler {
  color: var(--fehler);
  font-size: 14px;
  line-height: 20px;
}

.inhalt .feld__fehler:empty {
  display: none;
}

/* Honigtopf gegen Spam-Bots – für Menschen unsichtbar */
.honigtopf {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.inhalt .formular__hinweis {
  color: var(--weiss-40);
  font-size: 15px;
  line-height: 22px;
}

.formular__absenden {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 4px;
}

.inhalt .formular__status {
  font-size: 16px;
  line-height: 24px;
}

.inhalt .formular__status:empty {
  display: none;
}

.inhalt .formular__status.ist-fehler {
  color: var(--fehler);
}

.kontaktwege {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--weiss-10);
}

/* --------------------------------------------------------------------------
   Fußzeile
   -------------------------------------------------------------------------- */
.fuss {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  max-width: var(--spalte-breit);
  margin: 0 auto;
  padding: 8px 24px 20px;
  line-height: 32px;
}

@media (min-width: 1024px) {
  .fuss {
    flex-direction: row;
    padding: 24px 0;
  }
}

.fuss__copy {
  color: var(--weiss-30);
  font-size: 14px;
}

.fuss__links {
  position: relative;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fuss__links a {
  position: relative;
  z-index: 1;
  display: block;
  padding: 4px 12px;
  border-radius: 10px;
  color: var(--weiss-40);
  font-size: 14px;
  line-height: 32px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.fuss__links a:hover,
.fuss__links a:focus-visible,
.fuss__links a[aria-current="page"] {
  color: var(--weiss-80);
}

.fuss__links a:focus-visible {
  outline-offset: 0;
}

/* Ohne JavaScript: einfache Hover-Fläche. Mit JavaScript gleitet eine
   gemeinsame Pille zwischen den Links (siehe main.js). */
.fuss__links:not(.hat-gleiter) a:hover {
  background: var(--weiss-10);
}

.fuss__gleiter {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 10px;
  background: var(--weiss-10);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
}

.fuss__gleiter.ist-aktiv {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Weniger Bewegung, wenn im System so eingestellt
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .hintergrund,
  .koernung,
  .unterseite::before,
  .navigation,
  .fuss__links {
    display: none !important;
  }

  html,
  body {
    background: #fff;
    color: #000;
  }

  .inhalt p,
  .inhalt li,
  .inhalt h2,
  .inhalt h3,
  .start__text p {
    color: #000 !important;
  }
}
