/* ═══════════════════════════════════════════
   HOME PAGE — ADVANCED UI & COMPLEX ANIMATIONS
   home.css — Gladnet HealthTech
═══════════════════════════════════════════ */

/* ─── HERO FULL-BLEED ─────────────────────── */
.home-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--white);
  padding-top: 72px;
}

/* Particle canvas */
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Background image layer */
.hero-bg-image {
  position: absolute;
  inset: 0;
  background: url('assets/home_page_hero.png') center / cover no-repeat;
  z-index: 0;
}

/* Gradient overlay: readable left, vivid right */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(255,255,255,0.97) 0%,
    rgba(255,255,255,0.93) 30%,
    rgba(255,255,255,0.72) 55%,
    rgba(255,255,255,0.28) 80%,
    rgba(247,250,251,0.08) 100%
  );
  z-index: 2;
}

/* ─── ANIMATED RINGS ─────────────────────── */
.hero-rings {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: none;
}

.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(2, 114, 146, 0.12);
  animation: ringExpand 8s ease-out infinite;
}

.ring-1 { width: 320px; height: 320px; animation-delay: 0s;   border-color: rgba(36, 178, 139, 0.15); }
.ring-2 { width: 500px; height: 500px; animation-delay: 1.5s; border-color: rgba(2, 114, 146, 0.10); }
.ring-3 { width: 700px; height: 700px; animation-delay: 3s;   border-color: rgba(5, 173, 179, 0.07); }
.ring-4 { width: 900px; height: 900px; animation-delay: 4.5s; border-color: rgba(112,214,109,0.05); }

@keyframes ringExpand {
  0%   { opacity: 0;    transform: translate(-50%, -50%) scale(0.7); }
  20%  { opacity: 1; }
  80%  { opacity: 0.4; }
  100% { opacity: 0;    transform: translate(-50%, -50%) scale(1.15); }
}

/* ─── HERO LAYOUT ─────────────────────────── */
.home-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 10;
  padding: 80px 0;
}

/* ─── HERO CONTENT ───────────────────────── */
.home-hero-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.eyebrow-wrap { margin-bottom: 20px; }

.home-hero-h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  line-height: 1.07;
  letter-spacing: -0.04em;
  margin: 0 0 22px;
  font-weight: 800;
}

/* Animated gradient text */
.type-gradient {
  background: linear-gradient(110deg, var(--deep), var(--teal), var(--emerald), var(--lime), var(--teal), var(--deep));
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 6s linear infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% center; }
  100% { background-position: 300% center; }
}

.home-hero-p {
  font-size: 16.5px;
  color: var(--muted);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 8px;
}

/* ─── METRICS BAR ─────────────────────────── */
.metrics-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 36px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 24px;
  width: fit-content;
  box-shadow: var(--shadow-md);
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
}

.metric-item:first-child { padding-left: 0; }
.metric-item:last-child  { padding-right: 0; }

.metric-num {
  font-size: 26px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--deep);
  letter-spacing: -0.03em;
  line-height: 1;
  display: inline-block;
}

.metric-unit {
  font-size: 16px;
  font-weight: 700;
  color: var(--emerald);
  margin-left: 1px;
  vertical-align: super;
  font-size: 13px;
}

.metric-text {
  font-size: 26px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--deep);
  line-height: 1;
}

.metric-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
  white-space: nowrap;
}

.metric-divider {
  width: 1px;
  height: 36px;
  background: var(--line);
  flex-shrink: 0;
}

/* ─── HERO PANEL (Right side) ─────────────── */
.home-hero-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-panel-card {
  width: 100%;
  max-width: 440px;
  border-radius: 24px;
  border: 1px solid rgba(2, 114, 146, 0.12);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.9) inset,
    0 24px 60px -8px rgba(2, 114, 146, 0.14),
    0 8px 24px -4px rgba(18, 51, 58, 0.06);
  overflow: hidden;
  animation: cardFloat 6s ease-in-out infinite;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-8px) rotate(0.3deg); }
  66%       { transform: translateY(-4px) rotate(-0.2deg); }
}

/* Panel Header (macOS traffic lights style) */
.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(247, 250, 251, 0.8);
  border-bottom: 1px solid var(--line);
}

.panel-dots { display: flex; gap: 6px; }
.pdot {
  width: 11px; height: 11px; border-radius: 50%;
  transition: transform 0.2s;
}
.pdot:hover { transform: scale(1.2); }
.pdot.red    { background: #ff5f57; }
.pdot.yellow { background: #febc2e; }
.pdot.green  { background: #28c840; }

.panel-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.panel-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--emerald);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Panel image area */
.panel-image-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.panel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.panel-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(255,255,255,0.15) 100%);
}

/* Scanning line animation */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(36, 178, 139, 0.6), rgba(5, 173, 179, 0.5), transparent);
  top: 0;
  animation: scanDown 3s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(36, 178, 139, 0.4);
}

@keyframes scanDown {
  0%   { top: 0%;   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* Data ping points on image */
.data-point {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
}

.dp1 { left: 14%; top: 28%; }
.dp2 { right: 16%; top: 54%; }
.dp3 { left: 22%; bottom: 18%; }

.dp-ping {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
}

.dp-ping::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--emerald);
  animation: pingOut 1.8s ease-out infinite;
}

@keyframes pingOut {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

.dp1 .dp-ping { background: var(--emerald); }
.dp2 .dp-ping { background: var(--teal); animation-delay: 0.6s; }
.dp3 .dp-ping { background: var(--cyan); animation-delay: 1.2s; }

.dp-label {
  font-size: 9px;
  font-weight: 750;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: 0.04em;
  color: var(--white);
  background: rgba(2, 114, 146, 0.75);
  backdrop-filter: blur(4px);
  padding: 2px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Panel stats bars */
.panel-stats {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.pstat {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
}

.pstat svg { flex-shrink: 0; color: var(--deep); }

.pstat-bar {
  flex: 1;
  height: 5px;
  background: var(--surface);
  border-radius: 99px;
  overflow: hidden;
}

.pstat-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--deep), var(--emerald));
  animation: barFill 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 1s;
}

@keyframes barFill {
  to { width: var(--w); }
}

.pstat > span:last-child {
  min-width: 80px;
  text-align: right;
  font-weight: 600;
  color: var(--ink);
}

/* Panel toast (notification) */
.panel-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(90deg, rgba(36, 178, 139, 0.06), rgba(2, 114, 146, 0.04));
}

.panel-toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--deep), var(--emerald));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
  flex-shrink: 0;
}

.panel-toast-text strong {
  display: block;
  font-size: 11.5px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--ink);
}

.panel-toast-text span {
  font-size: 10.5px;
  color: var(--muted);
}

/* ─── FLOATING BADGE CARDS ────────────────── */
.float-badge {
  position: absolute;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(36, 178, 139, 0.2);
  box-shadow: var(--shadow-lg);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 20;
  transition: var(--transition-normal);
  max-width: 200px;
}

.float-badge:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-xl);
  border-color: rgba(36, 178, 139, 0.4);
}

.fb-top { top: -16px; left: -24px; animation: badgeFloat1 7s ease-in-out infinite; }
.fb-bottom { bottom: -16px; right: -24px; animation: badgeFloat2 7s ease-in-out infinite 1s; }

@keyframes badgeFloat1 {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%       { transform: translateY(-10px) rotate(0.5deg); }
}
@keyframes badgeFloat2 {
  0%, 100% { transform: translateY(0) rotate(1deg); }
  50%       { transform: translateY(-8px) rotate(-0.5deg); }
}

.fb-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(36, 178, 139, 0.1);
  color: var(--deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.float-badge strong {
  display: block;
  font-size: 12.5px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--ink);
  font-weight: 700;
}

.float-badge small {
  font-size: 10.5px;
  color: var(--muted);
  display: block;
}

/* ─── SCROLL INDICATOR ───────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 20;
  opacity: 0;
  animation: fadeIn 1s ease 2s forwards;
}

.scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--emerald), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

.scroll-indicator span {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.1); }
}

@keyframes fadeIn { to { opacity: 1; } }

/* ─── ENTRY ANIMATIONS ───────────────────── */
.animate-fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-left {
  opacity: 0;
  transform: translateX(40px);
  animation: fadeLeft 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeLeft {
  to { opacity: 1; transform: translateX(0); }
}

/* ─── CAPABILITY CARDS ───────────────────── */
.caps-grid { gap: 24px; }

.cap-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
  animation-delay: calc(var(--i) * 0.12s);
}

.cap-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 0%, rgba(36,178,139,0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cap-card:hover .cap-card-glow { opacity: 1; }

.cap-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px -10px rgba(2, 114, 146, 0.12), 0 6px 16px -4px rgba(18, 51, 58, 0.05);
  border-color: rgba(36, 178, 139, 0.3);
}

.cap-icon-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
}

.cap-icon-wrap .icon {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.cap-icon-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed rgba(36, 178, 139, 0.3);
  animation: spinSlow 12s linear infinite;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.cap-card:hover .cap-icon-ring { border-color: var(--emerald); }

.cap-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cap-card p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.cap-arrow {
  margin-top: 18px;
  font-size: 18px;
  color: var(--emerald);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cap-card:hover .cap-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ─── ANIMATED CHECKS ────────────────────── */
.check-animated {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: calc(var(--ci) * 0.12s);
}

.check-animated.show {
  opacity: 1;
  transform: translateX(0);
}

/* ─── MISSION CARDS ──────────────────────── */
.mission-grid { gap: 24px; }

.mission-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.mission-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--deep), var(--emerald));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mission-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(2, 114, 146, 0.15);
}

.mission-card:hover::after { transform: scaleX(1); }

.mission-card-num {
  font-size: 11px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--emerald);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.mission-card-bar {
  width: 32px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--deep), var(--emerald));
  margin-bottom: 18px;
  transition: width 0.4s ease;
}

.mission-card:hover .mission-card-bar { width: 56px; }

.mission-card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.mission-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ─── RESPONSIVE ─────────────────────────── */
@media (max-width: 960px) {
  .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 0;
    text-align: center;
  }

  .home-hero-content { align-items: center; }

  .metrics-bar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .home-hero-panel {
    justify-content: center;
  }

  .hero-panel-card {
    max-width: 400px;
  }

  .hero-rings { right: -30%; }

  .fb-top { left: -10px; }
  .fb-bottom { right: -10px; }
}

@media (max-width: 680px) {
  .home-hero { min-height: 100svh; }

  .home-hero-inner { padding: 40px 0; }

  .home-hero-h1 { font-size: clamp(32px, 8vw, 48px); }

  .metrics-bar { padding: 12px 16px; gap: 0; }

  .metric-item { padding: 0 12px; }

  .metric-num { font-size: 20px; }

  .hero-panel-card { max-width: 100%; }

  .panel-image-wrap { height: 160px; }

  .float-badge { display: none; }

  .caps-grid { grid-template-columns: 1fr; }

  .mission-grid { grid-template-columns: 1fr; }
}
