/* =====================================================
   STARTSEITE - animierter Hero "Schicht fuer Schicht"
   =====================================================

   Nur auf der Startseite geladen (index.php). Die Animation rechnet der Browser selbst
   (three.js, liegt unter /assets/js/three-r128.min.js) - kein Video, kein fremder Server.

   Ohne WebGL oder ohne JavaScript bleibt ein dunkler Verlauf mit dem Text stehen; alles,
   was man lesen muss, steht im HTML und nicht im Bild.

   Die Archivo (SIL Open Font License, aus @fontsource-variable/archivo 5.3.0) ist eine
   variable Schrift mit Breitenachse: dieselbe Datei liefert die breite, duenne Zeile und
   das schmale, fette "belastbar.".
   ===================================================== */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('/assets/fonts/archivo-var.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;
}

.hero-druck {
  --hd-ink: #0e1012;
  --hd-panel: rgba(24, 27, 31, 0.62);
  --hd-line: rgba(236, 232, 225, 0.14);
  --hd-bone: #ece8e1;
  --hd-soft: #c9c5bf;
  --hd-muted: #9aa0a7;
  --hd-hot: #ffb36b;
  --hd-display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
}

/* style.css schneidet .content seitlich ab (overflow-x: clip, max. 1440 px). Ohne diese
   Ausnahme wird der Hero auf breiten Bildschirmen links und rechts abgeschnitten -
   genau das ist beim ersten Deploy am 25.09.2026 auf einem 1920er-Monitor passiert.
   Seitliches Scrollen verhindert weiterhin body { overflow-x: hidden }. */
.content:has(> .hero-druck) { overflow-x: visible; }

/* Die allgemeinen .hero-Regeln aus style.css (Polster, Leuchtflecken) gelten hier nicht.
   Den 100vw-Ausbruch aus style.css behaelt der Abschnitt. */
.content > section.hero.hero-druck {
  position: relative;
  height: clamp(600px, 84vh, 800px);
  margin-top: calc(-1 * clamp(28px, 3vw, 40px));
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  color: var(--hd-bone);
  background:
    radial-gradient(60% 55% at 68% 45%, #2a1a12 0%, transparent 70%),
    radial-gradient(90% 70% at 20% 100%, #111a1c 0%, transparent 70%),
    var(--hd-ink);
}
.content > section.hero.hero-druck::before {
  content: "";
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  filter: none;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(14,16,18,.9) 0%, rgba(14,16,18,.55) 34%, transparent 58%);
}
.content > section.hero.hero-druck::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  top: auto;
  right: 0;
  width: auto;
  height: 22%;
  filter: none;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(0deg, var(--hd-ink) 0%, transparent 100%);
}

.hero-druck canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.hd-copy {
  position: absolute;
  z-index: 3;
  /* buendig mit dem Logo in der Navigation (Inhalt max. 1440 px breit) */
  left: max(clamp(24px, 5vw, 80px), calc(50vw - 696px));
  bottom: clamp(56px, 10vh, 100px);
  max-width: 660px;
}

.hero-druck h1 {
  margin: 0;
  font-family: var(--hd-display);
  line-height: .9;
  letter-spacing: 0;
  color: var(--hd-bone);
}
.hd-eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 22px;
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--hd-muted);
}
.hd-eyebrow::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: hd-puls 1.4s ease-in-out infinite;
}
@keyframes hd-puls { 50% { opacity: .35; } }

.hd-a {
  display: block;
  font-weight: 300;
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-size: clamp(28px, 3.7vw, 52px);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.hd-b {
  display: block;
  margin-top: .06em;
  font-weight: 900;
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  font-size: clamp(60px, 8.6vw, 124px);
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.hd-lead {
  margin: 24px 0 30px;
  max-width: 46ch;
  color: var(--hd-soft);
  font-size: 16px;
  line-height: 1.6;
}

.hd-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
}
.hd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  font: 600 14px/1 "Inter", system-ui, sans-serif;
  text-decoration: none;
  transition: transform .2s, background-color .2s, border-color .2s;
}
.hd-btn-voll { background: var(--accent); color: #140700; }
.hd-btn-voll:hover { background: #ff7240; transform: translateY(-1px); }
.hd-btn-linie {
  color: var(--hd-bone);
  border: 1px solid var(--hd-line);
}
.hd-btn-linie:hover { border-color: var(--hd-bone); }
.hd-link {
  color: var(--hd-bone);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--hd-line);
  padding: 4px 0;
}
.hd-link:hover { border-color: var(--hd-bone); }
.hero-druck :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Telemetrie-Karten */
.hd-tele {
  position: absolute;
  z-index: 3;
  right: max(clamp(24px, 4vw, 64px), calc(50vw - 696px));
  top: 50%;
  transform: translateY(-46%);
  display: grid;
  gap: 12px;
  width: 228px;
}
.hd-card {
  background: var(--hd-panel);
  border: 1px solid var(--hd-line);
  border-radius: 14px;
  padding: 14px 16px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.hd-k {
  display: flex;
  justify-content: space-between;
  font: 500 10px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hd-muted);
}
.hd-v {
  margin-top: 8px;
  font: 700 30px/1.1 var(--hd-display);
  font-variation-settings: "wdth" 80;
  font-variant-numeric: tabular-nums;
  color: var(--hd-bone);
}
.hd-v small { font: 500 12px var(--font-mono); color: var(--hd-muted); margin-left: 4px; }
.hd-bar { height: 3px; margin-top: 10px; border-radius: 3px; overflow: hidden; background: var(--hd-line); }
.hd-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--hd-hot)); }
.hd-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hd-duo .hd-v { font-size: 22px; }
.hd-state { color: var(--hd-hot); }
.hd-sub { margin-top: 6px; font: 500 11px/1.3 var(--font-mono); color: var(--hd-muted); letter-spacing: .04em; }

.hd-gcode {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 18px;
  padding: 0 16px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .06em;
  color: rgba(236, 232, 225, .38);
}

/* Die Kennzahlen-Leiste darunter bekommt Luft zum dunklen Block */
.hero-druck + .stats-bar { margin-top: clamp(32px, 4vw, 48px); }

@media (max-width: 900px) {
  /* style.css setzt .content hier auf 64px Polster oben */
  .content > section.hero.hero-druck { height: auto; min-height: 700px; margin-top: -64px; }
  .content > section.hero.hero-druck::before {
    background: linear-gradient(0deg, var(--hd-ink) 0%, rgba(14,16,18,.92) 44%, transparent 66%);
  }
  .hd-tele { top: 16px; right: 16px; transform: none; width: 168px; gap: 8px; }
  .hd-tele .hd-card { padding: 10px 12px; }
  .hd-tele .hd-v { font-size: 22px; }
  .hd-nur-gross { display: none; }
  .hd-sub { display: none; }
  .hd-copy { position: relative; left: auto; bottom: auto; max-width: none; padding: 400px 20px 64px; }
}
@media (max-width: 480px) {
  .hd-tele { width: 148px; }
  .hd-copy { padding-top: 370px; }
  .hd-b { font-size: clamp(52px, 16vw, 64px); }
}

@media (prefers-reduced-motion: reduce) {
  .hd-eyebrow::before { animation: none; }
  .hd-btn { transition: none; }
}
