/* ============================================
   RK PHYSIO — Animated Logo Styles
   Health-themed, CSS-powered animations
   ============================================ */

/* ===== WRAPPER ===== */
.animated-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  text-decoration: none;
  cursor: pointer;
}

/* ===== ICON COLUMN ===== */
.logo-icon-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  width: 36px;
}

/* Figure silhouette */
.logo-figure {
  position: relative;
  width: 26px;
  height: 36px;
}
.logo-figure svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.fig-head {
  fill: none;
  stroke: #B8962E;
  stroke-width: 2;
  animation: fig-breathe 2.5s ease-in-out infinite;
  transform-origin: 13px 5px;
}
.fig-body {
  fill: none;
  stroke: #B8962E;
  stroke-width: 2;
  stroke-linecap: round;
  animation: fig-sway 2.5s ease-in-out infinite;
  transform-origin: 13px 16px;
}
@keyframes fig-breathe {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-2px); }
}
@keyframes fig-sway {
  0%, 100% { transform: scaleY(1); }
  50%       { transform: scaleY(1.04); }
}

/* Spine dots */
.spine-dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}
.spine-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #B8962E;
  animation: spine-pulse 1.4s ease-in-out infinite;
  transform-origin: center;
}
.spine-dot:nth-child(1) { animation-delay: 0s;    background: #D4AF37; }
.spine-dot:nth-child(2) { animation-delay: 0.12s; background: #C9A227; }
.spine-dot:nth-child(3) { animation-delay: 0.24s; background: #B8962E; }
.spine-dot:nth-child(4) { animation-delay: 0.36s; background: #A08020; }
.spine-dot:nth-child(5) { animation-delay: 0.48s; background: #8C6E18; }

@keyframes spine-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.6; }
  50%       { transform: scale(1.6); opacity: 1;   }
}

/* ===== TEXT COLUMN ===== */
.logo-text-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* RK Letters */
.logo-rk-row {
  display: flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}
.logo-letter-r,
.logo-letter-k {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  display: inline-block;
  position: relative;
  color: #0D47A1;
  /* Gold shimmer overlay */
  background: linear-gradient(
    105deg,
    #0D47A1 0%,
    #0D47A1 30%,
    #D4AF37 45%,
    #F5E6B8 50%,
    #D4AF37 55%,
    #0D47A1 70%,
    #0D47A1 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rk-shimmer 3s ease-in-out infinite;
}
.logo-letter-k {
  animation-delay: 0.3s;
}
@keyframes rk-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -100% center; }
}

/* PHYSIO letters — wave bounce */
.logo-physio-row {
  display: flex;
  align-items: center;
  gap: 0px;
  line-height: 1;
}
.physio-letter {
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #4B5563;
  display: inline-block;
  animation: physio-wave 2s ease-in-out infinite;
  text-transform: uppercase;
}
.physio-letter:nth-child(1) { animation-delay: 0s;    }
.physio-letter:nth-child(2) { animation-delay: 0.1s;  }
.physio-letter:nth-child(3) { animation-delay: 0.2s;  }
.physio-letter:nth-child(4) { animation-delay: 0.3s;  }
.physio-letter:nth-child(5) { animation-delay: 0.4s;  }
.physio-letter:nth-child(6) { animation-delay: 0.5s;  }

@keyframes physio-wave {
  0%, 60%, 100% { transform: translateY(0);   color: #4B5563; }
  30%            { transform: translateY(-3px); color: #0D47A1; }
}

/* ECG / Heartbeat line */
.logo-ecg-row {
  margin-top: 3px;
  width: 100%;
  overflow: visible;
}
.ecg-svg {
  width: 88px;
  height: 14px;
  overflow: visible;
  display: block;
}
.ecg-line-base {
  fill: none;
  stroke: #D1D5DB;
  stroke-width: 1;
}
.ecg-line-pulse {
  fill: none;
  stroke: #B8962E;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: ecg-draw 2.2s cubic-bezier(0.4,0,0.2,1) infinite;
}
@keyframes ecg-draw {
  0%   { stroke-dashoffset: 160; opacity: 1; }
  70%  { stroke-dashoffset: 0;   opacity: 1; }
  85%  { stroke-dashoffset: 0;   opacity: 0.7; }
  100% { stroke-dashoffset: 0;   opacity: 0; }
}

/* Dot after PHYSIO */
.logo-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  color: #9CA3AF;
  text-transform: uppercase;
  margin-top: 1px;
  opacity: 0;
  animation: tagline-fade 3s ease-in-out infinite;
}
@keyframes tagline-fade {
  0%, 20% { opacity: 0; transform: translateY(2px); }
  40%, 80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-2px); }
}

/* ===== HOVER STATE ===== */
.animated-logo:hover .logo-letter-r,
.animated-logo:hover .logo-letter-k {
  animation: rk-shimmer 0.8s ease-in-out infinite;
}
.animated-logo:hover .spine-dot {
  animation-duration: 0.6s;
}
.animated-logo:hover .physio-letter {
  animation-duration: 0.8s;
}

/* ===== FOOTER VARIANT ===== */
.animated-logo-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.animated-logo-footer .logo-letter-r,
.animated-logo-footer .logo-letter-k {
  background: linear-gradient(
    105deg,
    #ffffff 0%,
    #ffffff 30%,
    #D4AF37 45%,
    #F5E6B8 50%,
    #D4AF37 55%,
    #ffffff 70%,
    #ffffff 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rk-shimmer 3s ease-in-out infinite;
}
.animated-logo-footer .physio-letter {
  color: rgba(255,255,255,0.65);
}
.animated-logo-footer .physio-letter:nth-child(1),
.animated-logo-footer .physio-letter:nth-child(2),
.animated-logo-footer .physio-letter:nth-child(3),
.animated-logo-footer .physio-letter:nth-child(4),
.animated-logo-footer .physio-letter:nth-child(5),
.animated-logo-footer .physio-letter:nth-child(6) {
  animation: physio-wave-dark 2s ease-in-out infinite;
}
.animated-logo-footer .physio-letter:nth-child(1) { animation-delay: 0s; }
.animated-logo-footer .physio-letter:nth-child(2) { animation-delay: 0.1s; }
.animated-logo-footer .physio-letter:nth-child(3) { animation-delay: 0.2s; }
.animated-logo-footer .physio-letter:nth-child(4) { animation-delay: 0.3s; }
.animated-logo-footer .physio-letter:nth-child(5) { animation-delay: 0.4s; }
.animated-logo-footer .physio-letter:nth-child(6) { animation-delay: 0.5s; }
@keyframes physio-wave-dark {
  0%, 60%, 100% { transform: translateY(0);   color: rgba(255,255,255,0.6); }
  30%            { transform: translateY(-3px); color: #D4AF37; }
}
.animated-logo-footer .ecg-line-base { stroke: rgba(255,255,255,0.15); }
.animated-logo-footer .logo-tagline  { color: rgba(255,255,255,0.4); }
.animated-logo-footer .spine-dot { background: rgba(212,175,55,0.8); }

/* ===== LOADER VARIANT ===== */
.loader-animated-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
}
.loader-animated-logo .animated-logo {
  transform: scale(1.6);
  transform-origin: center center;
  animation: loader-pulse 1.5s ease-in-out infinite;
}
@keyframes loader-pulse {
  0%, 100% { transform: scale(1.55); opacity: 1; }
  50%       { transform: scale(1.65); opacity: 0.9; }
}

/* Responsive */
@media (max-width: 1024px) {
  .logo-letter-r,
  .logo-letter-k { font-size: 1.6rem; }
}

@media (max-width: 768px) {
  .logo-letter-r,
  .logo-letter-k { font-size: 1.4rem; }
  .ecg-svg { width: 72px; }
  .logo-icon-col { width: 28px; }
  .physio-letter { font-size: 0.6rem; letter-spacing: 0.18em; }
  .logo-tagline { display: none; }
  .animated-logo { gap: 8px; }
}

@media (max-width: 480px) {
  .logo-letter-r,
  .logo-letter-k { font-size: 1.3rem; }
  .ecg-svg { width: 60px; }
  .logo-icon-col { width: 24px; }
  .physio-letter { font-size: 0.55rem; letter-spacing: 0.14em; }
}

