/* ============================================================================
   DEVELOOP STUDIO · utilities.css
   Helpers reutilizables: layout, secciones, texto, badges, reveal de scroll.
   ============================================================================ */

/* -------- Contenedor -------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 820px; }

/* -------- Secciones -------- */
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.25rem, 1.5rem + 2.5vw, 3.5rem); }
.section--alt { background: var(--bg-2); }

/* -------- Secciones CLARAS (alternancia estilo intelligenta.studio) --------
   Re-definen los tokens de color SOLO dentro de la sección, así todos los
   componentes (cards, texto, bordes, sombras) se adaptan a fondo claro solos.
   El acento azure (--accent) y el verde de WhatsApp se mantienen. */
.section--light,
.section--pale {
  --surface:       #FFFFFF;
  --surface-2:     #F4F8FB;
  --surface-3:     #E9F1F7;
  --bg-2:          #F3F7FA;
  --border:        rgba(15, 40, 58, 0.10);
  --border-strong: rgba(0, 159, 227, 0.32);
  --text:          #0E2433;   /* titulares navy oscuro */
  --text-muted:    #50616E;   /* cuerpo gris-azulado */
  --text-dim:      #7C8A96;
  --shadow-card:   0 4px 20px rgba(15, 40, 58, 0.07);
  --shadow-hover:  0 22px 48px rgba(15, 40, 58, 0.14);
  color: var(--text);
}
.section--light { background: #FFFFFF; }
.section--pale  { background: #E9F3F0; } /* mint pálido (como el testimonio de intelligenta) */

/* -------- Encabezado de sección -------- */
.section-head { max-width: 720px; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: 1rem; }
.section-head p { color: var(--text-muted); font-size: var(--fs-lead); }

/* -------- Eyebrow (label técnico mono) -------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.1rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--grad-warm);
  border-radius: 2px;
}
.section-head--center .eyebrow { justify-content: center; }

/* -------- Texto destacado de marca (azul zafiro SÓLIDO, look corporativo) -------- */
.text-gradient {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }

/* -------- Grids reutilizables -------- */
.grid { display: grid; gap: var(--gutter); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.cols-2 { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }

/* -------- Badges / chips -------- */
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.03);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: var(--glow-accent); }

/* Glow decorativo de fondo (malla radial) */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.glow--accent { background: radial-gradient(circle, rgba(0, 159, 227,0.5), transparent 70%); }
.glow--iris   { background: radial-gradient(circle, rgba(31, 184, 181,0.45), transparent 70%); }

/* -------- Divider sutil -------- */
.divider { height: 1px; background: var(--border); border: 0; }

/* -------- Helpers varios -------- */
.text-center { text-align: center; }
.mx-auto { margin-inline: auto; }
.relative { position: relative; }
.z1 { position: relative; z-index: 1; }
.full { width: 100%; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* -------- Reveal al hacer scroll (lo activa animations.js) -------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Stagger: usa --i en el elemento para retrasar */
.reveal { transition-delay: calc(var(--i, 0) * 80ms); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================================
   RESPONSIVE — utilities
   ============================================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .cols-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); } /* métricas 2x2 en mobile */
}
