/* ============================================================
   Valora Roleplay – Effekte, Animationen & zusätzliche Sektionen
   ============================================================ */

/* Header: transparent oben, solide beim Scrollen */
.site-header { transition: background .3s, border-color .3s, box-shadow .3s; }
.site-header:not(.scrolled) { background: transparent; border-bottom-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.site-header.scrolled { box-shadow: 0 10px 40px -20px rgba(0, 0, 0, 0.8); }
.read-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--grad);
  transform-origin: left;
  transform: scaleX(0);
}

/* Glanz-Sweep auf Buttons */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .7s ease;
}
.btn:hover::after { transform: translateX(120%); }
.btn.ghost::after { background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%); }

/* Foto-Band im Kopfbereich der Unterseiten */
.hero, .rb-hero { position: relative; isolation: isolate; }
.aurora { display: none; }
.rb-hero .aurora {
  display: block;
  position: absolute;
  top: calc(var(--header-h) * -1 - 20px);
  bottom: -60px;
  left: 42%;
  right: calc(50% - 50vw);
  z-index: -1;
  pointer-events: none;
  background: url("img/skyline.jpg") center 30% / cover no-repeat;
  opacity: 0.42;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%), linear-gradient(180deg, #000 45%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%), linear-gradient(180deg, #000 45%, transparent 100%);
  mask-composite: intersect;
}
.rb-hero .aurora span { display: none; }

/* Hero: Intro-Animation */
.js [data-intro] { opacity: 0; transform: translateY(18px); animation: intro .9s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 110ms + 100ms); }
@keyframes intro { to { opacity: 1; transform: none; } }

/* Scroll-Reveal */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-reveal].in { opacity: 1; transform: none; transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }

/* Spotlight + Leuchtrand auf Karten */
.spot { position: relative; isolation: isolate; }
.spot::before, .spot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s;
}
.spot::before {
  z-index: -1;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.05), transparent 45%);
}
.spot::after {
  inset: -1px;
  padding: 1px;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(210, 238, 255, 0.45), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.spot:hover::before, .spot:hover::after { opacity: 1; }

/* Statistik-Leiste */
.stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 0;
  overflow: hidden;
}
.stat { padding: 26px 28px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 800;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat span { font-size: 14px; color: var(--muted); }

/* Ticker */
.ticker {
  margin: 70px 0 0;
  padding: 22px 0;
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker 50s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 36px;
  padding-right: 36px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.ticker-track span::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Feature-Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile { min-width: 0; padding: 28px; display: flex; flex-direction: column; transition: transform .3s, border-color .3s; }
.tile:hover { transform: translateY(-3px); }
.tile .ico {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--cyan);
  margin-bottom: 18px;
}
.tile.warm .ico { color: var(--coral); }
.tile .ico svg { width: 22px; height: 22px; }
.tile h3 { font-size: 20px; margin-bottom: 8px; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 18px; }
.tags span {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.s2 { grid-column: span 2; }
.s3 { grid-column: span 3; }
.tile.hero-tile { grid-row: span 2; background: radial-gradient(120% 80% at 0% 0%, rgba(143, 220, 243, 0.1), transparent 60%), linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)); }
.hero-tile .big {
  font-family: var(--font-head);
  font-size: clamp(64px, 8vw, 104px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin: 6px 0 4px;
}
.hero-tile .big-sub { font-family: var(--font-head); font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.hero-tile .code {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--r);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  font: 13px/1.8 ui-monospace, Consolas, monospace;
  color: var(--dim);
  overflow-x: auto;
  white-space: nowrap;
}
.code .k { color: var(--coral); }
.code .s { color: var(--teal); }
.code .f { color: var(--cyan); }

/* Timeline: leuchtende Nummern */


/* Regelwerk: Kapitel-Akzent */
.chapter { transition: border-color .25s; }
.chapter:hover { border-color: var(--border-2); }


@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .s2, .s3 { grid-column: span 1; }
  .tile.hero-tile { grid-column: span 2; grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: span 2; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile.hero-tile { grid-column: auto; }
  .stat { padding: 18px 12px; }
  .ticker { margin-top: 50px; }
  .ticker-track span { font-size: 17px; }
  .rb-hero .aurora { left: 0; opacity: 0.22; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-intro] { opacity: 1; transform: none; }
}
