/* bankbreite.de — Stealth 3D Low-Poly Parallax + Hidden Key (7503) QR Gate */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

/* ── DARK THEME (Default / finclusion.de Midnight Navy) ── */
body[data-theme="dark"] {
  background: #060a12;
  color: #e4eeff;
  --vignette: radial-gradient(ellipse 75% 65% at 50% 48%, rgba(24, 58, 125, 0.14) 0%, rgba(6, 10, 18, 0.62) 100%);
  --dot-idle: rgba(120, 165, 240, 0.22);
  --dot-active: #4f94ff;
  --dot-glow: 0 0 12px rgba(79, 148, 255, 0.75);
  --card-bg: rgba(10, 16, 28, 0.78);
  --card-border: rgba(110, 165, 255, 0.24);
  --card-shadow: 0 32px 90px rgba(0, 0, 0, 0.72), 0 0 60px rgba(59, 130, 246, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --qr-bg: #ffffff;
  --qr-fg: #060a12;
  --qr-border: rgba(255, 255, 255, 0.96);
  --code-color: #dce9ff;
  --code-muted: rgba(148, 187, 255, 0.45);
  --bar-track: rgba(110, 165, 255, 0.14);
  --bar-fill: linear-gradient(90deg, #3b82f6, #7dd3fc);
}

/* ── LIGHT THEME (Architectural Daylight / Taubenblau) ── */
body[data-theme="light"] {
  background: #edf2f8;
  color: #0f172a;
  --vignette: radial-gradient(ellipse 75% 65% at 50% 48%, rgba(255, 255, 255, 0.35) 0%, rgba(195, 212, 232, 0.42) 100%);
  --dot-idle: rgba(30, 74, 138, 0.22);
  --dot-active: #005299;
  --dot-glow: 0 0 10px rgba(0, 82, 153, 0.45);
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-border: rgba(43, 94, 158, 0.22);
  --card-shadow: 0 28px 80px rgba(15, 23, 42, 0.16), 0 4px 20px rgba(0, 82, 153, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  --qr-bg: #ffffff;
  --qr-fg: #0f172a;
  --qr-border: #ffffff;
  --code-color: #0f172a;
  --code-muted: rgba(15, 23, 42, 0.38);
  --bar-track: rgba(0, 82, 153, 0.12);
  --bar-fill: linear-gradient(90deg, #005299, #2b7de9);
}

/* ── 3D LOW-POLY PARALLAX CANVAS ── */
#meshCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--vignette);
}

/* ── SUBTLE KEY-SEQUENCE DOTS (7 - 5 - 0 - 3) ── */
.key-dots {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.key-dots.visible {
  opacity: 1;
}

.key-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot-idle);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.key-dot.lit {
  background: var(--dot-active);
  box-shadow: var(--dot-glow);
  transform: scale(1.25);
}

/* ── QR CODE OVERLAY ON PARALLAX BACKGROUND ── */
.qr-stage {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-stage.active {
  opacity: 1;
  pointer-events: auto;
}

.qr-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 26px 22px;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  transform: translateY(18px) scale(0.94);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  cursor: pointer;
}

.qr-stage.active .qr-card {
  transform: translateY(0) scale(1);
}

.qr-frame {
  width: 248px;
  height: 248px;
  padding: 14px;
  border-radius: 12px;
  background: var(--qr-bg);
  border: 1px solid var(--qr-border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-frame svg,
.qr-frame img {
  width: 100%;
  height: 100%;
  display: block;
}

.pairing-code {
  margin-top: 16px;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
  color: var(--code-color);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  display: none;
}

body[data-show-code="true"] .pairing-code {
  display: block;
}

.ttl-bar {
  width: 100%;
  height: 3px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--bar-track);
  overflow: hidden;
}

.ttl-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  background: var(--bar-fill);
  transform-origin: left center;
  transition: transform 0.25s linear;
}
