/* ============================================================
   OVB Experience — HTML Overlay System
   Crisp text, phone mockups, OVB Assistant bubbles, floating cards
   positioned on top of the canvas scroll sequence.
   ============================================================ */

/* --- Phone Mockup --- */
.phone-mockup {
  position: fixed;
  z-index: 10;
  width: 140px;
  height: 280px;
  border: 3px solid rgba(255,255,255,0.2);
  border-radius: 28px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
.phone-mockup.visible {
  opacity: 1;
  transform: scale(1);
}
.phone-mockup .phone-screen {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--ovb-cream);
  display: flex;
  flex-direction: column;
  padding: 24px 12px 12px;
  font-family: 'Inter', sans-serif;
}
.phone-mockup .phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 20px;
  background: #000;
  border-radius: 0 0 12px 12px;
  z-index: 2;
}
.phone-screen .ps-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: var(--ovb-teal);
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}
.phone-screen .ps-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  font-style: italic;
  color: var(--ovb-slate);
  text-align: center;
  margin-bottom: 10px;
}
.phone-screen .ps-img {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 10px;
}
.phone-screen .ps-btn {
  background: var(--ovb-terracotta);
  color: white;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
}

/* Position phone lower-center where her hands are in the frame */
.phone-mockup.pos-hands {
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
}
.phone-mockup.pos-hands.visible {
  transform: translateX(-50%) scale(1);
}

/* --- OVB Assistant Chat Bubble --- */
.ovb-bubble {
  position: fixed;
  z-index: 10;
  max-width: 340px;
  background: white;
  color: var(--ovb-black);
  border-radius: 20px;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  overflow: hidden;
}
.ovb-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.ovb-bubble .ovb-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--ovb-teal-bright);
  color: white;
}
.ovb-bubble .ovb-header .ovb-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.ovb-bubble .ovb-header .ovb-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.ovb-bubble .ovb-header .ovb-label {
  font-size: 10px;
  opacity: 0.7;
  font-weight: 400;
}
.ovb-bubble .ovb-msg {
  padding: 14px 16px;
  color: #333;
  font-size: 15px;
  line-height: 1.5;
}

/* Positions for different acts */
.ovb-bubble.pos-intro { bottom: 16%; right: 10%; }
.ovb-bubble.pos-guide { top: 38%; right: 8%; }
.ovb-bubble.pos-wait { bottom: 18%; right: 10%; }
.ovb-bubble.pos-bridge { top: 25%; left: 50%; transform: translateX(-50%) translateY(10px) scale(0.95); }
.ovb-bubble.pos-bridge.visible { transform: translateX(-50%) translateY(0) scale(1); }

/* --- Floating Glass Cards --- */
.glass-card {
  position: fixed;
  z-index: 10;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--ovb-cream);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
.glass-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.glass-card .card-icon {
  font-size: 20px;
  margin-bottom: 6px;
}
.glass-card .card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-style: italic;
  margin-bottom: 4px;
}
.glass-card .card-body {
  font-size: 12px;
  opacity: 0.7;
  line-height: 1.4;
}

/* Card positions — scattered naturally */
.glass-card.pos-1 { top: 20%; left: 5%; }
.glass-card.pos-2 { top: 15%; right: 8%; }
.glass-card.pos-3 { bottom: 30%; left: 8%; }
.glass-card.pos-4 { bottom: 25%; right: 5%; }
.glass-card.pos-5 { top: 35%; left: 15%; }

/* --- Body Map Overlay --- */
.bodymap-overlay {
  position: fixed;
  z-index: 10;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}
.bodymap-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.bodymap-zone {
  position: absolute;
  cursor: pointer;
  padding: 8px 14px;
  background: rgba(193,123,92,0.15);
  border: 1px solid rgba(193,123,92,0.3);
  border-radius: 8px;
  color: var(--ovb-cream);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}
.bodymap-zone:hover, .bodymap-zone.active {
  background: rgba(193,123,92,0.4);
  border-color: var(--ovb-terracotta);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(193,123,92,0.3);
}
/* Zone positions — centered horizontally, staggered left/right of body center */
.bodymap-zone.z-head { top: 15%; left: 25%; }
.bodymap-zone.z-jaw { top: 22%; right: 25%; }
.bodymap-zone.z-shoulders { top: 33%; left: 20%; }
.bodymap-zone.z-chest { top: 42%; right: 22%; }
.bodymap-zone.z-stomach { top: 55%; left: 22%; }
.bodymap-zone.z-hands { top: 62%; right: 20%; }

/* Insight card that appears on zone tap */
.insight-card {
  position: fixed;
  z-index: 15;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  max-width: 400px;
  width: 90%;
  background: rgba(247,245,240,0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 24px;
  color: var(--ovb-black);
  font-family: 'Inter', sans-serif;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.insight-card.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.insight-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  color: var(--ovb-teal);
  margin-bottom: 8px;
}
.insight-card p {
  font-size: 14px;
  line-height: 1.6;
  color: #555;
}

/* --- Mobile --- */
@media (max-width: 768px) {
  /* Phone mockup — much smaller, tucked in corner */
  .phone-mockup { width: 90px; height: 180px; border-width: 2px; border-radius: 18px; }
  .phone-mockup .phone-notch { width: 50px; height: 12px; }
  .phone-mockup.pos-hands { bottom: 15%; left: 16px; transform: scale(0.9); }
  .phone-mockup.pos-hands.visible { transform: scale(1); }
  .phone-screen .ps-brand { font-size: 9px; }
  .phone-screen .ps-tagline { font-size: 7px; margin-bottom: 4px; }
  .phone-screen .ps-img { height: 45px; margin-bottom: 4px; }
  .phone-screen .ps-btn { font-size: 8px; padding: 4px; }

  /* OVB Assistant bubbles — smaller, bottom positioned */
  .ovb-bubble { max-width: 220px; font-size: 12px; }
  .ovb-bubble .ovb-header { padding: 8px 12px; gap: 8px; }
  .ovb-bubble .ovb-header .ovb-icon { width: 22px; height: 22px; }
  .ovb-bubble .ovb-header .ovb-name { font-size: 11px; }
  .ovb-bubble .ovb-header .ovb-label { font-size: 8px; }
  .ovb-bubble .ovb-msg { padding: 10px 12px; font-size: 13px; }
  .ovb-bubble.pos-intro { bottom: 12%; right: 8px; }
  .ovb-bubble.pos-guide { top: auto; bottom: 8%; right: 8px; }
  .ovb-bubble.pos-wait { bottom: 12%; right: 8px; }
  .ovb-bubble.pos-bridge { top: auto; bottom: 15%; left: 50%; }

  /* Glass cards — large centered hero moments on mobile */
  .glass-card {
    max-width: 85vw;
    width: 85vw;
    padding: 24px 24px;
    border-radius: 16px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(20px);
    text-align: center;
  }
  .glass-card.visible {
    transform: translateX(-50%) translateY(0);
  }
  .glass-card .card-title {
    font-size: 22px;
    margin-bottom: 8px;
  }
  .glass-card .card-body {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.5;
  }
  .glass-card.pos-1 { top: 30%; }
  .glass-card.pos-2 { top: 50%; }
  .glass-card.pos-3 { display: none; }
  .glass-card.pos-4 { display: none; }

  /* Inline OVB Assistant card in body text */
  .inline-ovb { max-width: 220px !important; margin-top: 16px !important; }
  .inline-ovb div[style*="padding:14px"] { padding: 10px 12px !important; font-size: 13px !important; }
  .inline-ovb div[style*="padding:12px"] { padding: 8px 12px !important; }
  .inline-ovb div[style*="width:28px"] { width: 22px !important; height: 22px !important; }

  /* Body map zones — bigger, well-spaced, clearly tappable, above the text */
  .bodymap-zone {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .bodymap-zone.z-head { top: 18%; left: 8%; }
  .bodymap-zone.z-jaw { top: 18%; right: 8%; }
  .bodymap-zone.z-shoulders { top: 30%; left: 6%; }
  .bodymap-zone.z-chest { top: 30%; right: 6%; }
  .bodymap-zone.z-stomach { top: 42%; left: 8%; }
  .bodymap-zone.z-hands { top: 42%; right: 8%; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .phone-mockup, .ovb-bubble, .glass-card, .bodymap-overlay, .insight-card {
    transition: none;
  }
}
