/* ============================================================
   Analyzer-Hero (.azh) — SEAKT 3D-Globe Hero für /analyze + /analyze/pro.
   Port aus hero-section-Vorlage, vollständig unter `.azh` gescoped, damit
   nichts mit den bestehenden Analyzer-Styles (.hero, .url-input, .btn,
   .analyze-btn) oder anderen Seiten kollidiert. Keyframes mit azh- Prefix.
   Fonts an Site angeglichen: Outfit (Display) / Inter (Sans) / JetBrains Mono.
   Farben aus design-tokens (SEAKT-Akzente). Funktionale IDs #url-input +
   #analyze-btn bleiben unangetastet — JS-Wiring intakt.
   ============================================================ */

@property --azh-holo  { syntax: '<angle>'; initial-value: 0deg; inherits: false; }

.azh {
  --azh-s: var(--color-s, #5BE9DC);
  --azh-e: var(--color-e, #5B8FF9);
  --azh-a: var(--color-a, #8B5CF6);
  --azh-k: var(--color-k, #FF3D81);
  --azh-t: var(--color-t, #FFB155);
  --azh-ink: var(--ink-primary, #F0EEE6);
  --azh-ink-muted: rgba(240, 238, 230, 0.62);
  --azh-ink-faint: rgba(240, 238, 230, 0.32);
  --azh-rule-subtle: rgba(240, 238, 230, 0.08);
  --azh-ease: var(--ease-apple, cubic-bezier(0.16, 1, 0.3, 1));

  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 16px 0 8px;
}
.azh *, .azh *::before, .azh *::after { box-sizing: border-box; }

/* ── Body: title + form share one stacking context, globe sits behind ── */
.azh__body {
  position: relative;
  width: 100%;
  max-width: 1180px;
  display: grid;
  place-items: center;
  padding: 30px 0 24px;
}

/* ─────────────────────────────────────────────────────────────────────
   LAYER A — 3D WIREFRAME GLOBE
   ───────────────────────────────────────────────────────────────────── */
.azh__globe-stage {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 720px; height: 720px;
  perspective: 1600px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.azh__globe {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: azh-globe-spin 90s linear infinite;
}
@keyframes azh-globe-spin {
  to { transform: rotateY(360deg) rotateX(-6deg); }
}
.azh__meridian, .azh__parallel {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-style: preserve-3d;
}
.azh__meridian { border: 1px solid rgba(240, 238, 230, 0.07); }
.azh__meridian:nth-child(1) { transform: rotateY(  0deg); border-color: rgba(91, 233, 220, 0.10); }
.azh__meridian:nth-child(2) { transform: rotateY( 30deg); }
.azh__meridian:nth-child(3) { transform: rotateY( 60deg); }
.azh__meridian:nth-child(4) { transform: rotateY( 90deg); border-color: rgba(139, 92, 246, 0.10); }
.azh__meridian:nth-child(5) { transform: rotateY(120deg); }
.azh__meridian:nth-child(6) { transform: rotateY(150deg); }

.azh__parallel {
  border: 1px solid rgba(240, 238, 230, 0.05);
  transform: rotateX(90deg) translateZ(0);
}
.azh__parallel--n2 { inset: 18% 14% auto 14%; height: 64%; transform: rotateX(90deg) translateZ(184px); }
.azh__parallel--n1 { inset: 6% 4% auto 4%;   height: 84%; transform: rotateX(90deg) translateZ(96px);  }
.azh__parallel--eq { inset: 0; border-color: rgba(91, 143, 249, 0.14); }
.azh__parallel--s1 { inset: 6% 4% auto 4%;   height: 84%; transform: rotateX(90deg) translateZ(-96px);  }
.azh__parallel--s2 { inset: 18% 14% auto 14%; height: 64%; transform: rotateX(90deg) translateZ(-184px); }

.azh__belt {
  position: absolute;
  inset: 49.2% 0 auto 0;
  height: 1.6%;
  background: conic-gradient(
    from var(--azh-holo),
    var(--azh-s), var(--azh-e), var(--azh-a),
    var(--azh-k), var(--azh-t), var(--azh-s)
  );
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.18;
  animation: azh-holo-spin 60s linear infinite;
  transform: rotateX(82deg);
  transform-style: preserve-3d;
}
@keyframes azh-holo-spin { to { --azh-holo: 360deg; } }

.azh__core {
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.55) 0%, rgba(139, 92, 246, 0.32) 35%, transparent 70%);
  filter: blur(18px);
  animation: azh-core-pulse 8s ease-in-out infinite;
}
@keyframes azh-core-pulse {
  0%, 100% { opacity: 0.30; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.06); }
}

/* ─── orbiting dimension nodes ──────────────────────────────────────── */
.azh__orbit {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: azh-orbit-rotate 55s linear infinite;
}
.azh__orbit--2 { animation-duration: 72s; animation-direction: reverse; }
.azh__orbit--3 { animation-duration: 88s; }
@keyframes azh-orbit-rotate { to { transform: rotateY(360deg); } }
.azh__node {
  position: absolute;
  top: 50%; left: 50%;
  width: 42px; height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 11px;
  transform-style: preserve-3d;
  animation: azh-node-face 55s linear infinite reverse;
}
.azh__orbit--2 .azh__node { animation-duration: 72s; animation-direction: normal; }
.azh__orbit--3 .azh__node { animation-duration: 88s; animation-direction: reverse; }
@keyframes azh-node-face { to { transform: rotateY(-360deg); } }
.azh__node-face {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(11, 8, 32, 0.88);
  border: 1px solid rgba(var(--dim-rgb), 0.38);
  color: var(--dim);
  font-family: var(--font-display, 'Outfit'), system-ui, sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  box-shadow:
    0 0 14px rgba(var(--dim-rgb), 0.20),
    inset 0 0 10px rgba(var(--dim-rgb), 0.08),
    0 8px 22px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.azh__node-face::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 12px;
  z-index: -1;
  background: conic-gradient(
    from var(--azh-holo),
    var(--azh-s), var(--azh-e), var(--azh-a),
    var(--azh-k), var(--azh-t), var(--azh-s)
  );
  opacity: 0.22;
  filter: blur(1.5px);
  animation: azh-holo-spin 14s linear infinite;
}
.azh__orbit--1 .azh__node { transform: translateZ(340px); }
.azh__orbit--2 { transform: rotateX(35deg); }
.azh__orbit--2 .azh__node--a { transform: rotateY(  0deg) translateZ(340px); }
.azh__orbit--2 .azh__node--b { transform: rotateY(140deg) translateZ(340px); }
.azh__orbit--3 { transform: rotateX(-30deg) rotateY(60deg); }
.azh__orbit--3 .azh__node--a { transform: rotateY( 70deg) translateZ(340px); }
.azh__orbit--3 .azh__node--b { transform: rotateY(220deg) translateZ(340px); }

/* ─────────────────────────────────────────────────────────────────────
   LAYER B — TITLE
   ───────────────────────────────────────────────────────────────────── */
.azh__title {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}
.azh__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--azh-rule-subtle);
  background: rgba(240, 238, 230, 0.03);
  color: var(--azh-ink-muted);
  font: 500 12px/1 var(--font-mono, 'JetBrains Mono'), ui-monospace, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.azh__eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--azh-s);
  box-shadow: 0 0 10px var(--azh-s);
  animation: azh-live-pulse 2.4s ease-in-out infinite;
}
@keyframes azh-live-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
.azh__h1 {
  margin: 0;
  font-family: var(--font-display, 'Outfit'), system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(34px, 5.4vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--azh-ink);
  text-wrap: balance;
}
.azh__ki {
  display: inline-block;
  background: linear-gradient(135deg, #FF3D81 0%, #B86CCB 50%, #8B5CF6 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
  text-shadow: 0 10px 50px rgba(255, 61, 129, 0.28);
  padding: 0 0.04em;
}
.azh__sub {
  margin: 22px auto 0;
  max-width: 60ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--azh-ink-muted);
  text-wrap: pretty;
}

/* ─────────────────────────────────────────────────────────────────────
   LAYER C — INPUT CARD with holographic edge
   ───────────────────────────────────────────────────────────────────── */
.azh__form {
  position: relative;
  z-index: 3;
  margin-top: 40px;
  width: min(720px, calc(100vw - 56px));
  justify-self: center;
}
.azh__readout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 0 6px 14px;
  font: 500 10.5px/1 var(--font-mono, 'JetBrains Mono'), ui-monospace, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--azh-ink-faint);
}
.azh__readout span { display: inline-flex; align-items: center; gap: 8px; }
.azh__readout .azh__sep {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(240, 238, 230, 0.10) 20%, rgba(240, 238, 230, 0.10) 80%, transparent);
}
.azh__readout em {
  font-style: normal;
  color: var(--azh-ink-muted);
  letter-spacing: 0.10em;
}

.azh__card {
  position: relative;
  isolation: isolate;
  padding: 18px;
  border-radius: 22px;
  background: transparent;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 10px 36px rgba(139, 92, 246, 0.14),
    0  4px 12px rgba(91, 233, 220, 0.08);
}
.azh__corners { position: absolute; inset: 0; pointer-events: none; }
.azh__corners i {
  position: absolute;
  width: 14px; height: 14px;
  border-color: rgba(240, 238, 230, 0.28);
  border-style: solid;
  border-width: 0;
}
.azh__corners i.tl { top: -7px; left: -7px;  border-top-width: 1px; border-left-width: 1px;  }
.azh__corners i.tr { top: -7px; right: -7px; border-top-width: 1px; border-right-width: 1px; }
.azh__corners i.bl { bottom: -7px; left: -7px;  border-bottom-width: 1px; border-left-width: 1px;  }
.azh__corners i.br { bottom: -7px; right: -7px; border-bottom-width: 1px; border-right-width: 1px; }
.azh__card::before {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 23.5px;
  z-index: -2;
  background: conic-gradient(
    from var(--azh-holo),
    var(--azh-s), var(--azh-e), var(--azh-a),
    var(--azh-k), var(--azh-t), var(--azh-s)
  );
  animation: azh-holo-spin 18s linear infinite;
  filter: blur(0.4px) saturate(1.05);
}
.azh__card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  z-index: -1;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(91, 233, 220, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(13, 18, 36, 0.94) 0%, rgba(11, 8, 32, 0.94) 100%);
  box-shadow:
    inset 0  1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0,   0,   0,   0.35);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.azh__shimmer {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.azh__shimmer::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 40%;
  transform: translateX(-160%) skewX(-20deg);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0)    0%,
    rgba(255, 255, 255, 0.10) 50%,
    rgba(255, 255, 255, 0)   100%
  );
  animation: azh-card-shimmer 9s ease-in-out infinite;
  mix-blend-mode: overlay;
}
@keyframes azh-card-shimmer {
  0%        { transform: translateX(-160%) skewX(-20deg); }
  55%, 100% { transform: translateX( 320%) skewX(-20deg); }
}

.azh__row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
}

/* ── URL input (label wrapper; #url-input keeps its id + JS wiring) ──── */
.azh__urlwrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(4, 5, 10, 0.55);
  border: 1px solid rgba(240, 238, 230, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 28px rgba(91, 143, 249, 0.04);
  transition: border-color .3s var(--azh-ease), box-shadow .3s var(--azh-ease);
}
.azh__urlwrap:focus-within {
  border-color: rgba(91, 233, 220, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 4px rgba(91, 233, 220, 0.08);
}
.azh__protocol {
  font: 500 14px/1 var(--font-mono, 'JetBrains Mono'), ui-monospace, monospace;
  color: var(--azh-ink-faint);
  letter-spacing: 0.02em;
  user-select: none;
  flex-shrink: 0;
}
.azh__field-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
/* the real input — override the page-level .url-input look while scoped */
.azh .azh__field {
  flex: 1;
  min-width: 0;
  width: 100%;
  position: relative;
  font: 500 17px/1 var(--font-mono, 'JetBrains Mono'), ui-monospace, monospace;
  color: var(--azh-ink);
  letter-spacing: 0.005em;
  background: transparent;
  border: 0;
  outline: 0;
  box-shadow: none;
  caret-color: transparent;
  padding: 0;
  height: auto;
  border-radius: 0;
}
.azh .azh__field:focus { border: 0; box-shadow: none; outline: 0; }
.azh .azh__field::placeholder { color: var(--azh-ink-faint); }
/* once the user types, restore a real caret */
.azh .azh__field.azh-typing { caret-color: var(--azh-s); }
.azh__typed {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font: 500 17px/1 var(--font-mono, 'JetBrains Mono'), ui-monospace, monospace;
  color: var(--azh-ink);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
}
.azh__typed.is-hidden { display: none; }
.azh__caret {
  display: inline-block;
  width: 2px; height: 1.05em;
  background: var(--azh-s);
  margin-left: 2px;
  vertical-align: -0.18em;
  box-shadow: 0 0 8px var(--azh-s);
  animation: azh-caret-blink 1s steps(1) infinite;
}
@keyframes azh-caret-blink {
  0%, 49%  { opacity: 1; }
  50%, 100%{ opacity: 0; }
}
.azh__scan {
  position: absolute;
  top: 50%; right: 14px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(91, 233, 220, 0.08);
  border: 1px solid rgba(91, 233, 220, 0.22);
  color: var(--azh-s);
  font: 500 10px/1 var(--font-mono, 'JetBrains Mono'), ui-monospace, monospace;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .35s var(--azh-ease);
}
.azh__scan.is-on { opacity: 1; }
.azh__scan::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--azh-s);
  box-shadow: 0 0 8px var(--azh-s);
}

/* ── Primary holographic CTA (#analyze-btn keeps its id + JS wiring) ───
   FLAT structure: the label is a direct text child of the button, styling
   lives on the element + ::before (holo edge) + ::after (white fill). The
   analyzer JS rewrites the button via `textContent` ("Analysiere…", "Erneut
   analysieren", …) — a flat button survives that without losing its look. */
.azh .azh-cta {
  --holo-duration: 6s;
  --holo-spread:   1.5px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  margin: 0;
  padding: 18px 28px;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--bg-obsidian, #04050A) !important;
  background: transparent;
  font: 600 15px/1 var(--font-sans, 'Inter'), system-ui, sans-serif;
  letter-spacing: -0.005em;
  box-shadow:
    0 8px 32px rgba(91, 233, 220, 0.18),
    0 2px  8px rgba(0,   0,   0,   0.30);
  transition: transform .45s var(--azh-ease), box-shadow .45s var(--azh-ease);
  min-width: 0;
  width: auto;
  height: auto;
}
.azh .azh-cta::before {
  content: '';
  position: absolute;
  inset: calc(var(--holo-spread) * -1);
  border-radius: 15.5px;
  z-index: -2;
  background: conic-gradient(
    from var(--azh-holo),
    #5BE9DC, #5B8FF9, #8B5CF6, #FF3D81, #FFB155, #5BE9DC
  );
  animation: azh-holo-spin var(--holo-duration) linear infinite;
  filter: blur(0.3px) saturate(1.05);
}
.azh .azh-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  z-index: -1;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0EEE6 55%, #E8E5DA 100%);
  box-shadow:
    0  1px 0 rgba(255, 255, 255, 0.40) inset,
    0 -1px 0 rgba(0,   0,   0,   0.10) inset;
}
.azh .azh-cta:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  --holo-duration: 2.5s;
  box-shadow:
    0 14px 44px rgba(91, 233, 220, 0.32),
    0  4px 12px rgba(0, 0, 0, 0.35);
}
.azh .azh-cta:active:not(:disabled) { transform: translateY(0) scale(0.99); transition-duration: .12s; }
.azh .azh-cta:disabled { opacity: 0.6; cursor: wait; }

/* ── Microcopy under the form ───────────────────────────────────────── */
.azh__micro {
  position: relative;
  z-index: 3;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--azh-ink-faint);
  text-align: center;
}
.azh__micro-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 12.5px/1 var(--font-sans, 'Inter'), sans-serif;
  color: var(--azh-ink-muted);
}
.azh__micro-row svg { color: var(--azh-s); flex-shrink: 0; }
.azh__micro-note {
  font: 400 12px/1.5 var(--font-mono, 'JetBrains Mono'), ui-monospace, monospace;
  letter-spacing: 0.04em;
  color: var(--azh-ink-faint);
  max-width: 64ch;
  text-wrap: pretty;
}

/* error message slot stays full-width under the card */
.azh__error {
  margin: 14px auto 0;
  max-width: 720px;
}

/* ── Footer legend strip ────────────────────────────────────────────── */
.azh__foot {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin: 32px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--azh-rule-subtle);
  font-family: var(--font-mono, 'JetBrains Mono'), ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--azh-ink-faint);
}
.azh__foot .azh__legend { display: flex; gap: 22px; flex-wrap: wrap; align-items: center; }
.azh__foot .azh__legend span { display: inline-flex; align-items: center; gap: 8px; }
.azh__foot .azh__legend i { width: 8px; height: 8px; border-radius: 50%; }

/* ── Reduced-motion ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .azh__globe, .azh__orbit, .azh__node, .azh__card::before, .azh-cta::before,
  .azh-cta__shimmer, .azh__shimmer::before, .azh__belt, .azh__core,
  .azh__caret, .azh__eyebrow::before {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Mobile performance: kill heavy 3D globe + decorative loops ≤760px ─ */
@media (max-width: 760px) {
  .azh__body { padding: 16px 0 18px; }
  .azh__globe-stage { display: none; }
  .azh__row { grid-template-columns: 1fr; }
  .azh-cta__face { justify-content: center; }
  .azh-cta { width: 100%; }
  .azh-cta__face { width: 100%; }
  .azh__foot { flex-direction: column; align-items: flex-start; }
  .azh__card::before, .azh-cta::before, .azh-cta__shimmer,
  .azh__shimmer::before { animation: none !important; }
}
