/* ═══════════════════════════════════════════════
   StepInsight — Premium Clinical Design System
   Modern, vibrant, designer-grade UI
   ═══════════════════════════════════════════════ */

/* ── Base & Reset ────────────────────────────── */
html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  font-family: "Sora", "Inter", "Helvetica Neue", system-ui, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Archivo Black", "Sora", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

h3,
h4,
h5,
h6 {
  font-family: "Sora", "Inter", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

button,
.glow-btn {
  font-family: "Sora", "Inter", system-ui, sans-serif;
  font-weight: 700;
}

#inicio h1 {
  font-family: "Bebas Neue", "Archivo Black", sans-serif;
  letter-spacing: 0.01em;
  line-height: 0.95;
}

section h2 {
  font-family: "Bebas Neue", "Archivo Black", sans-serif;
  letter-spacing: 0.02em;
}

/* ── Border-3 utility ──────────────────────── */
.border-3 {
  border-width: 3px;
}

/* ── Hero Load Animations ────────────────────── */
.animate-on-load {
  animation: fadeSlideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

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

/* ── Scroll Animations ───────────────────────── */
.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Hero Footprint SVG — Realistic Foot ─────── */
.foot-outline {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: drawOutline 2.4s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards;
  filter: drop-shadow(0 0 6px rgba(23, 165, 137, 0.3));
}

@keyframes drawOutline {
  to {
    stroke-dashoffset: 0;
  }
}

.foot-inner {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: drawOutline 2s cubic-bezier(0.4, 0, 0.2, 1) 1.4s forwards;
}

.foot-toe {
  opacity: 0;
  transform-origin: center;
  animation: popToe 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(2s + var(--toe-delay, 0s));
}

@keyframes popToe {
  0% {
    opacity: 0;
    transform: scale(0);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.foot-arch {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: drawOutline 1.5s ease-out 2.8s forwards;
}

.pressure-point {
  animation: pulse-pressure 3s ease-in-out infinite;
  animation-delay: 3.5s;
}

@keyframes pulse-pressure {

  0%,
  100% {
    opacity: 0.1;
    transform: scale(1);
  }

  50% {
    opacity: 0.25;
    transform: scale(1.15);
  }
}

.measure-line {
  opacity: 0;
  animation: fadeInLine 0.8s ease-out 3.2s forwards;
}

.measure-text {
  opacity: 0;
  animation: fadeInLine 0.8s ease-out 3.5s forwards;
}

@keyframes fadeInLine {
  to {
    opacity: 0.5;
  }
}

/* ── Scan line animation on hero foot ───────── */
.scan-line {
  animation: scanMove 3s ease-in-out 3.5s infinite;
}

@keyframes scanMove {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.6;
  }

  100% {
    transform: translateY(380px);
    opacity: 0;
  }
}

/* ── Floating Animation (improved) ──────────── */
.animate-float {
  animation: float 5s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  33% {
    transform: translateY(-8px) rotate(1deg);
  }

  66% {
    transform: translateY(-4px) rotate(-0.5deg);
  }
}

/* ── About Section — Full Human Figure ────────── */
.human-figure {
  animation: humanReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

.human-figure.is-visible {
  opacity: 1;
}

@keyframes humanReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

.joint-pulse {
  animation: jointGlow 2.5s ease-in-out infinite;
}

@keyframes jointGlow {

  0%,
  100% {
    r: 6;
    opacity: 0.4;
  }

  50% {
    r: 9;
    opacity: 0.8;
  }
}

.force-arrow {
  animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

/* ── Timeline Step Active State ──────────────── */
.timeline-step.step-active .absolute,
.timeline-step.step-active>div:first-child {
  border-color: #17A589 !important;
  color: #17A589 !important;
  background-color: white;
}

/* ── Drag & Drop States ──────────────────────── */
.dropzone-active {
  border-color: #17A589 !important;
  background-color: rgba(23, 165, 137, 0.05) !important;
  transform: scale(1.02);
}

.dropzone-active * {
  pointer-events: none;
}

/* ── Result Cards Reveal Animation ───────────── */
.result-card.reveal {
  animation: resultReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--result-delay, 0s);
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Navbar Scrolled State ───────────────────── */
.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.97) !important;
  box-shadow: 0 4px 40px rgba(27, 79, 114, 0.08),
    0 1px 3px rgba(27, 79, 114, 0.04);
  border-bottom-color: rgba(23, 165, 137, 0.12) !important;
}

/* ── Counter Number Styling ──────────────────── */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ── Canvas ──────────────────────────────────── */
canvas {
  image-rendering: auto;
}

/* ── Mobile Menu Transition ──────────────────── */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease-out;
  opacity: 0;
}

#mobile-menu.menu-open {
  max-height: 400px;
  opacity: 1;
}

/* ── Logo Image in Navbar ────────────────────── */
.navbar-logo {
  height: 70px;
  width: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.navbar-logo:hover {
  transform: scale(1.03);
}

@media (min-width: 768px) {
  .navbar-logo {
    height: 92px;
  }
}

/* ── Section Divider ─────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(23, 165, 137, 0.2), rgba(27, 79, 114, 0.15), transparent);
}

/* ── Gradient Text Utility ───────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #17A589 0%, #1ABC9C 50%, #1B4F72 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass Card ──────────────────────────────── */
.glass-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* ── Glow Button ─────────────────────────────── */
.glow-btn {
  position: relative;
  overflow: hidden;
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.glow-btn:hover::before {
  width: 300px;
  height: 300px;
}

/* ── Stat Card Hover Gradient ────────────────── */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #17A589, #1ABC9C, #E67E22);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

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

/* ── Feature Card Accent ─────────────────────── */
.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, #17A589, #1B4F72);
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 0 0 4px 0;
}

.feature-card:hover::before {
  height: 100%;
}

/* ── Hero Background Mesh ────────────────────── */
.hero-mesh {
  background-image:
    radial-gradient(at 20% 80%, rgba(23, 165, 137, 0.08) 0, transparent 50%),
    radial-gradient(at 80% 20%, rgba(27, 79, 114, 0.06) 0, transparent 50%),
    radial-gradient(at 50% 50%, rgba(230, 126, 34, 0.04) 0, transparent 60%),
    radial-gradient(at 90% 90%, rgba(26, 188, 156, 0.05) 0, transparent 40%);
}

/* ── Loading Spinner Extra ───────────────────── */
@keyframes spin-reverse {
  from {
    transform: rotate(360deg);
  }

  to {
    transform: rotate(0deg);
  }
}

/* ── Custom Scrollbar ────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F8FAFB;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #17A58944, #1B4F7233);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #17A58977, #1B4F7255);
}

/* ── Selection Color ─────────────────────────── */
::selection {
  background-color: #17A58933;
  color: #1B4F72;
}

/* ── Focus States for Accessibility ──────────── */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #17A589;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Responsive Adjustments ──────────────────── */
@media (max-width: 640px) {
  .animate-on-load {
    animation-delay: calc(var(--delay, 0s) * 0.5);
  }

  .scroll-animate {
    transform: translateY(25px);
    transition-duration: 0.5s;
  }
}

/* ── Print Styles ────────────────────────────── */
@media print {

  nav,
  #cta-final,
  .animate-float {
    display: none !important;
  }

  .scroll-animate {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Particle / Dot Grid Background ──────────── */
.dot-grid {
  background-image: radial-gradient(circle, rgba(23, 165, 137, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ── Shimmer effect for badges ───────────────── */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* ── Footer gradient line ────────────────────── */
.footer-gradient-line {
  height: 3px;
  background: linear-gradient(90deg, #17A589, #1ABC9C, #E67E22, #1B4F72);
}

/* Animación de indicador HERZCO */
.hc-indicator > div {
  animation: hcMarkerSlide 0.9s ease-out forwards;
}

@keyframes hcMarkerSlide {
  from {
    left: 0%;
  }

  to {
    left: var(--hc-position);
  }
}