/* ============================================================
   KapFixIT Welt: Layout und Look.
   Farben als Variablen, damit ein Rebranding eine Zeile ist.
   ============================================================ */

@font-face { font-family: 'Unbounded'; src: url('../fonts/unbounded-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Unbounded'; src: url('../fonts/unbounded-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('../fonts/manrope-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --primary: #5b5bd6;
  --primary-light: #8f8ff5;
  --violet: #7a4fd6;
  --ember: #ff7a45;
  --bg: #07070d;
  --text: #ececf6;
  --muted: #a5a5c4;
  --glass: rgba(12, 12, 26, 0.6);
  --line: rgba(143, 143, 245, 0.2);
  --radius: 22px;
  --font-head: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; background: var(--primary); color: #fff; border-radius: 10px; text-decoration: none; }
.skip-link:focus { top: 16px; }

/* ---------- 3D-Hintergrund ---------- */
#welt-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; display: block; z-index: 0; }

/* Vignette: dunkle Ränder geben dem Bild Tiefe, kostet nichts */
.welt-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(4,4,10,.55) 100%); }
.welt-static .welt-vignette { display: none; }

/* ---------- Loader ---------- */
.welt-loader {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: var(--bg);
  transition: opacity .7s ease, visibility .7s;
  animation: loader-failsafe .6s ease 5s forwards; /* verschwindet auch, falls JavaScript hängt */
}
.welt-ready .welt-loader { opacity: 0; visibility: hidden; }
.welt-loader__box { display: grid; gap: 14px; font-family: var(--font-mono); color: var(--primary-light); font-size: 15px; }
.welt-loader__bar { width: 220px; height: 3px; background: rgba(143,143,245,.15); border-radius: 3px; overflow: hidden; }
.welt-loader__bar i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--primary), var(--violet)); animation: loader-run 1.1s ease-in-out infinite; }
@keyframes loader-run { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- Kopfzeile und Navigation ---------- */
.welt-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: max(18px, env(safe-area-inset-top)) clamp(16px, 4vw, 48px) 18px; pointer-events: none;
}
.welt-header a { pointer-events: auto; text-decoration: none; }
.welt-brand { font-family: var(--font-head); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.welt-brand span { color: var(--primary-light); }
.welt-header__link { font-size: 14px; color: var(--muted); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(10px); }
.welt-header__link:hover { color: var(--text); border-color: var(--primary-light); }

.welt-nav { position: fixed; right: clamp(12px, 2.5vw, 32px); top: 50%; transform: translateY(-50%); z-index: 20; display: grid; gap: 14px; }
.welt-dot { position: relative; display: block; width: 10px; height: 10px; border-radius: 50%; background: rgba(143,143,245,.3); transition: transform .3s, background .3s; }
.welt-dot[aria-current] { background: var(--primary-light); transform: scale(1.5); box-shadow: 0 0 14px var(--primary); }
.welt-dot span { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 13px; color: var(--text); opacity: 0; pointer-events: none; transition: opacity .2s; }
.welt-dot:hover span, .welt-dot:focus-visible span { opacity: 1; }

/* ---------- Stationen ---------- */
.welt-main { position: relative; z-index: 10; pointer-events: none; } /* Leerflächen leiten Klicks an die 3D-Welt weiter */
.station { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 96px clamp(16px, 6vw, 96px); }
.station--finale { min-height: 120svh; }

.station-card {
  pointer-events: auto; max-width: 470px; padding: clamp(22px, 3vw, 34px);
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05);
}
/* Einblenden nur, wenn JavaScript läuft. Ohne JS (oder wenn das Skript nicht lädt) bleibt alles sichtbar. */
@media (scripting: enabled) {
  html:not(.welt-static) .station-card { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
  html:not(.welt-static) .station.is-active .station-card { opacity: 1; transform: none; }
  html:not(.welt-ready) .station-card { animation: reveal-failsafe .6s ease 6s forwards; }
}
@keyframes reveal-failsafe { to { opacity: 1; transform: none; } }

.eyebrow { margin: 0 0 10px; font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; color: var(--primary-light); }
h1, h2 { font-family: var(--font-head); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; margin: 0 0 14px; }
h1 { font-size: clamp(30px, 4.4vw, 54px); }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--primary-light), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { font-size: clamp(24px, 2.8vw, 36px); }
.station-card p { margin: 0 0 18px; color: var(--muted); }
.station-card p:last-child { margin-bottom: 0; }

.station-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--primary-light); }
.station-link::after { content: '\2192'; transition: transform .2s; }
.station-link:hover::after { transform: translateX(4px); }

.cta {
  display: inline-block; padding: 14px 26px; border-radius: 999px; font-weight: 700; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--ember), #ff5a7a); box-shadow: 0 10px 30px rgba(255,122,69,.35); transition: transform .2s, box-shadow .2s;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(255,122,69,.45); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.cta--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.cta--ghost:hover { border-color: var(--primary-light); box-shadow: none; }
.station-soon { display: inline-block; font-family: var(--font-mono); font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 6px 12px; }
.station-mail { font-size: 15px; }
.station-mail a { color: var(--primary-light); text-decoration: none; }
.station-mail a:hover { text-decoration: underline; }

a:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 3px; border-radius: 6px; }

.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(var(--primary-light), transparent); animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 0%, 100% { transform: scaleY(.4); transform-origin: top; } 50% { transform: scaleY(1); } }
.station--hero { position: relative; }

.welt-footer { position: relative; z-index: 10; display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 28px 16px 40px; font-size: 13px; color: var(--muted); }

/* ---------- Hochformat: Insel oben, Text unten ---------- */
@media (max-aspect-ratio: 1/1) {
  .station { align-items: flex-end; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .station-card { max-width: none; width: 100%; }
  .welt-nav { gap: 10px; }
  .welt-dot { width: 8px; height: 8px; }
  .welt-dot span { display: none; }
  .scroll-hint { display: none; }
  .station--finale { min-height: 100svh; }
  body { font-size: 16px; }
}

/* ---------- Ohne 3D (kein WebGL oder "Bewegung reduzieren" aktiv) ---------- */
.welt-static #welt-canvas { display: none; }
.welt-static body {
  background:
    radial-gradient(1200px 700px at 80% 10%, rgba(91,91,214,.28), transparent 60%),
    radial-gradient(900px 600px at 10% 90%, rgba(122,79,214,.22), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.welt-static .station { min-height: auto; padding-block: 72px; }
.welt-static .station--hero { min-height: 80svh; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
