/**
 * Estilos globales del sitio (tokens, reset mínimo, tipografía base).
 * La tarjeta digital carga además asesor/styles.css
 */
:root {
  --radius: 1.25rem;
  --background: oklch(0.985 0.005 230);
  --foreground: oklch(0.18 0.04 250);
  --card: oklch(1 0 0);
  --muted-foreground: oklch(0.5 0.03 250);
  --border: oklch(0.92 0.01 230);
  --secondary: oklch(0.96 0.01 230);
  --gradient-brand: linear-gradient(135deg, oklch(0.72 0.13 195) 0%, oklch(0.5 0.18 255) 60%, oklch(0.3 0.15 260) 100%);
  --gradient-soft: linear-gradient(180deg, oklch(0.98 0.01 220) 0%, oklch(0.94 0.03 220) 100%);
  --shadow-glow: 0 20px 60px -20px oklch(0.5 0.18 255 / 0.45);
  --shadow-card: 0 10px 40px -15px oklch(0.3 0.15 260 / 0.25);
  --shadow-soft: 0 4px 20px -8px oklch(0.3 0.15 260 / 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid var(--border);
}

html,
body {
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--gradient-soft);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
}

/* —— Listado (portada + /asesor/) —— tonos alineados con app INNOVA */
body:has(.listado-page) {
  background: #f1f5f9;
  color: #0f172a;
}

.listado-page {
  min-height: 100vh;
  padding: 0.75rem 1rem 3rem;
  max-width: 72rem;
  margin: 0 auto;
}

.listado-hero {
  position: relative;
  text-align: center;
  margin: 0 -1rem 2.25rem;
  padding: 3.65rem 1.5rem 2.25rem;
  background: linear-gradient(145deg, #1e3a8a 0%, #1e40af 42%, #172554 100%);
  color: #fff;
  border-radius: 0 0 1.25rem 1.25rem;
  box-shadow: 0 20px 50px -28px rgba(30, 58, 138, 0.65);
  animation: listado-fade 0.55s ease-out;
}

.listado-hero__logo {
  position: absolute;
  top: max(1rem, env(safe-area-inset-top, 0px));
  left: max(1.25rem, env(safe-area-inset-left, 0px));
  z-index: 1;
  display: block;
  width: min(11rem, 58vw);
  max-height: 2.35rem;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: left center;
}

@media (min-width: 40rem) {
  .listado-hero {
    border-radius: 1rem;
    margin-left: 0;
    margin-right: 0;
  }
}

.listado-hero h1 {
  font-size: clamp(1.65rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.listado-hero p {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  max-width: 38rem;
  margin: 0 auto;
}

.listado-hero__sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.82);
  margin-top: 0.4rem;
}

.listado-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 1.5rem;
  padding: 0.2rem;
  animation: listado-fade 0.6s ease-out 0.06s backwards;
}

.listado-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.55rem 0.45rem;
  background: linear-gradient(165deg, #1e3a8a 0%, #2563eb 42%, #dbeafe 42%, #eff6ff 58%, #ffffff 72%);
  border-radius: 1rem;
  overflow: visible;
  border: 1px solid rgba(37, 99, 235, 0.35);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 10px 28px -14px rgba(30, 58, 138, 0.22);
  transition:
    transform 0.3s cubic-bezier(0.33, 1, 0.68, 1),
    box-shadow 0.25s ease,
    border-color 0.25s ease;
  transform-origin: center center;
}

.listado-card:hover {
  transform: translateY(-6px) scale(1.045);
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow:
    0 4px 8px rgba(15, 23, 42, 0.06),
    0 18px 44px -16px rgba(30, 58, 138, 0.38);
}

@media (prefers-reduced-motion: reduce) {
  .listado-card {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .listado-card:hover {
    transform: translateY(-4px);
  }
}

.listado-card:focus-within {
  outline: 2px solid #3b82f6;
  outline-offset: 3px;
}

.listado-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  min-height: 0;
}

.listado-card__photo {
  display: block;
  width: 82%;
  max-width: 13.25rem;
  height: auto;
  margin: 0.6rem auto 0.35rem;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 0.55rem;
  border: 2px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 0 0 1px rgba(30, 58, 138, 0.2),
    0 8px 22px -10px rgba(15, 23, 42, 0.45);
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
}

.listado-card__body {
  margin-top: 0.15rem;
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  background: #fff;
  border-radius: 0.65rem;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.65);
}

.listado-card__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.listado-card__role {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
}

.listado-card__cta {
  margin-top: auto;
  padding-top: 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.01em;
  transition: color 0.15s ease, gap 0.15s ease;
}

.listado-card:hover .listado-card__cta {
  color: #1d4ed8;
  gap: 0.5rem;
}

.listado-card__cta svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  stroke: currentColor;
}

.listado-msg {
  text-align: center;
  padding: 1.75rem 1rem;
  color: #64748b;
  font-size: 0.9375rem;
}

.listado-msg code {
  font-size: 0.85em;
  padding: 0.12em 0.35em;
  border-radius: 0.35rem;
  background: #e2e8f0;
  color: #334155;
}

.listado-msg--error {
  color: #991b1b;
  background: linear-gradient(180deg, #fef2f2, #fee2e2);
  border: 1px solid #fecaca;
  border-radius: 1rem;
  max-width: 32rem;
  margin: 0 auto;
  box-shadow: 0 4px 16px -8px rgba(220, 38, 38, 0.2);
}

@keyframes listado-fade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enlace “Ver asesores” en portada (mismo tono acción) */
body:has(.listado-page) .listado-msg .sin-asesor__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.35rem;
  padding: 0.65rem 1.4rem;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  text-decoration: none;
  border-radius: 0.65rem;
  box-shadow: 0 4px 16px -4px rgba(59, 130, 246, 0.55);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body:has(.listado-page) .listado-msg .sin-asesor__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -6px rgba(59, 130, 246, 0.5);
}

.sin-asesor {
  max-width: 28rem;
  margin: 3rem auto;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.sin-asesor__titulo {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.sin-asesor__texto {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.sin-asesor__link {
  font-weight: 600;
  color: oklch(0.45 0.14 250);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
