/* ───────────── Schriften (lokal, kein Google-Abruf) ───────────── */
@font-face {
  font-family: 'Unbounded';
  src: url('/fonts/unbounded.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('/fonts/instrument-sans.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

/* ───────────── Tokens ───────────── */
:root {
  --night:   #0E1233;
  --night-2: #171C4A;
  --gold:    #F4B942;
  --teal:    #3FD0C2;
  --violet:  #6A54F0;
  --text:    #EEF0FA;
  --muted:   #A9AFD0;

  --glass:        rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --edge:         rgba(255, 255, 255, 0.14);
  --edge-soft:    rgba(255, 255, 255, 0.08);

  --spark-a: #8306D4;
  --spark-b: #D31785;
  --spark-c: #FB6822;

  --display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Typo-Skala (Quarte, 1.333) */
  --t-sm: 0.875rem;
  --t-md: 1.0625rem;
  --t-lg: 1.333rem;
  --t-xl: 1.777rem;
  --t-2xl: clamp(1.9rem, 4vw, 2.37rem);

  --wrap: 1120px;
  --r-slab: 40px;
  --r-panel: 28px;
  --r-tile: 20px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--t-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip {
  position: absolute; left: 1rem; top: -4rem;
  padding: .6rem 1rem; background: var(--gold); color: var(--night);
  border-radius: 999px; font-weight: 600; z-index: 100;
}
.skip:focus { top: 1rem; }

/* ───────────── Farbverläufe im Hintergrund ───────────── */
.aurora {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, var(--night-2), var(--night) 70%);
}
.aurora span {
  position: absolute; border-radius: 50%;
  filter: blur(90px);
  opacity: 0;
  animation: bloom 1.6s cubic-bezier(.2,.7,.2,1) forwards, drift 38s ease-in-out infinite alternate;
}
.aurora .a1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -10vmax; background: var(--violet); --o: .55; }
.aurora .a2 { width: 34vmax; height: 34vmax; right: -8vmax; top: 18vh; background: var(--gold); --o: .32; animation-delay: .15s, 0s; animation-duration: 1.6s, 46s; }
.aurora .a3 { width: 40vmax; height: 40vmax; left: 30vw; bottom: -22vmax; background: var(--teal); --o: .30; animation-delay: .3s, 0s; animation-duration: 1.6s, 52s; }

@keyframes bloom { from { opacity: 0; transform: scale(.7); } to { opacity: var(--o); transform: scale(1); } }
@keyframes drift {
  from { translate: 0 0; }
  to   { translate: 6vmax -4vmax; }
}

/* feines Rauschen gegen Farbstreifen */
.aurora::after {
  content: ''; position: absolute; inset: 0; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────────── Glas ───────────── */
.glass {
  background:
    linear-gradient(155deg, rgba(255,255,255,.10), rgba(255,255,255,.02) 45%),
    var(--glass);
  border: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 30px 60px -30px rgba(3, 5, 25, .7);
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* ───────────── Navigation ───────────── */
.nav {
  position: sticky; top: 1rem; z-index: 50;
  width: min(100% - 2rem, var(--wrap));
  margin: 1rem auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem .6rem .55rem 1.3rem;
  border-radius: 999px;
}
.nav__brand {
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: -.02em; text-decoration: none;
}
.nav__links { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: block; padding: .5rem .95rem; border-radius: 999px;
  text-decoration: none; font-size: var(--t-sm); color: var(--muted);
  transition: background .2s, color .2s;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); background: var(--glass-strong); }

.nav__toggle { display: none; }

@media (max-width: 720px) {
  .nav { padding-right: .45rem; flex-wrap: wrap; border-radius: 28px; }
  .nav__toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 0; border-radius: 999px; background: var(--glass-strong); color: var(--text); cursor: pointer;
  }
  .nav__links { display: none; width: 100%; flex-direction: column; padding: .25rem 0 .5rem; }
  .nav[data-open="true"] .nav__links { display: flex; }
  .nav__links a { padding: .75rem 1rem; font-size: var(--t-md); }
}

/* ───────────── Hero ───────────── */
.hero { padding: clamp(3rem, 9vh, 6rem) 0 clamp(3rem, 8vh, 5rem); }

.hero__slab {
  position: relative;
  border-radius: var(--r-slab);
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4.5rem) clamp(2rem, 5vw, 3.5rem);
  overflow: hidden;
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4.2rem, 20vw, 17.5rem);
  line-height: .9;
  letter-spacing: -.055em;
  display: flex;
  color: transparent;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,.55));
  -webkit-background-clip: text;
  background-clip: text;
}
.wordmark span {
  display: inline-block;
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(.35s + var(--i) * .06s);
  padding: .14em .08em .08em;
  margin: -.14em -.08em -.08em;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
}
.wordmark span:nth-child(1) { --i: 0; }
.wordmark span:nth-child(2) { --i: 1; }
.wordmark span:nth-child(3) { --i: 2; }
.wordmark span:nth-child(4) { --i: 3; }
.wordmark span:nth-child(5) { --i: 4; }
.wordmark span:nth-child(6) { --i: 5; }
@keyframes rise { from { transform: translateY(.35em); opacity: 0; } to { transform: none; opacity: 1; } }

.hero__lede {
  max-width: 34ch;
  margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
  font-size: var(--t-lg);
  line-height: 1.45;
  color: var(--muted);
}
.hero__lede strong { color: var(--text); font-weight: 600; }

.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
@media (max-width: 600px) { .wordmark { font-size: 23vw; } }


/* ───────────── Buttons ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .75rem 1.4rem;
  border-radius: 999px; border: 1px solid transparent;
  font: 600 var(--t-md)/1 var(--body);
  text-decoration: none; cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn--gold { background: var(--gold); color: #1B1606; }
.btn--gold:hover { background: #FFC955; }
.btn--glass { background: var(--glass-strong); border-color: var(--edge); color: var(--text); }
.btn--glass:hover { background: rgba(255,255,255,.16); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ───────────── Abschnitte ───────────── */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }

.section__head { display: grid; gap: .75rem; max-width: 60ch; margin-bottom: 2.25rem; }
.section__head h2 {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: var(--t-2xl); letter-spacing: -.03em; line-height: 1.15;
}
.section__head p { margin: 0; color: var(--muted); }

/* ───────────── Status-Chips ───────────── */
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .28rem .7rem; border-radius: 999px;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: rgba(255,255,255,.07); color: var(--muted);
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip--stable  { color: var(--teal); background: rgba(63,208,194,.12); }
.chip--testing { color: var(--gold); background: rgba(244,185,66,.12); }
.chip--wip     { color: #A89BFF;     background: rgba(106,84,240,.18); }
.chip--planned { color: var(--muted); }

/* ───────────── Plugins ───────────── */
.plugins { display: grid; gap: 1rem; grid-template-columns: repeat(6, 1fr); }

.tile {
  grid-column: span 2;
  display: flex; flex-direction: column; gap: .8rem;
  padding: 1.5rem;
  border-radius: var(--r-tile);
}
.tile--featured { grid-column: span 3; padding: 2rem; }
.tile__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.tile h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: var(--t-lg); letter-spacing: -.02em; line-height: 1.25; }
.tile--featured h3 { font-size: var(--t-xl); }
.tile p { margin: 0; color: var(--muted); flex: 1; }
.tile__link {
  align-self: flex-start; margin-top: .25rem;
  font-weight: 600; font-size: var(--t-sm); color: var(--gold);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(244,185,66,.4);
}
.tile__link:hover { text-decoration-color: var(--gold); }

.planned {
  grid-column: 1 / -1;
  padding: 1.5rem; border-radius: var(--r-tile);
  display: flex; flex-direction: column; justify-content: center; gap: .9rem;
}
.planned--span2 { grid-column: span 2; }
.planned--span4 { grid-column: span 4; }
.planned p { margin: 0; color: var(--muted); font-size: var(--t-sm); }
.planned ul { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.planned li { padding: .3rem .8rem; border: 1px solid var(--edge-soft); border-radius: 999px; font-size: var(--t-sm); }

@media (max-width: 900px) {
  .plugins { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile--featured { grid-column: span 1; }
  .planned, .planned--span2, .planned--span4 { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .plugins { grid-template-columns: 1fr; }
}

/* ───────────── Mods (Liste statt Karten) ───────────── */
.modlist { border-radius: var(--r-panel); padding: .5rem clamp(1rem, 3vw, 2rem); }
.modlist ul { list-style: none; margin: 0; padding: 0; }
.modlist li {
  display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr auto; align-items: baseline; gap: .5rem 1.5rem;
  padding: 1.25rem 0;
}
.modlist li + li { border-top: 1px solid var(--edge-soft); }
.modlist h3 { margin: 0; font-family: var(--display); font-weight: 600; font-size: var(--t-md); letter-spacing: -.01em; }
.modlist p { margin: 0; color: var(--muted); }
@media (max-width: 720px) {
  .modlist li { grid-template-columns: 1fr auto; }
  .modlist p { grid-column: 1 / -1; grid-row: 2; }
}

/* ───────────── Spark ───────────── */
.spark {
  position: relative; overflow: hidden;
  border-radius: var(--r-panel);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  display: grid; grid-template-columns: auto 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start;
}
.spark::before {
  content: ''; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(211,23,133,.45), rgba(131,6,212,.25) 45%, transparent 70%);
  filter: blur(40px); z-index: -1;
}
.spark__logo { width: clamp(88px, 12vw, 128px); border-radius: 28%; box-shadow: 0 20px 50px -15px rgba(211,23,133,.6); }
.spark h2 {
  margin: 0 0 1rem; font-family: var(--display); font-weight: 700; font-size: var(--t-2xl); letter-spacing: -.03em;
}
.spark__claim { margin: 0 0 1rem; font-size: var(--t-lg); line-height: 1.45; max-width: 36ch; }
.spark__text { margin: 0; color: var(--muted); max-width: 62ch; }
.spark__points {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.5rem;
  margin: 1.75rem 0 2rem; padding: 0; list-style: none;
}
.spark__points li { display: flex; gap: .65rem; align-items: baseline; }
.spark__points li::before {
  content: ''; flex: none; width: 10px; height: 10px; border-radius: 3px; translate: 0 1px;
  background: linear-gradient(135deg, var(--spark-a), var(--spark-b), var(--spark-c));
}
.btn--spark { background: linear-gradient(120deg, var(--spark-a), var(--spark-b) 55%, var(--spark-c)); color: #fff; }
.btn--spark:hover { filter: brightness(1.1); }

@media (max-width: 720px) {
  .spark { grid-template-columns: 1fr; }
  .spark__points { grid-template-columns: 1fr; }
}

/* ───────────── Downloads ───────────── */
.downloads { border-radius: var(--r-panel); padding: clamp(1.25rem, 3vw, 2rem); }
.downloads__note {
  display: flex; gap: .75rem; align-items: flex-start;
  margin: 0 0 1.5rem; padding: 1rem 1.2rem; border-radius: 16px;
  background: rgba(244,185,66,.08); border: 1px solid rgba(244,185,66,.2);
  font-size: var(--t-sm); color: var(--muted);
}
.downloads__note svg { flex: none; width: 20px; height: 20px; color: var(--gold); margin-top: 1px; }

.dl-group + .dl-group { margin-top: 1.75rem; }
.dl-group h3 { margin: 0 0 .5rem; font-size: var(--t-sm); font-weight: 600; color: var(--muted); }

.dl {
  display: grid; grid-template-columns: 1fr auto; gap: .35rem 1.25rem; align-items: center;
  padding: 1.1rem 0; border-top: 1px solid var(--edge-soft);
}
.dl__name { margin: 0; font-weight: 600; font-size: var(--t-md); }
.dl__meta { margin: 0; font-size: var(--t-sm); color: var(--muted); }
.dl__desc { grid-column: 1; margin: 0; color: var(--muted); font-size: var(--t-sm); }
.dl .btn { grid-column: 2; grid-row: 1 / span 3; min-height: 44px; padding: .6rem 1.1rem; }

@media (max-width: 560px) {
  .dl { grid-template-columns: 1fr; }
  .dl .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .5rem; }
}

.state { padding: 2rem 0; text-align: center; color: var(--muted); }
.state--error { color: #FF9E9E; }

.skeleton { height: 70px; border-radius: 14px; margin-top: .75rem; background: linear-gradient(90deg, var(--glass), var(--glass-strong), var(--glass)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ───────────── Passwort-Dialog ───────────── */
.dialog {
  width: min(100% - 2rem, 440px);
  padding: 0; border: 0; border-radius: var(--r-panel);
  color: var(--text); background: transparent;
}
.dialog::backdrop { background: rgba(8, 10, 32, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.dialog[open] { animation: pop .28s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { transform: scale(.94) translateY(8px); opacity: 0; } }

.dialog__body { padding: 2rem; border-radius: var(--r-panel); background-color: rgba(23, 28, 74, .72); }
.dialog h2 { margin: 0 0 .35rem; font-family: var(--display); font-weight: 600; font-size: var(--t-lg); letter-spacing: -.02em; }
.dialog__file { margin: 0 0 1.5rem; color: var(--muted); font-size: var(--t-sm); }
.dialog label { display: block; margin-bottom: .45rem; font-size: var(--t-sm); font-weight: 600; }

.field { position: relative; }
.field input {
  width: 100%; min-height: 50px; padding: .8rem 3.2rem .8rem 1rem;
  border-radius: 14px; border: 1px solid var(--edge);
  background: rgba(8, 10, 32, .45); color: var(--text);
  font: 500 var(--t-md) var(--body);
}
.field input:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.field input[aria-invalid="true"] { border-color: #FF8A8A; }
.field button {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%;
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.field button:hover { color: var(--text); background: var(--glass-strong); }
.field svg { width: 20px; height: 20px; }

.dialog__msg { min-height: 1.5rem; margin: .6rem 0 0; font-size: var(--t-sm); }
.dialog__msg[data-kind="error"] { color: #FF9E9E; }
.dialog__msg[data-kind="ok"] { color: var(--teal); }

.dialog__actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1.25rem; }

/* ───────────── Tutorials ───────────── */
.docs { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; padding: 3rem 0 5rem; }
.docs__nav { position: sticky; top: 6rem; border-radius: var(--r-panel); padding: 1.25rem; }
.docs__nav h2 { margin: .25rem .5rem .75rem; font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.docs__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.docs__nav a { display: block; padding: .6rem .75rem; border-radius: 12px; text-decoration: none; color: var(--muted); }
.docs__nav a:hover { color: var(--text); background: var(--glass); }
.docs__nav a[aria-current="page"] { color: var(--text); background: var(--glass-strong); }

.doc { border-radius: var(--r-panel); padding: clamp(1.5rem, 5vw, 3.5rem); }
.doc .doc__group { margin: 0 0 .5rem; color: var(--gold); font-size: var(--t-sm); font-weight: 600; }
.doc h1 { margin: 0 0 .75rem; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.035em; line-height: 1.1; }
.doc .doc__intro { margin: 0 0 2.5rem; font-size: var(--t-lg); color: var(--muted); max-width: 52ch; }
.doc section { max-width: 68ch; }
.doc section + section { margin-top: 2.5rem; padding-top: 2.5rem; border-top: 1px solid var(--edge-soft); }
.doc h2 { margin: 0 0 .9rem; font-family: var(--display); font-weight: 600; font-size: var(--t-xl); letter-spacing: -.02em; }
.doc p { margin: 0 0 1rem; }
.doc ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.doc li { margin-bottom: .45rem; }
.doc li::marker { color: var(--gold); }
.doc pre {
  margin: 0 0 1rem; padding: 1rem 1.25rem; border-radius: 14px; overflow-x: auto;
  background: rgba(8, 10, 32, .55); border: 1px solid var(--edge-soft);
  font: 500 .95rem/1.6 ui-monospace, 'Cascadia Code', Consolas, monospace; color: #F9DFA2;
}
.doc .doc__note {
  margin: 0 0 1rem; padding: .9rem 1.1rem; border-left: 3px solid var(--teal);
  background: rgba(63,208,194,.08); border-radius: 0 12px 12px 0; font-size: var(--t-sm);
}

@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; padding-top: 2rem; }
  .docs__nav { position: static; }
  .docs__nav ul { display: flex; flex-wrap: wrap; gap: .4rem; }
}

/* ───────────── Footer ───────────── */
.footer { padding: 2.5rem 0 3rem; color: var(--muted); font-size: var(--t-sm); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--edge-soft); padding-top: 1.5rem; }
.footer a { text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 3px; }

/* ───────────── Weniger Bewegung ───────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .aurora span { opacity: var(--o); }
}

/* Fallback ohne backdrop-filter (ältere Browser) */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(23, 28, 74, .92); }
}
