/* ============================================================
 *  CASOS DE USO — coverflow carousel
 *  Native to the Meefi landing: brand tokens, Montserrat display
 *  headings, 16px radii, soft brand shadows. Cool light surface
 *  (distinct from Audiences' warm off-white above it) so the
 *  white focus card pops.
 * ============================================================ */
.cu-section {
  position: relative;
  background: #F4F7FC;
  color: var(--ink);
  padding: 150px 0 160px;
  overflow: hidden;
  isolation: isolate;
}
.cu-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(820px 540px at 50% -6%, rgba(5,48,206,0.07), transparent 62%),
    linear-gradient(180deg, #F6F9FD 0%, #EEF2FB 100%);
}
.cu-wrap {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header ---------- */
.cu-header { text-align: center; max-width: 680px; margin: 0 auto 64px; }
.cu-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(5,48,206,0.07);
  border: 1px solid rgba(5,48,206,0.16);
  border-radius: 999px;
  margin-bottom: 22px;
}
.cu-badge-dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(5,48,206,0.14), 0 0 10px rgba(5,48,206,0.45);
  animation: cu-pulse var(--pulse-cycle) var(--ease-smooth) infinite;
}
@keyframes cu-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(5,48,206,0.12), 0 0 8px rgba(5,48,206,0.35); }
  50%      { box-shadow: 0 0 0 5px rgba(5,48,206,0.18), 0 0 14px rgba(5,48,206,0.6); }
}
.cu-headline {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.cu-grad {
  background: linear-gradient(92deg, var(--blue-500) 0%, var(--blue-400) 60%, var(--blue-500) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.cu-lede {
  margin: 0 auto;
  max-width: 520px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-muted);
  text-wrap: pretty;
}

/* ---------- Coverflow stage ---------- */
.cu-section {
  --cu-card-w: 468px;
  --cu-card-h: 510px;
  --cu-stage-h: 580px;
}
.cu-stage {
  position: relative;
  height: var(--cu-stage-h);
  perspective: 1800px;
  margin-top: 8px;
}
.cu-track { position: absolute; inset: 0; transform-style: preserve-3d; }

.cu-card {
  position: absolute;
  top: calc((var(--cu-stage-h) - var(--cu-card-h)) / 2);
  left: 50%;
  width: var(--cu-card-w);
  height: var(--cu-card-h);
  transform-origin: center center;
  transition:
    transform 540ms var(--ease-out-soft),
    opacity   540ms var(--ease-out-soft),
    filter    540ms var(--ease-out-soft);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}
.cu-card:not(.is-active) { cursor: pointer; }

.cu-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 30px 30px 24px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transform: translateZ(0);
  transition: box-shadow 360ms var(--ease-out-soft), border-color 360ms var(--ease-out-soft);
}
/* Focused card — elevated, prominent brand-tinted shadow */
.cu-card.is-active .cu-card-inner {
  border-color: rgba(5,48,206,0.14);
  box-shadow:
    0 1px 0 rgba(15,23,42,0.02),
    0 34px 64px -28px rgba(5,48,206,0.30),
    0 14px 32px -20px rgba(15,23,42,0.16);
}
/* Side cards — gentle lift on hover so they read as clickable */
.cu-card:not(.is-active):hover .cu-card-inner {
  border-color: rgba(5,48,206,0.16);
  box-shadow:
    0 1px 0 rgba(15,23,42,0.02),
    0 22px 44px -26px rgba(5,48,206,0.28),
    0 10px 24px -18px rgba(15,23,42,0.14);
}

/* Company-type tag */
.cu-tag {
  align-self: flex-start;
  padding: 5px 11px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}
.cu-card-title {
  margin: 16px 0 0;
  min-height: 52px; /* ~2 lines — keeps each card's panel starting at the same y */
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

/* ---------- Shared mini-visual area ---------- */
.cu-vis {
  flex: 1;
  margin: 20px 0 18px;
  min-height: 0;
}

/* Inner dashboard panel */
.cu-panel {
  display: flex;
  flex-direction: column;
  padding: 16px;
  background: var(--surface-1);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}
.cu-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cu-panel-title {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-1);
}
.cu-panel-sub {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-3);
}
.cu-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.cu-row:first-child { border-top: none; }
.cu-row-l { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.cu-row-name {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--fg-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cu-row-r { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.cu-amt {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg-1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cu-amt-in { color: var(--success); }
.cu-flag { border-radius: 2px; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0,0,0,0.05); }

/* Status pills */
.cu-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}
.cu-pill-dot { width: 5px; height: 5px; border-radius: 999px; background: currentColor; }
.cu-pill-sent { color: var(--success); background: rgba(22,163,74,0.10); }
.cu-pill-sat  { color: var(--accent);  background: rgba(5,48,206,0.09); }

/* Exportadoras footer (converges to MXN) */
.cu-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(5,48,206,0.22);
}
.cu-foot-l {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--fg-1);
}
.cu-foot-r {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Servicios — CFDI document */
.cu-panel-doc { gap: 0; }
.cu-doc-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.cu-doc-kind { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--fg-1); }
.cu-doc-meta { display: flex; flex-direction: column; }
.cu-doc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-top: 1px solid var(--line-soft);
}
.cu-doc-row:first-child { border-top: none; }
.cu-doc-row > span:first-child { font-family: var(--font-body); font-size: 12px; color: var(--fg-3); }
.cu-mono { font-family: var(--font-mono); font-size: 12px; color: var(--fg-1); letter-spacing: -0.01em; }
.cu-doc-recon {
  display: flex; align-items: center; gap: 9px;
  margin-top: 14px; padding: 10px 12px;
  background: rgba(22,163,74,0.07);
  border: 1px solid rgba(22,163,74,0.16);
  border-radius: 10px;
  font-family: var(--font-body); font-size: 12px; font-weight: 500; color: #15803D;
}
.cu-recon-check {
  flex: 0 0 auto; width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #15803D;
}
.cu-recon-check svg { width: 14px; height: 14px; }

/* Startups — FX comparison */
.cu-fx { display: flex; flex-direction: column; gap: 10px; }
.cu-fx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 10px;
}
.cu-fx-row-old {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
}
.cu-fx-row-new {
  background: rgba(5,48,206,0.07);
  border: 1px solid rgba(5,48,206,0.20);
}
.cu-fx-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--fg-2);
}
.cu-fx-row-new .cu-fx-label { color: var(--fg-1); font-weight: 600; }
.cu-fx-spark {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(5,48,206,0.14);
}
.cu-fx-rate {
  font-family: var(--font-body);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cu-fx-rate-old {
  font-size: 15px;
  color: var(--fg-3);
  text-decoration: line-through;
  text-decoration-color: rgba(17,24,39,0.3);
}
.cu-fx-rate-new { font-size: 19px; color: var(--accent); }
.cu-fx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.cu-fx-save {
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--fg-2);
}
.cu-fx-save strong { color: var(--success); font-weight: 700; }
.cu-fx-bps {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--success);
  background: rgba(22,163,74,0.10);
  padding: 3px 9px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Anchor stat ---------- */
.cu-anchor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}
.cu-anchor-dot {
  flex: 0 0 auto;
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(5,48,206,0.12);
}
.cu-anchor-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--fg-1);
}

/* ---------- Dots ---------- */
.cu-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 44px;
}
.cu-dot {
  width: 9px; height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(5,48,206,0.18);
  cursor: pointer;
  transition: width 320ms var(--ease-out-soft), background 320ms var(--ease-out-soft);
}
.cu-dot:hover { background: rgba(5,48,206,0.4); }
.cu-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cu-dot.is-active { width: 28px; background: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cu-section { --cu-card-w: min(420px, 86vw); --cu-card-h: 500px; --cu-stage-h: 560px; }
}
@media (max-width: 600px) {
  .cu-section { padding: 104px 0 112px; --cu-card-w: min(340px, 88vw); --cu-card-h: 476px; --cu-stage-h: 520px; }
  .cu-header { margin-bottom: 48px; }
  .cu-lede { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .cu-card { transition-duration: 1ms; }
  .cu-flow-beam, .cu-badge-dot { animation: none; }
}
