/* ============================================================
   DATAGROWTH — /servicios/datos/machine-learning — styles.css
   Tokens alineados con landings/home/ + sibling analisis-estadistico.
   ============================================================ */

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

:root {
  --ink:        #263b4a;
  --ink-soft:   #1d2e3a;
  --lima:       #b5ff82;
  --lav:        #bab8d0;
  --bg:         #ffffff;
  --surface:    #f8fafc;

  --ink-80:  rgba(38,59,74,0.80);
  --ink-70:  rgba(38,59,74,0.70);
  --ink-65:  rgba(38,59,74,0.65);
  --ink-50:  rgba(38,59,74,0.50);
  --ink-40:  rgba(38,59,74,0.40);
  --ink-15:  rgba(38,59,74,0.15);
  --ink-12:  rgba(38,59,74,0.12);
  --ink-06:  rgba(38,59,74,0.06);
  --ink-05:  rgba(38,59,74,0.05);
  --bg-85:   rgba(255,255,255,0.85);
  --bg-70:   rgba(255,255,255,0.70);
  --bg-50:   rgba(255,255,255,0.50);
  --bg-40:   rgba(255,255,255,0.40);
  --bg-15:   rgba(255,255,255,0.15);
  --bg-10:   rgba(255,255,255,0.10);

  --line:        rgba(38,59,74,0.10);
  --line-strong: rgba(38,59,74,0.20);

  --font: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  20px;
  --r-3xl:  28px;
  --r-pill: 9999px;

  --ease-out: cubic-bezier(0.25,0.46,0.45,0.94);
  --ease-reveal: cubic-bezier(0.16,1,0.3,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--lima); color: var(--ink); }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---- SKIP LINK ---- */
.dg-skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-md);
  z-index: 9999;
  font-weight: 500;
}
.dg-skip-link:focus { top: 16px; }

/* ---- LAYOUT ---- */
.dg-container-wide { max-width: 1280px; margin-inline: auto; padding-inline: 24px; }
.dg-container-prose { max-width: 900px; margin-inline: auto; padding-inline: 24px; }
.dg-text-center { text-align: center; }
.dg-landing { display: block; width: 100%; overflow-x: clip; }

/* ---- EYEBROW ---- */
.dg-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  /* ink-50 ≈ 2.2:1 sobre blanco — OK para texto mayúsc. bold 11px (umbral 3:1 large/UI)
     pero en secciones con fondo coloreado (lavanda) se sobreescribe abajo */
  color: var(--ink-50);
}
.dg-eyebrow--dark { color: var(--bg-40); }
.dg-eyebrow--lima { color: var(--lima); }

/* ---- REVEAL ---- */
.dg-reveal-line { display: block; overflow: hidden;
  padding-bottom: 0.12em; margin-bottom: -0.12em; }
.dg-reveal-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-reveal);
  will-change: transform;
}
.dg-reveal-line.is-visible .dg-reveal-inner { transform: translateY(0); }

/* ---- HIGHLIGHT / MARK (bloque verde) ---- */
.dg-highlight {
  background: var(--lima);
  color: var(--ink);
  padding: 0 5px;
  border-radius: 3px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---- BUTTONS ---- */
.dg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--r-pill);
  padding: 6px 8px 6px 24px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  height: 56px;
  text-decoration: none;
  transition: background 300ms var(--ease-out), border-color 300ms var(--ease-out), transform 300ms var(--ease-out);
  border: none;
}
.dg-btn:active { transform: scale(0.98); }
.dg-btn__label { padding-left: 4px; }
.dg-btn__circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.dg-btn__circle svg { width: 14px; height: 14px; transition: transform 300ms var(--ease-out); }
.dg-btn:hover .dg-btn__circle svg { transform: translate(2px, -2px); }
.dg-btn:focus-visible { outline: 2px solid var(--lima); outline-offset: 2px; }

.dg-btn--primary { background: var(--ink); color: #fff; }
.dg-btn--primary:hover { background: var(--ink-soft); }
.dg-btn--primary .dg-btn__circle { background: var(--lima); color: var(--ink); }

.dg-btn--invert { background: #fff; color: var(--ink); }
.dg-btn--invert:hover { background: #f1f2f4; }
.dg-btn--invert .dg-btn__circle { background: var(--lima); color: var(--ink); }

/* ============================================================
   S1 — HERO
   ============================================================ */
.dg-hero {
  position: relative;
  padding: 80px 0 64px;
  background: var(--bg);
  overflow: hidden;
}

.dg-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

.dg-hero__copy .dg-eyebrow { margin-bottom: 24px; }

.dg-hero__h1 {
  font-size: clamp(44px, 8vw, 120px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 32px;
  max-width: 13ch;
}
.dg-hero__h1 em { font-style: italic; color: var(--ink-80); font-weight: 500; }

.dg-hero__lead {
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-70);
  margin-bottom: 32px;
  max-width: 580px;
}

.dg-hero__ctas {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.dg-hero__cta-text {
  font-size: 14px;
  color: var(--ink-65);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.dg-hero__cta-text:hover { color: var(--ink); border-color: var(--ink); }

/* ---- HERO MINI MLOPS SVG ---- */
.dg-hero__diagram {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3xl);
  padding: 28px;
  box-shadow: 0 24px 64px -32px rgba(38,59,74,0.5), 0 6px 18px -10px rgba(38,59,74,0.12);
  position: relative;
  transition: transform 200ms cubic-bezier(0.2,0.8,0.2,1), box-shadow 200ms cubic-bezier(0.2,0.8,0.2,1);
  cursor: default;
}
.dg-hero__diagram:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 80px -32px rgba(38,59,74,0.55), 0 12px 32px -10px rgba(38,59,74,0.18);
}
.dg-hero__diagram-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 12px;
}
.dg-hero__diagram svg { width: 100%; height: auto; max-height: 320px; }
.dg-hero__diagram .dg-loop-node circle { fill: var(--bg); stroke: var(--ink); stroke-width: 1.6; }
.dg-hero__diagram .dg-loop-node text { fill: var(--ink); font-family: var(--font); font-size: 11px; font-weight: 500; text-anchor: middle; }
.dg-hero__diagram .dg-loop-arrow { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; }
.dg-hero__diagram .dg-loop-arrow-head { fill: var(--ink); }

@media (min-width: 960px) {
  .dg-hero { padding: 120px 0 96px; }
  .dg-hero__grid { grid-template-columns: 1.05fr 0.95fr; gap: 64px; }
}

/* ============================================================
   S2 — SEÑALES
   ============================================================ */
.dg-senales { padding: 80px 0; background: #F3F5F8; }

.dg-senales__header { margin-bottom: 40px; }
.dg-senales__header .dg-eyebrow { margin-bottom: 16px; }

.dg-senales__microcopy {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-65);
  margin-top: 20px;
  max-width: 580px;
}

.dg-senales__h2 {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.dg-senales__h2 em { font-style: italic; color: var(--ink-80); font-weight: 500; }

.dg-senales__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-3xl);
  overflow: hidden;
}

.dg-senales__card {
  background: var(--bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 300ms var(--ease-out);
}
.dg-senales__card:hover { background: var(--surface); }

.dg-senales__body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  letter-spacing: -0.005em;
}

@media (min-width: 768px) {
  .dg-senales { padding: 112px 0; }
  .dg-senales__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .dg-senales__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   S3 — ML vs IA generativa (lavanda)
   ============================================================ */
.dg-vs { padding: 80px 0; background: var(--lav); color: var(--ink); }

.dg-vs__header { text-align: center; margin-bottom: 48px; }
/* ink-70 sobre lavanda #bab8d0 ≈ 2.5:1 — insuficiente (WCAG 1.4.3). → ink = 7.1:1 */
.dg-vs__header .dg-eyebrow { color: var(--ink); margin-bottom: 16px; }

.dg-vs__h2 {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 20px;
}
.dg-vs__h2 em { font-style: italic; color: var(--ink-80); font-weight: 500; }

.dg-vs__sub {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.6;
  /* ink-70 sobre lavanda ≈ 2.5:1 — insuficiente. → ink-80 = 3.2:1 (pasa large text),
     texto ~17px no es "large" formal pero sí borderline. Usamos ink para garantizar 7:1 */
  color: var(--ink);
  max-width: 640px;
  margin-inline: auto;
}

.dg-vs__split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 48px;
}

.dg-vs__col {
  background: var(--bg);
  border-radius: var(--r-3xl);
  padding: 32px;
  border: 1px solid var(--ink-15);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 200ms cubic-bezier(0.2,0.8,0.2,1), box-shadow 200ms cubic-bezier(0.2,0.8,0.2,1);
}
.dg-vs__col:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px -16px rgba(38,59,74,0.18);
}

.dg-vs__col--ml {
  background: #F3F5F8;
  border-left: 4px solid var(--ink);
}
.dg-vs__col--gen {
  background: var(--bg);
  border-left: 4px solid var(--lima);
}

.dg-vs__col-tag {
  display: inline-block;
  width: fit-content;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.dg-vs__col-tag--ml {
  background: #263b4a;
  color: #fff;
}
.dg-vs__col-tag--gen {
  background: var(--lima);
  color: var(--ink);
}

.dg-vs__col-h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 8px;
}

.dg-vs__attrs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* Las cards .dg-vs__col tienen bg: #fff. Ratios sobre blanco:
   ink-70 = 2.86:1 (falla 4.5:1 para 14px normal) → usamos ink (14.05:1)
   ink-50 en dt 11px mayúsc. → 4.5:1 mínimo para texto normal; ink-50 ≈ 5.2:1 sobre blanco.
   Re-calculado: #263b4a al 50% → mezcla con white → aprox #92aba0. Lum ≈ 0.26. Ratio ≈ 2.5:1. Falla.
   → dt usa ink-80 sobre blanco: lum blend ≈ 0.22 → ratio ≈ 4.0:1. Borderline.
   → usamos ink directo para garantizar AA en todos los tamaños */
.dg-vs__attrs div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--ink-12);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.dg-vs__attrs div:last-child { border-bottom: 1px solid var(--ink-12); }
.dg-vs__attrs dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* ink-50 sobre white ≈ 2.5:1 — insuficiente. → ink-80 sobre white ≈ 4.0:1 (pasa UI/large),
     pero para máxima seguridad en 11px usamos ink */
  color: var(--ink);
  padding-top: 2px;
}
.dg-vs__attrs dd { color: var(--ink); font-weight: 500; }

.dg-vs__decisionwrap {
  background: var(--bg);
  border-radius: var(--r-3xl);
  border: 1px solid var(--ink-15);
  overflow: hidden;
}

.dg-vs__decision-head {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--ink-12);
}
.dg-vs__decision-head h3 {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 6px;
}
.dg-vs__decision-head p {
  font-size: 14px;
  color: var(--ink-65);
}

.dg-vs__tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dg-vs__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.dg-vs__table caption {
  position: absolute;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.dg-vs__table th,
.dg-vs__table td {
  text-align: left;
  padding: 14px 20px;
  border-top: 1px solid var(--ink-12);
}
.dg-vs__table thead th {
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
  font-weight: 500;
  border-top: 0;
}
.dg-vs__table tbody th[scope="row"] {
  font-weight: 500;
  color: var(--ink);
  min-width: 260px;
}
.dg-vs__table tbody td { color: var(--ink-70); }
.dg-vs__table .dg-vs__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--ink-15);
  background: var(--bg);
  white-space: nowrap;
}
.dg-vs__tag--ml { background: var(--ink); color: #fff; border-color: var(--ink); }
.dg-vs__tag--gen { background: var(--lima); color: var(--ink); border-color: var(--lima); }

.dg-vs__footer {
  text-align: center;
  font-size: 14px;
  /* ink-70 sobre lavanda ≈ 2.5:1 — insuficiente. → ink = 7.1:1 */
  color: var(--ink);
  margin-top: 32px;
  font-style: italic;
}

@media (min-width: 768px) {
  .dg-vs { padding: 112px 0; }
  .dg-vs__split { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   S4 — CASOS DE USO (acordeón horizontal)
   ============================================================ */
.dg-casosuso { padding: 80px 0; background: var(--bg); }

.dg-casosuso__header { margin-bottom: 40px; }
.dg-casosuso__header .dg-eyebrow { margin-bottom: 16px; }

.dg-casosuso__h2 {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.dg-casosuso__h2 em { font-style: italic; color: var(--ink-80); font-weight: 500; }

.dg-casosuso__microcopy {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-65);
  margin-top: 20px;
  max-width: 580px;
}

/* Lista de acordeón */
.dg-casosuso__list {
  border: 1px solid var(--line);
  border-radius: var(--r-3xl);
  overflow: hidden;
}

.dg-casosuso__item {
  border-bottom: 1px solid var(--line);
}
.dg-casosuso__item:last-child { border-bottom: 0; }

.dg-casosuso__row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
  background: var(--bg);
  transition: background 200ms var(--ease-out);
}
.dg-casosuso__row:hover { background: var(--surface); }
.dg-casosuso__row:focus-visible { outline: 2px solid var(--lima); outline-offset: -2px; }

.dg-casosuso__row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: var(--ink-05);
  color: var(--ink);
  flex-shrink: 0;
}
.dg-casosuso__row-icon svg { width: 20px; height: 20px; }

.dg-casosuso__row-title {
  flex: 1;
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.dg-casosuso__row-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
  transition: transform 300ms var(--ease-out), background 200ms var(--ease-out);
  color: var(--ink);
}
.dg-casosuso__row-toggle svg { width: 12px; height: 12px; }
.dg-casosuso__row[aria-expanded="true"] .dg-casosuso__row-toggle {
  transform: rotate(45deg);
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* Panel desplegable.
   El atributo [hidden] aplica display:none del UA stylesheet.
   Lo sobreescribimos con display:grid para que la animación
   grid-template-rows funcione (el JS quita hidden antes del rAF). */
.dg-casosuso__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms var(--ease-out);
}
.dg-casosuso__panel[hidden] { display: none; }
.dg-casosuso__panel.is-open { grid-template-rows: 1fr; }

.dg-casosuso__panel-inner {
  overflow: hidden;
  padding: 0 24px 0 80px;
}
.dg-casosuso__panel.is-open .dg-casosuso__panel-inner {
  padding-bottom: 24px;
}

.dg-casosuso__panel-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-65);
  margin-bottom: 12px;
}

.dg-casosuso__output {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-50);
  letter-spacing: 0.02em;
  display: block;
}
.dg-casosuso__output em { font-style: italic; }

@media (min-width: 768px) {
  .dg-casosuso { padding: 112px 0; }
  .dg-casosuso__row { padding: 22px 32px; gap: 20px; }
  .dg-casosuso__panel-inner { padding-left: 92px; }
}

/* ============================================================
   S6 — STACK
   ============================================================ */
.dg-stack { padding: 80px 0; background: var(--bg); }
.dg-stack__header { text-align: center; margin-bottom: 40px; }
.dg-stack__header .dg-eyebrow { margin-bottom: 16px; }

.dg-stack__h2 {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.dg-stack__h2 em { font-style: italic; color: var(--ink-80); font-weight: 500; }

.dg-stack__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-3xl);
  overflow: hidden;
  margin-bottom: 24px;
}

.dg-stack__cell {
  background: var(--bg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  transition: background 300ms var(--ease-out);
}
.dg-stack__cell:hover { background: var(--surface); }
.dg-stack__cell img { width: 48px; height: 48px; }
.dg-stack__cell img.dg-stack__cell-icon {
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  /* Mono como los simpleicons hermanos (/263b4a) del stack */
  filter: brightness(0);
}
.dg-stack__cell-icon-text {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.dg-stack__cell-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.dg-stack__cell-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-50);
}

.dg-stack__note {
  text-align: center;
  font-size: 14px;
  color: var(--ink-65);
  max-width: 720px;
  margin-inline: auto;
  font-style: italic;
}

@media (min-width: 768px) {
  .dg-stack { padding: 112px 0; }
  .dg-stack__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .dg-stack__grid { grid-template-columns: repeat(6, 1fr); }
}

/* ============================================================
   S7 — CASO METEOROLOGÍA
   ============================================================ */
.dg-caso { padding: 80px 0; background: var(--surface); }

.dg-caso__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}

.dg-caso__visual {
  position: relative;
  border-radius: var(--r-3xl);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}
.dg-caso__visual svg { width: 100%; height: 100%; padding: 24px; }

.dg-caso__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--lima);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--r-pill);
}

.dg-caso__body .dg-eyebrow { margin-bottom: 16px; }

.dg-caso__h3 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 20px;
}

.dg-caso__p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-70);
  margin-bottom: 14px;
}
.dg-caso__p strong { color: var(--ink); font-weight: 500; }

.dg-caso__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 28px;
}
.dg-caso__chip {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--ink);
}

/* Inline chart SVG for caso */
.dg-caso__chart { fill: none; }
.dg-caso__chart .dg-axis { stroke: var(--bg-40); stroke-width: 1; }
.dg-caso__chart .dg-axis-label { fill: var(--bg-70); font-family: var(--font-mono); font-size: 10px; }
.dg-caso__chart .dg-band { fill: var(--lima); opacity: 0.18; }
.dg-caso__chart .dg-pred { stroke: var(--lima); stroke-width: 2; stroke-linecap: round; }
.dg-caso__chart .dg-real { stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 4 4; }
.dg-caso__chart .dg-title { fill: #fff; font-family: var(--font); font-size: 12px; font-weight: 500; }
.dg-caso__chart .dg-legend { fill: var(--bg-70); font-family: var(--font); font-size: 10px; }

@media (min-width: 960px) {
  .dg-caso { padding: 112px 0; }
  .dg-caso__grid { grid-template-columns: 1.1fr 1fr; gap: 56px; }
  .dg-caso__grid--reverse { grid-template-columns: 1fr 1.1fr; }
}

.dg-caso--alt { background: var(--bg); }

/* Barras del gráfico de impago */
.dg-caso__chart .dg-bar { opacity: 0.85; }
.dg-caso__chart .dg-bar--high { fill: #e05c5c; }
.dg-caso__chart .dg-bar--mid { fill: var(--lav); }
.dg-caso__chart .dg-bar--low { fill: var(--lima); }

/* ============================================================
   S8 — FASES
   ============================================================ */
.dg-fases { padding: 80px 0; background: var(--bg); }

.dg-fases__header { margin-bottom: 40px; }
.dg-fases__header .dg-eyebrow { margin-bottom: 16px; }

.dg-fases__h2 {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.dg-fases__h2 em { font-style: italic; color: var(--ink-80); font-weight: 500; }

.dg-fases__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-3xl);
  overflow: hidden;
}

.dg-fases__card {
  background: var(--bg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 240px;
}

.dg-fases__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-50);
  margin-bottom: 8px;
}

.dg-fases__h3 {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.dg-fases__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-65);
  flex: 1;
}

.dg-fases__meta {
  font-size: 12px;
  color: var(--ink-50);
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  .dg-fases { padding: 112px 0; }
  .dg-fases__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .dg-fases__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   S9 — CROSSLINKS
   ============================================================ */
.dg-cross { padding: 80px 0; background: var(--surface); border-top: 1px solid var(--line); }
.dg-cross__header { margin-bottom: 32px; }
.dg-cross__header .dg-eyebrow { margin-bottom: 16px; }

.dg-cross__h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.dg-cross__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-3xl);
  overflow: hidden;
  margin-bottom: 24px;
}

.dg-cross__card {
  background: var(--bg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 300ms var(--ease-out);
  position: relative;
}
.dg-cross__card:hover { background: var(--surface); }

.dg-cross__card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dg-cross__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.dg-cross__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--ink-05);
  color: var(--ink);
  transition: background 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.dg-cross__arrow svg { width: 12px; height: 12px; }
.dg-cross__card:hover .dg-cross__arrow { background: var(--lima); transform: translate(2px, -2px); }

.dg-cross__h3 {
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--ink);
}

.dg-cross__body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-65);
}

.dg-cross__bridge {
  font-size: 14px;
  color: var(--ink-65);
}
.dg-cross__bridge a {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--ink-15);
  padding-bottom: 1px;
  transition: border-color 200ms var(--ease-out);
}
.dg-cross__bridge a:hover { border-color: var(--ink); }

@media (min-width: 768px) {
  .dg-cross { padding: 112px 0; }
  .dg-cross__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .dg-cross__grid { grid-template-columns: repeat(5, 1fr); }
}

/* ============================================================
   S10 — FAQ
   ============================================================ */
.dg-faq { padding: 40px 0 80px; background: var(--surface); }
.dg-faq__header { margin-bottom: 40px; text-align: center; }
.dg-faq__header .dg-eyebrow { margin-bottom: 16px; }

/* FAQ CENTRADA como la home: h2 centrado + lista constreñida y centrada. */
.dg-faq__h2 {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-align: center;
  margin-bottom: 56px;
}

.dg-faq__list { display: flex; flex-direction: column; max-width: 760px; margin-inline: auto; }

.dg-faq__item { border-bottom: 1px solid var(--line); }

.dg-faq__btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}
.dg-faq__btn:focus-visible { outline: 2px solid var(--lima); outline-offset: 2px; border-radius: 4px; }

.dg-faq__q {
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}

.dg-faq__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
  transition: transform 300ms var(--ease-out);
  color: var(--ink);
}
.dg-faq__icon svg { width: 12px; height: 12px; }
.dg-faq__btn[aria-expanded="true"] .dg-faq__icon { transform: rotate(45deg); }

.dg-faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms var(--ease-out);
}
/* Override UA [hidden]{display:none} para que la transición de grid-row corra
   al cerrar. El panel queda height 0 (grid-template-rows: 0fr + inner
   overflow:hidden), invisible pero accesible; el JS gestiona el ciclo de hidden. */
.dg-faq__answer[hidden] { display: grid; }
.dg-faq__answer.is-open { grid-template-rows: 1fr; }

.dg-faq__answer-inner { overflow: hidden; }
.dg-faq__answer-inner p {
  padding-bottom: 24px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-70);
}
.dg-faq__answer-inner a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 768px) {
  .dg-faq { padding: 56px 0 112px; }
}

/* ============================================================
   S11 — CTA FINAL (dark)
   ============================================================ */
.dg-cta-final {
  position: relative;
  padding: 96px 0;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.dg-cta-final .dg-container-wide { position: relative; z-index: 1; }

.dg-cta-final__inner {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.dg-cta-final .dg-eyebrow { color: var(--bg-40); margin-bottom: 20px; }

.dg-cta-final__h2 {
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: #fff;
  margin-bottom: 24px;
}
.dg-cta-final__h2 em { font-style: italic; color: var(--bg-70); font-weight: 500; }

.dg-cta-final__sub {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--bg-70);
  margin-bottom: 40px;
  max-width: 560px;
  margin-inline: auto;
}

.dg-cta-final__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.dg-cta-final__mail {
  font-size: 14px;
  color: var(--bg-40);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dg-cta-final__mail:hover { color: var(--bg-85); }

@media (min-width: 768px) {
  .dg-cta-final { padding: 144px 0; }
}

/* ============================================================
   MAGNETIC CTA
   ============================================================ */
.dg-magnetic-cta { transition: transform 250ms var(--ease-out); }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .dg-reveal-inner { transform: translateY(0) !important; }
  [data-reveal] { opacity: 1 !important; transform: translateY(0) !important; }
  /* Hero diagram: deshabilitar hover translateY */
  .dg-hero__diagram:hover { transform: none; box-shadow: 0 24px 64px -32px rgba(38,59,74,0.5), 0 6px 18px -10px rgba(38,59,74,0.12); }
  /* VS cols: deshabilitar hover translateY */
  .dg-vs__col:hover { transform: none; box-shadow: none; }
}

/* ============================================================
   RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 720px) {
  .dg-senales__grid,
  .dg-casosuso__list,
  .dg-stack__grid { border-radius: var(--r-xl); }
}
