/* ============================================
   AUTO TRIAGE — PREMIUM EFFECTS CSS
   Particles, Glow, 3D, Glass, Animations
   ============================================ */

/* ---- CANVAS OVERLAY (Three.js) ---- */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---- FLOATING PARTICLES BG ---- */
#particles-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* ---- AMBIENT GLOW ORBS ---- */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  animation: orbDrift 18s ease-in-out infinite alternate;
}
.glow-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #e63946 0%, transparent 70%);
  top: -200px; left: -200px;
  animation-duration: 20s;
}
.glow-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #457b9d 0%, transparent 70%);
  bottom: -200px; right: -100px;
  animation-duration: 25s;
  animation-delay: -8s;
}
.glow-orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #f5f5f0 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 30s;
  animation-delay: -14s;
  opacity: 0.04;
}
@keyframes orbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(60px, -40px) scale(1.08); }
  66%  { transform: translate(-30px, 50px) scale(0.95); }
  100% { transform: translate(40px, 20px) scale(1.05); }
}

/* ---- ECG / HEARTBEAT WAVE ---- */
#ecg-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
#ecg-svg {
  width: 200%;
  height: 100%;
  animation: ecgScroll 4s linear infinite;
}
@keyframes ecgScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ecg-path {
  fill: none;
  stroke: #ff3333 !important;
  stroke-width: 2.5 !important;
  opacity: 0.9 !important;
  filter: drop-shadow(0 0 10px rgba(255,51,51,0.8)) !important;
}

/* ---- GLOWING LINE DIVIDER ---- */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e63946 30%, #e63946 70%, transparent);
  opacity: 0.3;
  margin: 0;
  position: relative;
}
.glow-divider::after {
  content: '';
  position: absolute;
  inset: -2px 0;
  background: inherit;
  filter: blur(6px);
  opacity: 0.5;
}

/* ---- FLOATING CARD PARTICLES ---- */
.float-particle {
  position: absolute;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #e63946;
  pointer-events: none;
  animation: floatUp var(--dur, 8s) ease-in-out infinite;
  opacity: 0;
}
@keyframes floatUp {
  0%   { transform: translateY(0) scale(0); opacity: 0; }
  10%  { opacity: 0.6; transform: scale(1); }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-120px) translateX(var(--drift, 20px)) scale(0); opacity: 0; }
}

/* ---- GLASS CARD EFFECT ---- */
.glass-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);

  border-radius: 16px;
  transition: background 0.4s, border-color 0.4s, transform 0.4s;
}
.glass-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(230,57,70,0.25);
  transform: translateY(-4px);
}

/* ---- MAGNETIC BUTTON GLOW ---- */
.btn-primary, .btn-outline, .nav-launch {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primary:hover::before {
  opacity: 1;
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(245,245,240,0.15), 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(-2px) scale(1.01);
}

/* ---- ANIMATED COUNTER ---- */
.stat-counter {
  display: inline-block;
}

/* ---- SECTION TITLE UNDERLINE REVEAL ---- */
.s-title {
  position: relative;
}
.s-title::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 0;
  height: 2px;
  width: 0;
  background: #e63946;
  transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 0 12px #e63946;
}
.s-title.revealed::after {
  width: 60px;
}

/* ---- SCANLINE EFFECT (Hero) ---- */
.hero-scanline {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(230,57,70,0.6), transparent);
  z-index: 2;
  pointer-events: none;
  animation: scanDown 6s linear infinite;
  opacity: 0.6;
}
@keyframes scanDown {
  from { top: 0; opacity: 0.6; }
  80%  { opacity: 0.6; }
  to   { top: 100%; opacity: 0; }
}

/* ---- LETTER REVEAL ANIMATION ---- */
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: charReveal 0.6s forwards;
}
@keyframes charReveal {
  to { opacity: 1; transform: none; }
}

/* ---- STAT NUMBER GLOW ---- */
.as-num {
  position: relative;
  display: inline-block;
}
.as-num::after {
  content: attr(data-val);
  position: absolute;
  inset: 0;
  color: #e63946;
  filter: blur(12px);
  opacity: 0.3;
  z-index: -1;
}

/* ---- 3D TILT CARD ---- */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.1s;
}
.tilt-card-inner {
  transform: translateZ(20px);
}

/* ---- NOISE TEXTURE OVERLAY ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: overlay;
}

/* ---- HERO BADGE PULSE ---- */
.hero-badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #e63946;
  display: inline-block;
  margin-right: 8px;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(230,57,70,0.7);
}
@keyframes pulse {
  0%  { box-shadow: 0 0 0 0 rgba(230,57,70,0.7); }
  70% { box-shadow: 0 0 0 10px rgba(230,57,70,0); }
  100%{ box-shadow: 0 0 0 0 rgba(230,57,70,0); }
}

/* ---- SECTION REVEAL (Removed orphaned classes) ---- */

/* ---- GRID LINES BACKGROUND ---- */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ---- GLITCH TEXT EFFECT ---- */
.glitch {
  position: relative;
}
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}
.glitch::before {
  color: #e63946;
  clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
  animation: glitchTop 4s infinite;
  opacity: 0.7;
}
.glitch::after {
  color: #457b9d;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
  animation: glitchBot 4s infinite;
  animation-delay: 0.5s;
  opacity: 0.5;
}
@keyframes glitchTop {
  0%, 90%, 100% { transform: translateX(0); }
  92%           { transform: translateX(-4px); }
  94%           { transform: translateX(4px); }
  96%           { transform: translateX(-2px); }
}
@keyframes glitchBot {
  0%, 88%, 100% { transform: translateX(0); }
  90%           { transform: translateX(4px); }
  92%           { transform: translateX(-4px); }
}

/* ---- MOBILE ADJUSTMENTS ---- */
@media (max-width: 600px) {
  .glow-orb { opacity: 0.07; }
  .hero-scanline { display: none; }
  body::after { opacity: 0.015; }
}



.hero-title .out, .hero-title .outline { color: var(--fg) !important; -webkit-text-stroke: none !important; text-shadow: none !important; } /*
  color: transparent !important;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.85) !important;
  text-shadow: 0 0 15px rgba(255,255,255,0.2) !important;
}

#ecg-container {
  display: block !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 120px !important;
  z-index: 5 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}



.hero-title {
  color: #ffffff !important;
  font-weight: 700 !important;
  text-shadow: none !important;
}
.hero-title .out, .hero-title .outline, .hero-title span {
  color: #ffffff !important;
  -webkit-text-stroke: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
}




/* CRISP HOLLOW HERO TRIAGE TITLE */
.hero-title {
  font-family: 'Bebas Neue', sans-serif !important;
  font-size: clamp(80px, 13vw, 200px) !important;
  line-height: 0.88 !important;
  letter-spacing: -2px !important;
  color: #ffffff !important;
}

.hero-title .out, .hero-title .outline {
  display: block !important;
  font-family: 'Bebas Neue', sans-serif !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.5) !important;
  text-shadow: none !important;
  filter: none !important;
}


/* ACTIVE RED ECG HEARTBEAT PULSE FOR ALL SCREENS */
#ecg-container {
  display: block !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 120px !important;
  z-index: 5 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}

#ecg-svg {
  width: 200% !important;
  height: 100% !important;
  animation: ecgScroll 4s linear infinite !important;
  will-change: transform;
}

.ecg-path {
  fill: none !important;
  stroke: #ff3333 !important;
  stroke-width: 2.5 !important;
  opacity: 0.9 !important;
  filter: drop-shadow(0 0 10px rgba(255, 51, 51, 0.8)) !important;
}
