/* ============================================
   ESCALA CONSULTORES — Global Styles
   Stack: HTML5 + CSS3 + GSAP
   Taste-Skill: DESIGN_VARIANCE:8, MOTION:6, DENSITY:4
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* === RESET & TOKENS === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:             #F0F4FF;
  --bg-section:     #FFFFFF;
  --bg-dark:        #0D1B2E;
  --text-primary:   #0D1B2E;
  --text-secondary: #3D5166;
  --accent:         #1D4ED8;
  --accent-hover:   #1E40AF;
  --accent-light:   #EFF6FF;
  --accent2:        #F59E0B;
  --border:         #E2E8F0;
  --white:          #FFFFFF;
  --font:           'Poppins', sans-serif;
  --radius:         12px;
  --radius-lg:      20px;
  --shadow:         0 4px 24px -8px rgba(0,0,0,0.08);
  --shadow-lg:      0 20px 60px -15px rgba(0,0,0,0.14);
  --transition:     all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === DARK MODE === */
[data-theme="dark"] {
  --bg:             #0D1117;
  --bg-section:     #161B22;
  --bg-dark:        #010409;
  --text-primary:   #E6EDF3;
  --text-secondary: #A8B8C8;
  --accent:         #4D8EF7;
  --accent-hover:   #6BA3F9;
  --accent-light:   #1C2A4A;
  --border:         #21262D;
  --white:          #E6EDF3;
  --shadow:         0 4px 24px -8px rgba(0,0,0,0.4);
  --shadow-lg:      0 20px 60px -15px rgba(0,0,0,0.6);
}

/* Smooth color transition on theme change */
body, nav, .service-item, .testimonial-card, .faq-item, .modal, footer {
  transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

/* Dark mode nav scrolled */
[data-theme="dark"] nav.scrolled {
  background: rgba(13,17,23,0.92);
  border-bottom-color: var(--border);
}

/* Dark mode skeleton shimmer */
[data-theme="dark"] .img-wrapper {
  background: linear-gradient(90deg, #1c2128 25%, #2d333b 50%, #1c2128 75%);
  background-size: 600px 100%;
}

/* Dark mode hero bg overlay slightly deeper */
[data-theme="dark"] .hero {
  background:
    linear-gradient(135deg, rgba(1,4,9,0.92) 0%, rgba(29,78,216,0.60) 100%),
    url('../assets/img-home.webp') center/cover no-repeat;
}

/* === DARK MODE TOGGLE BUTTON === */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  padding: 0;
}

.theme-toggle:hover {
  background: rgba(255,255,255,0.18);
  transform: rotate(20deg);
}

nav.scrolled .theme-toggle {
  border-color: var(--border);
  background: var(--bg);
  color: var(--text-primary);
}

nav.scrolled .theme-toggle:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: absolute;  /* both stacked, CSS controls which shows */
}

/* Dark mode → show sun (to switch back to light) */
[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 1 !important; transform: rotate(0deg); }
[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0 !important; transform: rotate(90deg); }

/* Light mode → show moon (to switch to dark) */
[data-theme="light"] .theme-toggle .icon-sun  { opacity: 0 !important; transform: rotate(-90deg); }
[data-theme="light"] .theme-toggle .icon-moon { opacity: 1 !important; transform: rotate(0deg); }

/* scroll-behavior: smooth — disabled, Lenis handles this */
html { scroll-behavior: auto; }

/* === CUSTOM CURSOR === */
/* Hide default cursor on non-touch devices */
@media (pointer: fine) {
  html, body, a, button, [data-modal], input, select, textarea, label {
    cursor: none !important;
  }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
  transition: opacity 0.3s ease;
}

/* Small solid dot — snappy, follows cursor exactly */
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent2);
}

/* Larger ring — lags behind for the premium feel */
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(29, 78, 216, 0.55);
  background: transparent;
  transition: width 0.25s ease, height 0.25s ease,
              border-color 0.25s ease, opacity 0.3s ease;
}

/* Hover state: ring expands and fills slightly */
.cursor-ring.is-hovering {
  width: 52px;
  height: 52px;
  border-color: var(--accent2);
  background: rgba(245, 158, 11, 0.07);
}

/* Click state: dot pulses */
.cursor-dot.is-clicking {
  transform: translate(-50%, -50%) scale(2.2);
  background: var(--accent);
}

/* Hide when outside window */
.cursor-dot.is-hidden,
.cursor-ring.is-hidden {
  opacity: 0;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
h4 { font-size: 1.1rem; }

p { color: var(--text-secondary); max-width: 62ch; line-height: 1.75; }

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

/* === LAYOUT === */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 2rem;
}

section { padding: 6rem 0; }

/* === READING PROGRESS BAR === */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  z-index: 200;
  transform-origin: left;
  transition: width 0.05s linear;
  pointer-events: none;
}

/* === NAVIGATION === */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  transition: var(--transition);
}

nav.scrolled {
  background: rgba(249, 248, 245, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1.1;
}

.nav-slogan {
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
  line-height: 1;
}

nav.scrolled .nav-logo { color: var(--text-primary); }
nav.scrolled .nav-slogan { color: var(--text-secondary); }

.nav-logo span { color: var(--accent2); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
  position: relative;
}

nav.scrolled .nav-links a { color: var(--text-primary); }

.nav-links a:hover { color: var(--white); }
nav.scrolled .nav-links a:hover { color: var(--text-primary); }

/* Active link — amber pill indicator */
.nav-links a.active {
  color: var(--white);
  font-weight: 600;
}
nav.scrolled .nav-links a.active {
  color: var(--accent);
}

/* Underline animada en hover */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent2);
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-links a:hover::after { width: 100%; }

/* Punto activo (·) encima del link */
.nav-links a.active::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  background: var(--accent2);
  border-radius: 50%;
  animation: nav-dot-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Underline fija en activo */
.nav-links a.active::after {
  width: 100%;
  background: var(--accent2);
}
nav.scrolled .nav-links a.active::after {
  background: var(--accent);
}
nav.scrolled .nav-links a.active::before {
  background: var(--accent);
}

@keyframes nav-dot-in {
  from { opacity: 0; transform: translateX(-50%) scale(0); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: 100px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(29, 78, 216, 0.35);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.45);
}

.btn-primary:active { transform: scale(0.98); }

/* Navbar CTA — amber brand color */
nav .btn-primary {
  background: var(--accent2);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(245,158,11,0.35);
}

nav .btn-primary:hover {
  background: #d97706;
  box-shadow: 0 6px 20px rgba(245,158,11,0.45);
  color: #ffffff;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* Hero dark bg — override outline btn */
.hero .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,0.45);
}
.hero .btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

/* === HAMBURGER (mobile) === */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* === HERO === */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(13,27,46,0.88) 0%, rgba(13,27,46,0.70) 50%, rgba(29,78,216,0.45) 100%),
    url('../assets/img-home.webp') center/cover no-repeat;
}

/* Override text colors for dark hero */
.hero h1          { color: var(--white); }
.hero-desc        { color: rgba(255,255,255,0.92); text-shadow: 0 1px 8px rgba(0,0,0,0.45); }
.hero-tag         { background: rgba(255,255,255,0.12); color: var(--white); border: 1px solid rgba(255,255,255,0.2); }
.hero-tag::before { background: var(--accent2); }
.hero-stats       { border-top-color: rgba(255,255,255,0.15); }
/* Hero stats always on dark bg — use literal white regardless of theme */
.hero .stat-num   { color: #ffffff; }
.hero .stat-label { color: rgba(255,255,255,0.75); }

.hero-bg {
  display: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 5rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.hero h1 {
  margin-bottom: 1.2rem;
  font-weight: 800;
  font-size: clamp(3.2rem, 7.5vw, 6rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
}
.hero h1 em { font-style: normal; color: var(--accent); }

.hero-desc {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 2.5rem;
  max-width: 38ch;
}
.hero-desc em { font-style: normal; color: #FCD34D; text-shadow: 0 0 20px rgba(245,158,11,0.5); }

.hero-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-item {}
.stat-num {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #ffffff;
  line-height: 1;
}
.stat-label {
  font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  color: rgba(255,255,255,0.55);
  margin-top: 0.3rem;
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 3rem;
}

.hero-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 380px;
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.hero-card-title { font-size: 0.85rem; font-weight: 600; color: #0D1B2E; }
.hero-card-badge {
  background: #EFF6FF;
  color: #1D4ED8;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
}

.progress-list { display: flex; flex-direction: column; gap: 1rem; }

.progress-item {}
.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.progress-label { font-size: 0.82rem; color: #64748B; font-weight: 500; }
.progress-value { font-size: 0.82rem; font-weight: 700; color: #0D1B2E; }
.progress-bar {
  height: 6px;
  background: #F0F4FF;
  border-radius: 100px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mini-card {
  position: absolute;
  bottom: -1.5rem;
  left: -2rem;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mini-icon {
  width: 36px; height: 36px;
  background: #EFF6FF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-icon svg { width: 18px; height: 18px; stroke: #1D4ED8; }
.mini-text .mini-label { font-size: 0.72rem; color: #64748B; }
.mini-text .mini-val { font-size: 0.92rem; font-weight: 700; letter-spacing: -0.02em; color: #0D1B2E; }

/* === SECTION HEADER === */
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title { margin-bottom: 1rem; }
.section-desc { font-size: 1.05rem; }

/* === SERVICES SECTION === */
.services { background: var(--bg-section); }

.services-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: 4rem;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  background: transparent;
  border-radius: var(--radius-lg);
  overflow: visible;
  perspective: 1200px;
}

.service-item {
  background: var(--bg-section);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

/* Shine layer that follows mouse */
.service-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(29,78,216,0.07),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.service-item:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(29,78,216,0.2);
}

.service-item:hover::before { opacity: 1; }

.service-icon {
  width: 48px; height: 48px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.service-item:hover .service-icon { background: var(--accent); }
.service-item:hover .service-icon svg { stroke: var(--white); }

.service-icon svg { width: 22px; height: 22px; stroke: var(--accent); transition: var(--transition); }

.service-item h3 { margin-bottom: 0.75rem; position: relative; z-index: 1; font-size: 1.2rem; }
.service-item p { font-size: 0.92rem; line-height: 1.7; position: relative; z-index: 1; }

/* === PROCESS SECTION === */
.process { background: var(--bg); }

.process-inner {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 5rem;
  align-items: start;
}

.process-steps { display: flex; flex-direction: column; gap: 0; }

.process-step {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.process-step:last-child { border-bottom: none; }
.process-step:hover { padding-left: 0.5rem; }

.step-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  width: 28px;
  flex-shrink: 0;
  padding-top: 0.2rem;
}

.step-content h4 { font-size: 1rem; margin-bottom: 0.35rem; }
.step-content p { font-size: 0.88rem; }

.process-visual {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.process-visual h3 { font-size: 1.1rem; margin-bottom: 1.5rem; }

.metrics-list { display: flex; flex-direction: column; gap: 1.25rem; }

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: 8px;
  transition: var(--transition);
}

.metric-row:hover { background: var(--accent-light); }

.metric-name { font-size: 0.88rem; font-weight: 500; }
.metric-change {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}
.metric-change.down { color: #D97706; }

/* === CTA SECTION === */
.cta-section {
  background: var(--bg-dark);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(29,78,216,0.3) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-inner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-inner p { color: rgba(255,255,255,0.78); margin: 0 auto 2.5rem; max-width: 48ch; }

.cta-inner .btn-primary {
  background: var(--white);
  color: var(--text-primary);
}

.cta-inner .btn-primary:hover {
  background: var(--bg);
  box-shadow: 0 8px 32px rgba(255,255,255,0.2);
}

/* === LAZY IMAGE / SKELETON === */
@keyframes skeleton-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

.img-lazy {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.img-lazy.loaded {
  opacity: 1;
}

/* Wrapper that shows shimmer while image loads */
.img-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  background:
    linear-gradient(90deg,
      #e8edf5 25%,
      #f4f7fc 50%,
      #e8edf5 75%
    );
  background-size: 600px 100%;
  animation: skeleton-shimmer 1.4s infinite linear;
}

.img-wrapper.loaded {
  background: none;
  animation: none;
}

/* === FOOTER === */
footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .nav-logo { font-size: 1.1rem; color: var(--white); }
.footer-brand p { color: rgba(255,255,255,0.65); font-size: 0.88rem; margin-top: 0.75rem; max-width: 30ch; }

.footer-col h5 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.55); max-width: none; }

/* === SCROLL ANIMATION SECTION === */
.scroll-anim-section {
  position: relative;
  height: 250vh;
}

.scroll-anim-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}

.scroll-anim-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  width: 100%;
}

/* Image side */
.scroll-anim-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.anim-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.anim-img-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 16/9;
}

.anim-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  transition: none; /* controlled by GSAP */
}

.anim-img-final  { opacity: 1; }
.anim-img-inicio { opacity: 0; }

/* Progress bar below image */
.anim-caption {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 520px;
}

.caption-before,
.caption-after {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.caption-after { color: var(--accent); }

.caption-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.caption-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 100px;
  transition: none; /* controlled by GSAP */
}

/* Features side */
.scroll-features {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.scroll-features-title {
  font-size: clamp(1.8rem, 2.5vw, 2.6rem);
  margin-bottom: 2.5rem;
  margin-top: 0.5rem;
}

.scroll-feature {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0.25;
  transform: translateX(-12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-feature:last-child { border-bottom: none; }

.scroll-feature.active {
  opacity: 1;
  transform: translateX(0);
}

.sf-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 0.2rem;
  min-width: 24px;
}

.sf-content h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.sf-content p  { font-size: 0.88rem; }

/* Mobile: stack vertically */
@media (max-width: 1024px) {
  .scroll-anim-section { height: auto; }
  .scroll-anim-sticky  { position: relative; height: auto; padding: 4rem 0; }
  .scroll-anim-inner   { grid-template-columns: 1fr; gap: 3rem; }
  .anim-img-wrapper    { max-width: 100%; }
  .scroll-feature      { opacity: 1; transform: none; }
  /* Imagen debajo de los bullets en mobile */
  .scroll-anim-visual  { order: 2; }
  .scroll-features     { order: 1; }
}

/* === PAGE HERO (inner pages) === */
.page-hero {
  position: relative;
  padding: 11rem 0 6rem;
  background:
    linear-gradient(135deg, rgba(13,27,46,0.82) 0%, rgba(29,78,216,0.65) 100%),
    url('../assets/img-servicio.webp') center/cover no-repeat;
  overflow: hidden;
}

/* Animated grain overlay */
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* Decorative geometric accent */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page-hero .container { position: relative; z-index: 1; }
.page-hero .section-label {
  margin-bottom: 0.75rem;
  color: var(--accent2);
  font-weight: 600;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  max-width: 18ch;
  color: var(--white);
}
.page-hero h1 em { font-style: normal; color: #FCD34D; }
.page-hero p {
  margin-top: 1.2rem;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  max-width: 52ch;
}

/* Page-specific hero seeds */
.page-hero--servicios {
  background-image:
    linear-gradient(135deg, rgba(13,27,46,0.82) 0%, rgba(29,78,216,0.65) 100%),
    url('../assets/img-servicio.webp');
}
.page-hero--nosotros {
  background:
    linear-gradient(135deg, rgba(13,27,46,0.62) 0%, rgba(16,60,160,0.50) 100%),
    url('../assets/imagen-home.webp') center/cover no-repeat;
}

/* Page hero stats strip */
.page-hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  flex-wrap: wrap;
}

.page-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-hero-stat.visible {
  opacity: 1;
  transform: translateY(0);
}

.page-hero-stat .stat-num {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.04em;
  line-height: 1;
}

.page-hero-stat .stat-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* === SERVICIOS PAGE === */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

.service-detail:last-child { border-bottom: none; }
.service-detail.reverse { direction: rtl; }
.service-detail.reverse > * { direction: ltr; }

.service-detail-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.service-detail h2 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); margin-bottom: 1rem; }
.service-detail p { margin-bottom: 1.5rem; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.feature-list li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.45rem;
}

.service-visual {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-visual .service-icon-large {
  width: 80px; height: 80px;
  background: var(--white);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.service-visual .service-icon-large svg {
  width: 36px; height: 36px;
  stroke: var(--accent);
}

/* === NOSOTROS PAGE === */
.about-intro {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 5rem;
  align-items: center;
}

.about-intro h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-bottom: 1.25rem; }
.about-intro p { margin-bottom: 1rem; }

.about-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.about-num-item {
  background: var(--white);
  padding: 2rem;
  text-align: center;
}

.about-num-item .num {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--text-primary);
  line-height: 1;
}
.about-num-item .num span { color: var(--accent); }
.about-num-item .label { font-size: 0.82rem; color: var(--text-secondary); margin-top: 0.4rem; }

.values-section { background: var(--white); }

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.value-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: var(--transition);
}

.value-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(29, 92, 58, 0.08);
  transform: translateY(-2px);
}

.value-card h4 { margin-bottom: 0.5rem; }
.value-card p { font-size: 0.9rem; }

/* === CONTACT MODAL === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  padding: 1rem;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 480px;
  transform: translateY(20px) scale(0.97);
  transition: var(--transition);
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.modal-header h3 { font-size: 1.4rem; }
.modal-header p { font-size: 0.88rem; margin-top: 0.25rem; }

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  transition: var(--transition);
  border-radius: 6px;
}

.modal-close:hover { background: var(--bg); color: var(--text-primary); }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--bg);
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--accent); background: var(--white); }

.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* === ANIMATIONS (initial state for GSAP) === */
.fade-up { opacity: 0; transform: translateY(32px); }
.fade-in { opacity: 0; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { display: none; }
  .services-header { grid-template-columns: 1fr; gap: 1rem; }
  .process-inner { grid-template-columns: 1fr; gap: 3rem; }
  .about-intro { grid-template-columns: 1fr; gap: 3rem; }
  .service-detail { grid-template-columns: 1fr; gap: 2.5rem; }
  .service-detail.reverse { direction: ltr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  .container { padding: 0 1.25rem; }
  h1 { font-size: 2.2rem; }
  .hero h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); }
  h2 { font-size: 1.7rem; }

  /* ── Hamburger visible en mobile ── */
  .hamburger { display: flex; }

  /* ── Ocultar links por defecto ── */
  .nav-links { display: none; }

  /* ── Nav fullscreen cuando menú está abierto ──
     Expandimos el nav (no el ul) para evitar el problema
     de backdrop-filter creando un nuevo containing block  */
  nav.menu-open {
    bottom: 0;
    height: 100dvh;
    background: var(--bg) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: none !important;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  /* Ocultar logo y theme toggle cuando el menú está abierto */
  nav.menu-open .nav-logo-wrap,
  nav.menu-open .theme-toggle { display: none; }

  /* Hamburger (X) en la esquina superior derecha */
  nav.menu-open .hamburger {
    position: absolute;
    top: 1.2rem;
    right: 1.25rem;
  }

  /* Links dentro del nav expandido — static, no fixed */
  nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  nav.menu-open .nav-links li a {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    text-align: center;
    transition: color 0.2s;
  }

  nav.menu-open .nav-links li a:hover { color: var(--accent); }

  nav.menu-open .nav-links .btn.btn-primary {
    font-size: 1rem;
    padding: 0.8rem 2.5rem;
    color: #fff;
    margin-top: 0.5rem;
  }

  /* ── Hero ── */
  .hero { padding-top: 4.5rem; min-height: 100dvh; }
  .hero-actions { flex-direction: column; gap: 0.75rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .hero-stats { flex-wrap: nowrap; gap: 0; justify-content: space-between; }
  .hero-stats .stat-item { flex: 1; text-align: center; }
  .hero-desc { font-size: 1.1rem; }
  .stat-num { font-size: 1.6rem; }
  .stat-label { font-size: 0.72rem; }

  /* ── Nosotros / inner pages hero stats ── */
  .page-hero-stats { gap: 0; flex-wrap: nowrap; justify-content: space-between; }
  .page-hero-stat { flex: 1; text-align: center; }
  .page-hero-stat .stat-num { font-size: 1.6rem; }

  /* ── Servicios grid (home) ── */
  .services-grid { grid-template-columns: 1fr; }

  /* ── Servicios detalle (servicios.html) — reducir icono ── */
  .service-visual { min-height: 140px; padding: 1.75rem; }
  .service-visual .service-icon-large { width: 52px; height: 52px; border-radius: 14px; }
  .service-visual .service-icon-large svg { width: 22px; height: 22px; }

  /* ── Scroll anim / Cómo trabajamos ── */
  .scroll-anim-inner { gap: 2rem; }
  .scroll-features-title { font-size: 1.6rem; margin-bottom: 1.75rem; }
  .scroll-feature { padding: 1.1rem 0; gap: 1rem; }
  .sf-num { font-size: 0.95rem; }

  /* ── Nosotros ── */
  .values-grid { grid-template-columns: 1fr; }
  .about-numbers { grid-template-columns: 1fr 1fr; }

  /* ── Testimonios ── */
  .testimonials-grid { grid-template-columns: 1fr; }

  /* ── Footer ── */
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

  /* ── Modal form ── */
  .form-row { grid-template-columns: 1fr; }

  /* ── Team ── */
  .team-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  section { padding: 3rem 0; }
  .container { padding: 0 1rem; }

  .hero h1 { font-size: clamp(2rem, 10vw, 2.6rem); }
  h2 { font-size: 1.5rem; }

  .page-hero-stat .stat-num { font-size: 1.4rem; }

  .stat-num { font-size: 1.5rem; }

  .clients-logos { gap: 1.5rem; }

  .scroll-features-title { font-size: 1.4rem; }

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

  .section-title { font-size: 1.5rem; }

  .cta-inner h2 { font-size: 1.6rem; }
}

/* === TEAM SECTION === */
.team-section { background: var(--bg); }

.team-section .section-header {
  margin-bottom: 3.5rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.team-photo {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--accent-light);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-card:hover .team-photo img { transform: scale(1.04); }

/* Avatar with initials fallback */
.team-photo--initials {
  background: linear-gradient(135deg,
    hsl(var(--hue, 220), 70%, 35%) 0%,
    hsl(var(--hue, 220), 85%, 55%) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-initials {
  font-family: var(--font);
  font-size: 2.2rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.05em;
  user-select: none;
}

.team-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,27,46,0.6) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition);
}

.team-card:hover .team-photo-overlay { opacity: 1; }

.team-info {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.team-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.team-role {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.team-info p {
  font-size: 0.85rem;
  line-height: 1.65;
  flex: 1;
}

.team-accent-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-card:hover .team-accent-bar { transform: scaleX(1); }

@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* === PROCESS TEAM PHOTO === */
.process-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.process-team-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.process-team-photo img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-team-photo:hover img {
  transform: scale(1.03);
}

/* === FOOTER DEV CREDIT === */
.footer-dev {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
}
.footer-dev-logo img {
  height: 18px;
  width: auto;
  opacity: 0.5;
  filter: brightness(0) invert(1);
  transition: opacity 0.3s ease;
}
.footer-dev-logo:hover img { opacity: 0.9; }

/* === FOOTER SOCIAL ICONS === */
.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.55);
  transition: var(--transition);
}
.footer-social-link:hover {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

/* === FORM FEEDBACK === */
.form-feedback {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  display: none;
}
.form-feedback.success {
  display: block;
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}
.form-feedback.error {
  display: block;
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: 6rem;
  right: 1.75rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-dark);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  pointer-events: none;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--accent);
  transform: translateY(-3px);
}
.back-to-top svg { flex-shrink: 0; }

/* === WHATSAPP FLOATING BUTTON === */
.whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  z-index: 500;
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s ease;
  text-decoration: none;
}
.whatsapp-btn svg { width: 28px; height: 28px; }
.whatsapp-btn:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 8px 32px rgba(37,211,102,0.5);
}
.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  background: var(--bg-dark);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font);
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.whatsapp-btn:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* === CLIENTS STRIP === */
.clients-strip {
  padding: 2.75rem 0;
  background: var(--bg-dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.clients-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.75rem;
}
.clients-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.35rem;
  max-width: none;
}
.clients-count {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.42);
  letter-spacing: 0.04em;
  max-width: none;
}
.clients-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  flex-wrap: nowrap;
}
.client-logo {
  color: rgba(255,255,255,0.55);
  transition: color 0.3s ease, opacity 0.3s ease;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.client-logo:hover { color: rgba(255,255,255,0.92); }
.client-logo svg { height: 42px; width: auto; }
.client-logo img {
  height: 60px;
  width: auto;
  opacity: 0.55;
  filter: invert(1);
  transition: opacity 0.3s ease;
}
.client-logo:hover img { opacity: 0.9; }
.client-logo a { display: flex; align-items: center; }

@media (max-width: 900px) {
  .clients-logos { flex-wrap: wrap; gap: 2rem; row-gap: 1.75rem; }
}
.client-logo--muted span {
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.02em;
}

/* === TESTIMONIALS === */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.testimonial-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.testimonial-quote {
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.2;
  font-family: Georgia, serif;
  margin-bottom: -0.5rem;
}
.testimonial-text {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-secondary);
  flex: 1;
  max-width: none;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.testimonial-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsl(var(--hue,220),70%,35%), hsl(var(--hue,220),85%,55%));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.testimonial-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.testimonial-company {
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.testimonial-stars {
  font-size: 0.85rem;
  color: var(--accent2);
  letter-spacing: 0.05em;
}
@media (max-width: 1024px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* === CASOS DE ÉXITO === */
.cases-section { background: var(--bg-section); }

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.case-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.case-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(29,78,216,0.2);
}

.case-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.case-industry {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.case-industry svg { stroke: var(--accent); flex-shrink: 0; }

.case-service-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--accent-light);
  color: var(--accent);
  white-space: nowrap;
}

.case-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
}

.case-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.case-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem;
  background: var(--bg-section);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.case-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.case-metric-values {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.case-metric-values svg { stroke: var(--text-secondary); flex-shrink: 0; }

.case-metric-values .before {
  color: var(--text-secondary);
  font-weight: 400;
}

.case-metric-values .after {
  color: var(--accent);
  font-weight: 700;
}

.case-metric-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: right;
}

.case-duration {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.case-duration::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent2);
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .cases-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .cases-grid { grid-template-columns: 1fr; }
}

/* === FAQ === */
.faq-section { background: var(--bg); }
.faq-inner {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 5rem;
  align-items: start;
}
.faq-list { display: flex; flex-direction: column; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  transition: var(--transition);
}
.faq-question:hover { color: var(--accent); }
.faq-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  stroke: var(--accent);
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16,1,0.3,1);
}
.faq-answer.open { grid-template-rows: 1fr; }
.faq-answer > p {
  overflow: hidden;
  padding-bottom: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: none;
}
@media (max-width: 1024px) {
  .faq-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ============================================
   DARK MODE OVERRIDES — modal de contacto
   ============================================ */
[data-theme="dark"] .modal {
  background: var(--bg-section);
}
[data-theme="dark"] .modal-header h3,
[data-theme="dark"] .modal-header p,
[data-theme="dark"] .form-group label {
  color: var(--text-primary);
}
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
  background: var(--bg);
  color: var(--text-primary);
  border-color: var(--border);
}
[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
  color: var(--text-secondary);
}
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus,
[data-theme="dark"] .form-group select:focus {
  background: var(--bg);
  color: var(--text-primary);
  border-color: var(--accent);
}

/* ============================================
   DARK MODE OVERRIDES — secciones con fondo blanco
   ============================================ */

/* About numbers (nosotros) */
[data-theme="dark"] .about-num-item {
  background: var(--bg-section);
}
[data-theme="dark"] .about-numbers {
  border-color: var(--border);
}

/* Values section (nosotros) */
[data-theme="dark"] .values-section {
  background: var(--bg-section);
}
[data-theme="dark"] .value-card {
  background: var(--bg);
  color: var(--text-primary);
}
[data-theme="dark"] .value-card h4,
[data-theme="dark"] .value-card p {
  color: var(--text-primary);
}

/* Team cards (nosotros) */
[data-theme="dark"] .team-card {
  background: var(--bg-section);
}
[data-theme="dark"] .team-info h3 {
  color: var(--text-primary);
}
[data-theme="dark"] .team-info p {
  color: var(--text-secondary);
}

/* Testimonials section (home) */
[data-theme="dark"] .testimonials {
  background: var(--bg-section) !important;
}
[data-theme="dark"] .testimonial-card {
  background: var(--bg);
}
[data-theme="dark"] .testimonial-name {
  color: var(--text-primary);
}
[data-theme="dark"] .testimonial-text {
  color: var(--text-secondary);
}

/* CTA button text visible in dark mode */
[data-theme="dark"] .cta-inner .btn-primary {
  background: var(--white);
  color: #0D1B2E;
}
[data-theme="dark"] .cta-inner .btn-primary:hover {
  background: #c8d6e8;
  color: #0D1B2E;
}

/* === MP NUMBER — team member sub-label === */
.team-mp {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
  margin-top: 0.15rem;
}

/* ============================================
   MOBILE — Revisión completa
   ============================================ */

/* Hamburger blanco sobre hero oscuro (nav transparente) */
nav:not(.scrolled) .hamburger span {
  background: rgba(255, 255, 255, 0.9);
}

/* Punto activo del navbar — ocultar en menú mobile expandido */
nav.menu-open .nav-links a.active::before,
nav.menu-open .nav-links a.active::after {
  display: none;
}
nav.menu-open .nav-links a.active {
  color: var(--accent) !important;
}

/* === PAGE HERO — reducir padding en mobile === */
@media (max-width: 768px) {
  .page-hero {
    padding: 6.5rem 0 3rem;
  }
  .page-hero h1 {
    max-width: none;
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }
  .page-hero p {
    font-size: 0.95rem;
  }
}

/* === PAGE HERO STATS — 4 ítems en 2×2 en pantallas pequeñas === */
@media (max-width: 600px) {
  .page-hero-stats {
    flex-wrap: wrap;
    gap: 1.5rem 0;
    justify-content: space-between;
  }
  .page-hero-stat {
    flex: 0 0 48%;
    text-align: left;
  }
}

/* === CLIENTES — logos más chicos en mobile === */
@media (max-width: 480px) {
  .clients-logos {
    gap: 1.5rem;
    row-gap: 1.25rem;
  }
  .client-logo svg {
    height: 32px;
  }
  .client-logo img {
    height: 44px;
  }
}

/* === SERVICES ITEM — reducir padding interno === */
@media (max-width: 480px) {
  .service-item {
    padding: 1.75rem 1.5rem;
  }
}

/* === SERVICIOS PAGE — detalle, reducir padding vertical === */
@media (max-width: 768px) {
  .service-detail {
    padding: 3rem 0;
    gap: 2rem;
  }
}

/* === ABOUT NUMBERS (nosotros) — compactar en mobile === */
@media (max-width: 480px) {
  .about-num-item {
    padding: 1.25rem 1rem;
  }
  .about-num-item .num {
    font-size: 2.2rem;
  }
}

/* === TESTIMONIALS — mejorar spacing en mobile === */
@media (max-width: 480px) {
  .testimonial-card {
    padding: 1.5rem;
  }
}

/* === FAQ — section spacing === */
@media (max-width: 768px) {
  .faq-section .container > div {
    margin-bottom: 2.5rem !important;
  }
  .faq-question {
    font-size: 0.9rem;
    padding: 1.2rem 0;
  }
}

/* === MODAL — bottom sheet en mobile === */
@media (max-width: 520px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92dvh;
    overflow-y: auto;
    padding: 1.75rem 1.25rem 2rem;
  }
}

/* === FOOTER — legibilidad en mobile === */
@media (max-width: 480px) {
  .footer-brand p {
    max-width: none;
  }
  .footer-bottom {
    gap: 0.75rem;
  }
}

/* === HERO — pequeñas correcciones para pantallas muy pequeñas (≤360px) === */
@media (max-width: 360px) {
  .hero-stats {
    gap: 0;
  }
  .stat-num {
    font-size: 1.4rem;
  }
  .stat-label {
    font-size: 0.65rem;
  }
  .hero-tag {
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
  }
  .container {
    padding: 0 0.9rem;
  }
}

/* === CTA — ajuste de texto en mobile === */
@media (max-width: 480px) {
  .cta-inner h2 {
    font-size: 1.55rem;
  }
  .cta-inner p {
    font-size: 0.9rem;
  }
  .cta-inner .btn-lg {
    width: 100%;
    justify-content: center;
  }
}

/* === BACK-TO-TOP — ajustar posición junto al WA === */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 5.5rem;
    right: 1.25rem;
    width: 38px;
    height: 38px;
  }
  .whatsapp-btn {
    bottom: 1.5rem;
    right: 1.5rem;
  }
}

/* === TEAM ROLE MOBILE — dar más espacio al nombre === */
@media (max-width: 600px) {
  .team-info {
    padding: 1rem 1.25rem 1.25rem;
  }
  .team-info h3 {
    font-size: 1rem;
  }
  .team-role {
    font-size: 0.73rem;
  }
  .team-mp {
    font-size: 0.68rem;
  }
  .team-info p {
    font-size: 0.82rem;
  }
}

/* === SCROLL ANIM — imagen frames en mobile === */
@media (max-width: 768px) {
  .anim-img-wrapper {
    aspect-ratio: 4/3;
  }
  .anim-caption {
    margin-top: 0.75rem;
  }
}
