/* ============================================================
   Orivan — öffentliche Website
   Setzt tokens.css voraus. Keine Hexwerte hier drin.
   ============================================================ */

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

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: var(--t-m);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

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

/* Sprungmarke für Tastaturnutzer */
.skip-link {
  position: absolute;
  left: var(--s4);
  top: calc(-1 * var(--s16));
  z-index: 100;
  padding: var(--s3) var(--s5);
  background: var(--akzent-flaeche);
  color: var(--auf-akzent);
  border-radius: var(--r-klein);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--dauer-kurz) var(--kurve);
}
.skip-link:focus {
  top: var(--s4);
}

/* ---------- Bausteine ---------- */

.huelle {
  width: 100%;
  max-width: var(--breite-inhalt);
  margin-inline: auto;
  padding-inline: var(--rand-seitlich);
}

.abschnitt {
  padding-block: clamp(var(--s16), 10vw, var(--s32));
  position: relative;
}

.abschnitt--linie {
  border-top: 1px solid var(--linie);
}

/* Kleinversal-Label — trägt Struktur, nicht Dekoration */
.label {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-still);
  margin: 0 0 var(--s5);
}

.titel {
  font-family: var(--schrift-display);
  font-weight: 400;
  font-size: var(--t-2xl);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 var(--s5);
}

.titel em {
  font-style: italic;
  color: var(--akzent-hell);
}

.fliess {
  max-width: var(--breite-text);
  color: var(--text-leise);
  font-size: var(--t-l);
  margin: 0 0 var(--s6);
}

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: var(--s3) var(--s6);
  border-radius: var(--r-rund);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--t-s);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dauer-kurz) var(--kurve),
              border-color var(--dauer-kurz) var(--kurve),
              color var(--dauer-kurz) var(--kurve);
}

.knopf--primaer {
  background: var(--akzent-flaeche);
  color: var(--auf-akzent);
}
/* Beim Hover NICHT aufhellen: Weiss auf --akzent (#3b82f6) waere nur
   3,7:1 und faellt unter AA. Stattdessen abdunkeln — der Kontrast der
   Beschriftung steigt dabei sogar. */
.knopf--primaer:hover {
  background: var(--akzent-dunkel);
}

.knopf--rand {
  background: transparent;
  color: var(--text);
  border-color: var(--linie-stark);
}
.knopf--rand:hover {
  border-color: var(--akzent);
  color: var(--akzent-hell);
}

/* ---------- Kopfleiste ---------- */

.kopf {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--grund) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dauer-kurz) var(--kurve);
}
.kopf.ist-gescrollt {
  border-bottom-color: var(--linie);
}

.kopf__reihe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
  padding-block: var(--s4);
}

.kopf__logo img {
  height: 34px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--s6);
}

.nav a {
  font-size: var(--t-s);
  color: var(--text-leise);
  text-decoration: none;
  transition: color var(--dauer-kurz) var(--kurve);
}
.nav a:hover {
  color: var(--text);
}

.nav__schalter {
  display: none;
  background: none;
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-klein);
  color: var(--text);
  padding: var(--s2) var(--s3);
  cursor: pointer;
  font-size: var(--t-m);
  line-height: 1;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(var(--s20), 14vh, var(--s32)) clamp(var(--s16), 10vw, var(--s24));
  position: relative;
  overflow: hidden;
}

/* Ein einzelner, sehr weicher Lichtschein — die einzige Zierde der Seite */
.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  translate: -50% 0;
  width: min(60rem, 130%);
  aspect-ratio: 1;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--akzent) 16%, transparent) 0%,
    transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero__titel {
  font-family: var(--schrift-display);
  font-weight: 400;
  font-size: var(--t-riese);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 18ch;
  margin: 0 0 var(--s6);
}

.hero__titel em {
  font-style: italic;
  color: var(--akzent-hell);
}

.hero__text {
  max-width: var(--breite-text);
  font-size: var(--t-l);
  color: var(--text-leise);
  margin: 0 0 var(--s8);
}

.hero__knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

/* ---------- Kennzahlen ---------- */

.zahlen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: var(--s8) var(--s6);
  border-top: 1px solid var(--linie);
  padding-top: var(--s10);
}

.zahl__wert {
  font-family: var(--schrift-display);
  font-size: var(--t-3xl);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin: 0 0 var(--s2);
}

.zahl__wert span {
  color: var(--akzent-hell);
}

.zahl__was {
  font-size: var(--t-s);
  color: var(--text-leise);
  margin: 0;
  max-width: 22ch;
}

/* ---------- Referenzen ---------- */

.referenzen {
  display: grid;
  gap: var(--s4);
}

.referenz {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  align-items: baseline;
  gap: var(--s5);
  padding: var(--s6) 0;
  border-top: 1px solid var(--linie);
  text-decoration: none;
  transition: border-color var(--dauer-kurz) var(--kurve);
}
.referenz:last-child {
  border-bottom: 1px solid var(--linie);
}
.referenz:hover {
  border-top-color: var(--akzent);
}

.referenz__nr {
  font-family: var(--schrift-mono);
  font-size: var(--t-xs);
  color: var(--text-still);
  letter-spacing: 0.08em;
}

.referenz__name {
  font-family: var(--schrift-display);
  font-size: var(--t-xl);
  line-height: 1.15;
  margin: 0 0 var(--s2);
  transition: color var(--dauer-kurz) var(--kurve);
}
.referenz:hover .referenz__name {
  color: var(--akzent-hell);
}

.referenz__was {
  font-size: var(--t-s);
  color: var(--text-leise);
  margin: 0;
  max-width: 46ch;
}

.referenz__ergebnis {
  font-size: var(--t-s);
  color: var(--akzent-hell);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

/* ---------- Leistungen ---------- */

.leistungen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1px;
  background: var(--linie);
  border: 1px solid var(--linie);
  border-radius: var(--r-gross);
  overflow: hidden;
}

.leistung {
  background: var(--grund);
  padding: var(--s8) var(--s6);
  transition: background var(--dauer-mittel) var(--kurve);
}
.leistung:hover {
  background: var(--grund-erhoben);
}

.leistung__symbol {
  width: 28px;
  height: 28px;
  color: var(--akzent);
  margin-bottom: var(--s5);
}
.leistung__symbol svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
}

.leistung h3 {
  font-family: var(--schrift-display);
  font-weight: 400;
  font-size: var(--t-xl);
  line-height: 1.2;
  margin: 0 0 var(--s3);
}

.leistung p {
  font-size: var(--t-s);
  color: var(--text-leise);
  margin: 0;
}

/* ---------- Arbeitsweise: nummeriert, weil es eine Reihenfolge IST ---------- */

.schritte {
  display: grid;
  gap: var(--s10);
  counter-reset: schritt;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 52rem) {
  .schritte {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s8);
  }
}

.schritt {
  counter-increment: schritt;
  border-top: 1px solid var(--linie);
  padding-top: var(--s5);
}

.schritt::before {
  content: '0' counter(schritt);
  display: block;
  font-family: var(--schrift-mono);
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  color: var(--akzent);
  margin-bottom: var(--s4);
}

.schritt h3 {
  font-family: var(--schrift-display);
  font-weight: 400;
  font-size: var(--t-xl);
  margin: 0 0 var(--s3);
}

.schritt p {
  font-size: var(--t-s);
  color: var(--text-leise);
  margin: 0;
}

/* ---------- Über uns ---------- */

.ueber {
  display: grid;
  gap: var(--s10);
}

@media (min-width: 56rem) {
  .ueber {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--s16);
    align-items: start;
  }
}

.werte {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: var(--s6);
}

.wert h4 {
  font-size: var(--t-s);
  font-weight: 600;
  margin: 0 0 var(--s1);
  color: var(--text);
}

.wert p {
  font-size: var(--t-s);
  color: var(--text-leise);
  margin: 0;
}

/* ---------- Kontakt ---------- */

.kontakt {
  display: grid;
  gap: var(--s10);
}

@media (min-width: 56rem) {
  .kontakt {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--s16);
  }
}

.kontakt__wege {
  display: grid;
  gap: var(--s5);
  align-content: start;
}

.kontakt__weg {
  border-top: 1px solid var(--linie);
  padding-top: var(--s3);
}
.kontakt__weg span {
  display: block;
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-still);
  margin-bottom: var(--s1);
}
.kontakt__weg a,
.kontakt__weg p {
  font-size: var(--t-m);
  color: var(--text);
  text-decoration: none;
  margin: 0;
}
.kontakt__weg a:hover {
  color: var(--akzent-hell);
}

/* ---------- Formular ---------- */

.feld {
  display: grid;
  gap: var(--s2);
  margin-bottom: var(--s5);
}

.feld label {
  font-size: var(--t-s);
  font-weight: 600;
  color: var(--text);
}

.feld input,
.feld textarea {
  width: 100%;
  padding: var(--s3) var(--s4);
  background: var(--grund-erhoben);
  border: 1px solid var(--linie-stark);
  border-radius: var(--r-mittel);
  color: var(--text);
  font-family: inherit;
  font-size: var(--t-m);
  transition: border-color var(--dauer-kurz) var(--kurve);
}

.feld input::placeholder,
.feld textarea::placeholder {
  color: var(--text-still);
}

.feld input:focus,
.feld textarea:focus {
  outline: none;
  border-color: var(--akzent);
}

.feld textarea {
  min-height: 8rem;
  resize: vertical;
}

.feld__fehler {
  font-size: var(--t-xs);
  color: var(--fehler);
  min-height: 1.2em;
}

.zustimmung {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  margin-bottom: var(--s5);
  font-size: var(--t-s);
  color: var(--text-leise);
}
.zustimmung input {
  margin-top: 0.25em;
  accent-color: var(--akzent-flaeche);
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}
.zustimmung a {
  color: var(--akzent-hell);
}

/* Honeypot — für Menschen unsichtbar, Bots füllen ihn aus */
.falle {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rueckmeldung {
  margin-top: var(--s4);
  padding: var(--s4);
  border-radius: var(--r-mittel);
  font-size: var(--t-s);
  display: none;
}
.rueckmeldung.ist-sichtbar {
  display: block;
}
.rueckmeldung.ist-ok {
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
}
.rueckmeldung.ist-fehler {
  background: color-mix(in srgb, var(--fehler) 12%, transparent);
  color: var(--fehler);
  border: 1px solid color-mix(in srgb, var(--fehler) 35%, transparent);
}

/* ---------- Fußbereich ---------- */

.fuss {
  background: var(--grund-tief);
  border-top: 1px solid var(--linie);
  padding-block: var(--s12) var(--s8);
}

.fuss__gitter {
  display: grid;
  gap: var(--s8);
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin-bottom: var(--s10);
}

.fuss h4 {
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-still);
  margin: 0 0 var(--s4);
  font-weight: 600;
}

.fuss ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--s2);
}

.fuss a {
  font-size: var(--t-s);
  color: var(--text-leise);
  text-decoration: none;
}
.fuss a:hover {
  color: var(--text);
}

.fuss__schluss {
  border-top: 1px solid var(--linie);
  padding-top: var(--s5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  justify-content: space-between;
  font-size: var(--t-xs);
  color: var(--text-still);
}

/* ============================================================
   Bewegung — drei Momente, mehr nicht

   1. Auftritt beim Laden (nur Hero)
   2. Einmaliges Erscheinen beim Scrollen
   3. Hover-Rückmeldung (steht oben bei den Komponenten)
   ============================================================ */

.auftritt {
  opacity: 0;
  translate: 0 1.2rem;
  animation: auftritt var(--dauer-lang) var(--kurve) forwards;
}
.auftritt:nth-child(2) { animation-delay: 90ms; }
.auftritt:nth-child(3) { animation-delay: 180ms; }
.auftritt:nth-child(4) { animation-delay: 270ms; }

@keyframes auftritt {
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* Erscheinen beim Scrollen — die Klasse .ist-da kommt vom IntersectionObserver.

   Wichtig: nur unter .js verstecken. Die Klasse setzt ein Inline-Script im
   <head>. Fehlt JavaScript oder schlägt es fehl, greift diese Regel nie und
   alles ist von Anfang an sichtbar — sonst wäre die Seite unterhalb des
   Heros leer, inklusive Kontaktformular. */
.js .erscheint {
  opacity: 0;
  translate: 0 1.5rem;
  transition: opacity var(--dauer-lang) var(--kurve),
              translate var(--dauer-lang) var(--kurve);
}
.js .erscheint.ist-da {
  opacity: 1;
  translate: 0 0;
}

/* ---------- Mobil ---------- */

@media (max-width: 46rem) {
  .nav__schalter {
    display: block;
  }

  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s4) var(--rand-seitlich) var(--s6);
    background: var(--grund);
    border-bottom: 1px solid var(--linie);

    /* versteckt heißt versteckt — sonst bleiben die Links im Tab-Fokus */
    visibility: hidden;
    opacity: 0;
    translate: 0 -0.5rem;
    transition: opacity var(--dauer-kurz) var(--kurve),
                translate var(--dauer-kurz) var(--kurve),
                visibility var(--dauer-kurz);
  }

  .nav.ist-offen {
    visibility: visible;
    opacity: 1;
    translate: 0 0;
  }

  .nav a {
    padding-block: var(--s3);
    border-bottom: 1px solid var(--linie);
    font-size: var(--t-m);
  }

  .nav .knopf {
    margin-top: var(--s4);
  }

  .referenz {
    grid-template-columns: 2.5rem 1fr;
  }
  .referenz__ergebnis {
    grid-column: 2;
    text-align: left;
  }
}
