/* ════════════════════════════════════════════════════════════
   Vault-opening sequence (js/vault-open.js) — shown when access is
   granted on Vault Access and the Client Portal. Compositor-only:
   every animated property is transform or opacity.
   ════════════════════════════════════════════════════════════ */

.vo-overlay {
  --vo-gold: #c8a44e;
  --vo-gold-light: #e8c978;
  --vo-steel-1: #2a3a55;
  --vo-steel-2: #16243c;
  --vo-ink: #060d18;
  --vo-size: min(70vmin, 460px);

  position: fixed; inset: 0; z-index: 10000;
  display: grid; place-items: center; align-content: center; gap: 28px;
  background: radial-gradient(circle at 50% 45%, #0e1f3a 0%, var(--vo-ink) 70%);
  cursor: pointer;
}

.vo-stage { position: relative; width: var(--vo-size); height: var(--vo-size); perspective: 1600px; }

/* Warm light inside the vault, revealed as the door swings */
.vo-light {
  position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle, #fff6d8 0%, var(--vo-gold-light) 28%, rgba(200,164,78,0.35) 58%, transparent 72%);
  opacity: 0; transform: scale(0.85);
}

/* Fixed frame ring */
.vo-frame {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 210deg, #3b4d6d, #101c30, #3b4d6d, #101c30, #3b4d6d);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), inset 0 0 0 2px rgba(200,164,78,0.35);
  -webkit-mask: radial-gradient(circle, transparent 43.5%, #000 44%);
          mask: radial-gradient(circle, transparent 43.5%, #000 44%);
}

/* The door: hinged on the left edge */
.vo-door {
  position: absolute; inset: 7%; border-radius: 50%;
  transform-origin: 0% 50%; transform-style: preserve-3d;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.12), transparent 45%),
    radial-gradient(circle, var(--vo-steel-1) 0%, var(--vo-steel-2) 70%, #0c1628 100%);
  box-shadow: inset 0 0 0 3px rgba(200,164,78,0.45), inset 0 0 40px rgba(0,0,0,0.55), 0 10px 40px rgba(0,0,0,0.5);
  will-change: transform;
}
.vo-door::before { /* inner ring */
  content: ""; position: absolute; inset: 16%; border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(200,164,78,0.35);
}

/* Locking bolts around the rim: each arm is rotated into place; the bolt slides along it */
.vo-bolt-arm { position: absolute; left: 50%; top: 50%; width: 50%; height: 0; transform-origin: 0 0; }
.vo-bolt {
  position: absolute; right: -2%; top: -9px; width: 30px; height: 18px; border-radius: 4px;
  background: linear-gradient(180deg, var(--vo-gold-light), var(--vo-gold) 55%, #8d7231);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

/* Handle wheel */
.vo-wheel { position: absolute; inset: 27%; border-radius: 50%; box-shadow: inset 0 0 0 5px var(--vo-gold); will-change: transform; }
.vo-spoke {
  position: absolute; left: 50%; top: 50%; width: 50%; height: 8px; margin-top: -4px; transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--vo-gold) 0%, var(--vo-gold-light) 100%); border-radius: 4px;
}
.vo-spoke::after {
  content: ""; position: absolute; right: -9px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff2c4, var(--vo-gold) 60%, #7d6428);
}

/* Combination dial with a fixed index mark */
.vo-dial {
  position: absolute; inset: 40%; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #f3f0e6, #c9c3b2 70%, #8e8878);
  box-shadow: 0 0 0 3px #0c1628, 0 4px 12px rgba(0,0,0,0.5);
  will-change: transform;
}
.vo-dial-tick { position: absolute; left: 50%; top: 4%; width: 2px; height: 12%; margin-left: -1px; background: #1b2436; transform-origin: 50% 383%; }
.vo-index {
  position: absolute; left: 50%; top: calc(40% - 16px); width: 0; height: 0; margin-left: -7px;
  border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 12px solid var(--sw-red, #e4002b);
}

.vo-label {
  position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%);
  font: 700 0.8rem/1 "Jost", "DM Sans", sans-serif; letter-spacing: 0.3em; color: rgba(232,201,120,0.85);
  white-space: nowrap;
}

.vo-status {
  margin: 0; min-height: 1.4em;
  font: 600 0.95rem/1.4 "Jost", "DM Sans", sans-serif; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--vo-gold-light); text-align: center;
}
.vo-skip { margin: 0; font: 0.75rem/1 "Jost", "DM Sans", sans-serif; letter-spacing: 0.08em; color: rgba(255,255,255,0.35); }

@media (prefers-reduced-motion: reduce) {
  .vo-overlay { display: none; }
}
