/* ==========================================================================
   GT DASH — 3D VAULT, HOLOGRAPHIC TILT, TELEMETRY & GAMIFICATION MODULE
   ========================================================================== */
:root {
  --in-oklab: ;
  --in-oklch: ;
}

@supports (background: linear-gradient(in oklab, white, black)) {
  :root {
    --in-oklab: in oklab;
    --in-oklch: in oklch;
  }
}

/* 1. 3D Holographic Perspective Tilt Cards */
.holo-tilt-card {
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  will-change: transform;
  isolation: isolate;
}

.holo-tilt-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--glare-x, 50%) var(--glare-y, 20%),
    rgba(255, 255, 255, 0.13),
    rgba(56, 189, 248, 0.06) 35%,
    transparent 70%
  );
  mix-blend-mode: soft-light;
  opacity: var(--glare-alpha, 0);
  transition: opacity 0.25s ease;
  z-index: 3;
}

/* 2. 3D Swiss Titanium Vault Combination Wheel (Lock Screen) */
.vault-dial-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 0.75rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 600px;
}

.vault-dial-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px dashed rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.2), inset 0 0 12px rgba(16, 185, 129, 0.15);
  transform: rotateX(18deg) rotateZ(var(--dial-deg, 0deg));
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease;
  pointer-events: none;
}

.vault-dial-ring::before {
  content: "▲";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: var(--cyan);
  text-shadow: 0 0 6px var(--cyan);
}

/* 3. Executive 3D Flippable Titanium Black Card */
.sovereign-card-scene {
  width: 100%;
  height: 198px;
  perspective: 1200px;
  margin: 0.65rem 0 0.85rem 0;
  cursor: pointer;
  user-select: none;
}

.sovereign-black-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 18px;
}

.sovereign-black-card.is-flipped {
  transform: rotateY(180deg);
}

.sovereign-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 18px;
  padding: 1.05rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.18), transparent 45%),
    linear-gradient(135deg var(--in-oklab), #090D16 0%, #111827 48%, #1E293B 78%, #090D16 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.65),
    inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.sovereign-card-back {
  transform: rotateY(180deg);
  background:
    linear-gradient(135deg var(--in-oklab), #0B0F19 0%, #1E1B4B 55%, #090D16 100%);
}

.emv-chip {
  width: 40px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #FDE68A 0%, #F59E0B 50%, #B45309 100%);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.45);
  position: relative;
}

.emv-chip::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 3px;
}

.sovereign-serial {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: rgba(226, 232, 240, 0.88);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

/* 4. Defcon / Margin Call Penalty Mode & Cracked Glass Hazard */
.penalty-hazard-active {
  border-color: rgba(244, 63, 94, 0.75) !important;
  box-shadow: 0 0 28px rgba(244, 63, 94, 0.32), inset 0 0 18px rgba(244, 63, 94, 0.15) !important;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(244, 63, 94, 0.08) 0 10px,
      transparent 0 20px
    ) !important;
}

.penalty-stamp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(244, 63, 94, 0.22);
  color: #FDA4AF;
  border: 1.5px solid rgba(244, 63, 94, 0.65);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.35);
  animation: pulsePenaltyAlert 1.4s infinite alternate;
}

@keyframes pulsePenaltyAlert {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.03); filter: brightness(1.22); }
}

/* 5. 3D Capital Gravity Globe Canvas & Orbit HUD */
.capital-globe-stage {
  position: relative;
  width: 100%;
  height: 255px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.12), rgba(7, 11, 20, 0.92) 72%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.capital-globe-stage:active {
  cursor: grabbing;
}

.capital-globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 6. F1 Telemetry 3D Tachometer & RPM Gauge */
.f1-telemetry-deck {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(7, 11, 20, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.f1-rpm-bar-track {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 3px;
  height: 10px;
}

.f1-rpm-led {
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.f1-rpm-led.lit-green {
  background: #10B981;
  box-shadow: 0 0 6px #10B981;
}

.f1-rpm-led.lit-amber {
  background: #F59E0B;
  box-shadow: 0 0 6px #F59E0B;
}

.f1-rpm-led.lit-red {
  background: #F43F5E;
  box-shadow: 0 0 8px #F43F5E;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
