/* =========================================================
   Gia Alfieri · Link-in-bio
   Paleta: lila pastel #D8CEDB · lavanda #F3EDF5 · berenjena #4A2C59
   ========================================================= */

:root {
  --fondo: #D8CEDB;
  --boton: #F3EDF5;
  --boton-hover: #FBF8FC;
  --texto: #4A2C59;
  --texto-suave: #7A6487;
  --borde: rgba(74, 44, 89, 0.12);
  --sombra: 0 1px 2px rgba(74, 44, 89, 0.08), 0 4px 14px rgba(74, 44, 89, 0.06);

  --serif: "Fraunces", "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radio: 10px;
  --ancho: 580px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

.icono {
  width: 24px;
  height: 24px;
  flex: none;
}

/* ---------- Contenedor ---------- */
.pagina {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 28px 16px calc(32px + env(safe-area-inset-bottom));
}

/* ---------- Cabecera ---------- */
.cabecera {
  position: relative;
  text-align: center;
  padding-top: 12px;
}

.perfil {
  width: 96px;
  height: 96px;
  margin: 0 auto 14px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--boton);
}

.titulo {
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 48;
}

.bio {
  max-width: 340px;
  margin: 6px auto 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 0.95rem;
}

.redes {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}
.redes a {
  color: var(--texto);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: background .15s ease, transform .15s ease;
}
.redes a:hover { background: rgba(255, 255, 255, .35); transform: translateY(-1px); }
.redes .icono { width: 26px; height: 26px; }

/* ---------- Botones principales ---------- */
.enlaces {
  display: grid;
  gap: 14px;
  margin: 28px 0 32px;
}

.boton {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 14px 52px;
  border-radius: var(--radio);
  background: var(--boton);
  color: var(--texto);
  text-decoration: none;
  text-align: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.98rem;
  box-shadow: var(--sombra);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.boton:hover {
  background: var(--boton-hover);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 2px 4px rgba(74, 44, 89, .08), 0 10px 22px rgba(74, 44, 89, .10);
}
.boton:active { transform: scale(.99); }

.icono-boton {
  position: absolute;
  left: 16px;
  width: 22px;
  height: 22px;
  opacity: .85;
}

/* ---------- Catálogo ---------- */
.catalogo {
  background: var(--boton);
  border-radius: 14px;
  padding: 16px 12px 12px;
  box-shadow: var(--sombra);
}

.buscador {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 42px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--borde);
  color: var(--texto-suave);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.buscador:focus-within {
  border-color: var(--texto);
  box-shadow: 0 0 0 3px rgba(74, 44, 89, .12);
}
.buscador .icono { width: 18px; height: 18px; }
.buscador input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--texto);
  font: 500 0.92rem var(--sans);
}
.buscador input::placeholder { color: var(--texto-suave); opacity: .8; }

/* Píldoras de categorías: scroll horizontal en celu, envuelven en escritorio */
.categorias {
  display: flex;
  gap: 8px;
  margin: 12px -12px 0;
  padding: 2px 12px 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.categorias::-webkit-scrollbar { display: none; }

.pildora {
  flex: none;
  scroll-snap-align: start;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--borde);
  background: #fff;
  color: var(--texto);
  font: 600 0.80rem var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.pildora:hover { border-color: var(--texto); }
.pildora[aria-selected="true"] {
  background: var(--texto);
  border-color: var(--texto);
  color: #fff;
}

@media (min-width: 560px) {
  .categorias { flex-wrap: wrap; justify-content: center; overflow: visible; }
}

.encabezado-categoria {
  text-align: center;
  margin: 14px 0 10px;
}
.encabezado-categoria h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.encabezado-categoria p {
  margin: 2px 0 0;
  font-size: .78rem;
  font-weight: 500;
  color: var(--texto-suave);
}

/* ---------- Grilla de videos ---------- */
.grilla {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin: 0 -4px;
}

.tarjeta {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #e9e0ec;
  color: #fff;
  text-decoration: none;
}
.tarjeta img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}
.tarjeta:hover img { transform: scale(1.04); filter: brightness(.88); }
.tarjeta:focus-visible { outline: 3px solid var(--texto); outline-offset: -3px; }

/* Ícono de plataforma en la esquina */
.tarjeta .plataforma {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(30, 16, 38, .45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tarjeta .plataforma .icono { width: 13px; height: 13px; }

/* Título sobre la portada al pasar el mouse (y siempre si no hay imagen) */
.tarjeta .nombre {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 8px 7px;
  font: 700 .74rem/1.2 var(--sans);
  text-transform: uppercase;
  background: linear-gradient(transparent, rgba(30, 16, 38, .75));
  opacity: 0;
  transition: opacity .2s ease;
}
.tarjeta:hover .nombre,
.tarjeta:focus-visible .nombre { opacity: 1; }

/* Portada que no cargó: tarjeta de color con el nombre */
.tarjeta.sin-imagen {
  display: grid;
  place-items: center;
  padding: 10px;
  background: linear-gradient(160deg, #b9a3c4, var(--texto));
}
.tarjeta.sin-imagen img { display: none; }
.tarjeta.sin-imagen .nombre {
  position: static;
  opacity: 1;
  background: none;
  padding: 0;
  text-align: center;
  font-family: var(--serif);
  font-size: .84rem;
  text-transform: uppercase;
  hyphens: auto;
}

.vacio {
  text-align: center;
  padding: 28px 8px 20px;
  margin: 0;
  color: var(--texto-suave);
}
.vacio button {
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--texto);
  color: #fff;
  font: 500 .85rem var(--sans);
  cursor: pointer;
}

/* Botón "Ver más" debajo de la grilla */
.ver-mas {
  display: block;
  margin: 16px auto 4px;
  border: 1px solid var(--borde);
  border-radius: 999px;
  padding: 10px 22px;
  background: var(--boton);
  color: var(--texto);
  font: 600 .88rem var(--sans);
  cursor: pointer;
  box-shadow: var(--sombra);
}
.ver-mas:hover { background: var(--boton-hover); }
.ver-mas:focus-visible { outline: 3px solid var(--texto); outline-offset: 2px; }
.ver-mas[hidden] { display: none; }

/* Reproducciones dentro del título de la tarjeta */
.tarjeta .nombre .vistas {
  display: block;
  margin-top: 3px;
  font: 500 .68rem/1 var(--sans);
  opacity: .85;
}

.pie {
  text-align: center;
  margin-top: 28px;
  font-size: .75rem;
  color: var(--texto-suave);
}

/* Aviso visual si el enlace del Drive todavía no está cargado (solo para quien edita) */
.boton[data-pendiente][href="#"] { outline: 2px dashed rgba(74, 44, 89, .25); outline-offset: 3px; }

.aviso {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--texto);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: .85rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  z-index: 10;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}