/* Majestic Studios
   Look: Game-Studio statt Tech-Template. Graphit, Gold aus dem "Steal a Sword"-Schriftzug,
   Discord-Blau nur für Discord. Kursive Großbuchstaben wie im Logo, harte Kanten statt Glow.
   Radien: Karten/Bilder 12px, Panels 16px, Buttons 8px, Labels 4px. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wdth-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
  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;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext-wdth-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #0d0d0f;
  --bg-alt: #111114;
  --surface: #17171b;
  --surface-hi: #1f1f24;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f3f2ee;
  --muted: #b2b0a9;
  --faint: #8c8a84;

  --gold: #ffc83d;
  --gold-deep: #c58f0e;
  --gold-ink: #1b1403;
  --gold-soft: rgba(255, 200, 61, 0.12);

  --discord: #5865f2;
  --discord-hover: #4752c4;
  --discord-deep: #3a43a8;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r: 12px;
  --r-panel: 16px;
  --r-btn: 8px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 88px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255, 200, 61, 0.2);
}

::selection {
  background: var(--gold);
  color: var(--gold-ink);
}
/* Bilder und Deko lassen sich nicht markieren oder wegziehen */
img,
svg,
.join-art,
.skill-bg,
.ghost,
.member {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: min(1440px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}
/* Kopf- und Fußzeile nutzen die volle Breite: Logo ganz links, Aktionen ganz rechts */
.container-wide {
  width: min(1840px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* Überschriften im Stil des Logos: kursiv, breit, Großbuchstaben */
h1,
h2,
h3 {
  font-style: italic;
  font-weight: 900;
  font-stretch: 112%;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--r-btn);
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus {
  transform: none;
}

/* ---------- Buttons & Labels ---------- */

.btn {
  --edge: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  height: 52px;
  padding: 0 1.4rem;
  border: 2px solid transparent;
  border-radius: var(--r-btn);
  background: none;
  color: var(--text);
  font: italic 800 0.95rem/1 var(--font);
  font-stretch: 108%;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--edge);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--edge);
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--edge);
}
.btn-gold {
  --edge: var(--gold-deep);
  background: var(--gold);
  color: var(--gold-ink);
}
.btn-discord {
  --edge: var(--discord-deep);
  background: var(--discord);
  color: #fff;
}
.btn-discord:hover {
  background: var(--discord-hover);
}
.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(13, 13, 15, 0.35);
}
.btn-ghost:hover {
  border-color: var(--text);
  transform: none;
  box-shadow: none;
}
.btn-ghost:active {
  transform: translateY(1px);
  box-shadow: none;
}
.btn-sm {
  height: 42px;
  padding: 0 1rem;
  font-size: 0.8rem;
}
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.btn .icon-move {
  transition: transform 0.25s var(--ease);
}
.btn:hover .icon-move {
  transform: translateY(2px);
}

/* Offizielles Discord-Logo; auf Discord-Blau weiß wie bei Discord selbst */
.discord-logo {
  width: 22px;
  height: 22px;
  flex: none;
}
.btn-discord .discord-logo {
  filter: brightness(0) invert(1);
}
.btn-sm .discord-logo {
  width: 18px;
  height: 18px;
}

.label {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 0.55rem;
  border-radius: 4px;
  background: var(--surface-hi);
  color: var(--muted);
  font: italic 800 0.74rem/1 var(--font);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.label-gold {
  background: var(--gold);
  color: var(--gold-ink);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-btn);
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--text);
}
.icon-btn .icon {
  width: 16px;
  height: 16px;
}

/* Lichtschein, der der Maus folgt (Position kommt aus site.js) */
.spot {
  position: relative;
  isolation: isolate;
}
.spot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 200, 61, 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.spot:hover::after {
  opacity: 1;
}

/* ---------- Header ---------- */

.top-sentinel {
  position: absolute;
  top: 0;
  width: 1px;
  height: 1px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 13, 15, 0.92);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.site-header.is-scrolled {
  background: var(--bg);
  border-bottom-color: var(--line);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  height: var(--nav-h);
}
.brand {
  display: flex;
  align-items: center;
  justify-self: start;
}
.brand img {
  width: auto;
  height: 60px;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--muted);
  font: italic 800 0.88rem/1 var(--font);
  font-stretch: 108%;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.6rem;
}
.lang-toggle {
  gap: 0.4rem;
  padding: 0 0.8rem;
}
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
}
.menu-toggle .icon {
  width: 20px;
  height: 20px;
}

.mobile-menu {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0 1.25rem;
}
.mobile-menu ul {
  display: grid;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.mobile-menu a:not(.btn) {
  display: block;
  padding: 0.85rem 0.15rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: italic 900 1.15rem/1.2 var(--font);
  font-stretch: 110%;
  text-transform: uppercase;
  text-decoration: none;
}
.mobile-menu .btn {
  width: 100%;
}

@media (max-width: 959px) {
  .nav {
    grid-template-columns: auto 1fr;
  }
  .nav > nav,
  .nav-actions .nav-discord {
    display: none;
  }
  .menu-toggle {
    display: grid;
  }
  .brand img {
    height: 48px;
  }
}
@media (min-width: 960px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ---------- Hero: Studio + Neuigkeiten ---------- */

/* Startbildschirm füllt das ganze Fenster (unter der Navigation) */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--nav-h));
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(5rem, 9vw, 7rem);
}
.hero > .container {
  flex: 1;
  max-width: min(1440px, 100% - var(--gutter) * 2);
}
/* „Scroll“-Hinweis unten in der Mitte */
.scroll-cue {
  position: absolute;
  bottom: clamp(1.25rem, 3vh, 2.25rem);
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font: italic 900 0.7rem/1 var(--font);
  font-stretch: 112%;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
  translate: -50% 0;
  transition: color 0.25s ease;
}
.scroll-cue:hover {
  color: var(--gold);
}
.scroll-cue-mouse {
  position: relative;
  width: 24px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: 14px;
}
.scroll-cue-mouse::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--gold);
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue-mouse::after {
    animation: cue 1.8s var(--ease) infinite;
  }
}
@keyframes cue {
  0% { opacity: 0; transform: translateY(-3px); }
  30% { opacity: 1; }
  80%, 100% { opacity: 0; transform: translateY(12px); }
}
@media (max-height: 640px), (max-width: 1279px) {
  .scroll-cue {
    display: none;
  }
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: -50px;
  background: url("../img/splashlab/map-downtown.webp") 60% 40% / cover no-repeat;
  filter: blur(26px) saturate(1.3) brightness(0.5);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 13, 15, 0.94) 0%, rgba(13, 13, 15, 0.7) 42%, rgba(13, 13, 15, 0.35) 100%),
    linear-gradient(180deg, rgba(13, 13, 15, 0.6) 0%, transparent 25%, transparent 70%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 720px);
  align-items: center;
  gap: clamp(2.5rem, 4vw, 4rem);
}
/* Schriftgröße richtet sich nach der Breite der Textspalte, damit auch "Entwicklerstudio" passt */
.hero-copy {
  container-type: inline-size;
}
.hero h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(2rem, 7.4cqi, 4.4rem);
  line-height: 0.95;
  hyphens: manual;
  text-wrap: wrap;
}
.hero h1 .line {
  display: block;
}
.hero h1 .gold {
  color: var(--gold);
}
.hero-lead {
  max-width: 44ch;
  margin: 0 0 2rem;
  color: #cfcdc6;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
}
.hero-lead strong {
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.75rem;
  margin: clamp(2.25rem, 4vw, 3.25rem) 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-strong);
}
.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat dt {
  order: 2;
  color: var(--muted);
  font-size: 0.88rem;
}
.hero-stat dd {
  order: 1;
  margin: 0;
  font: italic 900 clamp(2rem, 3vw, 2.6rem)/1.05 var(--font);
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
}
.hero-stat .unit {
  margin-left: 0.08em;
  color: var(--gold);
  font-size: 0.6em;
}
.stat-online dd::before,
.stat-online-dot {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  margin: 0 0.55rem 0.35rem 0;
  border-radius: 50%;
  background: #23a55a;
  vertical-align: middle;
}

/* Changelog-Panel (halbtransparent) */
.cl-panel {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-panel);
  background: rgba(22, 22, 26, 0.58);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 50px 90px -30px rgba(0, 0, 0, 0.75);
}
.cl-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.65rem 0.75rem 0.95rem;
}
.cl-panel-title {
  margin: 0;
  font-size: 1rem;
  font-stretch: 108%;
}
.cl-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--faint);
  font-size: 0.82rem;
}
.live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #23a55a;
}
.cl-status.is-stale .live-dot {
  background: var(--faint);
}

.cl-scroll {
  max-height: min(520px, 62vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  border-radius: var(--r);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.cl-scroll::-webkit-scrollbar {
  width: 6px;
}
.cl-scroll::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}

.cl-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cl-entry {
  padding: 1.1rem 1.25rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.035);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.cl-entry:hover {
  border-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.055);
}
.cl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.8rem;
}
.cl-stamp {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 0.55rem;
  border-radius: 4px;
  background: rgba(255, 200, 61, 0.14);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cl-ago {
  color: var(--faint);
  font-size: 0.82rem;
}
.cl-author {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.cl-body {
  color: #dddcd6;
  font-size: 0.96rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.cl-body > :last-child {
  margin-bottom: 0;
}
.cl-body p,
.cl-body ul,
.cl-body blockquote,
.cl-body pre {
  margin: 0 0 0.65rem;
}
.cl-body ul {
  display: grid;
  gap: 0.35rem;
  padding: 0;
  list-style: none;
}
.cl-body li {
  position: relative;
  padding-left: 1rem;
  color: var(--text);
  font-weight: 600;
}
.cl-body li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0.15rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.cl-body .md-h1,
.cl-body .md-h2,
.cl-body .md-h3 {
  color: var(--text);
  font-weight: 800;
  line-height: 1.3;
}
.cl-body .md-h1 {
  font-size: 1.22rem;
}
.cl-body .md-h2 {
  font-size: 1.1rem;
}
.cl-body .md-h3 {
  font-size: 1rem;
}
.cl-body .md-sub {
  color: var(--faint);
  font-size: 0.8rem;
}
/* Discord-Inhalte so, wie man sie aus Discord kennt */
.cl-body a {
  color: #00a8fc;
  text-decoration: none;
}
.cl-body a:hover {
  text-decoration: underline;
}
.cl-body code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.85em;
}
.cl-body pre {
  overflow-x: auto;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
}
.cl-body pre code {
  padding: 0;
  background: none;
}
.cl-body blockquote {
  padding-left: 0.9rem;
  border-left: 4px solid #4e5058;
  color: var(--muted);
}
.mention {
  padding: 0 0.2em;
  border-radius: 3px;
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  font-weight: 500;
}
.spoiler {
  border-radius: 3px;
  background: #1e1f22;
  color: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.spoiler.is-revealed {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  cursor: auto;
}
.emoji {
  display: inline-block;
  width: 1.35em;
  height: 1.35em;
  object-fit: contain;
  vertical-align: -0.3em;
}

.cl-skeleton {
  display: grid;
  gap: 0.7rem;
}
.sk {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  background-size: 200% 100%;
}
.sk-meta {
  width: 150px;
}
.sk-line {
  width: 85%;
}
.sk-line.short {
  width: 55%;
}

.state-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.5rem;
  border: 2px dashed var(--line-strong);
  border-radius: var(--r);
  color: var(--muted);
}
.state-box p {
  margin: 0;
}
.state-box > .icon {
  width: 24px;
  height: 24px;
  color: var(--faint);
}

@media (max-width: 1279px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .cl-panel {
    max-width: 820px;
  }
}
@media (max-width: 599px) {
  .cl-entry {
    padding: 1rem;
  }
  .cl-author {
    margin-left: 0;
  }
}

/* Große Bildschirme: Startbereich nutzt den Platz – größere Schrift, breiteres und höheres News-Fenster */
@media (min-width: 1280px) {
  .hero > .container {
    max-width: min(1600px, 100% - var(--gutter) * 2);
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 780px);
    gap: clamp(3rem, 5vw, 6rem);
  }
  /* so groß, wie die längste Zeile in die Spalte passt („game studio.“ ≈ 8,8em, „Entwicklerstudio.“ ≈ 13,1em) */
  .hero h1 {
    font-size: clamp(3rem, 11cqi, 6.2rem);
  }
  html[lang="de"] .hero h1 {
    font-size: clamp(2.6rem, 7.5cqi, 6.2rem);
  }
  .hero-lead {
    max-width: 40ch;
    font-size: clamp(1.2rem, 1.3vw, 1.45rem);
  }
  .hero-ctas .btn {
    height: 60px;
    padding: 0 1.75rem;
    font-size: 1.05rem;
  }
  .hero-stat dd {
    font-size: clamp(2.6rem, 3.2vw, 3.4rem);
  }
  .hero-stat dt {
    font-size: 0.98rem;
  }
  .hero .cl-panel {
    padding: 12px;
  }
  .hero .cl-panel-title {
    font-size: 1.2rem;
  }
  .hero .cl-scroll {
    max-height: min(640px, 66vh);
  }
  .hero .cl-entry {
    padding: 1.3rem 1.5rem 1.45rem;
  }
  .hero .cl-body {
    font-size: 1.06rem;
  }
}

/* ---------- Abschnitte ---------- */

.section {
  padding: clamp(4.5rem, 9vw, 7.5rem) 0;
  overflow-x: clip;
}
.section-head {
  max-width: 760px;
  margin-bottom: clamp(2.25rem, 4vw, 3.25rem);
}
h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  line-height: 0.98;
}
.section-lead {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

/* ---------- Projekte: großes Banner, darunter drei Spalten ---------- */

.project {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
}
.project-banner {
  position: relative;
  overflow: hidden;
  aspect-ratio: 21 / 8;
  background: var(--surface-hi);
}
.project-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 4%;
  /* etwas größer, damit beim Parallax-Verschieben keine Kante sichtbar wird */
  transform: scale(1.12);
  transition: transform 1.6s var(--ease);
}
.project:hover .project-banner img {
  transform: scale(1.16);
}
/* Übergang vom Bild in die Karte */
.project-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(23, 23, 27, 0.85) 92%, var(--surface) 100%);
  pointer-events: none;
}

.project-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  margin-top: -2.5rem;
  padding: 0 clamp(1.5rem, 3.5vw, 2.75rem) clamp(1.75rem, 3.5vw, 2.75rem);
  position: relative;
}
.project-col {
  min-width: 0;
}
.project-about {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}
.project-tags {
  display: flex;
  gap: 0.5rem;
}
.project-about h3 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 0.95;
}
.project-desc {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.project-about .btn {
  margin-top: 0.4rem;
}

.project-progress {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  align-self: start;
  gap: 1.35rem;
  margin-top: 2.5rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.025);
}
.ring {
  position: relative;
  width: 112px;
  height: 112px;
}
.ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring circle {
  fill: none;
  stroke-width: 10;
}
.ring-track {
  stroke: var(--surface-hi);
}
.ring-value {
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 1.4s var(--ease);
}
.ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font: italic 900 1.8rem/1 var(--font);
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
}
.progress-label {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.roadmap {
  position: relative;
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.roadmap::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 9px;
  width: 2px;
  background: var(--line-strong);
}
.roadmap li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--faint);
  font-size: 0.93rem;
  font-weight: 600;
}
/* Rauten statt Kreise */
.roadmap .marker {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
}
.roadmap .marker::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid var(--line-strong);
  background: var(--surface);
  transform: rotate(45deg);
}
.roadmap li.is-done {
  color: var(--muted);
}
.roadmap li.is-done .marker::before {
  border-color: var(--gold);
  background: var(--gold);
}
.roadmap li.is-current {
  color: var(--text);
}
.roadmap li.is-current .marker::before {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 6px var(--gold);
}
.roadmap .label {
  margin-left: auto;
}

.features {
  display: grid;
  align-content: start;
  gap: 1.15rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}
.features li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}
.feat-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-btn);
  background: var(--gold-soft);
  color: var(--gold);
}
.feat-icon .icon {
  width: 22px;
  height: 22px;
}
.features h4 {
  margin: 0 0 0.1rem;
  font-size: 1rem;
  font-weight: 700;
}
.features p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.5;
}

/* Tools für GTA V: zwei Karten nebeneinander */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}
.project-tool {
  display: flex;
  flex-direction: column;
}
/* Promo-Bilder (2:1) mit eigener Schrift: ganz zeigen, keine Ecken-Deko darüber */
.project-tool .project-banner {
  aspect-ratio: 2 / 1;
}
.project-tool .project-banner img {
  object-position: 50% 50%;
  transform: none;
}
.project-tool:hover .project-banner img {
  transform: scale(1.03);
}
.project-tool .project-banner::before {
  display: none;
}
.project-tool .project-banner::after {
  background: linear-gradient(180deg, transparent 78%, rgba(23, 23, 27, 0.85) 94%, var(--surface) 100%);
}
.project-tool .project-body {
  margin-top: -1rem;
}
.project-tool .project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1.5rem;
}
.project-tool .project-about h3 {
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
}
.project-tool .project-tags {
  flex-wrap: wrap;
}
.project-tool .features {
  margin: 0;
}
.project-tool .project-cta {
  align-self: flex-start;
  margin-top: auto;
}

.project-teaser {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin-top: 18px;
  padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2.25rem);
  border: 2px dashed var(--line-strong);
  border-radius: var(--r-panel);
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.015) 0 12px, transparent 12px 24px);
}
.teaser-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--r);
  background: var(--surface-hi);
  color: var(--gold);
}
.teaser-icon .icon {
  width: 26px;
  height: 26px;
}
.project-teaser h3 {
  margin: 0 0 0.2rem;
  font-size: 1.35rem;
}
.project-teaser p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 1099px) {
  .project-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .project-about {
    grid-column: 1 / -1;
  }
  .project-progress,
  .features {
    margin-top: 0;
  }
  .tools-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 699px) {
  .project-banner {
    aspect-ratio: 16 / 9;
  }
  .project-body {
    grid-template-columns: minmax(0, 1fr);
    margin-top: -1.5rem;
  }
  .project-progress {
    grid-template-columns: 1fr;
  }
  .project-teaser {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

/* ---------- Studio ---------- */

/* weicher Übergang statt harter Kante: die Fläche blendet oben und unten in den Seitenhintergrund */
.section-studio {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 20%, var(--bg-alt) 80%, var(--bg) 100%);
}
.skills {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.skill {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 250px;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
  overflow: hidden;
}
.skill-wide {
  grid-column: span 4;
}
.skill-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: auto;
  border-radius: var(--r);
  background: var(--gold-soft);
  color: var(--gold);
}
.skill-icon .icon {
  width: 26px;
  height: 26px;
}
.skill h3 {
  margin: 1.5rem 0 0;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  line-height: 1;
}
.skill p {
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
}
/* Großes Game-Icon als Deko in der Ecke (Icons: game-icons.net, CC BY 3.0) */
.skill {
  position: relative;
  isolation: isolate;
}
.skill-bg {
  position: absolute;
  right: -1.5rem;
  bottom: -1.5rem;
  z-index: -1;
  width: clamp(140px, 16vw, 200px);
  aspect-ratio: 1;
  background: #fff;
  opacity: 0.06;
  -webkit-mask: var(--art) center / contain no-repeat;
  mask: var(--art) center / contain no-repeat;
  transform: rotate(-8deg);
  transition: opacity 0.4s ease, transform 0.6s var(--ease), background-color 0.4s ease;
}
.skill:hover .skill-bg {
  background: var(--gold);
  opacity: 0.14;
  transform: rotate(0deg) scale(1.06);
}
.skill-bg-gamepad { --art: url("../img/gi/gamepad.svg"); }
.skill-bg-gears { --art: url("../img/gi/gears.svg"); }
.skill-bg-castle { --art: url("../img/gi/castle.svg"); }
/* Eine Kachel mit Bildausschnitt für Abwechslung */
.skill-art {
  background:
    linear-gradient(90deg, var(--surface) 35%, rgba(23, 23, 27, 0.6) 70%, rgba(23, 23, 27, 0.2)),
    url("../img/splashlab/map-vinewood.webp") 95% 55% / 135% auto no-repeat;
  /* Hintergrund unter dem Rand starten, sonst wiederholt sich der Verlauf als helle Linie links */
  background-origin: border-box;
  background-repeat: no-repeat;
}

@media (max-width: 899px) {
  .skill,
  .skill-wide {
    grid-column: 1 / -1;
    min-height: 0;
  }
  /* Schmale Kachel: Text braucht mehr Abdunklung */
  .skill-art {
    background:
      linear-gradient(90deg, var(--surface) 45%, rgba(23, 23, 27, 0.75) 80%, rgba(23, 23, 27, 0.45)),
      url("../img/splashlab/map-vinewood.webp") 70% 50% / cover no-repeat;
    background-origin: border-box;
  }
}

/* ---------- Team ---------- */

.team-grid {
  display: grid;
  /* höchstens 4 pro Reihe */
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(220px, calc((100% - 54px) / 4))), 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (max-width: 559px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}
/* Spotlight-Karte: Profilbild füllt die Karte, schwarz-weiß; Hover macht es farbig */
.member {
  --rc: var(--gold);
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface-hi);
  color: var(--text);
  font: inherit;
  text-align: left;
  transition: border-color 0.35s ease;
}
button.member {
  cursor: zoom-in;
}
.member-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.45s ease, transform 0.6s var(--ease);
}
/* ohne Bild: Initialen groß in der Mitte */
.member-initials {
  position: absolute;
  inset: 0 0 25%;
  display: grid;
  place-items: center;
  color: var(--gold);
  font: italic 900 clamp(2.5rem, 6vw, 3.5rem)/1 var(--font);
  font-stretch: 112%;
}
.member-meta {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 2.5rem 1.1rem 1.1rem;
  background: linear-gradient(transparent, rgba(8, 8, 10, 0.88) 55%);
  transition: transform 0.4s var(--ease);
}
.member-name {
  overflow: hidden;
  max-width: 100%;
  font: italic 900 clamp(1rem, 2vw, 1.25rem)/1.1 var(--font);
  font-stretch: 110%;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-role {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 2px solid var(--rc);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}
.member-user {
  overflow: hidden;
  max-width: 100%;
  color: var(--faint);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.4s ease;
}
.member .label {
  margin-top: 0.2rem;
}
.avatar-zoom {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(13, 13, 15, 0.6);
  color: #fff;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.avatar-zoom svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button.member:hover,
button.member:focus-visible {
  border-color: color-mix(in srgb, var(--rc) 55%, var(--line));
}
button.member:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
button.member:hover .avatar-zoom,
button.member:focus-visible .avatar-zoom {
  opacity: 1;
  transform: none;
}
/* Nur mit Maus: ruhiger Grundzustand (grau, dunkel, Rolle versteckt) */
@media (hover: hover) {
  .member .member-img {
    filter: grayscale(1) brightness(0.55);
  }
  .member-meta {
    transform: translateY(2.6rem);
  }
  .member .member-role,
  .member .member-user {
    opacity: 0;
  }
  .member:hover .member-img,
  .member:focus-visible .member-img {
    filter: none;
    transform: scale(1.06);
  }
  .member:hover .member-meta,
  .member:focus-visible .member-meta {
    transform: none;
  }
  .member:hover .member-role,
  .member:hover .member-user,
  .member:focus-visible .member-role,
  .member:focus-visible .member-user {
    opacity: 1;
  }
}

/* Großansicht Profilbild */
.avatar-dialog {
  --rc: var(--gold);
  width: min(440px, calc(100% - 2rem));
  margin: auto;
  padding: 1.25rem;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--rc) 40%, var(--line));
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}
.avatar-dialog[open] {
  display: grid;
  justify-items: center;
  gap: 1rem;
  animation: avatar-in 0.3s var(--ease);
}
.avatar-dialog::backdrop {
  background: rgba(8, 8, 10, 0.75);
  backdrop-filter: blur(6px);
}
@keyframes avatar-in {
  from { opacity: 0; transform: scale(0.94); }
}
.avatar-dialog figure {
  display: grid;
  gap: 1rem;
  margin: 0;
  width: 100%;
}
.avatar-dialog figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  background: var(--surface-hi);
  box-shadow: 0 0 0 1px var(--line), 0 20px 50px -20px color-mix(in srgb, var(--rc) 50%, transparent);
}
.avatar-dialog figcaption {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
}
.avatar-dialog figcaption strong {
  font: italic 900 1.5rem/1.1 var(--font);
  font-stretch: 110%;
  text-transform: uppercase;
}
.avatar-dialog-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-hi);
  color: var(--text);
  cursor: pointer;
}
.avatar-dialog-close:hover {
  border-color: var(--gold);
}
.avatar-dialog-close .icon {
  width: 18px;
  height: 18px;
}
/* ---------- Discord ---------- */

.join {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
}
.join h2 {
  max-width: 15ch;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin: 2rem 0;
}
.stat {
  display: flex;
  flex-direction: column;
}
.stat dt {
  order: 2;
  color: var(--muted);
  font-size: 0.9rem;
}
.stat dd {
  order: 1;
  margin: 0;
  font: italic 900 2.5rem/1.05 var(--font);
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
}
.join-actions {
  margin-top: 2rem;
}
.stats + .join-actions {
  margin-top: 0;
}
.join-art {
  justify-self: end;
  width: 100%;
  max-width: 360px;
  margin: -1.5rem 0;
}
.join-art img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 28px 32px rgba(0, 0, 0, 0.5));
}
@media (prefers-reduced-motion: no-preference) {
  .join-art img {
    animation: float 6s ease-in-out infinite;
  }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(-2deg); }
}

@media (max-width: 799px) {
  .join {
    grid-template-columns: 1fr;
  }
  .join-art {
    display: none;
  }
}

/* ---------- Deko: Hintergründe und Animationen ---------- */

/* Feine Körnung über der ganzen Seite, damit dunkle Flächen nicht so glatt wirken */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Funken im Hero (wie aus einer Schmiede) */
.embers {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.embers i {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  background: var(--gold);
  box-shadow: 0 0 8px 1px rgba(255, 200, 61, 0.55);
  opacity: 0;
}

/* Riesiges Kontur-Wort hinter den Überschriften */
.section-head {
  position: relative;
  isolation: isolate;
}
.ghost {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.07);
  font: italic 900 clamp(5rem, 15vw, 15rem) / 0.8 var(--font);
  font-stretch: 112%;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(var(--gx, 0px), -50%);
  pointer-events: none;
  user-select: none;
}

/* Gekreuzte Absperrbänder zwischen Projekten und Studio */
.tapes {
  --tapes-h: clamp(120px, 11vw, 170px);
  position: relative;
  z-index: 3;
  height: var(--tapes-h);
  margin: calc(var(--tapes-h) / -2) 0;
  overflow-x: clip;
  pointer-events: none;
}
.tape {
  position: absolute;
  top: 50%;
  left: -5vw;
  right: -5vw;
  display: flex;
  overflow: hidden;
}
.tape-front {
  background: var(--gold);
  color: #0d0d0f;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(-50%) rotate(-2.5deg);
}
.tape-back {
  border-block: 1px solid var(--line-strong);
  background: #1b1b20;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.45);
  transform: translateY(-50%) rotate(2deg);
}
.tape-track {
  display: flex;
  flex: none;
  align-items: center;
  gap: 1.6rem;
  /* rechts so viel Abstand wie zwischen den Wörtern, damit die Schleife nahtlos ist */
  padding: 0.85rem 1.6rem 0.85rem 0;
  font: italic 900 clamp(1rem, 1.5vw, 1.35rem) / 1 var(--font);
  font-stretch: 112%;
  text-transform: uppercase;
  white-space: nowrap;
}
.tape b {
  flex: none;
  width: 0.5em;
  height: 0.5em;
  background: currentColor;
  transform: rotate(45deg);
}
.tape-back b {
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  background: none;
}

/* Lego-Noppen im Studio-Bereich, blenden zu den Rändern aus */
.section-studio {
  position: relative;
  isolation: isolate;
}
.section-studio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 13px 13px, rgba(255, 255, 255, 0.07) 0 5px, transparent 5.6px),
    radial-gradient(circle at 14.5px 15px, rgba(0, 0, 0, 0.6) 0 5.5px, transparent 6px);
  background-size: 28px 28px;
  /* zwei Flecken (oben rechts, unten links), die zusätzlich zu Ober- und Unterkante weich auslaufen */
  -webkit-mask-image:
    linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent),
    radial-gradient(ellipse 55% 75% at 100% 10%, #000, transparent 75%),
    radial-gradient(ellipse 45% 60% at 0% 90%, #000, transparent 75%);
  -webkit-mask-composite: source-in, source-over;
  mask-image:
    linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent),
    radial-gradient(ellipse 55% 75% at 100% 10%, #000, transparent 75%),
    radial-gradient(ellipse 45% 60% at 0% 90%, #000, transparent 75%);
  mask-composite: intersect, add;
}

/* Fortschrittsbalken oben beim Scrollen */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  box-shadow: 0 0 12px rgba(255, 200, 61, 0.55);
  transform: scaleX(var(--sp, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}

/* Parallax: Elemente wandern beim Scrollen etwas langsamer/schneller (eigene translate-Eigenschaft,
   damit vorhandene transform-Animationen wie Schweben oder Hover-Zoom erhalten bleiben) */
[data-parallax] {
  translate: 0 var(--py, 0px);
}

/* Goldene Sucher-Ecken auf dem Projektbanner */
.project-banner::before {
  --c: var(--gold);
  --l: 30px;
  --w: 3px;
  content: "";
  position: absolute;
  inset: clamp(14px, 2vw, 26px) clamp(14px, 2vw, 26px) clamp(54px, 6vw, 84px);
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(var(--c) 0 0) 0 0 / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) 0 0 / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) 100% 0 / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) 100% 0 / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) 0 100% / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) 0 100% / var(--w) var(--l),
    linear-gradient(var(--c) 0 0) 100% 100% / var(--l) var(--w),
    linear-gradient(var(--c) 0 0) 100% 100% / var(--w) var(--l);
  background-repeat: no-repeat;
  transition: transform 0.8s var(--ease);
}
.project:hover .project-banner::before {
  transform: scale(0.985);
}

/* Ring und umkreisende Raute um das Discord-Logo */
.join-art {
  position: relative;
}
.join-art img {
  position: relative;
  z-index: 1;
}
.join-art::before {
  content: "";
  position: absolute;
  inset: 3%;
  border: 2px dashed rgba(88, 101, 242, 0.45);
  border-radius: 50%;
}
.orbit {
  position: absolute;
  inset: -5%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .embers i {
    animation: ember var(--t) linear var(--d) infinite;
  }
  .tape-track {
    animation: marquee 50s linear infinite;
  }
  .tape-back .tape-track {
    animation-duration: 70s;
    animation-direction: reverse;
  }
  .join-art::before {
    animation: spin 60s linear infinite;
  }
  .orbit {
    animation: spin 16s linear infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  .embers {
    display: none;
  }
}
@keyframes ember {
  0% { transform: translate(0, 0) rotate(45deg); opacity: 0; }
  12% { opacity: 0.9; }
  75% { opacity: 0.45; }
  100% { transform: translate(var(--dx), -780px) rotate(315deg); opacity: 0; }
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (max-width: 699px) {
  .tapes {
    --tapes-h: 96px;
  }
  .tape-track {
    gap: 1.1rem;
    padding: 0.65rem 1.1rem 0.65rem 0;
  }
  .embers i:nth-child(odd) {
    display: none;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.875rem;
}
.ft-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 2.5rem 4rem;
}
.ft-brand img {
  width: auto;
  height: 40px;
}
.ft-brand p {
  max-width: 34ch;
  margin: 1rem 0 1.25rem;
  color: var(--muted);
  line-height: 1.6;
}
.ft-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s;
}
.ft-discord:hover {
  border-color: #5865f2;
  background: rgba(88, 101, 242, 0.12);
}
.ft-discord .discord-logo {
  width: 18px;
  height: 18px;
}
.ft-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}
.ft-cols h2 {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ft-cols ul {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ft-cols a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.ft-cols a:hover,
.ft-cols a:focus-visible {
  color: var(--text);
}
.ft-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}
.ft-bottom a {
  color: inherit;
}
@media (max-width: 860px) {
  .ft-top {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 520px) {
  .ft-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ft-bottom {
    flex-direction: column;
  }
}
/* ---------- Rechtliches ---------- */

.legal {
  max-width: 760px;
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(4rem, 8vw, 6rem);
}
.legal h1 {
  margin: 0 0 2rem;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1;
}
.legal h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.2rem;
  line-height: 1.2;
}
.legal p,
.legal li {
  color: #d3d1cb;
}
.legal a {
  color: var(--gold);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font: italic 800 0.85rem/1 var(--font);
  text-transform: uppercase;
  text-decoration: none;
}
.back-link:hover {
  color: var(--text);
}
.back-link .icon {
  transform: rotate(180deg);
}

/* ---------- Ohne Transparenz, wenn das System es so wünscht ---------- */

@media (prefers-reduced-transparency: reduce) {
  .cl-panel {
    background: var(--surface);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .cl-entry {
    background: var(--surface-hi);
  }
}

/* ---------- Bewegung ---------- */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  /* Einblenden: von unten, leicht kleiner und unscharf → scharf */
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    filter: blur(8px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
    transition-delay: calc(var(--d, 0) * 110ms);
  }
  .js [data-reveal].is-in {
    opacity: 1;
    transform: none;
    filter: none;
  }
  /* Überschriften werden von links „aufgewischt“ */
  .js .section-head[data-reveal] h2 {
    clip-path: inset(-20% 100% -20% -5%);
    transition: clip-path 1.1s var(--ease) 0.15s;
  }
  .js .section-head[data-reveal].is-in h2 {
    clip-path: inset(-20% -5% -20% -5%);
  }
  /* Team-Karten kommen nacheinander */
  .js .team-grid.is-in > li {
    animation: rise 0.8s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 110ms + 150ms);
  }
  .js .team-grid:not(.is-in) > li {
    opacity: 0;
  }
  .sk {
    animation: shimmer 1.4s ease-in-out infinite;
  }
  .is-loading .icon {
    animation: spin 0.9s linear infinite;
  }
  .live-dot {
    animation: live 2.4s ease-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover,
  .btn:active,
  .member:hover .member-img,
  .member .member-meta,
  .skill:hover .skill-bg,
  .project:hover .project-banner img {
    transform: none;
  }
  .avatar-dialog[open] {
    animation: none;
  }
  .ring-value {
    transition: none;
  }
}

/* ---------- Scroll-Effekte (hängen direkt am Scrollen, Werte kommen aus site.js) ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Karten gleiten gerade von der Seite rein und wachsen dabei auf volle Größe */
  [data-scroll="left"] {
    translate: calc((1 - var(--p, 1)) * -50px) 0;
    scale: calc(0.95 + 0.05 * var(--p, 1));
  }
  [data-scroll="right"] {
    translate: calc((1 - var(--p, 1)) * 50px) 0;
    scale: calc(0.95 + 0.05 * var(--p, 1));
  }
  /* große Karten wachsen beim Reinscrollen auf volle Größe */
  [data-scroll="grow"] {
    scale: calc(0.82 + 0.18 * var(--p, 1));
  }
  /* Discord-Würfel wächst beim Reinscrollen */
  .join[data-scroll] .join-art img {
    scale: calc(0.6 + 0.4 * var(--p, 1));
  }
  /* Absperrbänder laufen beim Scrollen gegeneinander */
  .tape-front .tape-track {
    translate: calc(var(--tp, 0) * -320px) 0;
  }
  .tape-back .tape-track {
    translate: calc(var(--tp, 0) * 320px) 0;
  }
  /* Startbereich: Hintergrund zoomt und dunkelt ab, Inhalt gleitet nach oben weg */
  .hero-bg {
    scale: calc(1 + var(--hp, 0) * 0.25);
    opacity: calc(1 - var(--hp, 0) * 0.7);
  }
  .scroll-cue {
    opacity: calc(1 - var(--hp, 0) * 5);
  }
  @media (min-width: 1280px) {
    .hero-copy {
      translate: 0 calc(var(--hp, 0) * -160px);
      opacity: calc(1 - var(--hp, 0) * 1.4);
    }
    .hero .cl-panel {
      translate: 0 calc(var(--hp, 0) * -70px);
    }
  }
}
/* Spuren starten links außerhalb, damit beim Verschieben nie ein Ende sichtbar wird */
.tape-track {
  margin-left: -360px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(36px) scale(0.92); }
}
@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes live {
  0% { box-shadow: 0 0 0 0 rgba(35, 165, 90, 0.6); }
  70%, 100% { box-shadow: 0 0 0 8px rgba(35, 165, 90, 0); }
}

/* ---------- Ergänzungen: Suche (Strg+K) und Changelog-Link ---------- */

.cmdk-btn {
  width: 42px;
  height: 42px;
}
.cmdk-btn .icon {
  width: 18px;
  height: 18px;
}
.project-news {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  align-self: flex-start;
  margin-top: 0.9rem;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}
.project-news .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}
.project-news:hover span:not(.label) {
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}
.project-news:hover .icon {
  transform: translateX(3px);
}
