/* =========================================================
   DELEGA — Landing page (v2 · premium / dark experience)
   Neurociencia del color:
   - Fondo verde-negro profundo  -> foco, sofisticación, hace brillar los acentos
   - Verde esmeralda/mint         -> confianza, crecimiento, dinero, WhatsApp ("adelante")
   - Dorado suave (acento)        -> valor, premium, atrae la mirada a lo importante
   ========================================================= */

:root {
  /* Base oscura */
  --bg-0: #04140d;          /* fondo más profundo */
  --bg-1: #071c13;          /* fondo secciones */
  --bg-2: #0a2419;          /* superficies */
  --panel: rgba(255, 255, 255, 0.04);
  --panel-brd: rgba(255, 255, 255, 0.09);

  /* Verdes de marca */
  --verde-oscuro: #0b3d2e;
  --verde-acento: #16a34a;
  --mint: #34d399;
  --mint-claro: #6ee7b7;
  --verde-whatsapp: #25d366;
  --verde-whatsapp-hover: #1ebe57;

  /* Acento premium */
  --oro: #f4c752;
  --oro-2: #e8b23a;

  /* Texto */
  --blanco: #ffffff;
  --texto: #eaf3ee;
  --texto-tenue: #a9c3b6;
  --texto-mute: #6f8a7e;

  --radius: 18px;
  --radius-lg: 26px;
  --sombra: 0 18px 50px rgba(0, 0, 0, 0.45);
  --sombra-mint: 0 14px 40px rgba(37, 211, 102, 0.28);

  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* ====== Aurora / luces de fondo globales ====== */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}
.aurora span:nth-child(1) {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #1f8f5f, transparent 60%);
  top: -140px; left: -120px;
  animation: float1 18s ease-in-out infinite;
}
.aurora span:nth-child(2) {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #14b8a6, transparent 60%);
  top: 30%; right: -160px;
  animation: float2 22s ease-in-out infinite;
}
.aurora span:nth-child(3) {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(244, 199, 82, 0.5), transparent 60%);
  bottom: -160px; left: 30%;
  opacity: 0.28;
  animation: float3 26s ease-in-out infinite;
}
@keyframes float1 { 50% { transform: translate(60px, 40px); } }
@keyframes float2 { 50% { transform: translate(-50px, -30px); } }
@keyframes float3 { 50% { transform: translate(30px, -50px); } }

/* Grano/textura sutil sobre todo */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ====== Títulos ====== */
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  color: var(--blanco);
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 14px;
}
.section-eyebrow {
  display: block;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mint);
  margin-bottom: 12px;
}
.gradient-text {
  background: linear-gradient(100deg, var(--mint-claro), var(--mint) 45%, var(--oro));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ====== Botones ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn--whatsapp {
  background: linear-gradient(135deg, var(--verde-whatsapp), #12a150);
  color: var(--blanco);
  box-shadow: var(--sombra-mint);
  position: relative;
}
.btn--whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(37, 211, 102, 0.45);
}
.btn--large { padding: 18px 38px; font-size: 1.12rem; }
.btn--large.btn--whatsapp { animation: pulseGlow 2.8s ease-in-out infinite; }
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 14px 40px rgba(37, 211, 102, 0.28); }
  50%      { box-shadow: 0 14px 52px rgba(37, 211, 102, 0.6); }
}
.btn--nav { padding: 10px 20px; font-size: 0.9rem; }
.icon-wa { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

/* ====== Header ====== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(4, 20, 13, 0.55);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.header.is-scrolled {
  background: rgba(4, 20, 13, 0.85);
  border-bottom: 1px solid var(--panel-brd);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.header__logo {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--blanco);
  letter-spacing: -0.5px;
}
.header__logo::after {
  content: "J";
  color: var(--mint);
}
.header__nav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-weight: 600;
  color: var(--texto-tenue);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--blanco); }
.header__toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px; height: 20px;
  background: transparent; border: none; cursor: pointer; padding: 0;
}
.header__toggle span {
  display: block; width: 100%; height: 3px;
  background: var(--blanco); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ====== HERO ====== */
.hero { padding: 150px 0 90px; position: relative; }
.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero__copy { text-align: left; }
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-brd);
  color: var(--texto-tenue);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  margin-bottom: 24px;
}
.hero__badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: 0.35; } }
.hero__title {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  font-weight: 900;
  color: var(--blanco);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 22px;
}
.hero__subtitle {
  max-width: 520px;
  margin-bottom: 12px;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  color: var(--texto-tenue);
}
.hero__niches {
  max-width: 480px;
  margin-bottom: 30px;
  font-size: 0.85rem;
  color: var(--texto-mute);
}
.hero__cta-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.hero__microcopy {
  font-size: 0.85rem;
  color: var(--texto-mute);
}
/* Reversión de riesgo, debajo y centrada respecto al botón del CTA */
.hero__risk-note {
  max-width: 320px;
  margin: 12px auto 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--texto-mute);
}
/* Color sólido de marca para la palabra clave del titular (sin degradado) */
.hero__highlight-solid {
  color: var(--verde-whatsapp);
}
/* Utilidad para ocultar secciones sin borrarlas del código */
.is-hidden {
  display: none;
}

/* Stats bajo el hero */
.hero__stats {
  display: flex;
  gap: 36px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.stat__num {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--blanco);
}
.stat__num span { color: var(--mint); }
.stat__label {
  font-size: 0.82rem;
  color: var(--texto-mute);
}

/* ====== Maqueta de chat WhatsApp (visual del hero) ====== */
.phone {
  justify-self: center;
  width: 300px;
  max-width: 100%;
  border-radius: 34px;
  padding: 12px;
  background: linear-gradient(160deg, #0c2a1e, #061810);
  border: 1px solid var(--panel-brd);
  box-shadow: var(--sombra), 0 0 0 1px rgba(52,211,153,0.06) inset;
  position: relative;
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 50% { transform: translateY(-14px); } }
.phone::before {
  content: "";
  position: absolute;
  top: 22px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 6px; border-radius: 999px;
  background: rgba(255,255,255,0.14);
}
.phone__screen {
  background: #0b1f18;
  border-radius: 24px;
  overflow: hidden;
  margin-top: 26px;
}
.phone__top {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #075e4a, #0a7a5c);
}
.phone__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--verde-acento));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #05130d; font-size: 0.95rem;
}
.phone__name { font-weight: 700; color: #fff; font-size: 0.92rem; line-height: 1.1; }
.phone__status { font-size: 0.72rem; color: rgba(255,255,255,0.7); }
.phone__body {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 320px;
  background:
    linear-gradient(rgba(6,24,16,0.92), rgba(6,24,16,0.92));
}
.bubble {
  max-width: 82%;
  padding: 9px 13px;
  font-size: 0.85rem;
  line-height: 1.4;
  border-radius: 14px;
  opacity: 0;
  transform: translateY(8px);
  animation: bubbleIn 0.5s ease forwards;
}
.bubble--in {
  align-self: flex-start;
  background: #12352a;
  color: var(--texto);
  border-bottom-left-radius: 4px;
}
.bubble--out {
  align-self: flex-end;
  background: linear-gradient(135deg, #1f9d63, #12a150);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble time {
  display: block;
  font-size: 0.62rem;
  opacity: 0.7;
  text-align: right;
  margin-top: 3px;
}
.bubble:nth-child(1) { animation-delay: 0.3s; }
.bubble:nth-child(2) { animation-delay: 1.1s; }
.bubble:nth-child(3) { animation-delay: 1.9s; }
.bubble:nth-child(4) { animation-delay: 2.7s; }
@keyframes bubbleIn { to { opacity: 1; transform: translateY(0); } }

/* ====== Secciones genéricas ====== */
section { position: relative; z-index: 2; }

/* Feature cards */
.features { padding: 30px 0 90px; }
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--panel);
  border: 1px solid var(--panel-brd);
  border-radius: var(--radius);
  padding: 30px 26px;
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(52,211,153,0.14), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow: var(--sombra);
}
.feature-card__icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(52,211,153,0.2), rgba(37,211,102,0.08));
  border: 1px solid rgba(52,211,153,0.25);
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.08rem; color: var(--blanco); margin-bottom: 8px; }
.feature-card p { font-size: 0.92rem; color: var(--texto-tenue); }

/* ====== Quiénes somos ====== */
.about { padding: 90px 0; }
.about__inner { max-width: 860px; margin: 0 auto; text-align: center; }
.about__text {
  font-size: 1.14rem;
  color: var(--texto-tenue);
  margin: 8px auto 46px;
  max-width: 720px;
}
.about__text strong { color: var(--blanco); }
.about__subtitle {
  font-size: 1.1rem; color: var(--blanco);
  margin-bottom: 24px; font-weight: 700;
}
.rubros { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.rubro-tag {
  background: var(--panel);
  border: 1px solid var(--panel-brd);
  color: var(--texto);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: 999px;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.rubro-tag:hover {
  transform: translateY(-3px);
  border-color: rgba(52,211,153,0.5);
  color: var(--mint-claro);
}

/* ====== Reseñas ====== */
.testimonials { padding: 90px 0; }
.testimonials__note {
  text-align: center; color: var(--texto-mute);
  font-style: italic; margin-bottom: 46px; font-size: 0.92rem;
}
.testimonials__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.testimonial-card {
  background: var(--panel);
  border: 1px solid var(--panel-brd);
  border-radius: var(--radius);
  padding: 34px 26px;
  text-align: center;
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.testimonial-card:hover { transform: translateY(-5px); border-color: rgba(52,211,153,0.35); }
.testimonial-card__avatar {
  width: 66px; height: 66px; border-radius: 50%;
  margin: 0 auto 18px; object-fit: cover;
  background: var(--bg-2);
  border: 2px solid rgba(52,211,153,0.4);
}
.testimonial-card__stars { color: var(--oro); margin-bottom: 12px; letter-spacing: 2px; }
.testimonial-card__quote {
  font-size: 0.96rem; color: var(--texto); font-style: italic; margin-bottom: 18px;
}
.testimonial-card__name { font-weight: 700; color: var(--blanco); font-size: 0.95rem; }
.testimonial-card__role { font-size: 0.82rem; color: var(--texto-mute); }

/* ====== Contacto ====== */
.contact { padding: 100px 0; }
.contact__inner {
  max-width: 720px; margin: 0 auto; text-align: center;
  background: linear-gradient(160deg, rgba(11,61,46,0.7), rgba(6,24,16,0.7));
  border: 1px solid var(--panel-brd);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  box-shadow: var(--sombra);
  position: relative;
  overflow: hidden;
}
.contact__inner::before {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(52,211,153,0.25), transparent 65%);
  top: -120px; right: -80px;
  filter: blur(30px);
}
.contact__text {
  color: var(--texto-tenue);
  font-size: 1.1rem;
  margin: 10px auto 34px;
  max-width: 520px;
}
.contact__email { margin-top: 22px; color: var(--texto-mute); font-size: 0.95rem; }
.contact__email a { color: var(--mint-claro); font-weight: 700; border-bottom: 1px solid rgba(110,231,183,0.4); }
.contact__guarantee {
  margin-top: 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--blanco);
  background: rgba(244, 199, 82, 0.1);
  border: 1px solid rgba(244, 199, 82, 0.35);
  border-radius: var(--radius);
  padding: 16px 24px;
}
.contact__guarantee::before { content: "🛡️"; }

/* ====== Footer ====== */
.footer {
  background: var(--bg-0);
  color: var(--texto-mute);
  text-align: center;
  padding: 30px 0;
  font-size: 0.85rem;
  border-top: 1px solid var(--panel-brd);
  position: relative; z-index: 2;
}
.footer p + p { margin-top: 4px; }

/* ====== Scroll reveal ====== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ====== Responsive ====== */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__copy { text-align: center; }
  .hero__subtitle { margin-left: auto; margin-right: auto; }
  .hero__niches { margin-left: auto; margin-right: auto; }
  .hero__cta-row, .hero__stats { justify-content: center; }
  .phone { order: -1; }
  .features__grid, .testimonials__grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .header__toggle { display: flex; }
  .header__nav {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(4, 20, 13, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--panel-brd);
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .header__nav.is-open { max-height: 420px; }
  .header__nav .nav-link, .header__nav .btn {
    padding: 18px 24px;
    border-bottom: 1px solid var(--panel-brd);
    border-radius: 0; width: 100%;
  }
  .header__nav .btn--nav { justify-content: flex-start; }
  .hero { padding: 120px 0 60px; }
  .hero__stats { gap: 24px; }
}

@media (max-width: 480px) {
  .btn--large { width: 100%; padding: 16px 22px; }
  .hero__cta-row { flex-direction: column; align-items: stretch; }
  .contact__inner { padding: 44px 24px; }
}

/* Respeta a quien prefiere menos movimiento */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
