@import url("tour.css");

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/plus-jakarta-sans-latin-ext.woff2) format("woff2");
  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-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(../fonts/plus-jakarta-sans-latin.woff2) format("woff2");
  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: Doto;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/doto.woff2) format("woff2");
}
:root {
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #fff;
  --mut: #9aa3b5;
  --line: rgba(255, 255, 255, 0.14);
  --blue: #3860c0;
  --teal: #58b8a8;
  --meas: #5fd3bf;
  --tgt: #f8c850;
  --pad: clamp(16px, 3vw, 44px);
}
* {
  box-sizing: border-box;
  margin: 0;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--ink);
  font: 400 16.5px/1.58 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: fixed;
  left: 8px;
  top: -60px;
  background: #fff;
  color: #000;
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 99;
}
.skip:focus {
  top: 8px;
}
canvas#c {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.lbl {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #cfd8ee;
  text-align: center;
  will-change: transform;
  text-shadow: 0 2px 10px #000;
}
.lbl small {
  display: block;
  font: 700 10px var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mut);
  margin-top: 3px;
}
.lbl.pitch {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  pointer-events: auto;
  z-index: 4;
  filter: none;
}
.lbl.pitch.hot {
  filter: drop-shadow(0 0 18px rgba(95, 211, 191, 0.55));
  z-index: 5;
}
.lbl.pitch.hot.locked {
  filter: drop-shadow(0 0 16px rgba(248, 200, 80, 0.4));
}
.lbl.pitch.live small {
  color: var(--meas);
}
.lbl.pitch.locked {
  opacity: 0.82;
}
.lbl.pitch.locked small {
  color: var(--tgt);
}
.lbl.pitch {
  cursor: pointer;
}
.world-hit {
  position: absolute;
  left: 50%;
  top: 0;
  width: 240px;
  height: 240px;
  transform: translate(-50%, -70%);
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
a.world-hit {
  display: block;
}
.world-hit:focus {
  outline: none;
}
.world-hit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.hud-top {
  position: fixed;
  z-index: 5;
  left: var(--pad);
  right: var(--pad);
  top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.hud-top > * {
  pointer-events: auto;
}
.brandline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--mut);
  white-space: nowrap;
}
.brandline b {
  color: #fff;
  font-weight: 700;
}
.brandline .sep {
  opacity: 0.4;
}
.hmark {
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 7px;
  position: relative;
  display: inline-block;
}
.hmark::before,
.hmark::after {
  content: "";
  position: absolute;
  background: #fff;
}
.hmark::before {
  left: 5px;
  top: 4px;
  width: 4px;
  height: 14px;
  transform: skewY(6deg);
}
.hmark::after {
  right: 5px;
  top: 4px;
  width: 4px;
  height: 14px;
  transform: skewY(-6deg);
}
.badge {
  font: 700 10px var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e9edf5;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 3px 8px;
  border-radius: 99px;
}
.hud-right {
  display: flex;
  gap: 10px;
}
.snd-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(14, 16, 22, 0.72);
  backdrop-filter: blur(10px);
  font-weight: 700;
  font-size: 13px;
  color: var(--mut);
  cursor: pointer;
}
.snd-btn .sico {
  flex: none;
}
.snd-btn .w {
  display: none;
}
.snd-btn[aria-pressed="true"] .w {
  display: inline;
  stroke: var(--meas);
}
.snd-btn[aria-pressed="true"] .x {
  display: none;
}
.snd-btn[aria-pressed="true"] {
  color: #fff;
  border-color: rgba(95, 211, 191, 0.5);
}
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 8px;
}

.tag {
  position: fixed;
  left: 50%;
  top: calc(50% + 52px);
  transform: translateX(-50%);
  color: #8a94ad;
  font: 700 12px var(--font-sans);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 2px 12px #000;
}

#character {
  position: fixed;
  left: max(8px, var(--pad) - 8px);
  bottom: 28px;
  width: min(220px, 32vw);
  height: min(260px, 46vh);
  z-index: 6;
  pointer-events: none;
  overflow: visible;
  background: none;
  border: 0;
  box-shadow: none;
  /* Hidden on the hub and in worlds until the guided tour is running. */
  opacity: 0;
  visibility: hidden;
}
body.tour-on > #character {
  opacity: 1;
  visibility: visible;
}
body.sound-ask #character {
  z-index: 45;
}
.char-stage {
  position: relative;
  overflow: visible;
  background: none;
  border: 0;
  width: 100%;
  height: 100%;
}
.char-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.45));
}
.char-svg svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  background: none;
  pointer-events: none;
}
.char-hit {
  position: absolute;
  left: 12%;
  top: 10%;
  width: 72%;
  height: 80%;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 50% 50% 46% 46%;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.char-hit:focus,
.char-hit:active,
.char-hit:focus-visible {
  outline: none;
  box-shadow: none;
}
.char-hit:focus-visible {
  outline: 2px solid rgba(95, 211, 191, 0.85);
  outline-offset: 4px;
  box-shadow: none;
}
.char-bubble {
  position: absolute;
  left: calc(100% - 8px);
  top: 8%;
  width: min(34ch, calc(100vw - 200px));
  min-width: 16ch;
  max-width: min(42ch, calc(100vw - 40px));
  overflow: visible;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  hyphens: manual;
  padding: 10px 16px;
  border-radius: 16px 16px 16px 4px;
  background: #10162b;
  color: #f4f6fb;
  border: 1px solid #5fd3bf;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 8;
  box-sizing: border-box;
}
.char-bubble.hide {
  opacity: 0;
  transition: opacity 0.25s;
}
.char-bubble::after {
  content: "";
  position: absolute;
  left: -8px;
  top: 18px;
  bottom: auto;
  border: 8px solid transparent;
  border-right-color: #10162b;
  border-left: 0;
}

.hint {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 5;
  max-width: min(640px, calc(100% - 280px));
  text-align: center;
  pointer-events: none;
}
.hint p {
  font-size: 13px;
  color: #b4bdd0;
  text-shadow: 0 2px 10px #000;
}
.hint a {
  color: var(--meas);
  font-weight: 700;
  pointer-events: auto;
  text-decoration: none;
}
.hint a:hover {
  text-decoration: underline;
}
.hud-bot {
  position: fixed;
  right: var(--pad);
  left: auto;
  bottom: 14px;
  z-index: 5;
  pointer-events: none;
  max-width: 32ch;
  text-align: right;
}
.fine {
  font-size: 11px;
  color: #6f778a;
  line-height: 1.45;
}
/* Kleingedrucktes rechts unten, weg von Krabbel und seiner Sprechblase (links unten).
   body > schlägt die globale .hud-bot-Regel aus website-issues/css. */
body > .hud-bot {
  left: auto;
  right: var(--pad);
}
#issues-root .hud-bot {
  max-width: none;
  text-align: left;
}
#issues-root .hud-bot .fine {
  align-self: flex-end;
  max-width: min(440px, 38vw);
  text-align: right;
}

@media (max-width: 820px) {
  .lbl:not(.pitch) {
    display: none;
  }
  .lbl.pitch {
    font-size: 13px;
    white-space: normal;
    max-width: 42vw;
    line-height: 1.2;
  }
  .brandline span:not(.hmark):not(.badge) {
    display: none;
  }
  .brandline b {
    display: inline;
  }
  .snd-btn .slbl {
    display: none;
  }
  .snd-btn {
    padding: 8px 10px;
  }
  .tag {
    top: auto;
    bottom: 46%;
    font-size: 10px;
  }
  #character {
    width: min(168px, 46vw);
    height: min(210px, 42vh);
    left: 8px;
    bottom: 86px;
    overflow: visible;
  }
  .char-bubble {
    left: calc(100% - 4px);
    top: 2%;
    max-width: min(34ch, 70vw);
    font-size: 12.5px;
    padding: 8px 12px;
  }
  .hint {
    bottom: 52px;
    max-width: calc(100% - 24px);
    left: 12px;
    right: 12px;
    transform: none;
  }
  .hint p {
    font-size: 12px;
  }
  .hud-bot {
    display: none;
  }
  .lbl {
    font-size: 11px;
  }
  .lbl.pitch {
    font-size: 13px;
  }
  .world-hit {
    width: 180px;
    height: 180px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .char-bubble {
    transition: none;
  }
}

#veil {
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--vx, 30%) var(--vy, 38%),
    rgba(95, 211, 191, 0.45) 0%,
    #000 58%
  );
  transition: opacity 0.45s ease;
}
#veil.on {
  opacity: 1;
  pointer-events: auto;
}
#veil.out {
  opacity: 0;
  transition: opacity 0.7s ease;
}
@media (prefers-reduced-motion: reduce) {
  #veil {
    transition: opacity 0.15s linear;
  }
}

/* Sound consent: a card under the sound button, no backdrop, so the tour CTA on the
   wordmark stays visible and clickable on first visit. */
.smodal {
  position: fixed;
  z-index: 40;
  top: 70px;
  right: var(--pad);
  width: min(360px, calc(100vw - 2 * var(--pad)));
}
.smodal[hidden] {
  display: none;
}
.smodal-card {
  width: 100%;
  padding: 20px 20px 18px;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(16, 22, 43, 0.96), rgba(8, 12, 24, 0.94));
  border: 1px solid rgba(95, 211, 191, 0.4);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #f4f6fb;
}
.smodal-card h2 {
  font: 700 18px/1.25 var(--font-sans);
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.smodal-card p {
  margin: 0 0 16px;
  color: #c5cde0;
  font-size: 14px;
  line-height: 1.5;
}
.smodal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.smodal-actions .btn {
  padding: 11px 20px;
  border-radius: 99px;
  font: 700 14px var(--font-sans);
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.smodal-actions .btn.primary {
  background: var(--blue);
  border-color: #5b83e0;
  box-shadow: 0 0 28px rgba(56, 96, 192, 0.4);
}
.smodal-actions .btn.primary:hover {
  background: #4a74d8;
}
.smodal-actions .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}
@media (max-width: 820px) {
  .smodal {
    top: 62px;
    left: 8px;
    right: 8px;
    width: auto;
  }
  .smodal-card {
    padding: 16px 16px 14px;
  }
  .smodal-card p {
    font-size: 13.5px;
    margin-bottom: 12px;
  }
}

/* ---------- Website-Issues as in-page scene ---------- */
#issues-root {
  position: fixed;
  inset: 0;
  z-index: 22;
  opacity: 0;
  pointer-events: none;
  background: transparent;
}
#issues-root.visible {
  opacity: 1;
  pointer-events: auto;
}
#issues-root.previs:not(.visible) {
  pointer-events: none;
  z-index: 20;
}
#issues-root canvas,
#issues-root #c-issues {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}
#issues-root.bridge .story,
#issues-root.bridge .panel,
#issues-root.bridge .hud-top,
#issues-root.bridge .hud-bot,
#issues-root.bridge .bubble,
#issues-root.bridge .krab-btn,
#issues-root.bridge #markers {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: none;
}
#issues-root:not(.visible) *,
#seo-root:not(.visible) *,
#video-root:not(.visible) *,
#issues-root.bridge *,
#seo-root.bridge *,
#video-root.bridge * {
  pointer-events: none !important;
}
body:not(.issues-on):not(.seo-on):not(.video-on):not(.startseite-on) > .hud-top {
  z-index: 35;
}
#issues-root.settled .story {
  animation: issues-rise 0.7s ease both;
}
#issues-root.settled .panel {
  animation: issues-rise 0.78s 0.06s ease both;
}
#issues-root.settled .hud-top,
#issues-root.settled .hud-bot {
  animation: issues-fade 0.5s ease both;
}
@keyframes issues-rise {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes issues-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  #issues-root.settled .story,
  #issues-root.settled .panel,
  #issues-root.settled .hud-top,
  #issues-root.settled .hud-bot {
    animation: none;
  }
}
body.issues-on > .hud-top,
body.issues-on > .hint,
body.issues-on > .tag,
body.issues-on > .hud-bot,
body.issues-on > #labels {
  opacity: 0;
  pointer-events: none;
}
body.issues-on > #character {
  z-index: 28;
  pointer-events: none;
}
body.tour-on.issues-on > #character {
  opacity: 1;
}
body.tour-on.issues-on > #character .char-hit {
  pointer-events: auto;
}
body.issues-on > #c {
  visibility: hidden;
}
body.issues-on #issues-root {
  z-index: 22;
}
#issues-root[data-step-kind="snippet"] .list,
#issues-root[data-step-kind="finale"] .list {
  display: none;
}
#issues-root[data-step-kind="snippet"] .gauges,
#issues-root[data-step-kind="finale"] .gauges {
  display: none;
}
#issues-root[data-crawler="1"][data-raw="1"] .rawhtml {
  display: block;
}
#issues-root:not([data-crawler="1"]) .mk {
  opacity: 0;
  pointer-events: none;
}

body.zooming-in #labels,
body.zooming-in .hint,
body.zooming-in .tag,
body.zooming-in .hud-bot,
body.zooming-in .hud-top {
  opacity: var(--zoom-fade, 1) !important;
  transition: none;
}
body.zooming-in > #character {
  z-index: 28;
}

#character.docked {
  position: fixed;
  bottom: auto;
  right: auto;
  margin: 0;
  overflow: visible;
}
#character.docked .char-bubble {
  left: calc(100% - 4px);
  top: 10%;
}
/* Mobil wächst die Blase nach oben, damit ein langer Satz nicht auf das Issues-Panel fällt. */
@media (max-width: 820px) {
  body.issues-on > #character.docked .char-bubble {
    top: auto;
    bottom: 14%;
  }
  body.issues-on > #character.docked .char-bubble::after {
    top: auto;
    bottom: 14px;
  }
}
body.has-companion #issues-root .bubble,
body.has-companion #issues-root .krab-btn {
  visibility: hidden;
  pointer-events: none;
}
body[data-start="issues"]:not(.issues-on) > #c,
body[data-start="issues"]:not(.issues-on) > #labels,
body[data-start="issues"]:not(.issues-on) > .hint,
body[data-start="issues"]:not(.issues-on) > .tag,
body[data-start="issues"]:not(.issues-on) > .hud-bot,
body[data-start="issues"]:not(.issues-on) > .hud-top {
  opacity: 0;
  pointer-events: none;
}
body[data-start="issues"]:not(.issues-ready) #issues-root {
  opacity: 0;
}

/* Auswahl nur in Textpanels; Canvas/Overlays nicht ziehbar (sonst schwarzes Drag-Ghost des WebGL-Canvas) */
html,
body {
  -webkit-user-select: none;
  user-select: none;
}
.story,
.story h1,
.story .lead,
.story .kick,
.story .rawhtml,
.story .rawhtml *,
.panel,
.panel h2,
.panel li,
.panel p,
.panel .fine,
.panel .gift,
.panel .teaser,
.panel .snip,
.hint,
.hint p,
.hint a,
.fine,
#soundModal,
#soundModal p,
#soundModal h2,
#soundModal label,
.rawhtml,
.rawhtml * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-user-drag: none;
}
.story button,
.panel button,
#soundModal button,
.btn,
.navb,
.glass-btn,
.snd-btn {
  -webkit-user-select: none;
  user-select: none;
}
canvas,
canvas#c,
canvas#c-issues,
canvas#c-seo,
#issues-root canvas,
#seo-root canvas,
#video-root canvas,
#veil,
#labels,
#markers,
#character,
.char-stage,
.char-svg,
.char-hit,
.char-svg svg,
.krab-btn,
.mk,
.world-hit,
img,
svg,
.hmark,
.gico,
.sico {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}
.story ::selection,
.panel ::selection,
.hint ::selection,
.fine ::selection,
#soundModal ::selection,
.rawhtml ::selection {
  background: rgba(95, 211, 191, 0.45);
  color: #fff;
}
