/* ==========================================================================
   KINETIC 3D FLIP-DIGIT & SPLIT-FLAP PHYSICS
   Simulates mechanical airport/station split-flap display with lighting
   ========================================================================== */

.flip-segment {
  position: relative;
  display: inline-block;
  perspective: 600px;
  -webkit-perspective: 600px;
}

/* Base Digit Structure */
.flip-card-inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-feature-settings: "tnum" 1, "zero" 1;
}

/* Mechanical Split Horizontal Line */
.split-divider {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0, 0, 0, 0.7);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  z-index: 10;
  pointer-events: none;
}

/* Mechanical Notch Cutouts on the sides */
.notch-left, .notch-right {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 10px;
  background: var(--bg-void);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(-50%);
  z-index: 11;
  border-radius: 3px;
}

.notch-left {
  left: -3px;
  border-left: none;
}

.notch-right {
  right: -3px;
  border-right: none;
}

/* 3D Kinetic Flip Animation */
.digit-flip-animate {
  animation: flipPerspective 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: center center;
}

@keyframes flipPerspective {
  0% {
    transform: rotateX(0deg) scale(1);
    filter: brightness(1);
  }
  40% {
    transform: rotateX(-35deg) scale(0.96);
    filter: brightness(1.25) drop-shadow(0 0 15px rgba(245, 197, 24, 0.4));
  }
  70% {
    transform: rotateX(15deg) scale(1.02);
    filter: brightness(1.1);
  }
  100% {
    transform: rotateX(0deg) scale(1);
    filter: brightness(1);
  }
}

/* Smooth Glow Pulse on Digit Change */
.glow-pulse {
  animation: glowPulseKey 0.6s ease-out;
}

@keyframes glowPulseKey {
  0% {
    text-shadow: 0 0 35px var(--gold-primary), 0 0 10px #ffffff;
  }
  100% {
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 197, 24, 0.25);
  }
}
