/* ==========================================================================
   Bishal Dutta Hero Animations & 3D Interactive Unboxing Experience
   ========================================================================== */

/* Hero Stage Container */
.hero-visual-stage {
  position: relative;
  width: 100%;
  height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
  transform-style: preserve-3d;
}

/* Background Particle Canvas */
.hero-particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Ambient Radial Glow */
.hero-ambient-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, rgba(139, 92, 246, 0.15) 45%, rgba(255, 255, 255, 0) 70%);
  filter: blur(40px);
  z-index: 1;
  animation: auraPulse 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes auraPulse {
  0% { transform: scale(0.9) translate3d(0, 0, 0); opacity: 0.6; }
  100% { transform: scale(1.15) translate3d(20px, -15px, 0); opacity: 0.95; }
}

/* 3D Scene Root that responds to mouse parallax */
.scene-3d-wrapper {
  position: relative;
  width: 420px;
  height: 460px;
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.4, 1);
  cursor: pointer;
  z-index: 3;
}

/* Base Shadow of the Box */
.box-ground-shadow {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) rotateX(65deg);
  width: 320px;
  height: 180px;
  background: radial-gradient(ellipse, rgba(15, 23, 42, 0.22) 0%, rgba(99, 102, 241, 0.08) 40%, transparent 70%);
  border-radius: 50%;
  filter: blur(14px);
  pointer-events: none;
  animation: shadowBreathe 4s ease-in-out infinite alternate;
}

@keyframes shadowBreathe {
  0% { transform: translateX(-50%) rotateX(65deg) scale(0.95); opacity: 0.6; }
  100% { transform: translateX(-50%) rotateX(65deg) scale(1.05); opacity: 0.85; }
}

/* ==========================================================================
   The 3D Isometric Carton Box (Exact Match to Mockup)
   ========================================================================== */

.box-3d-container {
  position: absolute;
  bottom: 50px;
  left: 50%;
  width: 240px;
  height: 200px;
  transform-style: preserve-3d;
  transform: translateX(-50%) rotateX(20deg) rotateY(-28deg);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.box-3d-container:hover {
  transform: translateX(-50%) rotateX(15deg) rotateY(-22deg) scale(1.03);
}

/* Box Facets */
.box-face {
  position: absolute;
  box-sizing: border-box;
}

/* Front-Right Facet (Features "Unbox Review Upgrade" and smiley icon) */
.box-face-front {
  width: 200px;
  height: 180px;
  background: linear-gradient(135deg, #c7d2fe 0%, #cbd5e1 40%, #94a3b8 100%);
  transform: rotateY(0deg) translateZ(100px);
  border-radius: 4px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-left: 1px solid rgba(255, 255, 255, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: inset -5px -5px 15px rgba(15, 23, 42, 0.12);
}

.box-branding {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.box-brand-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  color: #475569;
  letter-spacing: -0.01em;
  text-transform: capitalize;
}

.box-brand-text span {
  display: block;
}

.box-smiley {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.box-smiley::before, .box-smiley::after {
  content: '';
  position: absolute;
  top: 10px;
  width: 3px;
  height: 3px;
  background: #64748b;
  border-radius: 50%;
}
.box-smiley::before { left: 9px; }
.box-smiley::after { right: 9px; }

.box-smiley-smile {
  position: absolute;
  bottom: 8px;
  width: 14px;
  height: 7px;
  border-bottom: 2px solid #64748b;
  border-radius: 0 0 14px 14px;
}

/* Left Facet (In shadow) */
.box-face-left {
  width: 200px;
  height: 180px;
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 60%, #475569 100%);
  transform: rotateY(-90deg) translateZ(100px);
  border-radius: 4px;
  box-shadow: inset 5px 0 15px rgba(0, 0, 0, 0.2);
}

/* Inside Bottom Opening */
.box-face-bottom {
  width: 200px;
  height: 200px;
  background: #334155;
  transform: rotateX(-90deg) translateZ(90px);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

/* Top Open Rim / Light Glow Emitter */
.box-light-emitter {
  position: absolute;
  top: -10px;
  left: 0;
  width: 200px;
  height: 200px;
  transform: rotateX(90deg) translateZ(10px);
  background: radial-gradient(circle, #ffffff 0%, rgba(99, 102, 241, 0.8) 40%, rgba(139, 92, 246, 0) 70%);
  filter: blur(10px);
  animation: emitterGlow 3s ease-in-out infinite alternate;
}

@keyframes emitterGlow {
  0% { opacity: 0.7; transform: rotateX(90deg) translateZ(10px) scale(0.9); }
  100% { opacity: 1; transform: rotateX(90deg) translateZ(10px) scale(1.15); }
}

/* Floating Open Lid */
.box-floating-lid {
  position: absolute;
  top: -65px;
  left: -15px;
  width: 220px;
  height: 220px;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
  transform: rotateX(72deg) rotateZ(18deg) translateZ(40px);
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 25px 35px rgba(15, 23, 42, 0.25), inset 0 0 15px rgba(255, 255, 255, 0.6);
  animation: lidBob 5s ease-in-out infinite alternate;
}

@keyframes lidBob {
  0% { transform: rotateX(72deg) rotateZ(18deg) translateZ(40px) translateY(0); }
  100% { transform: rotateX(68deg) rotateZ(22deg) translateZ(60px) translateY(-12px); }
}

/* ==========================================================================
   Levitating Gadget Out of the Box (Floating Phone & Gadget Swapper)
   ========================================================================== */

.levitating-gadget-wrap {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  transform-style: preserve-3d;
  animation: gadgetLevitate 4.5s ease-in-out infinite;
}

@keyframes gadgetLevitate {
  0% {
    transform: translateX(-50%) translateY(0px) rotateZ(-2deg) rotateY(12deg);
  }
  50% {
    transform: translateX(-50%) translateY(-24px) rotateZ(2deg) rotateY(18deg);
  }
  100% {
    transform: translateX(-50%) translateY(0px) rotateZ(-2deg) rotateY(12deg);
  }
}

/* Phone Body */
.gadget-phone-frame {
  width: 175px;
  height: 350px;
  background: #0f172a;
  border-radius: 36px;
  padding: 8px;
  box-shadow: 
    0 25px 50px -10px rgba(15, 23, 42, 0.45),
    0 0 40px rgba(99, 102, 241, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gadget-phone-frame:hover {
  transform: scale(1.05) rotateZ(0deg);
}

/* Metallic Edge Highlight */
.gadget-phone-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
  animation: edgeShine 4s ease-in-out infinite;
  pointer-events: none;
  z-index: 20;
}

@keyframes edgeShine {
  0% { transform: translateX(-100%); }
  35%, 100% { transform: translateX(100%); }
}

/* Phone Screen */
.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4338ca 60%, #ec4899 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #ffffff;
  padding: 14px 12px;
}

/* Screen Notch / Punch-hole */
.phone-punchhole {
  width: 10px;
  height: 10px;
  background: #000000;
  border-radius: 50%;
  margin: 0 auto 10px auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Screen Content Header */
.screen-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  opacity: 0.9;
  margin-bottom: 24px;
}

/* Hero Phone Display UI (Unbox Review Live) */
.phone-ui-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  text-align: center;
}

.phone-gadget-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: iconPulse 2.5s ease-in-out infinite alternate;
}

@keyframes iconPulse {
  0% { transform: scale(0.96); box-shadow: 0 4px 15px rgba(236, 72, 153, 0.4); }
  100% { transform: scale(1.06); box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6); }
}

.phone-gadget-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: #ffffff;
}

.phone-gadget-spec {
  font-size: 0.65rem;
  font-weight: 600;
  color: #c7d2fe;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.phone-screen-footer {
  margin-top: auto;
  text-align: center;
  padding-bottom: 6px;
}

.phone-screen-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fbcfe8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ==========================================================================
   Hand-Drawn Doodle & Arrow Annotation (Mockup Match)
   ========================================================================== */

.doodle-annotation-wrap {
  position: absolute;
  top: 40px;
  right: -10px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  pointer-events: none;
  animation: doodleBob 3.5s ease-in-out infinite alternate;
}

@keyframes doodleBob {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-8px) rotate(2deg); }
}

.doodle-text {
  font-family: 'Caveat', cursive, var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #334155;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
}

.doodle-text span {
  display: block;
}

.doodle-arrow-svg {
  width: 60px;
  height: 60px;
  margin-left: 10px;
  margin-top: 4px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.doodle-path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawDoodle 2.5s ease-out forwards;
}

@keyframes drawDoodle {
  to {
    stroke-dashoffset: 0;
  }
}

/* ==========================================================================
   Floating Tech Chips / Orbiting Feature Pills
   ========================================================================== */

.floating-tech-chip {
  position: absolute;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
  z-index: 20;
  pointer-events: auto;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.floating-tech-chip:hover {
  transform: scale(1.1) translateY(-4px) !important;
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.25);
  border-color: var(--primary-light);
}

.chip-icon {
  font-size: 0.9rem;
}

/* Chip Positioning & Floating Delays */
.chip-pos-1 {
  top: 15%;
  left: -20px;
  animation: chipFloat1 5s ease-in-out infinite alternate;
}

.chip-pos-2 {
  bottom: 25%;
  right: -30px;
  animation: chipFloat2 6s ease-in-out infinite alternate 1s;
}

.chip-pos-3 {
  bottom: 10%;
  left: 10px;
  animation: chipFloat3 5.5s ease-in-out infinite alternate 0.5s;
}

@keyframes chipFloat1 {
  0% { transform: translateY(0) rotate(-3deg); }
  100% { transform: translateY(-16px) rotate(2deg); }
}

@keyframes chipFloat2 {
  0% { transform: translateY(0) rotate(3deg); }
  100% { transform: translateY(-20px) rotate(-2deg); }
}

@keyframes chipFloat3 {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-14px) rotate(4deg); }
}

/* Interactive Box Trigger Button */
.unbox-trigger-badge {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: var(--primary);
  border: 1.5px solid var(--primary-light);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  z-index: 25;
}

.unbox-trigger-badge:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateX(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Unbox Trigger Pop Animation */
.box-pop-animation {
  animation: unboxBurst 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes unboxBurst {
  0% { transform: translateX(-50%) scale(1); }
  40% { transform: translateX(-50%) translateY(-35px) scale(1.15) rotateZ(5deg); }
  100% { transform: translateX(-50%) scale(1); }
}
