/* ============================================================
   DataWay — Sistema de diseño compartido
   Se carga en: Home (/), Landing (soft.), DataGym (/datagym/)
   ------------------------------------------------------------
   Base común: fondo oscuro · tipografía Outfit · primario azul
   Cada producto define su --accent propio más abajo con la
   clase que pone en <body>:
     <body class="dw dw--home>       azul puro
     <body class="dw dw--comercio>   azul + ámbar
     <body class="dw dw--gym>        azul + lima
     <body class="dw dw--tienda>     azul + verde
   ============================================================ */

/* ---- 1. Tokens base (comunes a todo) -------------------- */
.dw,
:root {
  /* superficies */
  --dw-bg:          #0d0f14;
  --dw-bg-section:  #111318;
  --dw-bg-alt:      #161922;
  --dw-card:        #1a1d26;
  --dw-card-border: rgba(255,255,255,0.06);
  --dw-line:        rgba(255,255,255,0.09);

  /* texto */
  --dw-text:        #e8eaf0;
  --dw-text-soft:   #b6bdd0;
  --dw-text-muted:  #8b92a8;

  /* primario (igual en todas) */
  --dw-primary:      #4f8ef7;
  --dw-primary-dark: #3a7ae0;
  --dw-primary-glow: rgba(79,142,247,0.35);

  /* acento — lo pisa cada producto; por defecto = primario */
  --dw-accent:      var(--dw-primary);
  --dw-accent-ink:  #ffffff;
  --dw-accent-glow: var(--dw-primary-glow);

  /* estados */
  --dw-success: #1f9d5c;
  --dw-warn:    #f5a623;
  --dw-danger:  #ff5252;

  /* forma */
  --dw-radius:   14px;
  --dw-radius-sm: 8px;
  --dw-shadow:   0 1px 2px rgba(0,0,0,.3), 0 12px 32px -10px rgba(0,0,0,.55);
  --dw-shadow-hover: 0 20px 45px rgba(0,0,0,.5), 0 0 32px var(--dw-accent-glow);

  /* tipografía */
  --dw-font:      'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --dw-font-head: 'Outfit', system-ui, sans-serif;
}

/* ---- 2. Acento por producto ---------------------------- */
.dw--home    { --dw-accent: var(--dw-primary); --dw-accent-ink:#fff; --dw-accent-glow: var(--dw-primary-glow); }
.dw--comercio{ --dw-accent:#f59e0b; --dw-accent-ink:#1a1205; --dw-accent-glow: rgba(245,158,11,.32); }
.dw--gym     { --dw-accent:#b6ff2e; --dw-accent-ink:#1a2107; --dw-accent-glow: rgba(182,255,46,.30); }
.dw--tienda  { --dw-accent:#10b981; --dw-accent-ink:#04231a; --dw-accent-glow: rgba(16,185,129,.30); }

/* ---- 3. Base de página -------------------------------- */
body.dw {
  margin: 0;
  background: var(--dw-bg);
  color: var(--dw-text);
  font-family: var(--dw-font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.6;
}
.dw h1, .dw h2, .dw h3, .dw h4 {
  font-family: var(--dw-font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--dw-text);
  margin: 0;
}
.dw a { color: inherit; }
.dw img { max-width: 100%; }

/* ---- 4. Botones -------------------------------------- */
.dw .dw-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--dw-font); font-weight: 600; font-size: .95rem;
  padding: .85rem 1.7rem; border-radius: var(--dw-radius-sm);
  border: none; cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: transform .12s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
.dw .dw-btn:active { transform: translateY(1px); }

/* primario: siempre azul, en todas las páginas */
.dw .dw-btn--primary { background: var(--dw-primary); color: #fff; }
.dw .dw-btn--primary:hover { background: var(--dw-primary-dark); box-shadow: 0 0 22px var(--dw-primary-glow); color:#fff; }

/* acento: el color propio del producto */
.dw .dw-btn--accent { background: var(--dw-accent); color: var(--dw-accent-ink); }
.dw .dw-btn--accent:hover { box-shadow: 0 0 22px var(--dw-accent-glow); opacity: .92; }

/* fantasma */
.dw .dw-btn--ghost { background: transparent; color: var(--dw-text); border: 1.5px solid var(--dw-line); }
.dw .dw-btn--ghost:hover { border-color: var(--dw-primary); color: var(--dw-primary); }

.dw .dw-btn:focus-visible { outline: 2px solid var(--dw-accent); outline-offset: 3px; }

/* ---- 5. Tarjeta genérica ---------------------------- */
.dw .dw-card {
  background: var(--dw-card);
  border: 1px solid var(--dw-card-border);
  border-radius: var(--dw-radius);
  padding: 32px 26px;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
  position: relative;
  overflow: hidden;
}
.dw .dw-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--dw-accent), transparent);
  opacity: 0; transition: opacity .35s ease;
}
.dw .dw-card:hover { transform: translateY(-8px); border-color: color-mix(in srgb, var(--dw-accent) 35%, transparent); box-shadow: var(--dw-shadow-hover); }
.dw .dw-card:hover::before { opacity: 1; }

/* ---- 6. Eyebrow / tag ------------------------------ */
.dw .dw-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dw-accent);
}
.dw .dw-eyebrow::before {
  content: ''; width: .4rem; height: .4rem; border-radius: 1px;
  background: var(--dw-accent); display: inline-block;
}

/* ---- 7. Secciones --------------------------------- */
.dw .dw-section        { padding: 90px 0; background: var(--dw-bg-section); }
.dw .dw-section--alt   { background: var(--dw-bg-alt); }
.dw .dw-section--plain { background: var(--dw-bg); }
.dw .dw-section-title {
  text-align: center; margin-bottom: 55px;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); position: relative;
}
.dw .dw-section-title::after {
  content: ''; display: block; width: 50px; height: 2px;
  background: linear-gradient(90deg, var(--dw-accent), transparent);
  margin: 14px auto 0; border-radius: 2px;
}

/* ---- 8. Utilidades -------------------------------- */
.dw .dw-wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.dw .dw-muted { color: var(--dw-text-muted); }

/* ---- 9. Botón WhatsApp flotante (lo usa footer.php) ---- */
.btnWhatsapp {
  width: 52px; height: 52px;
  position: fixed;
  bottom: 22px; right: 22px;
  background-color: #25d366;
  color: #fff !important;
  font-size: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform .25s ease, box-shadow .25s ease;
  z-index: 9000;
  text-decoration: none;
}
.btnWhatsapp:hover {
  transform: scale(1.1);
  color: #fff !important;
  box-shadow: 0 6px 28px rgba(37,211,102,0.6);
}

/* ---- 10. Scroll reveal (opcional, si la página lo usa) ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 767px) {
  .dw .dw-section { padding: 55px 0; }
  .dw .dw-section-title { margin-bottom: 36px; }
  .dw .dw-card { padding: 24px 20px; }
  .btnWhatsapp { width: 46px; height: 46px; font-size: 23px; bottom: 15px; right: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .dw *, .dw *::before, .dw *::after { transition: none !important; animation: none !important; }
}
