/* ============================================================
   PeakRoutine — sections-additions.css
   Premium glassmorphism badges with beautiful Z-layering
   ============================================================ */

.hero {
  position: relative;
  min-height: 700px;
}

@media (max-width: 576px) {
  .hero {
    min-height: auto;
  }
}

/* Layer is container for absolute pos */
.hero-badges-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.hero-phones {
  z-index: 20;
}

/* Base styles for premium glassmorphism badges */
.hero-badge-new {
  position: absolute;
  background: linear-gradient(135deg, rgba(20, 25, 40, 0.85) 0%, rgba(10, 15, 25, 0.6) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  padding: 0.85rem 1.15rem;
  box-shadow: 
    0 24px 40px -12px rgba(0, 0, 0, 0.65), 
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    inset 0 4px 20px rgba(255, 255, 255, 0.05); /* Slight inner top glow */
  display: flex;
  align-items: center;
  gap: 1rem; 
  color: white;
  white-space: nowrap;
  
  /* Initial state for mount animation */
  opacity: 0;
  transform: scale(0.85);
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.hero-badge-new:hover {
  transform: scale(1.05) translateY(-4px) !important;
  box-shadow: 
    0 30px 50px -12px rgba(0, 0, 0, 0.8), 
    0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.badge-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge-col-new {
  display: flex;
  flex-direction: column;
}

.badge-label-new {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 2px;
}

.badge-value-new {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.ai-insight-badge {
  padding-right: 1.5rem;
}
.ai-insight-badge .badge-value-new {
  font-size: 14px;
  font-weight: 600;
}

/* Z-index layering for 3D depth */
.z-above {
  z-index: 30; /* Above the hero-phones which are 20 */
}
.z-below {
  z-index: 10; /* Below the hero-phones */
}

/* Positioning Rules: Set relative to .hero-phones (860px max-width, 480px height) */
/* Clustered beautifully around the 3 curved screens */
.position-top-left    { top: 15%; left: 0%; }        /* Narrow card: tuck inside */
.position-mid-left    { top: 44%; left: -14%; }      /* Wide card: pull far left */
.position-bottom-left { bottom: 8%; left: -2%; }     /* Narrow card */

.position-top-right   { top: 15%; right: 0%; }       /* Narrow card: tuck inside */
.position-mid-right   { top: 44%; right: -14%; }     /* Wide card: pull far right */
.position-bottom-right{ bottom: 8%; right: -2%; }    /* Narrow card */


/* Floating Animations */
@keyframes badgeMount {
  to { opacity: 1; transform: scale(1); }
}

@keyframes floatA { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes floatB { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes floatC { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.badge-anim-0 { animation: badgeMount 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards, floatA 4.2s ease-in-out 0.1s infinite; }
.badge-anim-1 { animation: badgeMount 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards, floatB 3.8s ease-in-out 0.25s infinite; }
.badge-anim-2 { animation: badgeMount 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.4s forwards, floatC 4.6s ease-in-out 0.4s infinite; }
.badge-anim-3 { animation: badgeMount 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.55s forwards, floatB 4.0s ease-in-out 0.55s infinite; }
.badge-anim-4 { animation: badgeMount 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards, floatA 4.8s ease-in-out 0.7s infinite; }
.badge-anim-5 { animation: badgeMount 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.85s forwards, floatC 4.4s ease-in-out 0.85s infinite; }

/* Responsive Overrides */
@media (max-width: 991px) {
  .hero-badge-new {
    padding: 0.6rem 0.9rem;
    gap: 0.75rem;
    border-radius: 16px;
  }
  .badge-icon-box { width: 32px; height: 32px; font-size: 14px; }
  .badge-label-new { font-size: 9px; }
  .badge-value-new { font-size: 13px; }
  
  .position-top-left    { left: 3%; top: 8%; }
  .position-mid-left    { left: 0%; top: 38%; }
  .position-bottom-left { left: 8%; bottom: 8%; }
  .position-top-right   { right: 1%; top: 18%; }
  .position-mid-right   { right: 0%; top: 48%; }
  .position-bottom-right{ right: 6%; bottom: 6%; }
}

@media (max-width: 767px) {
  /* Hide 4 badges on tablet, keep 2 */
  .position-bottom-left,
  .position-bottom-right,
  .position-mid-left,
  .position-mid-right {
    display: none !important;
  }
  .position-top-left { top: 8%; left: 2%; z-index: 30; }
  .position-top-right { top: 8%; right: 2%; z-index: 30; }
}

@media (max-width: 576px) {
  /* Show all 6 badges around the 3 phones */
  .position-bottom-left,
  .position-bottom-right,
  .position-mid-left,
  .position-mid-right { display: flex !important; }

  /* Position badges close to the phones, not at screen edges */
  .position-top-left    { top: -4%;    left: 8%; }
  .position-mid-left    { top: 38%;    left: 2%; }
  .position-bottom-left { bottom: -4%; left: 8%; }
  .position-top-right   { top: -4%;    right: 8%; }
  .position-mid-right   { top: 38%;    right: 2%; }
  .position-bottom-right{ bottom: -4%; right: 8%; }

  /* Compact badge size for mobile — all badges keep text */
  .hero-badge-new {
    padding: 0.28rem 0.45rem;
    gap: 0.35rem;
    border-radius: 9px;
    max-width: 105px;
    white-space: normal;
  }
  .badge-icon-box { width: 18px; height: 18px; font-size: 8px; border-radius: 5px; }
  .badge-label-new { font-size: 5.5px; margin-bottom: 1px; }
  .badge-value-new { font-size: 8px; line-height: 1.15; }

  /* Wide cards: truncate to single line on mobile */
  .ai-insight-badge {
    padding-right: 0.45rem;
  }
  .ai-insight-badge .badge-value-new {
    font-size: 7.5px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ai-insight-badge .badge-value-new br {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge-new {
    animation: none !important;
    opacity: 1 !important;
    transform: scale(1) !important;
    translate: 0 0 !important;
  }
}

/* ══════════════════════════════════════
   ADVANCED HOVER TILT & GLOW Tracker
══════════════════════════════════════ */
.about-card, .value-card, .testi-card, .pricing-card {
  transition: transform 0.1s linear, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.about-card::after, .value-card::after, .testi-card::after, .pricing-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
  background: radial-gradient(
    600px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    rgba(255, 255, 255, 0.06),
    transparent 40%
  );
}

.about-card:hover::after, .value-card:hover::after, .testi-card:hover::after, .pricing-card:hover::after {
  opacity: 1;
}

/* Green tinted glow for testi cards */
.tc-green::after {
  background: radial-gradient(
    500px circle at var(--mouse-x, 0) var(--mouse-y, 0),
    rgba(56, 193, 114, 0.08),
    transparent 40%
  );
}
