/* Compile Academy – Hero mit stummer Compiler-Animation als Hintergrund (Entscheidung des Eigentümers D12/D13, 16.10.2026).
   Die Szene liegt hinter dem Text, ohne Player-Rahmen, mit weichen Kanten; das Glas-Material des Textes
   komponiert darüber. Keine backdrop-filter-Schichten zusätzlich zur vorhandenen Website-Glasfläche. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero-grid.hero-single {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.hero-copy .lead {
  max-width: 620px;
}
.hero-actions-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--mist);
}
.hero-actions-note a {
  color: var(--violet-ink);
  text-underline-offset: 5px;
}

/* ---------- Bühne ---------- */
.hero-stage {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  right: max(-6vw, -120px);
  top: clamp(24px, 6vw, 80px);
  width: min(62vw, 980px);
  opacity: 0.62;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%), linear-gradient(180deg, #000 70%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 100%), linear-gradient(180deg, #000 70%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  transform: perspective(1600px) rotateY(-7deg) rotateX(2deg);
  transform-origin: 20% 40%;
}
.hs-window {
  border-radius: 22px;
  padding: 10px;
  font-family: var(--mono);
  font-size: clamp(10px, 0.78vw, 12.5px);
  color: var(--ink);
  transition: opacity 0.5s ease;
}
.hs-window.hs-fade {
  opacity: 0;
}
.hs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 4px 10px 8px;
  font-size: 0.85em;
  color: var(--mist);
  letter-spacing: 0.02em;
}
.hs-dots {
  display: flex;
  gap: 5px;
}
.hs-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8d93;
}
.hs-dots i:nth-child(2) {
  background: #f7cf7c;
}
.hs-dots i:nth-child(3) {
  background: #7adaaf;
}
.hs-run {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--violet), #5b8cff);
  color: #fff;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.9em;
  transition:
    transform 0.18s ease,
    filter 0.18s ease;
}
.hs-run i {
  width: 0;
  height: 0;
  border-left: 7px solid #fff;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}
.hs-run.is-pressed {
  transform: scale(0.94);
  filter: brightness(1.25);
}
.hs-body {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.7fr) minmax(150px, 1fr);
  gap: 8px;
  min-height: 330px;
}
.hs-tree,
.hs-editor,
.hs-out > div {
  border-radius: 16px;
  background: var(--code-bg);
  box-shadow: inset 0 0 0 1px var(--rim-low);
}
.hs-tree {
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--mist);
}
.hs-tree b,
.hs-term-head {
  display: block;
  font-size: 0.75em;
  letter-spacing: 0.16em;
  color: var(--haze);
  font-weight: 600;
}
.hs-tree ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 8px;
  display: grid;
  gap: 5px;
}
.hs-tree li.active {
  color: var(--ink);
  background: rgba(124, 92, 255, 0.22);
  border-radius: 7px;
  margin: 0 -6px;
  padding: 2px 6px;
}
.hs-editor {
  position: relative;
  padding: 10px 14px 14px;
  min-width: 0;
  overflow: hidden;
}
.hs-tab {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  margin-bottom: 10px;
}
.hs-code {
  margin: 0;
  display: grid;
  gap: 5px;
  font: inherit;
  line-height: 1.7;
  white-space: pre;
}
.hs-line {
  display: block;
}
.hs-ln {
  display: inline-block;
  width: 2.2em;
  color: var(--haze);
  opacity: 0.7;
}
.hs-k {
  color: #c4b5ff;
}
.hs-f {
  color: #7fd3ff;
}
.hs-s {
  color: #b6f0a2;
}
.hs-n {
  color: #ffd27f;
}
.hs-v {
  color: #ffb3d9;
}
.hs-t {
  color: #8ad7ff;
}
.hs-caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  vertical-align: -0.2em;
  margin-left: 1px;
  background: var(--cyan);
  animation: hs-blink 0.9s steps(2, start) infinite;
}
@keyframes hs-blink {
  to {
    visibility: hidden;
  }
}
.hs-lang {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 0.78em;
  color: var(--haze);
}
.hs-out {
  display: grid;
  min-width: 0;
}
.hs-out > div {
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}
.hs-out[data-mode='terminal'] .hs-preview,
.hs-out[data-mode='preview'] .hs-terminal {
  display: none;
}
.hs-cmd {
  color: var(--mist);
}
.hs-lines {
  display: grid;
  gap: 4px;
}
.hs-lines code {
  animation: hs-in 0.25s ease both;
}
.hs-done {
  color: var(--lime);
  margin-top: 4px;
}
.hs-done:empty,
.hs-cmd:empty {
  display: none;
}
@keyframes hs-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}
.hs-page {
  border-radius: 12px;
  background: #fff;
  color: #171a38;
  font-family: var(--body);
  padding: 14px;
  display: grid;
  gap: 8px;
  min-height: 120px;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}
.hs-page.is-in,
.is-static .hs-page {
  opacity: 1;
  transform: none;
}
.hs-page h1 {
  margin: 0;
  font-size: 1.35em;
  letter-spacing: -0.02em;
}
.hs-page p {
  margin: 0;
  color: #474d73;
}
.hs-page button {
  justify-self: start;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: var(--violet);
  color: #fff;
  font: inherit;
  font-weight: 600;
}
.is-static .hs-caret {
  display: none;
}

/* ---------- Lern-App als Web-App (im Compiler-Bereich) ---------- */
.learn-install {
  margin-top: 26px;
  padding: clamp(18px, 3vw, 28px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: center;
}
.learn-install h3 {
  margin: 8px 0 8px;
  font-size: clamp(20px, 2.2vw, 26px);
}
.learn-install p {
  margin: 0;
  color: var(--mist);
  max-width: 640px;
}
.learn-install .install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.learn-install .installed-note {
  display: none;
  color: var(--lime);
  font-size: 14px;
  margin-top: 6px;
}
.learn-install [data-offline-status] {
  font-size: 13px;
  color: var(--haze);
  margin-top: 8px;
}

/* ---------- Responsiv ---------- */
@media (max-width: 1100px) {
  .hero-stage {
    width: min(70vw, 820px);
    right: -14vw;
    opacity: 0.5;
  }
}
@media (max-width: 980px) {
  .hero-stage {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    margin-top: 28px;
    opacity: 1;
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
    pointer-events: none;
  }
  .hs-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 0;
  }
  .hs-tree {
    display: none;
  }
  .hs-window {
    font-size: 11px;
  }
  .learn-install {
    grid-template-columns: minmax(0, 1fr);
  }
  .learn-install .install-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 560px) {
  .hs-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .hs-editor {
    min-height: 150px;
  }
  .hs-window {
    font-size: 10.5px;
    padding: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hs-caret,
  .hs-lines code {
    animation: none;
  }
  .hs-run,
  .hs-page,
  .hs-window {
    transition: none;
  }
}
