/* ============================================================================
   SECCIÓN · IDE  —  Departamento de I+D (tono oscuro)
   4 cards numeradas sobre ink. Mismo lenguaje material que "dolor":
   superficie --d-surface, hairline --d-line, rojo SOLO en el índice + acento.
   Mobile-first · selectores prefijados .sec-ide · solo vars de tokens.
   ============================================================================ */

.sec-ide { overflow: hidden; }

/* ---- Cabecera ---- */
.sec-ide .s-head { margin-bottom: clamp(40px, 7vw, 72px); }
.sec-ide .ide-intro { margin-top: var(--s-4); }

/* ---- Grid de cards ---- */
.ide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}

/* ---- Card ---- */
.ide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--d-surface);
  border: 1px solid var(--d-line);
  border-radius: var(--r);
  padding: clamp(26px, 6vw, 38px);
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}
/* hairline superior: detalle material; se enciende en rojo al hover */
.ide-card::before {
  content: "";
  position: absolute;
  left: clamp(26px, 6vw, 38px);
  right: clamp(26px, 6vw, 38px);
  top: 0;
  height: 1px;
  background: var(--d-line);
  transition: background var(--dur) var(--ease);
}

@media (hover: hover) {
  .ide-card:hover {
    transform: translateY(-3px);
    border-color: rgba(233, 225, 217, 0.22);
    background: rgba(233, 225, 217, 0.055);
  }
  .ide-card:hover::before { background: var(--red); }
}

/* índice serif sobredimensionado = ancla estructural (único uso de rojo) */
.ide-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 9vw, 52px);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--red);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-4);
}

.ide-card h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  margin-bottom: var(--s-3);
  text-wrap: balance;
}

.ide-card p {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--d-text);
  text-wrap: pretty;
  margin: 0;
}
.ide-card p strong { color: var(--d-text-strong); font-weight: 700; }
.ide-card p em { color: var(--red); font-style: italic; }

/* ---- Cierre: pull-quote editorial ---- */
.ide-foot {
  margin-top: clamp(40px, 6vw, 60px);
  padding-top: clamp(28px, 5vw, 40px);
  border-top: 1px solid var(--d-line);
  text-align: center;
}
.ide-foot p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-h3);
  line-height: 1.4;
  color: var(--d-text-strong);
  max-width: 680px;
  margin-inline: auto;
  text-wrap: balance;
}
.ide-foot p em { color: var(--red); font-style: italic; }

/* ============================================================================
   TABLET
   ============================================================================ */
@media (min-width: 768px) {
  .ide-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-5);
  }
}

/* ============================================================================
   DESKTOP
   ============================================================================ */
@media (min-width: 1024px) {
  .ide-grid { gap: var(--s-6); }
  .ide-card { padding: clamp(34px, 3vw, 42px); }
}
