/* ===== DESIGN TOKENS ===== */
:root {
  --navy-900: #0a1628;
  --navy-800: #0f2140;
  --navy-700: #142d54;
  --navy-600: #1a3a6a;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --blue-300: #60a5fa;
  --blue-200: #93c5fd;
  --sky-400:  #38bdf8;
  --sky-300:  #7dd3fc;
  --gold-400: #e4c070;
  --gold-300: #f0d590;
  --green-wa: #25d366;

  --white:    #ffffff;
  --gray-50:  #f8fafc;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-800: #1e293b;

  --font-display: 'Outfit', sans-serif;
  --font-body:    'Outfit', sans-serif;

  --section-pad: clamp(3.5rem, 8vw, 6rem) 0;

  --glass-bg:     rgba(15, 33, 64, 0.55);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur:   blur(20px);
  --shadow-card:  0 8px 32px rgba(0, 0, 0, 0.25);
  --shadow-glow:  0 0 60px rgba(37, 99, 235, 0.15);

  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std:   cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:     0.2s var(--ease-std);
  --t-med:      0.4s var(--ease-std);
  --t-slow:     0.6s var(--ease-std);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; font-size: 16px; }
img   { max-width: 100%; height: auto; display: block; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }

body {
  font-family: var(--font-body);
  background: var(--navy-900);
  color: var(--gray-200);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(37,99,235,.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(56,189,248,.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--white);
}

h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.35rem); }
h4 { font-size: 1rem; }

.text-gradient {
  background: linear-gradient(135deg, var(--blue-300), var(--sky-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-400);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-label::before {
  content: '';
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-400), transparent);
  border-radius: 1px;
  flex-shrink: 0;
}

.section-label.centered { justify-content: center; }
.section-label.centered::before { display: none; }

.section-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--gray-400);
  max-width: 560px;
  margin-top: 0.6rem;
  font-weight: 400;
  line-height: 1.75;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

section { position: relative; z-index: 1; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--t-med);
}

.navbar.scrolled {
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.55rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.nav-logo-text { display: flex; flex-direction: column; line-height: 1; }

.nav-logo-text span:first-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
}

.nav-logo-sub {
  font-size: 0.62rem;
  opacity: 0.45;
  font-weight: 400;
  margin-top: 2px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-300);
  transition: color var(--t-fast);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--blue-400);
  transition: width var(--t-fast);
  border-radius: 1px;
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: linear-gradient(135deg, var(--green-wa), #20c05c) !important;
  color: var(--white) !important;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  font-weight: 600 !important;
  font-size: 0.82rem !important;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  box-shadow: 0 4px 15px rgba(37,211,102,.3);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,211,102,.45) !important;
  background: linear-gradient(135deg, #2bd96b, #1db954) !important;
}

.nav-cta:active {
  transform: scale(0.96) translateY(1px);
  box-shadow: 0 2px 10px rgba(37,211,102,.3) !important;
  transition-duration: 0.08s;
}
.nav-cta::after { display: none !important; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--t-fast);
}

/* ===== HERO ===== */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: clamp(5rem, 8vw, 6rem) 0 clamp(3rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 70%;
  height: 110%;
  background: radial-gradient(ellipse, rgba(37,99,235,.1) 0%, transparent 65%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content { animation: fadeInUp 0.7s var(--ease-out) both; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(37,99,235,.1);
  border: 1px solid rgba(37,99,235,.22);
  padding: 0.38rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-300);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: var(--green-wa);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 { margin-bottom: 0.85rem; }

.hero h1 .hero-sub-headline {
  display: block;
  background: linear-gradient(135deg, var(--blue-300), var(--sky-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: clamp(0.92rem, 1.6vw, 1.05rem);
  color: var(--gray-400);
  max-width: 460px;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2.25rem;
}

.stat-item { text-align: left; padding: 0 1.5rem 0 0; }
.stat-item:first-child { padding-left: 0; }

.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--glass-border);
  flex-shrink: 0;
  margin-right: 1.5rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInRight 0.7s var(--ease-out) 0.15s both;
}

.hero-image-wrapper {
  position: relative;
  width: 360px;
  height: 360px;
}

/* Efecto de perilla pseudo-3D (Estilo Caldera Blanca) */
.hero-image-wrapper.knob-effect {
  border-radius: 50%;
  /* Sombra exterior suave para darle volumen de plástico sobre chapa */
  box-shadow: 
    -10px -10px 20px rgba(255,255,255,0.05),
    10px 10px 20px rgba(0,0,0,0.5),
    inset -2px -2px 5px rgba(0,0,0,0.6),
    inset 2px 2px 5px rgba(255,255,255,0.2);
  background: #f1f5f9; /* Color gris muy claro / blanco plástico */
  padding: 22px; /* Espacio para que parezca el dial exterior */
  transform-style: preserve-3d;
  animation: turnKnob 1.2s cubic-bezier(0.3, 1.2, 0.4, 1) forwards 0.4s;
  transform: rotate(-90deg); 
  z-index: 2;
}

@keyframes turnKnob {
  0% { transform: rotate(-90deg); }
  75% { transform: rotate(5deg); } /* Pequeño rebote al encender */
  100% { transform: rotate(0deg); }
}

.knob-indicator {
  position: absolute;
  top: 6px; /* En el borde exterior de plástico */
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 18px;
  background: #94a3b8; /* Gris oscuro simulando la muesca pintada */
  border-radius: 4px;
  z-index: 5;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.5); /* Hendidura física */
}

.hero-image-wrapper img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  /* El logo actúa como el centro elevado de la perilla */
  border: 4px solid #e2e8f0; 
  box-shadow: 
    inset 0 0 15px rgba(0,0,0,0.4),
    0 4px 8px rgba(0,0,0,0.3); /* Separación del centro con la base */
  background: white;
}

/* Llama de fondo estilo hornalla de gas: realista, suave y contenida cerca del artefacto,
   para que nunca compita con el texto. Usa tonos celeste/azul (llama de gas real) con un
   filo ámbar apenas insinuado en la punta, y mix-blend-mode para que sea luz que se
   suma al fondo oscuro en vez de una mancha sólida encima del contenido. */
.hero-bg-flames {
  position: absolute;
  width: 100%;
  height: 58%;
  bottom: 0;
  left: 0;
  z-index: 0; /* Por detrás del contenedor principal */
  pointer-events: none;
  mix-blend-mode: screen;
  /* Se concentra cerca del visual (abajo a la derecha) y se apaga del todo hacia
     el texto y hacia arriba, así queda ambiente sin invadir la lectura */
  -webkit-mask-image: radial-gradient(ellipse 85% 95% at 78% 100%, black 0%, black 32%, transparent 70%);
  mask-image: radial-gradient(ellipse 85% 95% at 78% 100%, black 0%, black 32%, transparent 70%);
}

.hero-flame-glow {
  position: absolute;
  bottom: -8%;
  left: 50%;
  width: 65%;
  height: 90%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(56,189,248,.30) 0%, rgba(37,99,235,.15) 40%, transparent 72%);
  filter: blur(34px);
  opacity: 0;
  animation: flameGlowIn 1.6s var(--ease-out) forwards calc(1.3s);
}

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

.hero-flame {
  position: absolute;
  bottom: -16px; /* Esconde el corte inferior */
  width: 60px;
  height: var(--h); /* Altura dinámica desde HTML */
  margin-left: -30px;
  transform-origin: 50% 100%;
  /* Silueta más orgánica que un óvalo simétrico */
  border-radius: 46% 46% 38% 38% / 60% 60% 32% 32%;
  /* Llama de gas real: base celeste/azul, sin el naranja intenso de una fogata */
  background: radial-gradient(ellipse at 50% 100%, #eaf6ff 0%, #7dd3fc 22%, #2563eb 55%, rgba(37,99,235,0) 78%);
  filter: blur(10px);
  opacity: 0;
  /* Empiezan a encenderse después de que la perilla gira (1.2s delay base) */
  animation:
    flameIgnite 0.6s var(--ease-out) forwards calc(var(--delay) + 1.2s),
    flameFlicker calc(2.6s + var(--delay) * 1.3) ease-in-out infinite calc(var(--delay) + 1.8s);
}

/* Filo ámbar tenue en la punta, como el ligero destello amarillo que tienen las
   llamas de gas reales por trazas de impurezas — un detalle realista, no un efecto genérico */
.hero-flame::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 58%;
  width: 52%;
  height: 42%;
  transform: translateX(-50%);
  border-radius: 50% 50% 40% 40% / 60% 60% 35% 35%;
  background: radial-gradient(ellipse at 50% 100%, rgba(251,191,36,.5) 0%, rgba(249,115,22,.22) 45%, transparent 75%);
  filter: blur(5px);
}

@keyframes flameIgnite {
  0%   { opacity: 0;   transform: scaleY(0.25) scaleX(0.7); }
  100% { opacity: 0.5; transform: scaleY(1) scaleX(1); }
}

@keyframes flameFlicker {
  0%   { transform: scaleY(0.93) scaleX(0.96) skewX(-1.5deg); opacity: 0.38; }
  25%  { transform: scaleY(1.05) scaleX(1.02) skewX(1deg);    opacity: 0.46; }
  50%  { transform: scaleY(0.97) scaleX(1.04) skewX(-0.5deg); opacity: 0.42; }
  75%  { transform: scaleY(1.08) scaleX(0.97) skewX(1.5deg);  opacity: 0.5;  }
  100% { transform: scaleY(0.93) scaleX(0.96) skewX(-1.5deg); opacity: 0.38; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-flame, .hero-flame-glow { animation: none; opacity: 0.4; }
}

.hero-float-card {
  position: absolute;
  z-index: 10;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: floatCard 3.5s ease-in-out infinite;
  box-shadow: var(--shadow-card);
}

.hero-float-card.card-1 { top: 8%;   right: -8%; animation-delay: 0s;   }
.hero-float-card.card-2 { bottom: 12%; left: -5%; animation-delay: 1.8s; }

.card-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--white);
}

.card-icon.blue { background: rgba(37,99,235,.25); color: var(--blue-300); }
.card-icon.gold { background: rgba(228,192,112,.2); color: var(--gold-400); }

.card-text { font-size: 0.75rem; font-weight: 600; color: var(--white); white-space: nowrap; }
.card-sub  { font-size: 0.67rem; color: var(--gray-400); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.85rem;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  white-space: nowrap;
  line-height: 1;
}

.btn:active { transform: scale(0.98) translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-400));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(37,99,235,.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(37,99,235,.45);
}

.btn-whatsapp {
  background: linear-gradient(135deg, var(--green-wa), #20c05c);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(37,211,102,.35);
  position: relative;
  overflow: hidden;
}
.btn-whatsapp::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.btn-whatsapp:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 32px rgba(37,211,102,.55), 0 0 60px rgba(37,211,102,.2);
  background: linear-gradient(135deg, #2bd96b, #1db954);
}
.btn-whatsapp:hover::before {
  opacity: 1;
}
.btn-whatsapp:active {
  transform: scale(0.96) translateY(1px);
  box-shadow: 0 2px 12px rgba(37,211,102,.4);
  transition-duration: 0.08s;
}

.btn-outline {
  background: transparent;
  color: var(--gray-300);
  border: 1px solid var(--glass-border);
}
.btn-outline:hover {
  background: rgba(255,255,255,.08);
  color: var(--white);
  border-color: rgba(255,255,255,.2);
  transform: translateY(-2px);
}

.btn-lg { padding: 0.95rem 2.25rem; font-size: 1rem; }

/* ===== TRUST BAR ===== */
.trust-bar {
  padding: 2.25rem 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(15,33,64,.3);
}

.trust-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  opacity: 0.7;
  transition: opacity var(--t-fast);
}
.trust-item:hover { opacity: 1; }

.trust-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(37,99,235,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-300);
  flex-shrink: 0;
}

.trust-text { font-size: 0.82rem; font-weight: 600; color: var(--gray-300); }
.trust-sub  { font-size: 0.7rem;  color: var(--gray-500); }

/* ===== SERVICES ===== */
.services { padding: var(--section-pad); }

.services-header {
  margin-bottom: 3rem;
}

.services-header .section-subtitle { max-width: 520px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.service-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--t-med), border-color var(--t-fast), box-shadow var(--t-fast);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37,99,235,.28);
  box-shadow: var(--shadow-glow);
}

.service-card-image-wrapper { overflow: hidden; position: relative; flex-shrink: 0; }

.service-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.service-card:hover .service-card-image { transform: scale(1.04); }

.service-card-image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 55%;
  background: linear-gradient(to top, var(--navy-800), transparent);
  pointer-events: none;
}

.service-card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }

.service-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  margin-top: -2.25rem;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  color: var(--white);
  flex-shrink: 0;
}

.service-card-icon.blue   { background: linear-gradient(135deg, var(--blue-500), var(--blue-400)); }
.service-card-icon.orange { background: linear-gradient(135deg, #f97316, #fb923c); }
.service-card-icon.cyan   { background: linear-gradient(135deg, #06b6d4, var(--sky-400)); }

.service-card h3 { margin-bottom: 0.45rem; }
.service-card p { color: var(--gray-400); font-size: 0.88rem; line-height: 1.75; flex: 1; }

.service-tag {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-full);
  background: rgba(37,99,235,.1);
  color: var(--blue-300);
  border: 1px solid rgba(37,99,235,.18);
}

.service-tag.popular {
  background: rgba(228,192,112,.1);
  color: var(--gold-400);
  border-color: rgba(228,192,112,.18);
}

/* ===== ABOUT ===== */
/* ===== ABOUT ===== */
.about {
  position: relative;
  padding: var(--section-pad);
  /* Altura mínima suficiente para contener el character completo */
  min-height: 600px;
  /* Eliminado overflow: hidden para que el character pueda encimar la sección superior */
}

/* Contenedor estricto para los fondos de la sección */
.about-bg-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* ---- Ciudad de fondo (animación independiente: fade desde arriba) ---- */
.about-city-bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/red_ciudad_fondo.jpg');
  background-size: cover;
  background-position: center 30%;
  /* Bordes difuminados */
  -webkit-mask-image: radial-gradient(ellipse 85% 80% at 65% 55%, black 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 85% 80% at 65% 55%, black 20%, transparent 100%);
  opacity: 0;
  z-index: 0;
  /* Animación propia: slide desde arriba */
  transform: translateY(-30px) scale(1.04);
  transition: opacity 1s var(--ease-out) 0s,
              transform 1.1s var(--ease-out) 0s;
}

.about-city-bg.city-revealed {
  opacity: 0.28;
  transform: translateY(0) scale(1);
}

/* Overlay adicional para oscurecer */
.about-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--navy-900) 28%, transparent 68%),
    linear-gradient(to top, var(--navy-900) 0%, transparent 40%),
    linear-gradient(to bottom, var(--navy-900) 0%, transparent 28%);
  z-index: 1;
  pointer-events: none;
}

/* ---- Character flotante (animación atada al scroll en JS) ---- */
.about-character {
  position: absolute;
  /* Lo posicionamos anclado abajo, el JS controlará su Y */
  bottom: -8%;
  right: -2%;
  height: 115%;
  width: auto;
  z-index: 10; /* Z-index alto para encimar sobre la sección de arriba */
  pointer-events: none;
  /* Fade base extendido */
  -webkit-mask-image: linear-gradient(to top, transparent 0%, transparent 5%, black 35%, black 90%, transparent 100%);
  mask-image: linear-gradient(to top, transparent 0%, transparent 5%, black 35%, black 90%, transparent 100%);
  opacity: 0;
  /* La transición solo afecta la opacidad ahora, transform lo maneja el JS fluidamente */
  transition: opacity 0.8s var(--ease-out) 0.2s;
  /* Estado inicial antes del JS */
  transform: translateY(100px); 
}

.about-character.char-revealed {
  opacity: 1;
}

.about-character img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
  object-position: bottom center;
  /* Difuminar lado izquierdo para fusionar con fondo */
  -webkit-mask-image: linear-gradient(to left, black 55%, transparent 100%);
  mask-image: linear-gradient(to left, black 55%, transparent 100%);
}

/* ---- Badge de experiencia ---- */
.about-experience-badge {
  position: absolute;
  bottom: 8%;
  right: 45%; /* Posicionado a la izquierda del character */
  z-index: 3;
  background: linear-gradient(135deg, #FFC107, #D48806); /* Mostaza/Dorado */
  border: 2px solid #FFE066; /* Borde brillante para dar volumen */
  border-radius: var(--radius-md);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 15px 35px rgba(212, 136, 6, 0.4), 
              0 0 15px rgba(255, 193, 7, 0.3) inset; /* Sombra resplandeciente */
}

.exp-number {
  font-family: var(--font-display);
  font-size: 2.8rem; /* Más grande y exagerado */
  font-weight: 900;
  color: var(--navy-900); /* Contraste fuerte oscuro */
  line-height: 1;
}

.exp-text { 
  font-size: 0.9rem; 
  font-weight: 800; 
  color: var(--navy-900); 
  line-height: 1.25; 
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Animación del badge */
.reveal-badge {
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  transition: opacity 0.7s var(--ease-out) 0.65s,
              transform 0.7s var(--ease-out) 0.65s;
}

.reveal-badge.char-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ---- Contenedor de texto ---- */
.about .container {
  position: relative;
  z-index: 3;
  display: grid;
  /* Texto ocupa ~55%, columna derecha vacía donde va el character */
  grid-template-columns: 55% 45%;
  gap: 2rem;
  align-items: center;
  min-height: inherit;
}

/* Glassmorphism sutil detrás del texto */
.about-content {
  position: relative;
}

.about-content::before {
  content: '';
  position: absolute;
  inset: -2.5rem -2rem;
  background: radial-gradient(ellipse at 30% 50%, rgba(8,15,38,0.80) 0%, transparent 72%);
  border-radius: var(--radius-xl);
  z-index: -1;
  pointer-events: none;
}

.about-content h2 { margin-bottom: 1.1rem; }

.about-text { color: var(--gray-400); margin-bottom: 1.35rem; line-height: 1.8; font-size: 0.95rem; }

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  background: rgba(37,99,235,.06);
  border: 1px solid rgba(37,99,235,.1);
  border-radius: var(--radius-sm);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.about-feature:hover {
  background: rgba(37,99,235,.11);
  border-color: rgba(37,99,235,.2);
}

.feature-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-300);
  flex-shrink: 0;
}

.about-feature span:last-child { font-size: 0.82rem; font-weight: 500; color: var(--gray-300); }



/* ===== STATS STRIP ===== */
.stats-strip {
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(15,33,64,.2);
}

.stats-strip-grid {
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-strip-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 3rem;
  flex: 1;
  justify-content: center;
}

.stat-strip-divider {
  width: 1px;
  height: 48px;
  background: var(--glass-border);
  flex-shrink: 0;
}

.stat-strip-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(37,99,235,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-300);
  flex-shrink: 0;
}

.stat-strip-title { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; color: var(--white); margin-bottom: 0.15rem; }
.stat-strip-sub   { font-size: 0.75rem; color: var(--gray-500); }

/* ===== COVERAGE ===== */
.coverage {
  padding: var(--section-pad);
  background: linear-gradient(180deg, transparent, rgba(15,33,64,.35), transparent);
}

.coverage-header { margin-bottom: 2.5rem; }
.coverage-header .section-subtitle { max-width: 500px; }

.coverage-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.75rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
}

.coverage-zone {
  padding: 1.75rem 1.5rem;
  border-right: 1px solid var(--glass-border);
  transition: background var(--t-fast);
}
.coverage-zone:last-child { border-right: none; }
.coverage-zone:hover { background: rgba(37,99,235,.05); }

.zone-name   { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 0.25rem; }
.zone-detail { font-size: 0.78rem; color: var(--gray-500); }

.coverage-note {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(37,211,102,.07);
  border: 1px solid rgba(37,211,102,.14);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--green-wa);
  font-weight: 500;
}

.coverage-note svg { flex-shrink: 0; }

/* ===== FAQ ===== */
.faq { padding: var(--section-pad); }

.faq-header { margin-bottom: 2.75rem; }
.faq-header .section-subtitle { max-width: 500px; }

.faq-grid {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.faq-item:hover { border-color: rgba(37,99,235,.2); }
.faq-item.active { border-color: rgba(37,99,235,.3); box-shadow: var(--shadow-glow); }

.faq-question {
  padding: 1.1rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background var(--t-fast);
}
.faq-question:hover { background: rgba(255,255,255,.02); }

.faq-question h4 {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.q-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(37,99,235,.13);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-400);
  flex-shrink: 0;
}

.faq-toggle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
  flex-shrink: 0;
  color: var(--gray-400);
}
.faq-item.active .faq-toggle { background: var(--blue-500); color: var(--white); transform: rotate(180deg); }

.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }

.faq-answer-inner {
  padding: 0 1.35rem 1.35rem;
  padding-left: 4.1rem;
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ===== CTA ===== */
.cta-section { padding: var(--section-pad); }

.cta-card {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  border: 1px solid rgba(37,99,235,.18);
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 140%; height: 100%;
  background: radial-gradient(ellipse, rgba(37,99,235,.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-card h2 { margin-bottom: 0.7rem; position: relative; }

.cta-description {
  color: var(--gray-400);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  position: relative;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
}

.cta-info {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2.25rem;
  position: relative;
  flex-wrap: wrap;
}

.cta-info-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--gray-400);
}

.info-icon { color: var(--blue-300); flex-shrink: 0; }

/* ===== FOOTER ===== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--glass-border);
  text-align: center;
}

.footer .container { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }

.footer-logo { display: flex; align-items: center; gap: 0.55rem; }
.footer-logo img { width: 34px; height: 34px; border-radius: var(--radius-full); }
.footer-logo span { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; color: var(--white); }

.footer p { font-size: 0.78rem; color: var(--gray-500); }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--green-wa);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.5);
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  animation: bounceIn 0.8s var(--ease-out) 1s both;
}

.whatsapp-float::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(37,211,102,.35);
  z-index: -1;
  animation: waPulse 2s ease-in-out infinite;
}

@keyframes waPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.35); opacity: 0; }
}

.whatsapp-float:hover {
  transform: scale(1.15);
  box-shadow: 0 10px 40px rgba(37,211,102,.65), 0 0 60px rgba(37,211,102,.25);
  background: #2bd96b;
}

.whatsapp-float:hover::after {
  animation: none;
  opacity: 0;
}

.whatsapp-float:active {
  transform: scale(0.9);
  box-shadow: 0 3px 14px rgba(37,211,102,.5);
  transition-duration: 0.08s;
}

.whatsapp-float svg { width: 28px; height: 28px; fill: white; }

.whatsapp-float .tooltip {
  position: absolute;
  right: 68px;
  background: var(--white);
  color: var(--gray-800);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.whatsapp-float .tooltip::after {
  content: '';
  position: absolute;
  right: -6px; top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--white);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.whatsapp-float:hover .tooltip { opacity: 1; }

/* ===== TESTIMONIALS (reserve) ===== */
.testimonials { padding: var(--section-pad); }

.testimonials-header { margin-bottom: 3rem; }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
}

.testimonial-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform var(--t-med), border-color var(--t-fast), box-shadow var(--t-fast);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37,99,235,.28);
  box-shadow: var(--shadow-glow);
}

.testimonial-stars { color: var(--gold-400); font-size: 1rem; letter-spacing: 2px; }

.testimonial-card blockquote {
  margin: 0;
  flex-grow: 1;
  color: var(--gray-300);
  font-size: 0.92rem;
  line-height: 1.75;
}

.testimonial-card figcaption {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue-500), var(--sky-400));
}

.testimonial-name { font-weight: 600; color: var(--white); font-size: 0.87rem; }
.testimonial-role { font-size: 0.75rem; color: var(--gray-500); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.35); }
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-9px); }
}

@keyframes bounceIn {
  0%   { opacity: 0; transform: scale(0.4); }
  60%  { transform: scale(1.06); }
  80%  { transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
  .hero-description { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-image-wrapper { width: 270px; height: 270px; }
  .hero-float-card.card-1 { right: 5%; }
  .hero-float-card.card-2 { left: 5%;  }

  /* En este layout apilado (visual arriba, texto abajo) el fuego se centra y se
     achica pegado al borde inferior, para que jamás quede detrás del texto */
  .hero-bg-flames {
    height: 30%;
    -webkit-mask-image: linear-gradient(to top, black 0%, transparent 78%);
    mask-image: linear-gradient(to top, black 0%, transparent 78%);
  }
  .hero-flame-glow { left: 50%; width: 80%; }

  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-featured { grid-column: span 2; }

  .about { min-height: 520px; }
  .about .container { grid-template-columns: 1fr; gap: 0; }
  .about-character { height: 90%; max-height: 480px; right: -3%; }
  .about-character.char-revealed { opacity: 0.55; }
  .about-experience-badge { bottom: 2%; right: 2%; }

  .stats-strip-grid { flex-wrap: wrap; gap: 1.5rem; }
  .stat-strip-divider { display: none; }
  .stat-strip-item { padding: 0 1.5rem; flex: 0 1 auto; }

  .coverage-track { grid-template-columns: repeat(2, 1fr); }
  .coverage-zone:nth-child(2) { border-right: none; }
  .coverage-zone:nth-child(3) { border-top: 1px solid var(--glass-border); }
  .coverage-zone:nth-child(4) { border-top: 1px solid var(--glass-border); border-right: none; }

  .testimonials-grid { grid-template-columns: 1fr; max-width: 480px; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 70%; max-width: 280px;
    height: 100vh;
    background: var(--navy-800);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.35rem;
    transition: right var(--t-med);
    z-index: 999;
    border-left: 1px solid var(--glass-border);
  }
  .nav-links.active { right: 0; }
  .mobile-toggle { display: block; }
  .mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .mobile-toggle.active span:nth-child(2) { opacity: 0; }
  .mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .services-grid { grid-template-columns: 1fr; }
  .service-featured { grid-column: span 1; }

  .hero-image-wrapper { width: 210px; height: 210px; }
  .hero-float-card { display: none; }
  .hero-stats { gap: 0; }
  .stat-item { padding: 0 1rem 0 0; }
  .stat-number { font-size: 1.5rem; }

  .about-features { grid-template-columns: 1fr; }
  .about { min-height: 0; }
  .about-character { display: none; }
  .about-experience-badge { position: relative; bottom: auto; right: auto; margin-top: 1rem; display: inline-flex; box-shadow: none; border: 1px solid rgba(37,99,235,.2); }
  .about-city-bg {
    -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 60%, black 20%, transparent 100%);
    mask-image: radial-gradient(ellipse 100% 70% at 50% 60%, black 20%, transparent 100%);
  }

  .coverage-track { grid-template-columns: 1fr; }
  .coverage-zone { border-right: none !important; border-top: none; }
  .coverage-zone + .coverage-zone { border-top: 1px solid var(--glass-border) !important; }

  .faq-grid { max-width: 100%; }

  .cta-info { flex-direction: column; gap: 0.85rem; align-items: center; }

  .trust-bar .container { gap: 1.25rem; }

  .hero-actions { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; max-width: 320px; justify-content: center; }
}

@media (max-width: 480px) {
  .hero-badge { font-size: 0.72rem; }
  .hero-stats { flex-wrap: wrap; gap: 0.75rem; }
  .stat-divider { display: none; }
  .cta-actions { flex-direction: column; align-items: center; }
}

/* ===== ACCESSIBILITY ===== */
:focus-visible {
  outline: 2px solid var(--blue-300);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
