/* ============================================================
   ACATHI — pantalla: Inicio (patterns/home.php)
   REDISEÑO EDITORIAL · honra los tokens de marca (púrpura/magenta/
   arcoíris) pero replantea layout y jerarquía:
   · escala display grande      · héroe oscuro a sangre
   · bento de impacto           · pilares con índice
   · historias asimétricas      · arcoíris como motivo recurrente
   ============================================================ */

/* Primitivas editoriales (.ac-h-xl, .ac-section-head, .ac-text-gradient-bright)
   viven en acathi-motion.css (globales, reutilizadas por todas las pantallas). */

/* ═══════════════════ HÉROE ═══════════════════ */
.ac-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 120% at 85% 0%, #4a148c 0%, transparent 55%),
    linear-gradient(160deg, #1a1228 0%, #310065 60%, #4a148c 100%);
  color: #fff;
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(96px, 12vw, 168px);
}
.ac-hero__rainbow { position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--rainbow-gradient); z-index: 4; }
.ac-hero__grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.ac-hero__copy { max-width: 620px; }
.ac-hero__eyebrow { color: var(--secondary-fixed-dim); }
.ac-hero__title {
  font-family: var(--font-display); font-weight: var(--weight-extra);
  font-size: clamp(2.6rem, 1.4rem + 4.4vw, 5rem);
  line-height: 1.02; letter-spacing: -0.03em; color: #fff;
  margin: 22px 0 0; text-wrap: balance;
}
.ac-hero__title em { font-style: italic; font-weight: var(--weight-semibold); color: var(--secondary-fixed-dim); }
.ac-hero__lead {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.35rem); line-height: 1.55;
  color: rgba(255,255,255,0.86); margin: 26px 0 0; max-width: 540px;
}
.ac-hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 34px 0 0; }
.ac-hero__claim {
  font-size: 13px; letter-spacing: 0.03em; color: rgba(255,255,255,0.6);
  margin: 24px 0 0; font-weight: var(--weight-medium);
}
.ac-btn--glass {
  background: rgba(255,255,255,0.16); color: #fff;
  border-color: rgba(255,255,255,0.55);
  box-shadow: 0 6px 18px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.30);
  backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
.ac-btn--glass:hover { background: rgba(255,255,255,0.26); border-color: #fff; color: #fff; }

.ac-hero__media { position: relative; }
.ac-hero__photo {
  position: relative; z-index: 2; aspect-ratio: 4 / 5;
  border-radius: 36px 36px 36px 96px; /* máscara asimétrica orgánica */
  overflow: hidden; box-shadow: var(--shadow-2xl);
  border: 1px solid rgba(255,255,255,0.18);
}
.ac-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.ac-hero__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(49,0,101,0.35), transparent 50%);
}
.ac-hero__badge {
  position: absolute; left: -28px; bottom: 36px; z-index: 3;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--glass-bg); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255,255,255,0.7); border-radius: var(--radius-xl);
  padding: 16px 22px; box-shadow: var(--shadow-xl);
}
.ac-hero__badge-num { font-family: var(--font-display); font-weight: var(--weight-extra); font-size: 30px; line-height: 1; color: var(--secondary); }
.ac-hero__badge-label { font-size: 12px; color: var(--on-surface-variant); max-width: 140px; }
.ac-hero__cue {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 26px; z-index: 3;
  color: rgba(255,255,255,0.7);
}

/* ═══════════════════ IMPACTO — bento ═══════════════════ */
.ac-impact { position: relative; z-index: 3; margin-top: clamp(-120px, -8vw, -72px); }
.ac-bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 1fr;
}
.ac-bento article {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl); padding: 28px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--dur-base) var(--reveal-ease), box-shadow var(--dur-base) var(--reveal-ease);
}
.ac-bento article:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }
.ac-bento__feature {
  grid-column: span 5; grid-row: 1 / 3; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #ffffff 0%, #faf4fb 100%);
  justify-content: space-between;
}
.ac-bento__rainbow { position: absolute; top: 0; left: 0; bottom: 0; width: 6px; background: var(--rainbow-gradient); }
.ac-bento__cell { grid-column: span 4; }
.ac-bento__feature + .ac-bento__cell { grid-column: 6 / 9; }
.ac-bento__cell:nth-child(3) { grid-column: 9 / 13; }
.ac-bento__cell:nth-child(4) { grid-column: 6 / 13; flex-direction: row; align-items: center; gap: 18px; }
.ac-bento__cell:nth-child(4) > div:first-child { margin-bottom: 0; }
.ac-bento__big {
  font-family: var(--font-display); font-weight: var(--weight-extra);
  font-size: clamp(3rem, 2rem + 3vw, 4.5rem); line-height: 1; color: var(--secondary);
}
.ac-bento__num {
  font-family: var(--font-display); font-weight: var(--weight-extra);
  font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem); line-height: 1; color: var(--primary);
}
.ac-bento__cell--amber .ac-bento__num { color: #b06800; }
.ac-bento__cell--success .ac-bento__num { color: var(--success); }
.ac-bento__label { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: 17px; line-height: 1.4; color: var(--on-surface); margin: 0; max-width: 320px; }
.ac-bento p { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: 14px; color: var(--on-surface-variant); margin: 0; }

/* ═══════════════════ PILARES ═══════════════════ */
.ac-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ac-pillar {
  position: relative; overflow: hidden;
  background: var(--surface-container-low); border-radius: var(--radius-2xl);
  padding: 40px 32px 36px; border-top: 5px solid var(--primary);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform var(--dur-base) var(--reveal-ease), box-shadow var(--dur-base) var(--reveal-ease);
}
.ac-pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.ac-pillar--secondary { border-top-color: var(--secondary); }
.ac-pillar--amber { border-top-color: var(--acathi-amber); }
.ac-pillar__index {
  position: absolute; top: 18px; right: 22px;
  font-family: var(--font-display); font-weight: var(--weight-extra);
  font-size: 64px; line-height: 1; color: var(--primary); opacity: 0.07;
}
.ac-pillar h3 { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: 23px; line-height: 1.2; margin: 0; color: var(--on-surface); }
.ac-pillar p { font-size: 15px; line-height: 1.5; color: var(--on-surface-variant); margin: 0; }

/* ═══════════════════ HISTORIAS — asimétrico ═══════════════════ */
.ac-stories__grid {
  display: grid; gap: 20px;
  grid-template-columns: 1.45fr 1fr; grid-template-rows: 1fr 1fr;
}
.ac-photo-card--feature { grid-row: 1 / 3; aspect-ratio: auto; }
.ac-stories__grid .ac-photo-card { aspect-ratio: auto; min-height: 240px; }
/* Tarjetas-icono (sin foto) dentro del grid de Inicio — mismo lenguaje que Historias,
   para testimonios sin rostro identificable (RGPD art. 9). */
.ac-stories__grid .ac-stories-tonecard { position: relative; margin: 0; aspect-ratio: auto; min-height: 240px; border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.ac-stories__grid .ac-stories-tonecard:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.ac-stories__grid .ac-stories-tonecard__icon { position: absolute; top: 20px; left: 20px; font-size: 44px; }
.ac-stories__grid .ac-stories-tonecard__overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(49,0,101,0.55), transparent 62%); display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
.ac-stories__grid .ac-stories-tonecard__overlay blockquote { color: #fff; font-style: italic; font-size: 15px; line-height: 22px; margin: 0 0 10px; border: none; padding: 0; }
.ac-stories__grid .ac-stories-tonecard__overlay cite { color: rgba(255,255,255,0.9); font-style: normal; font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.ac-photo-card__quote-mark {
  font-family: Georgia, serif; font-size: 72px; line-height: 0.6;
  color: rgba(255,255,255,0.55); display: block; margin-bottom: 4px;
}
.ac-photo-card--feature blockquote { font-size: 20px; line-height: 1.4; }
.ac-stories__cta {
  margin-top: 24px; background: var(--surface-container-low);
  border-radius: var(--radius-2xl); padding: 32px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.ac-stories__cta p {
  font-family: var(--font-display); font-weight: var(--weight-semibold);
  font-size: 20px; line-height: 1.4; color: var(--on-surface); margin: 0; max-width: 560px;
}
.ac-rainbow-left { position: relative; overflow: hidden; }
.ac-rainbow-left::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--rainbow-gradient); }

/* ═══════════════════ CONOCIMIENTO ═══════════════════ */
.ac-knowledge { position: relative; overflow: hidden; }
.ac-knowledge__grid { position: relative; z-index: 2; display: grid; grid-template-columns: 5fr 7fr; gap: 40px; align-items: center; }
.ac-knowledge__intro .ac-h-xl { color: #fff; margin: 16px 0 18px; }
.ac-knowledge__intro .ac-lead { color: rgba(255,255,255,0.82); margin: 0 0 32px; max-width: 420px; }
.ac-knowledge__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ac-knowledge__cards .ac-dark-card h3 { font-size: 20px; margin: 14px 0 8px; }
.ac-knowledge__cards .ac-dark-card p { font-size: 14px; line-height: 1.45; margin: 0; }
.ac-knowledge__wide { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; }
.ac-knowledge__wide h3 { margin: 0 0 4px; }

/* ═══════════════════ PARTICIPACIÓN (tilt cards) ═══════════════════ */
.ac-home-participate { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.ac-tilt-card { position: relative; }
.ac-tilt-card::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius-2xl); transform: rotate(1.2deg); }
.ac-tilt-card--primary::before { background: var(--primary); }
.ac-tilt-card--secondary::before { background: var(--secondary); }
.ac-tilt-card__inner {
  position: relative; background: var(--surface-container-lowest); padding: 44px;
  border-radius: var(--radius-2xl); border: 1px solid rgba(49,0,101,0.08);
  height: 100%; display: flex; flex-direction: column; align-items: flex-start;
  transition: transform var(--dur-base) var(--reveal-ease);
}
.ac-tilt-card:hover .ac-tilt-card__inner { transform: translateY(-4px); }
.ac-tilt-card__kicker { font-family: var(--font-display); font-weight: var(--weight-semibold); font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 16px; }
.ac-tilt-card__title { font-size: 27px; line-height: 1.2; margin: 0 0 22px; }
.ac-tilt-card__inner p { font-size: 16px; line-height: 1.5; color: var(--on-surface-variant); margin: 0 0 30px; flex: 1; }

/* ═══════════════════ REDES ═══════════════════ */
.ac-home-social { border-radius: var(--radius-3xl); padding: 52px var(--gutter); text-align: center; position: relative; overflow: hidden; }
.ac-home-social::before { height: 5px; }

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 1100px) {
  .ac-hero__grid { grid-template-columns: 1fr; }
  .ac-hero__media { max-width: 460px; margin-inline: auto; }
  .ac-hero__cue { display: none; }
  .ac-bento { grid-template-columns: repeat(2, 1fr); }
  .ac-bento__feature, .ac-bento__feature + .ac-bento__cell,
  .ac-bento__cell:nth-child(3), .ac-bento__cell:nth-child(4) { grid-column: auto; grid-row: auto; }
  .ac-bento__feature { grid-column: 1 / -1; }
  .ac-bento__cell:nth-child(4) { grid-column: 1 / -1; }
  .ac-knowledge__grid { grid-template-columns: 1fr; }
  .ac-home-participate { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .ac-pillars { grid-template-columns: 1fr; }
  .ac-stories__grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .ac-photo-card--feature { grid-row: auto; }
  .ac-bento { grid-template-columns: 1fr; }
  .ac-knowledge__cards { grid-template-columns: 1fr; }
  .ac-hero__badge { left: 0; }
  .ac-stories__cta { padding: 24px; }
}
