/* Santo City Regelwerk – Logo, Hero-Bühne, Fortschrittsbalken, Laufband, Kapitelübersicht */
.brand-logo { width: 46px; height: 44px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .55)); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.08); }
.progress { position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: 3px; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #6b7380, #fff); box-shadow: 0 0 14px rgba(255, 255, 255, .55); pointer-events: none; }

/* Interaktiver Hintergrund */
.bg-canvas { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
[data-page="ic"] .bg-canvas, [data-page="fraktion"] .bg-canvas { opacity: .7; }
.cursor-glow { position: fixed; top: 0; left: 0; z-index: -1; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(255, 255, 255, .10), rgba(190, 200, 215, .04) 45%, transparent 70%); transition: opacity .4s; will-change: transform; }
@media (hover: none) { .cursor-glow { display: none; } }
.button { transform: translate(var(--bx, 0px), var(--by, 0px)); }
.button:hover { transform: translate(var(--bx, 0px), calc(var(--by, 0px) - 1px)); }
.tile { transform: perspective(800px) rotateX(var(--trx, 0deg)) rotateY(var(--try, 0deg)); transition: transform .25s ease-out, border-color .3s; }
.tile:hover, .tile:focus-visible { transform: perspective(800px) rotateX(var(--trx, 0deg)) rotateY(var(--try, 0deg)) translateY(-4px); }
.tile-num { transform: translateZ(0); }
.logo-glow { transform: translate(calc(var(--nx, 0) * -26px), calc(var(--ny, 0) * -20px)); transition: transform .3s ease-out; }
.logo-rings { margin: calc(var(--ny, 0) * 8px) calc(var(--nx, 0) * 10px); }
.logo-floor { transform: translateX(calc(var(--nx, 0) * 18px)); transition: transform .3s ease-out; }

/* Hero */
.hero { min-height: min(calc(100vh - var(--header-h)), 900px); display: flex; align-items: center; padding: clamp(40px, 7vw, 96px) 0; isolation: isolate; }
.hero-spot { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(520px circle at var(--mx, 70%) var(--my, 30%), rgba(255, 255, 255, .11), transparent 62%); }
.hero-dust { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
.hero .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.hero h1 { font-size: clamp(2.8rem, 7.4vw, 6.4rem); line-height: .94; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero h1 .line > span { display: block; }
.hero h1 .line:last-child > span { background: linear-gradient(180deg, #fff 25%, #6f7886); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-hint { margin: 22px 0 0; color: var(--muted); font-size: .85rem; }
.hero-hint kbd { padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(255, 255, 255, .05); color: var(--silver); font: 600 .75rem var(--font); }

.logo-stage { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; width: min(100%, 640px); margin-inline: auto; perspective: 1100px; --rx: 0deg; --ry: 0deg; --py: 0px; }
.logo-rings { position: absolute; inset: 4%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .10); }
.logo-rings::before, .logo-rings::after { content: ""; position: absolute; border-radius: 50%; }
.logo-rings::before { inset: 9%; border: 1px dashed rgba(255, 255, 255, .16); }
.logo-rings::after { inset: -7%; border: 1px solid rgba(255, 255, 255, .05); }
.logo-glow { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .26), rgba(170, 182, 200, .10) 38%, transparent 68%); filter: blur(10px); }
.logo-floor { position: absolute; left: 18%; right: 18%; bottom: 7%; height: 9%; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .75), transparent 70%); filter: blur(8px); }
.logo-tilt { position: relative; width: 82%; transform: translate3d(0, var(--py), 0) rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; }
.logo-float { position: relative; animation: floaty 7s ease-in-out infinite; }
.logo-3d { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 38px rgba(0, 0, 0, .7)) drop-shadow(0 0 40px rgba(255, 255, 255, .10)); user-select: none; -webkit-user-drag: none; }
.logo-shine { position: absolute; inset: 0; -webkit-mask-image: url("logo.webp"); mask-image: url("logo.webp"); -webkit-mask-size: 100% 100%; mask-size: 100% 100%; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .95) 50%, transparent 62%); background-size: 260% 100%; background-position: 140% 0; mix-blend-mode: overlay; animation: shine 6.5s ease-in-out 1.2s infinite; pointer-events: none; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes shine { 0% { background-position: 140% 0; } 38%, 100% { background-position: -60% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { transform: translateY(110%); } to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }

.js .hero h1 .line > span { animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.js .hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.js .hero .eyebrow, .js .hero .lead, .js .hero-actions, .js .hero-hint { animation: fade-up .8s ease both; }
.js .hero .lead { animation-delay: .25s; }
.js .hero-actions { animation-delay: .38s; }
.js .hero-hint { animation-delay: .5s; }
.js .logo-stage { animation: fade-up 1.1s .1s ease both; }
.logo-rings { animation: spin 90s linear infinite; }
.logo-rings::before { animation: spin 60s linear infinite reverse; }

/* Kennzahlen */
.statband { border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent); }
.statband-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-cell { padding: 30px 26px; border-left: 1px solid var(--line); }
.stat-cell:first-child { border-left: 0; }
.stat-cell strong { display: block; font: 750 clamp(2.2rem, 4.2vw, 3.4rem)/1 var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-cell span { display: block; margin-top: 8px; color: var(--muted); font-size: .86rem; letter-spacing: .04em; }
.statnote { margin: 0; padding: 0 0 20px; color: var(--muted); font-size: .84rem; }

/* Laufband */
.marquee { overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 80s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 28px; padding: 22px 0 22px 28px; color: var(--silver); font: 700 clamp(1.1rem, 2.2vw, 1.7rem)/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.marquee-item::after { content: "◆"; color: var(--muted); font-size: .6em; }
.marquee-item:nth-child(3n) { color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .45); }

/* Kapitelübersicht */
.chapter-groups { display: grid; gap: 56px; }
.chapter-group h3 { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; font-size: 1.5rem; }
.chapter-group h3 small { color: var(--muted); font: 500 .9rem var(--font); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 190px; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); color: var(--text); text-decoration: none; transition: transform .3s cubic-bezier(.2, .8, .2, 1), border-color .3s; }
.tile::before, .card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(360px circle at var(--tx, 50%) var(--ty, 0%), rgba(255, 255, 255, .13), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.tile:hover, .tile:focus-visible { border-color: var(--line-strong); }
.tile:hover::before, .tile:focus-visible::before, .card:hover::before { opacity: 1; }
.tile-num { position: absolute; top: 4px; right: 14px; font: 800 5.6rem/1 var(--font-display); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .20); transition: -webkit-text-stroke-color .3s, transform .4s; }
.tile:hover .tile-num { -webkit-text-stroke-color: rgba(255, 255, 255, .55); transform: translateY(4px) scale(1.04); }
.tile h4 { position: relative; font-size: 1.12rem; line-height: 1.25; }
.tile small { position: relative; margin-top: 6px; color: var(--muted); font-size: .82rem; }
.card:hover { transform: translateY(-5px); }

.discord-panel { position: relative; }
.discord-panel::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: 21px; background: conic-gradient(from 180deg, rgba(88, 101, 242, .5), rgba(255, 255, 255, .08), rgba(88, 101, 242, .5)); filter: blur(22px); opacity: .45; }
.discord-grid { position: relative; z-index: 0; }

/* Dokumentseiten */
.doc-hero { position: relative; overflow: hidden; isolation: isolate; }
.doc-hero-logo { position: absolute; right: max(2vw, calc((100vw - 1240px) / 2 - 40px)); top: 50%; z-index: 0; width: clamp(200px, 30vw, 380px); height: auto; transform: translateY(calc(-50% + var(--py, 0px))); opacity: .6; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .6)); pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%); mask-image: linear-gradient(90deg, transparent, #000 40%); }
.chapter-head::after { content: attr(data-no); position: absolute; right: 0; top: -22px; font: 800 clamp(5rem, 11vw, 8.5rem)/1 var(--font-display); letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .10); pointer-events: none; z-index: -1; }
.chapter { position: relative; }
.doc-hero > .shell { position: relative; z-index: 1; }
.footer-logo { width: 54px; height: auto; margin-bottom: 10px; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .6)); }

@media (max-width: 1080px) {
  .hero { min-height: 0; }
  .hero .hero-inner { grid-template-columns: minmax(0, 1fr); }
  .logo-stage { width: min(78%, 460px); order: -1; }
  .statband-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(3) { border-left: 0; }
  .stat-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .logo-stage { width: min(88%, 340px); }
  .tile { min-height: 150px; }
  .tile-num { font-size: 4.4rem; }
  .doc-hero-logo { opacity: .22; width: 220px; }
  .chapter-head::after { font-size: 4.4rem; top: -10px; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-float, .logo-shine, .logo-rings, .logo-rings::before, .marquee-track { animation: none !important; }
  .marquee-track { flex-wrap: wrap; width: auto; }
  .logo-tilt { transition: none; }
  .js .hero h1 .line > span, .js .hero .eyebrow, .js .hero .lead, .js .hero-actions, .js .hero-hint, .js .logo-stage { animation: none !important; }
}
@media print { .progress, .hero-dust, .doc-hero-logo, .chapter-head::after { display: none !important; } }

/* Offizielles Discord-Widget */
.discord-body.has-frame { padding: 0; min-height: 0; background: #2b2d31; }
.discord-frame { display: block; width: 100%; height: 500px; max-width: 100%; border: 0; background: #2b2d31; color-scheme: dark; }
.discord-panel:has(.has-frame) .discord-actions { padding-top: 18px; border-top: 1px solid var(--line); }
