/* landing.css — Orion Landing Page (Modul-Hub).
   Eigenstaendige Vollbild-Szene, absichtlich getrennt von orion.css.
   Ebenen: Canvas (z 0) < Sternknoten (z 1) < Kopf/Fuss (z 2). */

:root {
  --space-900: #070a14;
  --space-700: #131b33;
  --ink: #e8eefb;
  --ink-dim: #b9c6e2;
  --ink-faint: #7181a5;
  --glow: #7ea2ff;
  --glow-soft: rgba(126, 162, 255, 0.45);
  --gold: #d9a54a; /* Brand-Gold (#b08322), fuer dunklen Grund aufgehellt */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body.cosmos {
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background: radial-gradient(ellipse 120% 90% at 50% 30%,
              var(--space-700) 0%, var(--space-900) 70%);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

#constellation {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---- Kopf ---- */

.sky-head {
  position: relative;
  z-index: 2;
  text-align: center;
  padding-top: clamp(28px, 6vh, 64px);
}

.wordmark {
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 500;
  letter-spacing: 0.55em;
  text-indent: 0.55em; /* gleicht das Tracking aus, haelt den Schriftzug mittig */
  color: var(--ink);
  text-shadow: 0 0 24px var(--glow-soft);
  animation: driftIn 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hub-date {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  animation: fadeIn 1.2s 0.5s both;
}

/* ---- Sternknoten ---- */

.sky {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 62vh;
}

.node {
  position: absolute;
  width: 116px;
  text-align: center;
  text-decoration: none;
  transform: translate(-50%, -50%);
  animation: fadeIn 0.8s calc(0.9s + var(--i, 0) * 0.14s) both;
}

/* Lockerer Kreis um die Konstellation (Canvas-Zentrum ~44% Hoehe) */
/* Drei Module: Dreieck-Anordnung (Ledger, Hercules, Nutrition) */
.node:nth-child(1) { left: 22%; top: 32%; }
.node:nth-child(2) { left: 78%; top: 30%; }
.node:nth-child(3) { left: 50%; top: 74%; }

.node__orbwrap {
  position: relative;
  display: block;
  width: 60px;
  height: 60px;
  margin: 0 auto;
}

.node__orb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 24px;
  background: radial-gradient(circle at 38% 32%, #eaf1ff, #9db8f0 45%, #33508f 100%);
  box-shadow: 0 0 20px 5px var(--glow-soft), inset 0 0 10px rgba(255, 255, 255, 0.28);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.node__ring {
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px dashed rgba(126, 162, 255, 0.4);
  animation: ringspin 16s linear infinite;
  transition: inset 0.35s ease, border-color 0.35s ease;
}

.node__ring::after {
  /* Satellit auf dem Ring — Brand-Gold als Akzent */
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px 2px rgba(217, 165, 74, 0.6);
}

.node__label {
  display: block;
  margin-top: 15px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: color 0.3s, text-shadow 0.3s;
}

.node__sub {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

a.node:not(.node--locked):hover .node__orb,
a.node:not(.node--locked):focus-visible .node__orb {
  box-shadow: 0 0 34px 10px rgba(126, 162, 255, 0.55), inset 0 0 12px rgba(255, 255, 255, 0.4);
  transform: scale(1.08);
}

a.node:not(.node--locked):hover .node__ring,
a.node:not(.node--locked):focus-visible .node__ring {
  inset: -15px;
  border-color: rgba(168, 196, 255, 0.65);
}

a.node:not(.node--locked):hover .node__label,
a.node:not(.node--locked):focus-visible .node__label {
  color: var(--ink);
  text-shadow: 0 0 12px var(--glow);
}

a.node:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 6px;
  border-radius: 8px;
}

/* Gesperrte Module: erloschene Sterne */
.node--locked .node__orb {
  font-size: 17px;
  background: radial-gradient(circle at 38% 32%, #3a4256, #232a3c 55%, #12172a 100%);
  box-shadow: 0 0 10px 2px rgba(47, 60, 92, 0.3);
}

.node--locked .node__ring {
  border-color: rgba(58, 69, 96, 0.25);
  animation-duration: 34s;
}

.node--locked .node__ring::after {
  background: var(--ink-faint);
  box-shadow: none;
}

.node--locked .node__label { color: var(--ink-faint); }

div.node--locked { cursor: default; }

.node--locked:hover .node__sub,
a.node--locked:focus-visible .node__sub { color: var(--ink-dim); }

/* ---- Fuss ---- */

.sky-foot {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 18px 0 22px;
}

.quiet-link {
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s;
}

.quiet-link:hover,
.quiet-link:focus-visible { color: var(--ink-dim); }

.quiet-link:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---- Animationen ---- */

@keyframes driftIn {
  from { opacity: 0; letter-spacing: 0.85em; }
  to   { opacity: 1; letter-spacing: 0.55em; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ringspin {
  to { transform: rotate(360deg); }
}

/* ---- Mobile: Konstellation oben, Knoten als Raster darunter ---- */

@media (max-width: 720px), (max-height: 480px) and (orientation: landscape) {
  .sky {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 8px;
    align-content: start;
    padding: 42vh 16px 24px;
  }

  .node {
    position: static;
    transform: none;
    justify-self: center;
  }

  .node:nth-child(5) { grid-column: 1 / -1; }
}

/* ---- Reduzierte Bewegung: alles steht ---- */

@media (prefers-reduced-motion: reduce) {
  .wordmark, .tagline, .node { animation: none; }
  .node__ring { animation: none; }
}

/* ==== Mission Control (eingeloggt): Himmel oben, Deck unten ==== */

.node__orb--svg svg { width: 26px; height: 26px; color: #24406e; display: block; }

.hub {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) clamp(24px, 6vh, 56px);
}

/* Status-Sterne im Himmel (spiegeln den Karten-Zustand) */
.skyband { position: absolute; inset: 0 0 40%; pointer-events: none; }
.skystar {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: 0.9;
}
.skystar--ledger { left: 34%; top: 42%; }
.skystar--herc { left: 64%; top: 28%; }
.skystar.is-ok { background: #57b990; box-shadow: 0 0 16px 4px rgba(87, 185, 144, 0.55); }
.skystar.is-warn {
  background: #e07a6a;
  box-shadow: 0 0 18px 5px rgba(224, 122, 106, 0.65);
  animation: starpulse 1.8s ease-in-out infinite;
}
.skystar.is-ember { background: #ff7a33; box-shadow: 0 0 18px 5px rgba(255, 122, 51, 0.6); }
.skystar.is-dim { background: #33406a; box-shadow: none; opacity: 0.6; }
@keyframes starpulse {
  50% { box-shadow: 0 0 6px 1px rgba(224, 122, 106, 0.25); }
}

/* Karten-Deck */
.deck {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  animation: fadeIn 0.9s 0.5s both;
}
.hubcard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(126, 162, 255, 0.18);
  backdrop-filter: blur(6px);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
a.hubcard:hover { transform: translateY(-3px); border-color: rgba(126, 162, 255, 0.45); background: rgba(255, 255, 255, 0.075); }
.hubcard--dim { opacity: 0.45; }
.hubcard__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.hubcard__glyph svg { width: 16px; height: 16px; color: var(--ink-dim); display: block; }
.hubcard__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hubcard__dot.is-ok { background: #57b990; box-shadow: 0 0 8px rgba(87, 185, 144, 0.9); }
.hubcard__dot.is-warn { background: #e07a6a; box-shadow: 0 0 9px rgba(224, 122, 106, 0.95); animation: starpulse 1.8s ease-in-out infinite; }
.hubcard__dot.is-ember { background: #ff7a33; box-shadow: 0 0 9px rgba(255, 122, 51, 0.9); }
.hubcard__dot.is-dim { background: #33406a; }
.hubcard__big { font-size: clamp(17px, 2.2vw, 21px); font-weight: 700; font-variant-numeric: tabular-nums; }
.hubcard__more { font-size: 12px; font-weight: 600; color: var(--ink-faint); vertical-align: middle; }
.hubcard__sub { font-size: 12px; color: var(--ink-faint); line-height: 1.45; }
.is-warntext { color: #e07a6a; font-weight: 600; }

/* Tageszeit toent den Himmel (Klasse setzt constellation.js) */
body.sky-morning { background: radial-gradient(ellipse 120% 90% at 50% 30%, #1a2440 0%, #0a0d18 70%); }
body.sky-day { background: radial-gradient(ellipse 120% 90% at 50% 30%, #16223f 0%, var(--space-900) 70%); }
body.sky-evening { background: radial-gradient(ellipse 120% 90% at 50% 30%, #251d38 0%, #090812 70%); }
body.sky-night { background: radial-gradient(ellipse 120% 90% at 50% 30%, #0d1226 0%, #05070f 70%); }

@media (max-width: 720px) {
  .deck { grid-template-columns: 1fr; gap: 10px; }
  .hub { justify-content: flex-end; padding-bottom: 20px; }
  .skyband { inset: 0 0 62%; }
}

@media (prefers-reduced-motion: reduce) {
  .skystar.is-warn, .hubcard__dot.is-warn { animation: none; }
  .deck { animation: none; }
}
