/* ============================================================
   DATAGROWTH — /servicios/datos/analisis-estadistico — styles.css
   Tokens y componentes alineados con landings/home/.
   ============================================================ */

*, *::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-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; }

/* ---- SR-ONLY (visually hidden, accesible a screen readers) ---- */
.dg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- 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: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  /* ink-70 ≈ 4.6:1 sobre blanco, pasa WCAG AA (antes ink-50 ≈ 2.7:1) */
  color: var(--ink-70);
}
/* en fondo dark (ink) --bg-70 ≈ 6.4:1 (antes --bg-40 ≈ 3.2:1) */
.dg-eyebrow--dark { color: var(--bg-70); }

/* ---- 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); }

[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); }

/* ============================================================
   PIXEL SQUARES (hero background decoration)
   ============================================================ */
.dg-hero-sq-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.dg-hero-sq {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--lav);
  opacity: 0;
  animation: dg-sq-pulse var(--sq-cycle, 3s) ease-in-out infinite;
  animation-delay: var(--sq-delay, 0s);
}
.dg-hero-sq--lima { background: var(--lima); }

/* Cuadraditos del hero más grandes (resto de secciones sin cambios) */
.dg-hero .dg-hero-sq { width: 18px; height: 18px; }

@keyframes dg-sq-pulse {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  40%, 60%  { opacity: 0.55; transform: scale(1); }
}

/* ---- SECTION PIXEL DECORATION (reutilizable) ---- */
.dg-section-pixels {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.dg-section-pixels .dg-hero-sq {
  opacity: 0;
}

/* ============================================================
   S1 — HERO
   ============================================================ */
.dg-hero {
  position: relative;
  padding: 80px 0 48px;
  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;
}
.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;
  /* ink-70 ≈ 4.6:1 sobre blanco (antes ink-65 ≈ 4.07:1) */
  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;
  /* ink-70 ≈ 4.6:1 sobre blanco (antes ink-65 ≈ 4.07:1) */
  color: var(--ink-70);
  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); }

/* ---- OUTPUT CARD MOCK ---- */
.dg-output-card {
  background: var(--ink);
  color: #e8eef4;
  border-radius: var(--r-xl);
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  overflow: hidden;
  box-shadow: 0 24px 64px -32px rgba(38,59,74,0.5), 0 6px 18px -10px rgba(38,59,74,0.25);
  position: relative;
}
.dg-output-card__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--ink-soft);
  border-bottom: 1px solid var(--bg-10);
}
.dg-output-card__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--bg-15);
}
.dg-output-card__file {
  margin-left: 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  /* bg-70 ≈ 6.4:1 sobre ink-soft (antes bg-40 ≈ 3.2:1, falla AA) */
  color: var(--bg-70);
}
.dg-output-card__body {
  padding: 20px 22px 24px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(10.5px, 1vw, 12.5px);
  color: rgba(255,255,255,0.82);
  white-space: pre;
  overflow-x: auto;
  font-variant-numeric: tabular-nums;
}
/* bg-70 ≈ 6.4:1 sobre --ink (antes bg-40 ≈ 3.2:1, falla AA para texto 11px) */
.dg-output-card__cmt { color: var(--bg-70); }
.dg-output-card__hl {
  background: rgba(181,255,130,0.18);
  color: var(--lima);
  padding: 0 4px;
  border-radius: 4px;
}

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

/* ============================================================
   S2 — DISCIPLINAS
   ============================================================ */
.dg-disciplinas { position: relative; padding: 80px 0; background: var(--bg); overflow: hidden; }

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

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

.dg-disciplinas__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dg-disciplinas__card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 240px;
  transition: transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out), background 260ms var(--ease-out);
}
.dg-disciplinas__card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px -8px rgba(38,59,74,0.14);
  background: var(--surface);
}

.dg-disciplinas__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  background: var(--lima);
  color: var(--ink);
  flex-shrink: 0;
}
.dg-disciplinas__icon svg { width: 22px; height: 22px; }

.dg-disciplinas__h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.dg-disciplinas__body {
  font-size: 14px;
  line-height: 1.6;
  /* ink-70 ≈ 4.6:1 sobre blanco (antes ink-65 ≈ 4.07:1) */
  color: var(--ink-70);
}

@media (min-width: 768px) {
  .dg-disciplinas { padding: 80px 0; }
  .dg-disciplinas__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .dg-disciplinas__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   S3 — STACK (categorizado, tras disciplinas)
   ============================================================ */
.dg-stack { padding: 80px 0; background: var(--surface); }

.dg-stack__header { 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);
  margin-bottom: 12px;
}
.dg-stack__h2 em { font-style: italic; color: var(--ink-80); font-weight: 500; }

.dg-stack__sub {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.6;
  /* ink-70 ≈ 4.6:1 (antes ink-65 ≈ 4.07:1) */
  color: var(--ink-70);
  max-width: 640px;
}

.dg-stack__categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dg-stack__cat {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px 32px;
  transition: box-shadow 260ms var(--ease-out);
}
.dg-stack__cat:hover { box-shadow: 0 4px 20px -6px rgba(38,59,74,0.12); }

.dg-stack__cat--lenguajes  { background: rgba(181,255,130,0.12); border-color: rgba(181,255,130,0.4); }
.dg-stack__cat--entornos   { background: rgba(186,184,208,0.15); border-color: rgba(186,184,208,0.5); }
.dg-stack__cat--librerias  { background: rgba(38,59,74,0.04);    border-color: var(--line-strong); }
.dg-stack__cat--docs       { background: rgba(38,59,74,0.02);    border-color: var(--line); }

.dg-stack__cat--lenguajes:hover  { background: rgba(181,255,130,0.22); }
.dg-stack__cat--entornos:hover   { background: rgba(186,184,208,0.25); }
.dg-stack__cat--librerias:hover  { background: rgba(38,59,74,0.07); }
.dg-stack__cat--docs:hover       { background: rgba(38,59,74,0.05); }

.dg-stack__cat-title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* ink-70 ≈ 4.6:1 (antes ink-50 ≈ 2.7:1, falla AA) */
  color: var(--ink-70);
  margin-bottom: 16px;
}

.dg-stack__cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dg-stack__chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.dg-stack__chip img { width: 22px; height: 22px; }
.dg-stack__chip--text {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

@media (min-width: 768px) {
  .dg-stack { padding: 112px 0; }
  .dg-stack__categories { grid-template-columns: repeat(2, 1fr); }
  .dg-stack__chip { padding: 12px 22px; font-size: 15px; }
}
@media (min-width: 1024px) {
  .dg-stack__categories { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   S4 — CASOS (diseño editorial, foto + texto alternados)
   ============================================================ */
.dg-casos { padding: 80px 0; background: var(--bg); }

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

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

.dg-casos__tag {
  display: inline-block;
  width: fit-content;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ---- Caso editorial ---- */
.dg-caso-editorial {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--bg);
  transition: box-shadow 260ms var(--ease-out);
}
.dg-caso-editorial:hover { box-shadow: 0 8px 40px -12px rgba(38,59,74,0.14); }

.dg-caso-editorial__img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  min-height: 220px;
}
.dg-caso-editorial__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease-out);
}
.dg-caso-editorial:hover .dg-caso-editorial__img { transform: scale(1.03); }

.dg-caso-editorial__logo {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(255,255,255,0.92);
  border-radius: var(--r-md);
  padding: 6px 10px;
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.dg-caso-editorial__copy {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.dg-caso-editorial__h3 {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 16px;
}

.dg-caso-editorial__body {
  font-size: 15px;
  line-height: 1.7;
  /* ink-70 ≈ 4.6:1 (antes ink-65 ≈ 4.07:1) */
  color: var(--ink-70);
}

@media (min-width: 768px) {
  .dg-casos { padding: 112px 0; }
  .dg-caso-editorial {
    grid-template-columns: 1fr 1fr;
    min-height: 380px;
  }
  .dg-caso-editorial__img-wrap { min-height: unset; }
  .dg-caso-editorial--reverse { direction: rtl; }
  .dg-caso-editorial--reverse > * { direction: ltr; }
}
@media (min-width: 1024px) {
  .dg-caso-editorial { grid-template-columns: 5fr 7fr; }
  .dg-caso-editorial--reverse { grid-template-columns: 7fr 5fr; }
}

/* ============================================================
   S8 — FAQ
   ============================================================ */
/* Fondo #f3f5f8 mantenido por petición del cliente (excepción) */
.dg-faq { padding: 40px 0 80px; background: #f3f5f8; }
.dg-faq .dg-eyebrow { margin-bottom: 16px; }

.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;
}

/* FAQ centrada como la home: lista constreñida y centrada en el eje. */
.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); }

/* Override UA [hidden]{display:none} para que anime el grid-row al abrir/cerrar */
.dg-faq__answer[hidden] { display: grid; }
.dg-faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 300ms var(--ease-out);
}
.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;
  /* ink-70 ≈ 4.6:1 (antes ink-65 ≈ 4.07:1) */
  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; }
}

/* ============================================================
   S9 — CTA FINAL (dark + pixel-square)
   ============================================================ */
.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;
}

/* bg-70 ≈ 6.4:1 sobre --ink (antes bg-40 ≈ 3.2:1, falla AA) */
.dg-cta-final .dg-eyebrow { color: var(--bg-70); margin-bottom: 20px; }

.dg-cta-final__h2 {
  font-size: clamp(28px, 3.8vw, 46px);
  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;
  /* bg-70 ≈ 6.4:1 sobre --ink: ya correcto */
  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__microcopy {
  font-size: 13px;
  /* bg-70 ≈ 6.4:1 sobre --ink (antes bg-40 ≈ 3.2:1, falla AA) */
  color: var(--bg-70);
  letter-spacing: 0.02em;
}

.dg-cta-final__mail {
  font-size: 14px;
  /* bg-70 ≈ 6.4:1 sobre --ink (antes bg-40 ≈ 3.2:1, falla AA) */
  color: var(--bg-70);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dg-cta-final__mail:hover { color: var(--bg-85); }

/* Pixel-square */
.dg-pixel-field {
  position: absolute;
  inset-block: 0;
  width: 72px;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.dg-pixel-field--left { left: 0; }
.dg-pixel-field--right { right: 0; }

.dg-pixel {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--lima);
  opacity: 0;
  animation: dg-pixel-flicker var(--pixel-cycle, 2.4s) ease-in-out infinite;
  animation-delay: var(--pixel-delay, 0s);
}
.dg-pixel.is-sm { width: 8px; height: 8px; }

@keyframes dg-pixel-flicker {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  35%, 65% { opacity: 1; transform: scale(1); }
}

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

/* ============================================================
   MARQUEE KEYFRAMES
   ============================================================ */
@keyframes dg-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============================================================
   MAGNETIC CTA — no transform, solo señal de hover
   ============================================================ */
.dg-magnetic-cta { transition: transform 250ms var(--ease-out); }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  /* Desactiva scroll suave a nivel raíz (ítem 5) */
  html { scroll-behavior: auto !important; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .dg-stack__track { animation: none !important; }
  .dg-reveal-inner { transform: translateY(0) !important; }
  [data-reveal] { opacity: 1 !important; transform: translateY(0) !important; }
  .dg-pixel { animation: none !important; opacity: 0.6 !important; transform: scale(1) !important; }

  /* Neutraliza hover-scale de tarjetas metodología (ítem 5) */
  .dg-disciplinas__card:hover { transform: none !important; }

  /* dg-hero-sq queda con opacity:0 al neutralizar la animación → hacerla visible (ítem 5) */
  .dg-hero-sq { animation: none !important; opacity: 0.4 !important; transform: scale(1) !important; }
}

/* ============================================================
   RESPONSIVE — hero stack en móvil
   ============================================================ */
@media (max-width: 720px) {
  .dg-output-card__body { font-size: 10px; padding: 16px; }
  .dg-caso-editorial__copy { padding: 24px; }
}

/* D1: pantallas muy estrechas — reduce font para evitar desborde en pre con white-space:pre */
@media (max-width: 360px) {
  .dg-output-card__body {
    font-size: 8.5px;
    padding: 12px;
    /* hint visual de scroll horizontal */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  /* hint de que hay más contenido a la derecha */
  .dg-output-card {
    --hint-fade: linear-gradient(to right, transparent 88%, rgba(38,59,74,0.6) 100%);
    position: relative;
  }
  .dg-output-card::after {
    content: '';
    position: absolute;
    right: 0;
    top: 48px; /* debajo del header */
    bottom: 0;
    width: 32px;
    background: linear-gradient(to right, transparent, rgba(38,59,74,0.8));
    pointer-events: none;
    border-radius: 0 var(--r-xl) var(--r-xl) 0;
  }
}

