/* Zr0-i Styles - CyanGreen Theme */
:root {
  --bg: #09090b;
  --bg-elevated: #18181b;
  --bg-card: #131316;
  --border: #27272a;
  --border-accent: #164e4a;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  /* Main gradient colors */
  --cyan: #06b6d4;
  --green: #10b981;
  --cyan-light: #22d3ee;
  --green-light: #34d399;
  /* Primary Accent (Cyan) */
  --accent: #06b6d4;
  --accent-secondary: #10b981;
  --accent-hover: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.25);
  --accent-glow-green: rgba(16, 185, 129, 0.25);
  --accent-glow-mixed: rgba(11, 178, 171, 0.3);
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', system-ui, sans-serif;
  /* Responsive spacing */
  --spacing-sm: clamp(16px, 4vw, 24px);
  --spacing-md: clamp(24px, 5vw, 40px);
  --spacing-lg: clamp(40px, 8vw, 80px);
  --spacing-xl: clamp(60px, 10vw, 120px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 30% 0%, rgba(6, 182, 212, 0.03) 0%, transparent 35%),
    radial-gradient(circle at 70% 0%, rgba(16, 185, 129, 0.03) 0%, transparent 35%);
  background-size: 30px 30px, 100% 100%, 100% 100%;
  color: var(--text);
  line-height: 1.6;
  position: relative;
}

#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
}

a { color: inherit; text-decoration: none; }

/* Animation Utility */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Main Gradient Text */
.gradient {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient accent */
.accent {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--spacing-sm);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(9,9,11,0.8);
  backdrop-filter: blur(12px);
  z-index: 100;
}
@media (min-width: 960px) {
  .nav { padding: 20px 40px; }
  /* Hide redundant Contact link in desktop since Hablemos CTA is present */
  .nav-links a[href="#contacto"] { display: none; }
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo-text { font-family: var(--font-mono); font-size: 22px; font-weight: 700; }
.zero-slash { position: relative; }
.zero-slash::after { content: ''; position: absolute; top: 50%; left: 50%; width: 110%; height: 2px; background: currentColor; transform: translate(-50%,-50%) rotate(-45deg); }
.nav-links { display: flex; gap: 28px; font-family: var(--font-mono); font-size: 14px; }
.nav-links a { color: var(--text-secondary); transition: color 0.2s; }
.nav-links a:hover,
.nav-links a.active-section { /* Active style for desktop as well */
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
.nav-actions { display: none; gap: 20px; align-items: center; }
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}
.lang-btn {
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: all 0.3s;
  padding: 4px;
}
.lang-btn:hover {
  color: var(--text);
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}
.lang-divider {
  color: var(--border);
  font-size: 12px;
  user-select: none;
}
@media (min-width: 960px) { .nav-actions { display: flex; } .nav-actions .btn { display: inline-flex; } }
.nav-actions > .btn-primary {
  min-width: 135px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.nav-links a {
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-links:first-child {
  min-width: 76px;
}

/* Mobile Menu Toggle */
.mobile-cta-btn {
  display: none !important;
}

@media (max-width: 959px) {
  .mobile-cta-btn {
    display: inline-flex !important;
    margin-right: 10px;
    padding: 5px 10px;
    font-size: 12px;
    z-index: 9999;
  }
}

.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 9999;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
}
.hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
  transform-origin: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1); /* Subtle shadow for definition */
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line {
  background: #ffffff !important; /* Force pure white */
  box-shadow: 0 0 4px rgba(0,0,0,0.5); /* Stronger shadow when open to pop against background */
  opacity: 1; /* Reset base opacity, but let specific children override if needed */
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0 !important; /* Force hide the middle line */
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
@media (min-width: 960px) {
  .mobile-menu-toggle { display: none; }
}

  /* Mobile Nav Links */
.mobile-menu-logo, .mobile-menu-cta { display: none; }

@media (max-width: 959px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(10px, 2vh, 20px);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    z-index: 999;
    overflow-y: hidden; /* Prevent scrolling, force fit */
  }
  .nav-links.active {
    display: flex;
  }
  .nav-links a:not(.mobile-menu-cta) {
    font-size: clamp(16px, 3.5vh, 22px); /* Allow smaller text */
    padding: clamp(4px, 1vh, 10px) 0;
    width: 100%;
    text-align: center;
    transition: all 0.2s ease;
  }
  
  /* SELECTION EFFECT (Touch/Click) */
  .nav-links a:not(.mobile-menu-cta) {
    -webkit-tap-highlight-color: transparent; /* Removes native gray highlight */
    outline: none;
  }

  .nav-links a:not(.mobile-menu-cta):active,
  .nav-links a:not(.mobile-menu-cta):focus,
  .nav-links a:not(.mobile-menu-cta).active-tap,
  .nav-links a:not(.mobile-menu-cta).active-section { /* Class for active section */
    background: linear-gradient(135deg, var(--cyan), var(--green));
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    color: transparent !important;
    transform: scale(1.05);
    transition: none; /* Instant response, no delay */
    filter: drop-shadow(0 0 8px var(--accent-glow));
  }
  
  /* Specific adjustment for active-section on mobile (no scale or harsh transitions) */
  .nav-links a:not(.mobile-menu-cta).active-section {
      transform: none;
      filter: none;
      font-weight: 700; /* Slightly heavier to stand out */
  }
  
  /* Mobile Specific Elements */
  .mobile-menu-logo {
    display: block;
    position: absolute;
    top: 20px;
    left: 20px;
    height: 32px;
    width: auto;
    z-index: 1000;
  }
  
  /* Hover for desktop resize */
  .nav-links a:not(.mobile-menu-cta):hover {
    background: linear-gradient(135deg, var(--cyan), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.8;
  }

  .mobile-menu-cta {
    display: none;
  }
}

/* Mobile language switcher in menu */
.mobile-lang-switcher {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: clamp(10px, 3vh, 24px);
}
@media (min-width: 960px) {
  .mobile-lang-switcher { display: none; }
}

/* Buttons - with gradient */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: var(--bg);
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--cyan-light), var(--green-light));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
}
.btn-primary:hover::before {
  opacity: 1;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow-mixed);
}
.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.btn-secondary::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}
.btn-secondary:hover::before {
  opacity: 1;
}
.btn-secondary:hover {
  border-color: transparent;
  color: var(--text);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}
.btn-lg { padding: 16px 32px; font-size: 15px; border-radius: 12px; }

/* Hero */
.hero { padding: var(--spacing-lg) var(--spacing-sm); max-width: 1200px; margin: 0 auto; }
@media (min-width: 768px) {
  .hero { padding: 80px 40px 100px; }
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-image: linear-gradient(var(--bg-elevated), var(--bg-elevated)), 
                    linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(16, 185, 129, 0.3));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px var(--accent-glow);
}
@keyframes pulse {
  0% { opacity: 1; box-shadow: 0 0 10px var(--accent-glow); }
  50% { opacity: 0.5; box-shadow: 0 0 0 transparent; }
  100% { opacity: 1; box-shadow: 0 0 10px var(--accent-glow); }
}
.hero-title { font-size: clamp(36px, 9vw, 80px); font-weight: 700; line-height: 1.1; margin-bottom: 24px; }
.cursor {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.hero-subtitle { font-size: clamp(16px, 4vw, 20px); color: var(--text-secondary); max-width: 600px; line-height: 1.7; margin-bottom: 40px; }
.hero-subtitle strong { color: var(--text); }
.hero-cta { display: flex; flex-direction: column; gap: 12px; margin-bottom: clamp(32px, 8vw, 60px); }
.hero-cta .btn { width: 100%; justify-content: center; }
@media (min-width: 480px) {
  .hero-cta { flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .hero-cta .btn { width: auto; }
}

/* Stats - alternating colors */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 4vw, 32px); padding-top: clamp(24px, 5vw, 40px); border-top: 1px solid var(--border); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { text-align: center; }
.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}
.stat-label { font-size: clamp(14px, 3vw, 18px); color: var(--text-muted); display: block; margin-top: 4px; }

/* Tech Stack Strip */
.tech-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  background: var(--bg-card);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.tech-track { display: inline-flex; gap: 60px; animation: slide 20s linear infinite; }
.tech-item {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Alternating bullet colors */
.tech-item:nth-child(odd)::before {
  content: '•';
  color: var(--cyan);
}
.tech-item:nth-child(even)::before {
  content: '•';
  color: var(--green);
}
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-25%); } }

/* Sections */
.section { padding: var(--spacing-xl) var(--spacing-sm); }
@media (min-width: 768px) {
  .section { padding: 120px 40px; }
}
.section-alt {
  background: rgba(15,15,18,0.3);
  border-top: 1px solid var(--border);
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 18px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.section-title { font-size: clamp(28px, 6vw, 42px); font-weight: 700; margin-bottom: clamp(32px, 6vw, 48px); letter-spacing: -0.02em; }

/* Philosophy Section */
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(20px, 4vw, 32px);
}
@media (min-width: 640px) {
  .philosophy-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
.philosophy-card {
  padding: var(--spacing-md) var(--spacing-sm);
  background: rgba(19, 19, 22, 0.95);
  border: 1px solid var(--border);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 1.5s ease-in-out; /* Ultra slow progressive lighting */
  z-index: 1;
}
.philosophy-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(6, 182, 212, 0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: -1;
}
.philosophy-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none;
}
.philosophy-card:hover::before,
.philosophy-card.active::before { opacity: 1; }
.philosophy-card:hover::after,
.philosophy-card.active::after { opacity: 1; }

.philosophy-card:hover,
.philosophy-card.active {
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5), 0 0 30px rgba(6, 182, 212, 0.1);
  /* Removed transforms */
}
.philosophy-icon {
  position: relative;
  z-index: 10;
}
/* Removed scaling effect on hover for philosophy icons */
.philosophy-card h3 {
  font-family: var(--font-mono);
  font-size: clamp(22px, 5vw, 28px);
  margin: 24px 0 8px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
@media (min-width: 768px) {
  .philosophy-card { padding: 48px 40px; }
}
.philosophy-subtitle {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  display: block;
}
.philosophy-card p {
  color: var(--text-secondary);
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1.6;
  margin-bottom: 32px;
  flex-grow: 1;
}
.philosophy-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.philosophy-bullets li {
  color: var(--text-muted);
  font-size: clamp(14px, 3.5vw, 18px);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
}
.philosophy-bullets li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.philosophy-card:nth-child(1) .philosophy-bullets li::before {
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

/* Services Carousel Navigation */
.services-carousel {
  position: relative;
  width: 100%;
  max-width: 1150px;
  margin: 0 auto;
}

.carousel-track-container {
  overflow: hidden;
  width: 100%;
  padding: 20px 0;
}
@media (min-width: 1200px) {
  .carousel-track-container { padding: 40px 0; }
}
.carousel-track {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (min-width: 1200px) {
  .carousel-track {
    flex-direction: row;
    transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1);
    gap: 32px;
  }
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  opacity: 0.95; 
  filter: drop-shadow(0 0 8px var(--accent-glow-mixed)); /* More intense default glow */
}

/* Positioning arrows lateral again */
.carousel-prev { left: -80px; }
.carousel-next { right: -80px; }

@media (max-width: 1280px) {
  .carousel-nav { display: none; }
}

.carousel-nav svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.carousel-nav:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  filter: drop-shadow(0 0 20px var(--cyan)) drop-shadow(0 0 10px var(--green));
}

/* Dots - Neural Connection Line */
.carousel-controls {
  display: none; /* Hidden on mobile by default */
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  position: relative;
}
@media (min-width: 1200px) {
  .carousel-controls { display: flex; }
}

.carousel-dots {
  display: flex;
  justify-content: space-between; /* Spread dots */
  align-items: center;
  gap: 40px; /* Distance between nodes */
  position: relative;
}

/* The Connecting Line */
.carousel-dots::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
  transform: translateY(-50%);
}

/* Pulso de energía viajero */
.carousel-indicator {
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cyan), var(--green));
  box-shadow:
    0 0 10px var(--cyan),
    0 0 20px var(--cyan),
    0 0 4px var(--green);
  transform: translate(-50%, -50%);
  transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  pointer-events: none;
  animation: energyPulse 0.8s ease-in-out infinite;
}

/* Trail de energía detrás del pulso */
.carousel-indicator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--cyan), transparent);
  transform: translate(-50%, -50%);
  opacity: 0.4;
  animation: energyTrail 0.8s ease-out infinite;
}

@keyframes energyPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.8;
  }
}

@keyframes energyTrail {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-elevated); /* Inner node color */
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  position: relative;
  z-index: 1; /* Sit on top of line */
  box-shadow: 0 0 0 transparent;
}

.dot:hover {
  border-color: var(--text-secondary);
}

/* Active State - se queda iluminado después de que llega la energía */
.dot.active {
  border-color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan), 0 0 4px var(--green);
  transform: scale(1.05);
}

/* Efecto cuando la energía llega al dot */
.dot.energy-arrived {
  animation: dotEnergyBurst 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dotEnergyBurst {
  0% {
    background: var(--bg-elevated);
    border-color: var(--text-secondary);
    box-shadow: 0 0 0 rgba(6, 182, 212, 0);
  }
  30% {
    background: var(--bg);
    border-color: var(--cyan);
    box-shadow:
      0 0 20px var(--cyan),
      0 0 40px var(--cyan),
      0 0 8px var(--green),
      inset 0 0 8px var(--cyan);
    transform: scale(1.5);
  }
  100% {
    background: var(--bg-elevated);
    border-color: var(--cyan);
    box-shadow: 0 0 8px var(--cyan), 0 0 4px var(--green);
    transform: scale(1.05);
  }
}

/* Connecting Line Highlight (Optional - simulating signal travel) */
.dot.active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0.5;
  z-index: -1;
}

.service-card {
  width: 100%;
  flex-shrink: 0;
  padding: var(--spacing-md) var(--spacing-sm);
  background: rgba(19, 19, 22, 0.95);
  border: 1px solid var(--border);
  border-radius: 24px;
  transition: all 1.5s ease-in-out; /* Ultra slow progressive lighting */
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 1;
}
@media (min-width: 1200px) {
  .service-card {
    padding: 48px 40px;
    min-width: 100%;
  }
  .carousel-track > * {
    flex: 0 0 calc(50% - 10px);
    min-width: 0;
  }
  .service-card { min-width: calc(50% - 20px); max-width: 510px; }
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(6, 182, 212, 0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
  z-index: -1;
}
.service-card:hover::before,
.service-card.active::before { opacity: 1; }

.service-card:hover,
.service-card.active {
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5), 0 0 30px rgba(6, 182, 212, 0.1);
  /* Removed transform: translateY and scale to keep it static */
}

.service-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none;
}
.service-card:hover::after,
.service-card.active::after {
  opacity: 1;
}
.service-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 24px;
  position: relative;
  z-index: 10;
}
/* Removed scaling effect on hover */
.service-card h3 {
  font-size: clamp(22px, 5vw, 28px);
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
  min-height: 2.4em; /* Reserve space for 2 lines */
  display: flex;
  align-items: flex-end; /* Align text bottom for uniformity */
}
.service-card p {
  color: var(--text-muted);
  font-size: clamp(16px, 4vw, 22px);
  margin-bottom: 20px;
  flex-grow: 0;
  min-height: 110px; /* Reserve space for description */
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  min-height: 48px; /* Consistent baseline for tags */
}
.tags span {
  padding: 4px 10px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: clamp(12px, 3vw, 16px);
  font-family: var(--font-mono);
  border-radius: 12px;
  border: 1px solid transparent;
}
/* Color variations for tags (assigned by JS) */
.tag-cyan {
  background: rgba(6, 182, 212, 0.1) !important;
  border-color: rgba(6, 182, 212, 0.2) !important;
  color: #67e8f9 !important;
}
.tag-green {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.2) !important;
  color: #6ee7b7 !important;
}
.tag-purple {
  background: rgba(139, 92, 246, 0.1) !important;
  border-color: rgba(139, 92, 246, 0.2) !important;
  color: #a78bfa !important;
}
.tag-blue {
  background: rgba(59, 130, 246, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
  color: #93c5fd !important;
}
.tag-orange {
  background: rgba(249, 115, 22, 0.1) !important;
  border-color: rgba(249, 115, 22, 0.2) !important;
  color: #fdba74 !important;
}
.tag-pink {
  background: rgba(236, 72, 153, 0.1) !important;
  border-color: rgba(236, 72, 153, 0.2) !important;
  color: #f9a8d4 !important;
}

/* Service Examples - Terminal Style */
.service-examples {
  margin-top: 24px;
  padding: 40px 24px 24px;
  background: #050505;
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-grow: 0;
  flex-shrink: 0;
  font-family: var(--font-mono);
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
  min-height: 280px;
  max-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .service-examples {
    min-height: auto;
    max-height: none;
    height: auto;
    padding: 40px 16px 20px;
  }
}

/* Custom Scrollbar for Terminal */
.service-examples::-webkit-scrollbar {
  width: 4px;
}
.service-examples::-webkit-scrollbar-track {
  background: transparent;
}
.service-examples::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}
.service-examples::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Mac-style Window Controls */
.service-examples::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f56; /* Red */
  box-shadow: 16px 0 0 #ffbd2e, 32px 0 0 #27c93f; /* Yellow, Green */
  z-index: 2;
}

/* Optional: terminal header text */
.service-examples::after {
  content: 'zr0-i';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  pointer-events: none;
}

.examples-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6a9955;
  margin-bottom: 8px;
  letter-spacing: 0;
  text-transform: none;
  font-family: var(--font-mono);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  .examples-label {
    font-size: 11px;
  }
}

/* Turn label into a comment styling */
.examples-label::before {
  content: "// ";
  opacity: 0.7;
}

.service-examples ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  overflow: hidden;
}

.service-examples li {
  position: relative;
  padding-left: 16px;
  color: #e1e1e1;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 768px) {
  .service-examples li {
    font-size: 11px;
    line-height: 1.5;
    padding-left: 14px;
  }
}

.service-examples li:last-child {
  margin-bottom: 0;
}

/* Command Prompt Arrow */
.service-examples li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--cyan);
  background: none;
  -webkit-text-fill-color: initial;
  font-weight: 700;
}

/* Service Result */
.service-result {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  margin-bottom: 0;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-grow: 0;
  flex-shrink: 0;
  min-height: 72px;
}

@media (max-width: 768px) {
  .service-result {
    min-height: auto;
    padding: 10px 12px;
    gap: 8px;
  }
}
.result-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.service-result span:last-child {
  color: var(--text-secondary);
  font-size: clamp(14px, 3.5vw, 16px);
  font-weight: 400;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  flex: 1;
}

.service-result strong {
  display: block; /* Break line for better structure */
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* Process - Gradient Numbers */
.process-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 4vw, 24px); }
@media (min-width: 640px) { .process-grid { grid-template-columns: repeat(4, 1fr); } }
.process-step { text-align: center; }
.process-num {
  width: clamp(60px, 12vw, 80px);
  height: clamp(60px, 12vw, 80px);
  background: var(--bg-elevated);
  border: 2px solid transparent;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 24px;
  transition: all 1.5s ease-in-out; /* Ultra slow progressive lighting */
  position: relative;
}
.process-num::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  padding: 2px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 0.3s;
}

/* Active State (Scroll) - Static Lighting */
.process-step.active .process-num {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  /* Removed transform translateY */
  border-color: transparent;
  box-shadow: 0 0 32px var(--accent-glow-mixed); /* Glow only */
}
.process-step.active .process-num .gradient {
  background: none;
  -webkit-background-clip: border-box;
  -webkit-text-fill-color: var(--bg);
  color: var(--bg);
}
.process-step.active .process-num::before {
  opacity: 0;
}
.process-step h3 { font-size: clamp(18px, 4vw, 24px); margin-bottom: 8px; text-transform: uppercase;}
.process-step p { font-size: clamp(14px, 3vw, 18px); color: var(--text-muted); }

/* About Section */
.about-desc {
  font-size: clamp(16px, 4vw, 20px);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 800px;
  margin-bottom: clamp(32px, 6vw, 60px);
}
.about-badges {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 480px) {
  .about-badges { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
  .about-badges { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}
.about-badge {
  padding: clamp(16px, 4vw, 24px) 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: clamp(14px, 3vw, 18px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 1.5s ease-in-out; /* Ultra slow progressive lighting */
  position: relative;
  overflow: hidden;
}
.about-badge::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, var(--cyan), var(--green));
  opacity: 0.5;
  transition: opacity 0.3s;
}

/* Active State (Scroll) - Static Lighting */
.about-badge.active {
  /* Removed transform translateY */
  border-color: var(--accent);
  box-shadow: 0 0 30px -10px rgba(6, 182, 212, 0.25); /* Subtle static glow */
}
.about-badge.active::before { opacity: 1; }


/* CTA */
.cta-card {
  max-width: 700px;
  margin: 0 auto;
  padding: var(--spacing-md) var(--spacing-sm);
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid transparent;
  position: relative;
  border-radius: 24px;
  text-align: center;
  transition: all 1.5s ease-in-out; /* Ultra slow progressive lighting */
}
@media (min-width: 768px) {
  .cta-card { padding: 60px 40px; }
}
.cta-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.2; /* Low opacity by default */
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.cta-card.active::before {
  opacity: 1; /* Fully lit when active */
}

.cta-card.active {
  box-shadow: 0 0 40px var(--accent-glow-mixed);
}

.cta-card h2 { font-size: clamp(24px, 5vw, 36px); margin-bottom: 16px; }
.cta-card p { color: var(--text-secondary); margin-bottom: clamp(20px, 5vw, 32px); font-size: clamp(16px, 3.5vw, 20px);}
.cta-note { display: block; font-family: var(--font-mono); font-size: 16px; color: var(--text-muted); margin-top: 16px; }

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 500px;
  margin: 32px auto;
}
.form-row {
  display: flex;
  gap: 16px;
}
.input-container {
  position: relative;
  width: 100%;
}
.form-input {
  width: 100%;
  padding: 24px 16px 8px 16px; /* Adjusted padding for floating label */
  background: rgba(9, 9, 11, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  transition: all 0.3s;
  position: relative;
  z-index: 2; /* Ensure input is clickable */
}
.form-label {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.3s ease;
  pointer-events: none;
  font-family: var(--font-sans);
  z-index: 3;
}
/* Floating effect */
.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
  top: 6px;
  left: 16px;
  font-size: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}
.form-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
  background: rgba(9, 9, 11, 0.6);
}
/* Styles to prevent white background on autofill and during typing */
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0px 1000px #131316 inset; /* Solid color similar to rgba(9,9,11,0.6) */
  transition: background-color 5000s ease-in-out 0s;
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.btn-block {
  width: 100%;
  justify-content: center;
}
@media (max-width: 600px) {
  .form-row { flex-direction: column; }
}

/* Back to Top Button */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--cyan);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 90;
}
#back-to-top:hover {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  color: var(--bg);
  border-color: transparent;
  box-shadow: 0 4px 20px var(--accent-glow-mixed);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (min-width: 768px) {
  #back-to-top { bottom: 32px; right: 32px; width: 48px; height: 48px; }
}

.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: rgba(9, 9, 11, 0.1);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 10;
}
.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.footer-logo-img {
  height: 28px;
  width: auto;
  opacity: 0.9;
  display: block;
}
.footer-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}
@media (min-width: 640px) {
  .footer-info { flex-direction: row; }
}
.footer-locations {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
@media (min-width: 640px) {
  .footer-locations { text-align: left; }
}
.footer-sep { display: none; }
@media (min-width: 640px) {
  .footer-sep { display: inline; }
}
.footer-info a:hover {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-sep {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}
.copyright { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

section#nosotros {
  border-top: 1px solid var(--border);
}

section#servicios {
  border-top: 1px solid var(--border);
}

/* ============================================
   CHALLENGES SECTION - Toggle Switches
   ============================================ */

/* Grid Layout */
.challenges-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

@media (min-width: 980px) {
  .challenges-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1200px) {
  .challenges-grid {
    gap: 28px;
  }
}

/* Challenge Item Container */
.challenge-item {
  background: rgba(19, 19, 22, 0.95);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(20px, 4vw, 28px);
  transition: box-shadow 1.5s ease-in-out; /* Slow glow transition */
  position: relative;
  overflow: hidden;
  min-height: auto;
}

.challenge-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  pointer-events: none;
}

/* --- STATE: ACTIVE (Scroll Detection) --- */
/* Visuals: Lights, Colors, AND Switch ON. NO LAYOUT/HEIGHT CHANGES. */
.challenge-item.active {
  box-shadow: 0 8px 32px rgba(6, 182, 212, 0.15);
}
.challenge-item.active::before {
  opacity: 1;
}
/* Activate Switch on Scroll too */
.challenge-item.active .challenge-switch {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-color: transparent;
  box-shadow: 0 0 20px var(--accent-glow-mixed);
}
.challenge-item.active .challenge-thumb {
  transform: translateX(24px);
  background: var(--bg);
}

.challenge-item.active .challenge-problem {
  opacity: 0.5; /* Dim problem text to highlight solution */
}
.challenge-item.active .challenge-solution-text {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.challenge-item.active .challenge-checkmark {
  opacity: 1;
  transform: scale(1);
  color: var(--green);
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.5));
}
.challenge-item.active .challenge-progress {
  width: 100%; /* Fill progress bar */
}

/* Expand Detail Text on Active (Scroll) too */
.challenge-item.active .challenge-detail {
  max-height: 250px;
  opacity: 1;
  margin-top: 0;
}

/* Add margins on Active too */
.challenge-item.active .challenge-header {
  margin-bottom: 12px;
}
.challenge-item.active .challenge-bar {
  margin-bottom: 12px;
}

/* --- STATE: IS-OPEN (User Click) --- */
/* Layout changes: Expansion, Margins */

/* Keep Switch ON if opened manually (redundant if active is present, but safe) */
.challenge-item.is-open .challenge-switch {
  background: linear-gradient(135deg, var(--cyan), var(--green));
  border-color: transparent;
  box-shadow: 0 0 20px var(--accent-glow-mixed);
}
.challenge-item.is-open .challenge-thumb {
  transform: translateX(24px);
  background: var(--bg);
}

/* Add margin only when open to push content down */
.challenge-item.is-open .challenge-header {
  margin-bottom: 12px;
}
.challenge-item.is-open .challenge-bar {
  margin-bottom: 12px;
}

/* Expand Detail Text */
.challenge-item.is-open .challenge-detail {
  max-height: 250px;
  opacity: 1;
  margin-top: 0;
}

/* Header Structure */
.challenge-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
  flex-wrap: wrap;
  transition: margin-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 768px) {
  .challenge-header { flex-wrap: nowrap; gap: 16px; }
}

/* Problem Text */
.challenge-problem {
  flex: 1;
  font-family: var(--font-sans);
  font-size: clamp(14px, 3vw, 17px);
  color: var(--text-secondary);
  font-weight: 500;
  transition: opacity 0.6s ease-out;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Toggle Switch Base */
.challenge-toggle {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.challenge-switch {
  display: block;
  width: 52px;
  height: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: relative;
  transition: all 0.9s ease-out;
}
.challenge-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: var(--text);
  border-radius: 50%;
  transition: all 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Solution Text */
.challenge-solution {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.challenge-solution-text {
  font-family: var(--font-sans);
  font-size: clamp(14px, 3vw, 17px);
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.6s ease-out;
  word-wrap: break-word;
}

/* Checkmark Base */
.challenge-checkmark {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  opacity: 0;
  transform: scale(0);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

/* Progress Bar Base */
.challenge-bar {
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  margin-bottom: 0;
  overflow: hidden;
  transition: margin-bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.challenge-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 0.9s ease-out;
  box-shadow: 0 0 8px var(--accent-glow-mixed);
}

/* Detail Text Base */
.challenge-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease-out;
  opacity: 0;
  margin-top: 0;
}
.challenge-detail p {
  font-size: clamp(14px, 3vw, 16px);
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  padding-top: 4px;
}
.challenge-examples {
  font-size: clamp(13px, 2.8vw, 15px);
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
  margin-top: 8px !important;
  padding-top: 8px;
  border-top: 1px solid rgba(39, 39, 42, 0.5);
}

/* Accessibility */
.challenge-toggle:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 16px;
}
.challenge-toggle:focus:not(:focus-visible) { outline: none; }