/* Basetrain Hero — Typewriter + Orbit-Buehne
   Farben, Typografie, Radien und Spacing kommen aus den Basetrain Brand
   Guidelines V1.0 (Basetrain Design System.dc.html). Kein Wert geraten. */

:root {
  /* Farben stehen in assets/css/theme-dark.css — hier nur Maße und Bewegung. */
  --r-chip: 6px;
  --r-card: 14px;
  --r-panel: 20px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

/* Die Seite laedt auf 90 % Groesse. `zoom` skaliert echtes Layout, nicht nur
   die Darstellung — anders als transform: scale() bleiben feste Kopfzeile und
   Scrollhoehe dabei richtig.
   Viewport-Einheiten kennen den Zoom NICHT: 100vh waere nach der Skalierung nur
   noch 90 % des Bildschirms. Alles, was einen Bildschirm hoch sein soll, rechnet
   deshalb mit --schirm statt mit 100vh. */
html { zoom: var(--zoom, .9); }
:root { --zoom: .9; --schirm: calc(100vh / .9); }

html, body {
  margin: 0;
  background: var(--ink-900);
}

body {
  font-family: Manrope, system-ui, -apple-system, sans-serif;
  font-weight: 400;
  color: var(--tx-1);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.bt-sprite { position: absolute; }
.bt-sprite g { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.bt {
  /* Hoehe des Videobandes. Die Wortmarke setzt ihre Unterkante darauf. */
  --bt-video-h: calc(var(--schirm) * .55);
  position: relative;
  min-height: var(--schirm);
  overflow-x: clip;
  background: var(--ink-900);
}

/* Videoband — untere Bildschirmhaelfte, volle Breite ------------------- */
/* Von OBEN gerechnet, nicht von unten: sobald der Hero hoeher wird als ein
   Bildschirm — auf schmalen Geraeten mit langem Text — waere ein von unten
   verankertes Band mitsamt Wortmarke nach unten in den Text gerutscht. */
.bt-band {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--schirm) - var(--bt-video-h));
  bottom: 0;
  overflow: hidden;
}

.bt-band-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  opacity: .78;
}

/* Nach oben in den Grund auslaufen, nach unten in Ink 900 — sonst schneidet
   das Band hart gegen die naechste Sektion ab. */
.bt-band-schleier {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
              var(--ink-900) 0%,
              rgba(var(--grund-rgb), .18) 16%,
              rgba(var(--grund-rgb), .30) 62%,
              var(--ink-900) 100%);
}

/* Zweiter Schleier von links: ohne ihn stand die Unterzeile auf hellen
   Videostellen bei 2,3:1. Gemessen, nicht geschaetzt — der Verlauf endet dort,
   wo der Text endet, damit das Video rechts sichtbar bleibt. */
.bt-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
              rgba(var(--grund-rgb), .70) 0%,
              rgba(var(--grund-rgb), .52) 40%,
              rgba(var(--grund-rgb), .12) 66%,
              transparent 82%);
}

/* Wortmarke — sitzt auf der Kante ------------------------------------- */
.bt-wortmarke {
  position: absolute;
  left: 50%;
  top: calc(var(--schirm) - var(--bt-video-h));
  z-index: 2;
  margin: 0;
  /* Der Kasten endet 0,107 em unter der Schriftunterkante — mit line-height
     .78 liegt die Tinte hoeher als der Kastenboden. Gemessen: 16 px Luft bei
     165,6 px Schriftgroesse. Der Versatz steht in em, damit er bei jeder
     Groesse stimmt. */
  transform: translate(-50%, calc(-100% + .107em));
  pointer-events: none;
  white-space: nowrap;
  font-family: Syncopate, Manrope, sans-serif;
  font-weight: 700;
  /* Auf Breite gerechnet: Syncopate ist deutlich breiter als DM Sans, mit dem
     die alte Fassung 13,3vw fuhr. Der Wert ist gemessen, nicht uebernommen. */
  font-size: min(11.5vw, 204px);
  line-height: .78;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--pale);
}

/* Mint-Schimmer hinter der Buehne, damit Ink 900 nicht tot wirkt. */
.bt::before {
  content: "";
  position: absolute;
  top: -12%;
  right: -8%;
  width: 1000px;
  height: 1000px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--akzent-rgb), .16) 0%, rgba(var(--akzent-rgb), .05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Logo-Balken ------------------------------------------------------- */
.bar-pale { fill: var(--pale); }
.bar-mint { fill: var(--mint); }
.bar-base { fill: var(--mint); opacity: .5; }

/* Kopf -------------------------------------------------------------- */
.bt-mark { width: 30px; height: 30px; flex: 0 0 auto; }

.bt-lang {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ink-500);
  border-radius: 999px;
  background: var(--ink-800);
}

.bt-lang-btn {
  min-width: 52px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--tx-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  cursor: pointer;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}

.bt-lang-btn:hover { color: var(--pale); }

.bt-lang-btn.is-active {
  background: var(--mint);
  color: var(--ink-800);
}

.bt-lang-btn:focus-visible,

/* Hero -------------------------------------------------------------- */
.bt-hero {
  position: relative;
  z-index: 1;
  /* Fuellt den Hero, damit die Karte unten wirklich auf der Kante sitzt und
     nicht ueber dem Rest der Bildschirmhoehe schwebt. */
  min-height: var(--schirm);
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  /* Der Text steht unter der Kante, also im Videobereich. */
  padding: calc(var(--schirm) - var(--bt-video-h) + 40px) 64px 40px;
  display: flex;
  align-items: stretch;
  gap: 48px;
}

.bt-copy {
  /* Wie weit die linke Spalte unter der Oberkante der rechten sitzt. */
  --copy-tiefer: 72px;
  flex: 0 1 520px;
  max-width: 560px;
  /* Tiefer als die rechte Spalte — der Blick soll erst auf die Wortmarke und
     dann auf den Satz fallen. */
  margin-top: 72px;
  animation: bt-fade-up 1s var(--ease) .15s both;
}

/* Rechte Seite — der zweite Weg ---------------------------------------- */
/* Haengt am Hero, nicht am begrenzten Inhalt: .bt-hero ist auf 1920 px
   gedeckelt und wird zentriert — in der Flussvariante blieb auf breiten
   Fenstern ein Streifen rechts frei und die Karte sass nicht in der Ecke. */
.bt-ki {
  position: absolute;
  right: 64px;
  bottom: 40px;
  z-index: 2;
  width: min(940px, 58vw);
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  animation: bt-fade-up 1s var(--ease) .3s both;
}

.bt-ki-text {
  /* Breite setzt hero-mini.js auf die Kartenbreite — der Satz soll ueber der
     Box stehen, nicht daneben hinausragen. */
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 32px;
  color: var(--tx-1);
}

/* Jeder Satz eine Zeile. Als Block statt mit <br>, damit der Umbruch auch
   dann zwischen den Saetzen bleibt, wenn ein Satz selbst umbrechen muss. */
.bt-ki-zeile { display: block; }
.bt-ki-zeile + .bt-ki-zeile { color: var(--tx-2); }

/* Die Karte: derselbe Aufbau wie eine Regalkachel — die Sektion in klein.
   Anders als dort ohne Dimmung und ohne Unschaerfe, weil kein Titel darauf
   liegt, der sich davon abheben muesste. */
.bt-mini {
  /* Breite und Hoehe setzt hero-mini.js aus der gemessenen Chatkarte — sie
     wird vollstaendig gezeigt, nicht angeschnitten. */
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.bt-mini:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 3px rgba(var(--akzent-rgb), .22), 0 26px 64px rgba(0, 0, 0, .5);
}

.bt-mini:focus-visible { outline: 2px solid var(--mint-300); outline-offset: 3px; }

.bt-mini-buehne {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

/* Der Klon behaelt die Layoutbreite des Originals und wird als Ganzes
   skaliert — umbrechen wuerde ihn von der Karte wegtreiben, die er zeigt. */
.bt-mini-inhalt {
  display: block;
  transform-origin: top left;
  pointer-events: none;
  box-shadow: none;
  /* Die helle Umbelegung ihrer Token steht im Farbthema. */
}

.bt-eyebrow {
  margin: 0 0 24px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--mint);
}

.bt-h1 {
  margin: 0;
  font-family: Syncopate, Manrope, sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 2.5vw, 38px);
  line-height: 1.34;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--pale);
}

/* Der noch nicht getippte Rest bleibt im Fluss, nur unsichtbar — so
   springt beim Tippen keine Zeile. */
.bt-h1-rest { opacity: 0; }

.bt-h1-accent {
  color: var(--mint);
  transition: color .35s var(--ease), text-shadow .35s var(--ease);
}

/* Beim Ueberfahren zieht der Mint-Teil auf Mint 300 an und bekommt einen
   weichen Schein. Nur wo es echtes Hovern gibt — auf Touch bliebe der
   Zustand sonst nach dem Tippen haengen. */
@media (hover: hover) {
  .bt-h1:hover .bt-h1-accent {
    color: var(--mint-300);
    text-shadow:
      0 0 18px rgba(var(--akzent-hell-rgb), .55),
      0 0 48px rgba(var(--akzent-rgb), .35),
      0 0 96px rgba(var(--akzent-rgb), .18);
  }

  /* Der ungetippte Rest bleibt unsichtbar, auch beim Hovern. */
  .bt-h1:hover .bt-h1-rest { text-shadow: none; }
}

.bt-caret {
  display: inline-block;
  width: 0;
  height: .84em;
  vertical-align: -.06em;
  border-left: 2px solid var(--mint);
  animation: bt-blink 1s steps(1) infinite;
}











/* Orbit-Buehne ------------------------------------------------------ */
.bt-stage {
  flex: 0 0 720px;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bt-orbits {
  position: relative;
  width: 720px;
  height: 720px;
  /* Ring 4 misst 797px — bei .88 bleibt er innerhalb der 720er Buehne und
     laeuft nirgends ueber den Viewport hinaus.
     Breakpoints setzen --scale; die Keyframes lesen es mit, sonst
     ueberschreibt der gefuellte Animationszustand jedes transform. */
  --scale: .88;
  transform: scale(var(--scale));
  animation: bt-scale-in 1.2s var(--ease) .3s both;
}

.bt-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size);
  height: var(--size);
  margin-top: calc(var(--size) / -2);
  margin-left: calc(var(--size) / -2);
  border-radius: 50%;
}

.bt-orbit::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(180deg,
    rgba(var(--akzent-rgb), 0) 0%,
    rgba(var(--akzent-rgb), .85) 43%,
    rgba(var(--akzent-rgb), 0) 100%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

.bt-ccw { animation: bt-spin-ccw var(--dur) linear infinite; }
.bt-cw  { animation: bt-spin-cw  var(--dur) linear infinite; }

.bt-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  margin-top: -52px;
  margin-left: -130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  transform-origin: center;
}

.bt-center-mark {
  width: 104px;
  height: 104px;
  filter: drop-shadow(0 0 34px rgba(var(--akzent-rgb), .35));
}

.bt-slot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(var(--a)) translate(var(--r)) rotate(calc(var(--a) * -1));
}

.bt-av {
  width: var(--s);
  height: var(--s);
  overflow: hidden;
  background: var(--ink-700);
  /* Neutraler Rand und neutraler Schatten — die Portraits sind farbig,
     ein Mint-Schein daraufgelegt wuerde die Hauttoene verfaerben. */
  border: 1px solid rgba(var(--text-rgb), .14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  animation: bt-fly-in .9s var(--ease) var(--delay) both;
}

.bt-av img { width: 100%; height: 100%; object-fit: cover; }

.bt-av-round { border-radius: 50%; }
.bt-av-sq20  { border-radius: var(--r-panel); }
.bt-av-sq24  { border-radius: 24px; }

/* Ticker ------------------------------------------------------------ */
.bt-ticker {
  position: relative;
  z-index: 1;
  padding: 40px 0 48px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  animation: bt-fade-up 1s var(--ease) .6s both;
}

.bt-ticker-track {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  animation: bt-marquee 34s linear infinite;
}

.bt-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink-500);
  border-radius: 999px;
  background: var(--ink-800);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tx-1);
  white-space: nowrap;
}

/* fill/stroke sind vererbbar und erreichen darum auch den <use>-Shadow-Tree. */
.bt-chip-ic {
  width: 20px;
  height: 20px;
  color: var(--mint);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Keyframes --------------------------------------------------------- */
@keyframes bt-spin-ccw { to { transform: rotate(-360deg); } }
@keyframes bt-spin-cw  { to { transform: rotate(360deg); } }
@keyframes bt-blink    { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes bt-marquee  { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@keyframes bt-fade-down {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bt-fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bt-scale-in {
  from { opacity: 0; transform: scale(calc(var(--scale) * .85)); }
  to   { opacity: 1; transform: scale(var(--scale)); }
}

@keyframes bt-fly-in {
  from { opacity: 0; transform: scale(.4); }
  to   { opacity: 1; transform: scale(1); }
}

/* Responsive -------------------------------------------------------- */
/* Schmale Geraete: der Text nimmt die ganze Breite, der seitliche Schleier
   darf deshalb nicht nach rechts auslaufen — sonst steht die Unterzeile dort
   bei 3,3:1 auf hellen Videostellen. */
@media (max-width: 900px) {
  .bt-band::after {
    background: linear-gradient(90deg,
                rgba(var(--grund-rgb), .82) 0%,
                rgba(var(--grund-rgb), .74) 100%);
  }
}

@media (max-width: 1500px) {
  .bt-hero  { padding: calc(var(--schirm) - var(--bt-video-h) + 40px) 40px 40px; gap: 32px; }
  .bt-ki    { right: 40px; }
}

@media (max-width: 1280px) {
  .bt-stage  { flex: 0 0 560px; }
  .bt-orbits { --scale: .78; width: 560px; height: 560px; }
  .bt-orbits .bt-orbit { margin-top: calc(var(--size) / -2); }
}

/* Gestapelt auch auf FLACHEN Fenstern, nicht nur auf schmalen: Bei 700 px
   Fensterhoehe bleibt unter der Videokante kein Platz fuer Satz und Karte
   neben der Wortmarke — die Karte schrumpfte dort auf Briefmarkengroesse und
   lief trotzdem in die Marke hinein. */
@media (max-width: 1024px), (max-height: 720px) {
  .bt-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--schirm) - var(--bt-video-h) + 32px) 40px 64px;
    gap: 8px;
  }
  .bt-copy  { flex: 0 0 auto; max-width: 640px; }
  /* Gestapelt wieder im Fluss — dort gibt es kein "rechts unten". */
  /* Rand statt Innenabstand: hero-mini.js misst die Spalte per clientWidth,
     und clientWidth zaehlt Innenabstand mit — die Karte waere zu breit. */
  .bt-ki    { position: static; width: auto; max-width: 640px;
              margin: 0 24px 40px; align-items: stretch; }
  .bt-copy  { margin-top: 0; }

  .bt-stage {
    flex: 1 1 auto;
    width: 100%;
    min-height: 480px;
    margin: 0;
    align-items: center;
  }
  .bt-orbits { --scale: .72; width: 520px; height: 520px; }
}

@media (max-width: 768px) {
  .bt-hero  { padding: calc(var(--schirm) - var(--bt-video-h) + 28px) 24px 56px; }
  .bt-stage { min-height: 430px; }
  .bt-orbits { --scale: .62; width: 450px; height: 450px; }
  .bt-ticker { padding: 28px 0 36px; }
}

@media (max-width: 480px) {
  .bt-hero { padding: calc(var(--schirm) - var(--bt-video-h) + 24px) 20px 48px; }
  .bt-eyebrow { margin-bottom: 18px; letter-spacing: .22em; }
  .bt-h1 { font-size: 21px; line-height: 1.4; }
  .bt-stage { min-height: 330px; }
  .bt-orbits { --scale: .42; width: 335px; height: 335px; }
  .bt-center-mark { width: 88px; height: 88px; }
  .bt-chip { height: 42px; padding: 0 18px; font-size: 12px; }
}

/* Ohne Bewegung ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .bt *,
  .bt *::before {
    animation: none !important;
    transition: none !important;
  }
  .bt-orbits { opacity: 1; transform: scale(var(--scale)); }
  .bt-av { opacity: 1; }
  .bt-ticker-track { animation: none; }
  .bt-caret { display: none; }
}


/* Coach-Pille — vier Gesichter statt eines Knopfes ---------------------- */
.bt-coach {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding: 5px 22px 5px 5px;
  border: 1px solid rgba(var(--text-rgb), .45);
  border-radius: 999px;
  background: transparent;
  text-decoration: none;
  transition: border-color .25s var(--ease), background-color .25s var(--ease),
              transform .25s var(--ease);
}

.bt-coach:hover {
  border-color: var(--mint);
  background: rgba(var(--grund-rgb), .45);
  transform: translateY(-2px);
}

.bt-coach:focus-visible { outline: 2px solid var(--mint-300); outline-offset: 3px; }

.bt-coach-avs { display: flex; }

.bt-coach-av {
  width: 40px;
  height: 40px;
  margin-left: -12px;
  border: 2px solid var(--ink-900);
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.bt-coach-av:first-child { margin-left: 0; }
.bt-coach-av img { width: 100%; height: 100%; object-fit: cover; display: block; }

.bt-coach-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--tx-1);
}

@media (max-width: 480px) { .bt-coach { width: 100%; justify-content: flex-start; } }
