/**
 * Clinidex public homepage intro splash — lightweight branded overlay.
 */

html.clinidex-intro-active body {
  overflow: hidden;
}

html:not(.clinidex-intro-active) #clinidexIntro {
  display: none;
}

.clinidex-intro {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  opacity: 1;
  transition: opacity 0.55s ease;
}

.clinidex-intro.is-fading {
  opacity: 0;
  pointer-events: none;
}

.clinidex-intro.is-hidden {
  display: none !important;
}

.clinidex-intro-skip {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  padding: 8px 14px;
  border: 1px solid rgba(11, 60, 93, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0b3c5d;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.clinidex-intro-skip:hover {
  background: #fff;
  border-color: rgba(11, 60, 93, 0.28);
}

.clinidex-intro-skip:focus-visible {
  outline: 2px solid #1d65a6;
  outline-offset: 2px;
}

.clinidex-intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  max-width: min(92vw, 420px);
}

.clinidex-intro-logo-wrap {
  margin-bottom: 16px;
  animation: clinidexLogoReveal 700ms ease-out both;
}

.clinidex-intro-logo {
  display: block;
  width: min(70vw, 320px);
  max-width: 320px;
  height: auto;
  object-fit: contain;
}

.clinidex-intro-tagline {
  margin: 0 0 14px;
  font-size: clamp(15px, 3.8vw, 18px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #0b3c5d;
  line-height: 1.45;
  animation: clinidexTaglineReveal 500ms ease-out 500ms both;
}

.clinidex-intro-ecg {
  width: min(60vw, 220px);
  max-width: 220px;
  height: 28px;
  overflow: visible;
}

.clinidex-intro-ecg-line {
  fill: none;
  stroke: #e63946;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: clinidexEcgDraw 1000ms ease-in-out 600ms both;
  opacity: 0.75;
}

@keyframes clinidexLogoReveal {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes clinidexTaglineReveal {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes clinidexEcgDraw {
  from {
    stroke-dashoffset: 220;
    opacity: 0.25;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 0.75;
  }
}

@media (max-width: 480px) {
  .clinidex-intro-inner {
    padding: 16px;
  }

  .clinidex-intro-logo {
    width: min(70vw, 220px);
    max-width: 220px;
  }

  .clinidex-intro-tagline {
    max-width: 18rem;
  }

  .clinidex-intro-ecg {
    width: min(60vw, 180px);
    max-width: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clinidex-intro-logo-wrap,
  .clinidex-intro-tagline,
  .clinidex-intro-ecg-line {
    animation: none !important;
  }

  .clinidex-intro {
    transition: none;
  }
}
