/* ==========================================================================
   HMBSA & HERITAGE ANAESTHETICS — DUAL-THEME MEDICAL GLASSMORPHISM SYSTEM
   HMBSA: Luminous Pearl & Signature Teal (#3C9098 / #06B6D4) Light Theme
   Heritage Anaesthetics: Deep Obsidian Slate (#0B132B -> #1C2541) Inverse Theme
   ========================================================================== */

:root {
  --hmbsa-teal: #3C9098;
  --hmbsa-teal-dark: #2A6F76;
  --electric-cyan: #06B6D4;
  --medical-indigo: #6366F1;
  --clinical-emerald: #10B981;
  --gold-accent: #F59E0B;
  --navy-deep: #0B132B;
  --navy-slate: #1C2541;
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   1. SCROLL REVEAL (Declared BEFORE hover rules so hover always wins cleanly)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   2. LIGHT THEME (HMBSA — Inspired by HMBSA Header.png)
   -------------------------------------------------------------------------- */
body.theme-light {
  background: 
    radial-gradient(circle at 10% 10%, rgba(60, 144, 152, 0.14), transparent 40%),
    radial-gradient(circle at 90% 35%, rgba(6, 182, 212, 0.11), transparent 40%),
    radial-gradient(circle at 25% 85%, rgba(99, 102, 241, 0.09), transparent 45%),
    linear-gradient(145deg, #F8FAFC 0%, #EFF6F8 45%, #F3F6FC 100%);
  color: #0F172A;
  position: relative;
}

.bg-grid-light {
  background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-image: 
    linear-gradient(to right, rgba(60, 144, 152, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(60, 144, 152, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 10% 10%, rgba(60, 144, 152, 0.14), transparent 40%),
    radial-gradient(circle at 90% 35%, rgba(6, 182, 212, 0.11), transparent 40%),
    radial-gradient(circle at 25% 85%, rgba(99, 102, 241, 0.09), transparent 45%),
    linear-gradient(145deg, #F8FAFC 0%, #EFF6F8 45%, #F3F6FC 100%);
}

.glass-nav-light {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(60, 144, 152, 0.16);
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.06);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(60, 144, 152, 0.18);
  box-shadow: 
    0 18px 40px -15px rgba(15, 23, 42, 0.06),
    0 4px 12px -2px rgba(60, 144, 152, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s ease-out,
              border-color 0.28s ease-out,
              box-shadow 0.28s ease-out,
              background-color 0.28s ease-out;
}

.glass-card-light:hover,
.reveal.active.glass-card-light:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(6, 182, 212, 0.48);
  box-shadow: 
    0 24px 50px -12px rgba(60, 144, 152, 0.16),
    0 8px 20px -4px rgba(6, 182, 212, 0.1),
    0 0 0 1px rgba(255, 255, 255, 1) inset;
}

.glass-pill-light {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(60, 144, 152, 0.24);
  box-shadow: 0 4px 15px -3px rgba(60, 144, 152, 0.1);
}

/* --------------------------------------------------------------------------
   3. DARK INVERSE THEME (Heritage Anaesthetics — Spec Medical Glassmorphism)
   -------------------------------------------------------------------------- */
body.theme-dark {
  background: linear-gradient(135deg, #0B132B 0%, #131B36 50%, #1C2541 100%);
  color: #F8FAFC;
  position: relative;
}

.bg-grid-dark {
  background-size: 44px 44px, 44px 44px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-image: 
    linear-gradient(to right, rgba(6, 182, 212, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 102, 241, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 12% 12%, rgba(6, 182, 212, 0.16), transparent 40%),
    radial-gradient(circle at 88% 32%, rgba(99, 102, 241, 0.16), transparent 42%),
    radial-gradient(circle at 25% 85%, rgba(16, 185, 129, 0.09), transparent 45%),
    linear-gradient(135deg, #0B132B 0%, #131B36 50%, #1C2541 100%);
}

.glass-nav-dark {
  background: rgba(11, 19, 43, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* GPU-Stable Dark Glass Card (No backdrop-filter repaint glitch on hover) */
.glass-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.035) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 
    0 20px 45px -15px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  position: relative;
  overflow: hidden;
  transition: transform 0.28s ease-out,
              border-color 0.28s ease-out,
              background 0.28s ease-out,
              box-shadow 0.28s ease-out;
}

.glass-card:hover,
.reveal.active.glass-card:hover {
  transform: translateY(-4px);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(6, 182, 212, 0.06) 100%);
  border-color: rgba(6, 182, 212, 0.48);
  box-shadow: 
    0 25px 55px -15px rgba(6, 182, 212, 0.2),
    0 0 20px -5px rgba(99, 102, 241, 0.15),
    0 0 0 1px rgba(6, 182, 212, 0.22) inset;
}

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY GRADIENT & ECG UTILITIES (Descender-Safe Padding)
   -------------------------------------------------------------------------- */
.text-gradient-hmbsa {
  background: linear-gradient(135deg, #1E5F66 0%, #3C9098 40%, #06B6D4 75%, #4F46E5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.12em;
  line-height: 1.22;
}

.text-gradient-anaesthetics {
  background: linear-gradient(135deg, #22D3EE 0%, #38BDF8 45%, #818CF8 85%, #C084FC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.14em;
  line-height: 1.22;
}

.ecg-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: ecgPulse 5s linear infinite;
}

@keyframes ecgPulse {
  0% {
    stroke-dashoffset: 600;
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0.35;
  }
}

.status-dot-glow {
  box-shadow: 0 0 8px currentColor;
}

/* --------------------------------------------------------------------------
   5. SPOTLIGHT TAB PROGRESS HIGHLIGHT FILL (4s Auto-Advance Indicator)
   -------------------------------------------------------------------------- */
[data-spotlight-tab] {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

[data-spotlight-tab] .tab-progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
}

body.theme-light [data-spotlight-tab] .tab-progress-fill {
  background: linear-gradient(90deg, #2A6F76 0%, #3C9098 60%, #06B6D4 100%);
}

body.theme-dark [data-spotlight-tab] .tab-progress-fill {
  background: linear-gradient(90deg, #06B6D4 0%, #3B82F6 55%, #6366F1 100%);
}

.portal-card-dark {
  background: radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.25), transparent 45%),
              radial-gradient(circle at 15% 80%, rgba(99, 102, 241, 0.28), transparent 50%),
              linear-gradient(135deg, #0B132B 0%, #16203D 55%, #1C2541 100%);
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 30px 70px -15px rgba(11, 19, 43, 0.45);
  position: relative;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   6. CENTERPIECE ANIMATED HERITAGE LOGO & INTERACTIVE ETHOS TRIAD
   -------------------------------------------------------------------------- */
.hero-ambient-aura {
  position: absolute;
  inset: -35px;
  background:
    radial-gradient(circle at 35% 40%, rgba(60, 144, 152, 0.24), transparent 58%),
    radial-gradient(circle at 70% 60%, rgba(6, 182, 212, 0.2), transparent 58%);
  filter: blur(28px);
  border-radius: 9999px;
  pointer-events: none;
  z-index: 0;
  animation: auraBreathe 6.5s ease-in-out infinite;
}

@keyframes auraBreathe {
  0%, 100% {
    opacity: 0.72;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

.logo-centerpiece-stage {
  position: relative;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(60, 144, 152, 0.24);
  box-shadow:
    0 24px 55px -16px rgba(60, 144, 152, 0.18),
    0 8px 20px -6px rgba(15, 23, 42, 0.05),
    0 0 0 1px rgba(255, 255, 255, 1) inset;
  overflow: hidden;
  animation:
    logoStageEnter 0.85s cubic-bezier(0.16, 1, 0.3, 1) both,
    logoFloat 6s ease-in-out 0.85s infinite;
}

.logo-centerpiece-stage::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 65%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(6, 182, 212, 0.08) 35%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(60, 144, 152, 0.08) 65%,
    transparent 100%
  );
  transform: skewX(-22deg);
  pointer-events: none;
  animation: logoSheenSweep 6.5s ease-in-out 1.4s infinite;
}

@keyframes logoStageEnter {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes logoSheenSweep {
  0%, 55% {
    left: -130%;
  }
  100% {
    left: 165%;
  }
}

/* Crops hmbsa-header.png (393x107) cleanly at y=85 to isolate Cursive H + Wordmark */
.logo-wordmark-crop {
  aspect-ratio: 393 / 85;
  overflow: hidden;
  width: 100%;
}

.logo-wordmark-crop img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  filter: brightness(1.015) contrast(1.03);
}

/* Interactive Passion • Precision • Results Pills */
#ethos-triad {
  position: sticky;
  top: 0.75rem;
  z-index: 30;
  transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0.35rem 0.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Ensure no background pill, dock, or enclosing container appears on click */
#ethos-triad.is-focused-dock {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
}

.ethos-pill {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(60, 144, 152, 0.28);
  color: #1E293B;
  box-shadow: 0 8px 20px -6px rgba(60, 144, 152, 0.14);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.ethos-pill:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.65);
  box-shadow: 0 14px 28px -8px rgba(6, 182, 212, 0.24);
  color: #1E5F66;
}

/* Gentle sequential invitation shimmer when idle */
.ethos-triad-idle [data-ethos="passion"] {
  animation: ethosPassionTapSync 2.4s ease-in-out infinite;
}
.ethos-triad-idle [data-ethos="precision"] {
  animation: ethosInvitePulse 4.5s ease-in-out 1.2s infinite;
}
.ethos-triad-idle [data-ethos="results"] {
  animation: ethosInvitePulse 4.5s ease-in-out 2.4s infinite;
}

@keyframes ethosPassionTapSync {
  0%, 20%, 36%, 44%, 58%, 100% {
    border-color: rgba(60, 144, 152, 0.28);
    box-shadow: 0 8px 20px -6px rgba(60, 144, 152, 0.14);
    transform: translateY(0);
  }
  28%, 50% {
    border-color: #06B6D4;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.45), 0 4px 12px rgba(60, 144, 152, 0.2);
    transform: translateY(-2px) scale(0.98);
  }
}

@keyframes ethosInvitePulse {
  0%, 100% {
    border-color: rgba(60, 144, 152, 0.28);
    box-shadow: 0 8px 20px -6px rgba(60, 144, 152, 0.14);
  }
  20% {
    border-color: rgba(6, 182, 212, 0.75);
    box-shadow: 0 12px 26px -4px rgba(6, 182, 212, 0.28);
    transform: translateY(-2px);
  }
  40% {
    transform: translateY(0);
  }
}

/* --------------------------------------------------------------------------
   INTERACTIVE HAND CLICK AFFORDANCE POINTER (PROMINENT & MOBILE-SAFE)
   -------------------------------------------------------------------------- */
.ethos-tap-hand {
  position: absolute;
  top: 14px;
  right: 10px;
  width: 30px;
  height: 30px;
  pointer-events: none;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 42% 10%;
  animation: ethosHandClickGesture 2.2s cubic-bezier(0.25, 1, 0.5, 1) infinite;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.ethos-tap-hand.is-dismissed {
  opacity: 0 !important;
  transform: translateY(6px) scale(0.8) !important;
}

.ethos-tap-hand svg {
  width: 30px;
  height: 30px;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(11, 19, 43, 0.45));
}

/* Vivid Tap Ripple Ring */
.ethos-tap-ring {
  position: absolute;
  top: 3px;
  left: 12px;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.45);
  border: 2px solid #06B6D4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  animation: ethosTapRingPulse 2.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes ethosHandClickGesture {
  0% {
    transform: translateY(6px);
    opacity: 0;
  }
  15% {
    transform: translateY(0);
    opacity: 1;
  }
  28% {
    /* Clear finger tap down */
    transform: translateY(-5px) scale(0.86);
  }
  38% {
    transform: translateY(0) scale(1);
  }
  50% {
    /* Second tap down */
    transform: translateY(-5px) scale(0.86);
  }
  60% {
    transform: translateY(0) scale(1);
  }
  85% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes ethosTapRingPulse {
  0%, 25% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  28% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 1;
  }
  38% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
  }
  47% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 1;
  }
  60% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
}

.ethos-pill.is-active[data-ethos="passion"] {
  background: linear-gradient(135deg, #2A6F76 0%, #3C9098 60%, #D97706 100%) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 32px -8px rgba(60, 144, 152, 0.42);
}

.ethos-pill.is-active[data-ethos="precision"] {
  background: linear-gradient(135deg, #1E5F66 0%, #3C9098 50%, #06B6D4 100%) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 32px -8px rgba(6, 182, 212, 0.42);
}

.ethos-pill.is-active[data-ethos="results"] {
  background: linear-gradient(135deg, #059669 0%, #3C9098 55%, #4F46E5 100%) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 32px -8px rgba(16, 185, 129, 0.38);
}

/* Animated Ethos Showcase Card Reveal */
.ethos-card-animate {
  animation: ethosCardUnfold 0.48s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes ethosCardUnfold {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.96);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Micro-animations inside each Ethos Card */
.passion-pulse-ring {
  animation: passionHeartbeat 2.2s ease-in-out infinite;
}

@keyframes passionHeartbeat {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.35);
  }
  30% {
    transform: scale(1.08);
    box-shadow: 0 0 0 10px rgba(217, 119, 6, 0);
  }
  60% {
    transform: scale(1);
  }
}

.results-bar-1 {
  animation: resultsBarGrow 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
  transform-origin: bottom;
}
.results-bar-2 {
  animation: resultsBarGrow 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
  transform-origin: bottom;
}
.results-bar-3 {
  animation: resultsBarGrow 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
  transform-origin: bottom;
}
.results-bar-4 {
  animation: resultsBarGrow 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both;
  transform-origin: bottom;
}

@keyframes resultsBarGrow {
  0% {
    transform: scaleY(0.15);
    opacity: 0.3;
  }
  100% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
body.theme-light ::-webkit-scrollbar-track {
  background: #EFF6F8;
}
body.theme-light ::-webkit-scrollbar-thumb {
  background: #94BECA;
  border-radius: 5px;
}
body.theme-dark ::-webkit-scrollbar-track {
  background: #0B132B;
}
body.theme-dark ::-webkit-scrollbar-thumb {
  background: #28385E;
  border-radius: 5px;
}

/* ==========================================================================
   HERITAGE ANAESTHETICS CENTERPIECE & INTERACTIVE TRIAD
   ========================================================================== */

/* Ambient Neon Aura (Deep Obsidian / Electric Cyan / Indigo) */
.hero-ambient-aura-dark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130%;
  height: 140%;
  background: radial-gradient(
    ellipse at center,
    rgba(6, 182, 212, 0.28) 0%,
    rgba(79, 70, 229, 0.2) 40%,
    rgba(11, 19, 43, 0) 72%
  );
  filter: blur(52px);
  pointer-events: none;
  z-index: 0;
  animation: auraPulseDark 6s ease-in-out infinite;
}

@keyframes auraPulseDark {
  0%, 100% {
    opacity: 0.65;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* Glowing Dark-Glass Stage with Crystal Sheen */
.logo-centerpiece-stage-dark {
  position: relative;
  background: rgba(11, 19, 43, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow:
    0 24px 60px -16px rgba(6, 182, 212, 0.25),
    0 8px 24px -6px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  overflow: hidden;
  animation:
    logoStageEnter 0.85s cubic-bezier(0.16, 1, 0.3, 1) both,
    logoFloat 6s ease-in-out 0.85s infinite;
}

.logo-centerpiece-stage-dark::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 65%;
  height: 100%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(6, 182, 212, 0.15) 35%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(79, 70, 229, 0.18) 65%,
    transparent 100%
  );
  transform: skewX(-22deg);
  pointer-events: none;
  animation: logoSheenSweep 6.5s ease-in-out 1.4s infinite;
}

/* Interactive Anaesthetics Triad: DISPATCH • BOOKING APP • 90-DAY PIPELINE */
#anaesthetics-triad {
  position: sticky;
  top: 0.75rem;
  z-index: 30;
  transition: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0.35rem 0.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

/* Ensure no background pill, dock, or enclosing container appears on click */
#anaesthetics-triad.is-focused-dock {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
}

.ha-pill {
  position: relative;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(6, 182, 212, 0.3);
  color: #E2E8F0;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.ha-pill:hover {
  transform: translateY(-3px);
  border-color: rgba(6, 182, 212, 0.75);
  box-shadow: 0 14px 28px -8px rgba(6, 182, 212, 0.38);
  color: #FFFFFF;
}

/* Gentle sequential invitation shimmer when idle */
.ha-triad-idle [data-ha="dispatch"] {
  animation: haDispatchTapSync 2.2s ease-in-out infinite;
}
.ha-triad-idle [data-ha="booking"] {
  animation: haInvitePulse 4.5s ease-in-out 1.2s infinite;
}
.ha-triad-idle [data-ha="pipeline"] {
  animation: haInvitePulse 4.5s ease-in-out 2.4s infinite;
}

@keyframes haDispatchTapSync {
  0%, 20%, 36%, 44%, 58%, 100% {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4);
    transform: translateY(0);
  }
  28%, 50% {
    border-color: #06B6D4;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.6), 0 4px 12px rgba(6, 182, 212, 0.35);
    transform: translateY(-2px) scale(0.98);
  }
}

@keyframes haInvitePulse {
  0%, 100% {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.4);
  }
  20% {
    border-color: rgba(6, 182, 212, 0.95);
    box-shadow: 0 14px 30px -4px rgba(6, 182, 212, 0.5);
    transform: translateY(-2px);
  }
  40% {
    transform: translateY(0);
  }
}

.ha-pill.is-active[data-ha="dispatch"] {
  background: linear-gradient(135deg, #0891B2 0%, #06B6D4 50%, #2563EB 100%) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 34px -8px rgba(6, 182, 212, 0.55);
}

.ha-pill.is-active[data-ha="booking"] {
  background: linear-gradient(135deg, #059669 0%, #10B981 50%, #06B6D4 100%) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 34px -8px rgba(16, 185, 129, 0.55);
}

.ha-pill.is-active[data-ha="pipeline"] {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EC4899 100%) !important;
  border-color: transparent !important;
  color: #FFFFFF !important;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 34px -8px rgba(124, 58, 237, 0.55);
}

/* Micro-animations inside Anaesthetics Ethos Cards */
.radar-ping-ring {
  animation: radarPulse 2.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 16px rgba(6, 182, 212, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
  }
}

.booking-pulse-badge {
  animation: bookingGlow 2.2s ease-in-out infinite;
}

@keyframes bookingGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 18px 4px rgba(16, 185, 129, 0.3);
  }
}

.pipeline-step-glow {
  animation: pipelineStepPulse 3s ease-in-out infinite;
}

@keyframes pipelineStepPulse {
  0%, 100% {
    border-color: rgba(124, 58, 237, 0.4);
  }
  50% {
    border-color: rgba(236, 72, 153, 0.75);
    box-shadow: 0 0 14px -2px rgba(236, 72, 153, 0.35);
  }
}

/* ==========================================================================
   CROSS-PAGE TRANSITION SYSTEM (SILKY SMOOTH NAVIGATION)
   ========================================================================== */

/* Native View Transitions (Supported in modern Chrome/Edge) */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: pageViewFadeOut 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

::view-transition-new(root) {
  animation: pageViewFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes pageViewFadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.995); }
}

@keyframes pageViewFadeIn {
  from { opacity: 0; transform: scale(1.005); }
  to { opacity: 1; transform: scale(1); }
}

/* Universal Transition Veil (Fallback & Cross-Browser SPA Polish) */
.page-transition-veil {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.2) 0%, #0B132B 75%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

body.theme-light .page-transition-veil {
  background: radial-gradient(circle at center, rgba(60, 144, 152, 0.25) 0%, #0E2A38 85%);
}

.page-transition-veil.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Page enter fade-in state */
body.page-enter {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

body.page-entered {
  opacity: 1;
  transform: translateY(0);
}


/* ==========================================================================
   SPECIALIST MEMBER DIRECTORY 3D FLIP CARD SYSTEM
   ========================================================================== */
.member-flip-card {
  perspective: 1200px;
  -webkit-perspective: 1200px;
  min-height: 270px;
  height: 100%;
  cursor: pointer;
  outline: none;
  transition: transform 0.28s ease-out;
}

.member-flip-card:hover {
  transform: translateY(-4px);
}

.member-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 270px;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 1rem;
}

.member-flip-card.is-flipped .member-card-inner {
  transform: rotateY(180deg);
  -webkit-transform: rotateY(180deg);
}

.member-card-front,
.member-card-back {
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1rem;
  box-sizing: border-box;
}

.member-card-front.glass-card,
.member-card-front.glass-card:hover {
  position: relative;
  transform: rotateY(0deg) !important;
  -webkit-transform: rotateY(0deg) !important;
}

.member-card-back.glass-card,
.member-card-back.glass-card:hover {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg) !important;
  -webkit-transform: rotateY(180deg) !important;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.97) 0%, rgba(11, 19, 43, 0.98) 100%);
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.65), 0 0 25px -5px rgba(6, 182, 212, 0.18) inset;
}

/* Custom discreet scrollbar for bio */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.35);
  border-radius: 8px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 182, 212, 0.6);
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spinSlow 8s linear infinite;
}
