/* apps.talespace.pe — tokens de @talespace/shared (design/tokens.ts) y diseño de Tale Landing. */
:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e6eaf0;
  --primary: #00c9ff;
  --primary-hover: #00b4e6;
  --navy: #01053a;
  --texto-secundario: #5c6270;
  --gradiente-desde: #dff6ff;
  --gradiente-hasta: #f8f9fb;
  --sombra: 0 2px 8px rgba(1, 5, 58, 0.04);
  --sombra-hover: 0 4px 16px rgba(1, 5, 58, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--navy);
  background: linear-gradient(180deg, var(--gradiente-desde) 0, var(--gradiente-hasta) 420px, var(--surface) 100%);
}
main { flex: 1; }
[hidden] { display: none !important; }

.contenedor { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .contenedor { padding: 0 32px; } }

.solo-lector {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icono { width: 24px; height: 24px; }
.icono-chico { width: 16px; height: 16px; flex-shrink: 0; }

/* ── Cabecera ─────────────────────────────────────────────── */
.cabecera { background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.cabecera-fila { height: 56px; display: flex; align-items: center; }
.marca { font-weight: 800; letter-spacing: 0.12em; font-size: 15px; }
.marca-acento { color: var(--primary); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { max-width: 760px; padding: 56px 0 40px; }
.etiqueta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 9999px;
  background: var(--bg); border: 1px solid var(--border); box-shadow: var(--sombra);
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--texto-secundario);
}
.punto { width: 8px; height: 8px; border-radius: 9999px; background: var(--primary); }
.hero h1 { margin: 24px 0 16px; font-size: clamp(36px, 7vw, 60px); line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.degradado {
  background: linear-gradient(90deg, var(--primary), #2ea3ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--texto-secundario); }

/* ── Filtros ──────────────────────────────────────────────── */
.filtros { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
@media (min-width: 640px) { .filtros { flex-direction: row; } }
.buscador {
  /* 1 1 auto (no flex: 1): en la columna del celular, base 0 aplastaba la altura. */
  flex: 1 1 auto; display: flex; align-items: center; gap: 10px;
  padding: 0 12px; min-height: 44px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); color: var(--texto-secundario);
}
.buscador:focus-within, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 201, 255, 0.2); outline: none; }
.buscador input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--navy); }
select {
  height: 44px; padding: 0 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border); font: inherit; font-size: 14px; color: var(--navy);
}

/* ── Tarjetas ─────────────────────────────────────────────── */
.rejilla { list-style: none; margin: 0 0 56px; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .rejilla { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1024px) { .rejilla { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .rejilla { grid-template-columns: repeat(4, 1fr); gap: 32px; } }

.tarjeta {
  display: flex; flex-direction: column; padding: 24px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border); box-shadow: var(--sombra);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.tarjeta:hover { transform: translateY(-4px); box-shadow: var(--sombra-hover); border-color: #cbd5e1; }
.tarjeta-cabecera { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.tarjeta-icono {
  width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--navy);
  transition: color 0.2s, border-color 0.2s;
}
.tarjeta:hover .tarjeta-icono { color: var(--primary); border-color: rgba(0, 201, 255, 0.3); }
.tarjeta-nombre { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.insignia {
  display: inline-block; padding: 2px 10px; border-radius: 9999px; font-size: 11px; font-weight: 600;
  color: var(--navy); background: rgba(0, 201, 255, 0.1); border: 1px solid rgba(0, 201, 255, 0.25);
}
.tarjeta-descripcion { flex: 1; margin: 0 0 20px; font-size: 14px; line-height: 1.6; color: var(--texto-secundario); }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; border-radius: 12px; background: var(--primary); color: var(--navy);
  font-size: 14px; font-weight: 600; text-decoration: none; transition: background 0.2s;
}
.boton:hover { background: var(--primary-hover); }
.boton:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.vacio {
  margin: 0 0 56px; padding: 48px 24px; text-align: center; border-radius: 20px;
  background: var(--bg); border: 1px dashed var(--border); color: var(--texto-secundario);
}

/* ── Pie ──────────────────────────────────────────────────── */
.pie { border-top: 1px solid var(--border); background: rgba(255, 255, 255, 0.6); }
.pie-fila { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-top: 16px; padding-bottom: 16px; font-size: 12px; color: var(--texto-secundario); }

@media (prefers-reduced-motion: reduce) {
  .tarjeta, .tarjeta-icono, .boton { transition: none; }
  .tarjeta:hover { transform: none; }
}
