/* Business/Gaming-Schalter im Header + Übergang zwischen den Seiten */

.mode-switch {
  position: relative; isolation: isolate;
  display: inline-grid; grid-template-columns: 1fr 1fr; align-items: center;
  padding: 4px; border-radius: 999px; flex: none;
  background: linear-gradient(90deg, #4E2A1C 0%, #2A1B2E 50%, #0B1026 100%);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08), 0 6px 18px -8px rgba(0,0,0,.5);
  font: 700 .78rem/1 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.mode-switch:focus-visible { outline: 3px solid #6BE36B; outline-offset: 3px; }

.ms-opt {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .5rem .85rem; color: rgba(255,255,255,.62);
  transition: color .35s ease;
}
.ms-opt svg { width: 15px; height: 15px; flex: none; }

.ms-knob {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px); border-radius: 999px;
  background: #FBF4EA;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  transition: transform .5s cubic-bezier(.5,1.5,.45,1), background-color .5s ease, box-shadow .5s ease;
}

.mode-switch[data-mode="business"] .ms-biz  { color: #3B2116; }
.mode-switch[data-mode="gaming"]   .ms-game { color: #0B2A0B; }
.mode-switch[data-mode="gaming"]   .ms-knob {
  transform: translateX(100%);
  background: #6BE36B;
  box-shadow: 0 0 18px rgba(107,227,107,.65), 0 2px 6px rgba(0,0,0,.35);
}

/* Hinweis beim Überfahren: die andere Seite leuchtet leicht auf */
.mode-switch[data-mode="business"]:hover .ms-game { color: #6BE36B; }
.mode-switch[data-mode="gaming"]:hover   .ms-biz  { color: #FBF4EA; }
.mode-switch:hover .ms-knob { box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 2px 6px rgba(0,0,0,.35); }
.mode-switch[data-mode="gaming"]:hover .ms-knob { box-shadow: 0 0 22px rgba(107,227,107,.8), 0 0 0 3px rgba(255,255,255,.12); }

@media (max-width: 64rem) {
  .ms-opt span { display: none; }
  .ms-opt { padding: .5rem .75rem; }
  .ms-opt svg { width: 17px; height: 17px; }
}

/* Handy: Platz für Logo + Schalter in einer Zeile schaffen */
@media (max-width: 30rem) {
  .wordmark small { display: none; }
  header.top nav .btn { display: none; }
}

/* Vorhang beim Wechseln (wird per Skript erzeugt) */
.ms-curtain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  display: grid; place-items: center;
  clip-path: circle(0px at var(--cx, 50%) var(--cy, 0px));
  transition: clip-path .75s cubic-bezier(.7,0,.25,1);
}
.ms-curtain.go { clip-path: circle(150vmax at var(--cx, 50%) var(--cy, 0px)); }
.ms-curtain[data-to="gaming"] {
  background: radial-gradient(circle at var(--cx, 50%) var(--cy, 0px), #1A2250 0%, #0B1026 55%);
  color: #6BE36B;
}
.ms-curtain[data-to="business"] { background: #FBF4EA; color: #2F7C78; }
@media (prefers-color-scheme: dark) {
  .ms-curtain[data-to="business"] { background: #1C1411; color: #7CC7C2; }
}
.ms-curtain b {
  font: 900 clamp(2.5rem, 9vw, 6rem)/1 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; transform: scale(.85);
  transition: opacity .35s ease .3s, transform .6s cubic-bezier(.2,1.4,.4,1) .3s;
}
.ms-curtain.go b { opacity: 1; transform: none; }

/* Ankunft auf der neuen Seite: gleiche Farbe, blendet aus (reines CSS, kein Skript nötig) */
html.ms-arriving::after {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  animation: ms-out .7s ease .1s forwards;
}
html.ms-arriving[data-page="gaming"]::after { background: #0B1026; }
html.ms-arriving[data-page="business"]::after { background: #FBF4EA; }
@media (prefers-color-scheme: dark) {
  html.ms-arriving[data-page="business"]::after { background: #1C1411; }
}
@keyframes ms-out { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .ms-knob { transition: none; }
  html.ms-arriving::after { display: none; }
}
