:root {
  --fondo: #fafaf9;
  --tarjeta: #ffffff;
  --texto: #18181b;
  --suave: #52525b;
  --linea: #e4e4e0;
  --foco: #2451d6;
  --radio: 14px;
  --sombra: 0 1px 2px rgb(24 24 27 / .06), 0 1px 1px rgb(24 24 27 / .04);
  --sombra-alta: 0 12px 32px -8px rgb(24 24 27 / .18), 0 2px 6px rgb(24 24 27 / .08);
}

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

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

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.saltar {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--texto); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
}
.saltar:focus-visible { top: 12px; }

:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; }

/* Cabecera */
.cabecera {
  max-width: 44rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem) 1.25rem clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
.sello {
  font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--suave); margin-bottom: 1.25rem;
}
h1 {
  font-size: clamp(1.875rem, 1.2rem + 3.4vw, 3.25rem);
  line-height: 1.1; letter-spacing: -.025em; font-weight: 700;
  text-wrap: balance;
}
.bajada {
  margin-top: 1.25rem; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  color: var(--suave); text-wrap: pretty;
}
.pista { margin-top: 1rem; font-weight: 600; }

/* Grilla: 1 columna en celular, 2 en tablet, 3 en escritorio; la última fila queda centrada */
main { max-width: 74rem; margin: 0 auto; padding: 0 1.25rem; }

.grilla {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.grilla > li { display: flex; min-width: 0; }

@media (min-width: 640px) {
  .grilla { grid-template-columns: repeat(4, 1fr); gap: 1.75rem; }
  .grilla > li { grid-column: span 2; }
  .grilla > li:nth-child(5) { grid-column: 2 / span 2; }
}
@media (min-width: 1040px) {
  .grilla { grid-template-columns: repeat(6, 1fr); }
  .grilla > li:nth-child(4) { grid-column: 2 / span 2; }
  .grilla > li:nth-child(5) { grid-column: 4 / span 2; }
}

/* Tarjeta */
.tarjeta {
  display: flex; flex-direction: column; width: 100%;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
  color: inherit; text-decoration: none; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.tarjeta:focus-visible { outline-offset: 4px; }

.visual {
  position: relative;
  background: #f1f1ee;
  border-bottom: 1px solid var(--linea);
}
.visual .esc { width: 100%; aspect-ratio: 900 / 563; object-fit: cover; }
.visual .cel {
  position: absolute; right: 4.5%; bottom: -1px;
  width: 19%; height: auto;
  border: 3px solid #fff; border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 6px 18px rgb(24 24 27 / .28);
  background: #fff;
}

.cuerpo { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.375rem 1.375rem; }
.rubro { font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); }
h3 { margin-top: .25rem; font-size: 1.375rem; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; }
.resuelve { margin-top: .625rem; color: var(--suave); text-wrap: pretty; }

.etiquetas { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.25rem; }
.etiquetas li {
  font-size: .8125rem; line-height: 1; padding: .4375rem .6875rem;
  border: 1px solid var(--linea); border-radius: 999px; background: var(--fondo); color: #3f3f46;
}

.ver {
  display: inline-flex; align-items: center; gap: .375rem; align-self: flex-start;
  margin-top: auto; padding: 0 1.125rem; min-height: 44px;
  background: var(--texto); color: #fff; border-radius: 999px; font-weight: 600; font-size: .9375rem;
}
.ver svg { transition: transform .2s ease; }

@media (hover: hover) {
  .tarjeta:hover { transform: translateY(-4px); box-shadow: var(--sombra-alta); border-color: #cfcfca; }
  .tarjeta:hover .ver svg { transform: translate(2px, -2px); }
}

/* Pie */
.pie { text-align: center; padding: clamp(3rem, 7vw, 5rem) 1.25rem 3rem; color: var(--suave); font-size: .9375rem; }
.pie a { color: var(--texto); font-weight: 600; text-underline-offset: 3px; }
.pie a:hover { text-decoration-thickness: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .tarjeta:hover { transform: none; }
}
