/* =========================
   GRID CARDS — typography/colors matched to Standard Specifications
========================= */

:root{
  /* Standard-spec tokens */
  --cs-ink:#0f2140;
  --cs-muted:#5f6b7a;

  --line: rgba(15,33,64,.55);
  --border: rgba(15,33,64,.12);
  --shadow: 0 18px 45px rgba(15,33,64,.10);


  /* Font to match premium/system look */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
               "Apple Color Emoji","Segoe UI Emoji";
}

.wrap{
  width: min(100%, 72rem);               /* ~1152px, same pattern */
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(2.75rem, 6vw, 5rem);
  font-family: var(--font-sans);
  color: #0b0b0b;

}

/* Title like .ss-title */
.wrap h2{
  line-height: 1.12;
  text-align: center;
  padding-bottom: clamp(1.25rem, 3vw, 2.25rem);
  font-size: clamp(3rem, 4.5vw, 6rem);
  font-weight: 600;
  max-width: 18ch;
  margin: auto;
  color: #005598;
  text-align: center;
}

/* Main grid */
.cards-flex{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card{
  padding: clamp(.95rem, 1.6vw, 1.15rem) clamp(1rem, 1.8vw, 1.25rem);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  min-height: 112px;
  background: #fff;
}

.card h3{
  margin: 0 0 10px;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #0b0b0b;
}

.card p{
  margin: 0;
  font-size: clamp(.98rem, 1.25vw, 1.05rem);
  line-height: 1.6;
  color: var(--cs-muted);
  max-width: 46ch;
  text-align: justify;
}

/* quitar borde derecho en la última columna */
.card:nth-child(4n){
  border-right: none;
}

/* quitar borde inferior en la última fila (8 cards total => 5-8) */
.card:nth-last-child(-n + 4){
  border-bottom: none;
}

/* Responsive */
@media (max-width: 900px){
  .card:nth-child(4n){ border-right: 1px solid var(--border); } /* reset */
  .card:nth-child(2n){ border-right: none; } /* última col en 2 cols */

  .card:nth-last-child(-n + 4){ border-bottom: 1px solid var(--border); } /* reset */
  .card:nth-last-child(-n + 2){ border-bottom: none; } /* última fila en 2 cols */
}

@media (max-width: 520px){
  .card{ border-right: none; }
  .card:nth-last-child(-n + 2){ border-bottom: 1px solid var(--border); } /* reset */
  .card:last-child{ border-bottom: none; }
}

/* Flex layout keeps incomplete rows centered. */
.wrap .cards-flex{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: clamp(1rem, 2.4vw, 1.5rem);
  overflow: visible;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.wrap .cards-flex .card{
  width: min(100%, 15rem);
  max-width: 15rem;
  flex: 1 1 13rem;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 600px){
  .wrap .cards-flex .card{
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
  }
}


/* Reduce motion (kept consistent) */
@media (prefers-reduced-motion: reduce){
  .cards-flex, .card, .wrap *{
    transition: none !important;
    animation: none !important;
  }

  /* Reveal-only: keep content visible */
  [data-sr-reveal] .sr-item{
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================
   Reveal only (ADD-ON)
   - data-sr-reveal + .sr-item + .is-revealed + delays
   - NO cambia colores/layout/tamaños
========================= */
[data-sr-reveal] .sr-item{
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 800ms ease,
    transform 800ms ease;
  transition-delay: var(--sr-delay, 0ms);
  will-change: opacity, transform;
}

[data-sr-reveal] .sr-item.is-revealed{
  opacity: 1;
  transform: none;
}
