/* ==========================================================================
   Kori Labs · portada (index.html)
   Se carga después de styles.css. Mantiene la identidad: verde bosque, crema,
   durazno y el gato dormilón; suma el patrón de rombos de la marca y una
   tarjeta de PINTO que lleva su propio "mundo" oscuro de carreras.
   ========================================================================== */

.home {
  --forest-deep: #183f2c;
  --forest-line: #22533a;
  --kori: #399e5a;
  --teal: #51a3a3;
  --asphalt: #16171b;
  --asphalt-2: #1e1f24;
  --pinto-red: #e5463b;
  /* aire del separador de rombos: el mismo arriba (fin del hero) y abajo (inicio de Nuestros juegos) */
  --sep: clamp(2.5rem, 6vw, 3.5rem);

  /* rombos de la marca, muy sutiles; un halo cálido detrás del gato */
  background-color: var(--forest);
  background-image:
    radial-gradient(ellipse 55% 45% at 78% 30%, rgb(254 228 193 / 0.07), transparent 70%),
    conic-gradient(from 45deg, var(--forest-line) 25%, transparent 0 50%, var(--forest-line) 0 75%, transparent 0);
  background-size: auto, 4.5rem 4.5rem;
}

/* --- Cabecera ----------------------------------------------------------- */

.home-mark {
  display: block;
  color: var(--cream);
  border-radius: 4px;
}

.home-mark:focus-visible,
.site-nav__icon:focus-visible {
  outline: 3px solid var(--peach);
  outline-offset: 5px;
}

.site-nav__icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid rgb(247 243 234 / 0.4);
  border-radius: 50%;
  color: var(--cream);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-nav__icon svg { width: 1.15rem; height: 1.15rem; }

.site-nav__icon:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--forest);
}

/* --- Textos comunes ----------------------------------------------------- */

.h-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--peach);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.h-h2 {
  margin: 0;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.accent-inline { color: var(--peach); }

/* --- Portada ------------------------------------------------------------ */

.h-hero {
  display: grid;
  justify-items: center;
  gap: clamp(1.75rem, 5vw, 3rem);
  padding-block: clamp(2rem, 6vw, 4.5rem) var(--sep);
  text-align: center;
}

.h-hero__copy { max-width: 34rem; }

.h-hero__title {
  margin: 0;
  font-size: clamp(2.5rem, 1.3rem + 5.4vw, 4.75rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h-hero__lead {
  margin: 1.25rem auto 0;
  max-width: 30rem;
  color: var(--cream-dim);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  text-wrap: pretty;
}

.h-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.h-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.h-btn svg { width: 1.2rem; height: 1.2rem; }

.h-btn--primary {
  background: var(--peach);
  color: var(--forest);
}

.h-btn--primary:hover { background: var(--cream); transform: translateY(-2px); }

.h-btn--ghost {
  border: 2px solid rgb(247 243 234 / 0.45);
  color: var(--cream);
}

.h-btn--ghost:hover { border-color: var(--cream); background: rgb(247 243 234 / 0.08); transform: translateY(-2px); }

.h-btn:focus-visible { outline: 3px solid var(--peach); outline-offset: 4px; }

.h-hero__art {
  margin: 0;
  width: min(100%, 16rem);
}

/* Separador de rombos (como en los posts de la marca) */
.h-diamonds {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding-block: 0.5rem;
}

.h-diamonds i {
  width: 0.65rem;
  height: 0.65rem;
  transform: rotate(45deg);
  background: var(--cream);
}

.h-diamonds i:nth-child(2) { background: var(--kori); width: 0.85rem; height: 0.85rem; }
.h-diamonds i:nth-child(3) { background: var(--peach); }

/* --- Secciones ---------------------------------------------------------- */

.h-section {
  padding-block: clamp(3rem, 8vw, 5.5rem);
}

/* "Nuestros juegos": menos aire arriba (rombos) y abajo (antes de la suscripción) */
.h-games {
  padding-block: var(--sep) clamp(1.5rem, 4vw, 2.5rem);
  scroll-margin-top: 1.5rem;
}

.h-section__head { margin-bottom: 2rem; }
.h-section__head--center { text-align: center; margin-bottom: 1.5rem; }

/* --- Tarjeta de PINTO --------------------------------------------------- */

.h-game {
  position: relative;
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.25rem, 4vw, 2.75rem) calc(clamp(1.5rem, 4vw, 2.5rem) + 0.5rem);
  overflow: hidden;
  border-radius: 1.5rem;
  background-color: var(--asphalt);
  background-image:
    radial-gradient(ellipse 60% 70% at 25% 50%, rgb(229 70 59 / 0.12), transparent 70%),
    conic-gradient(from 45deg, var(--asphalt-2) 25%, transparent 0 50%, var(--asphalt-2) 0 75%, transparent 0);
  background-size: auto, 3.5rem 3.5rem;
  box-shadow: 0 1.5rem 3rem rgb(10 30 20 / 0.45);
  color: #f5f0e8;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.h-game:hover { transform: translateY(-4px); box-shadow: 0 2rem 3.5rem rgb(10 30 20 / 0.55); }
.h-game:focus-visible { outline: 3px solid var(--peach); outline-offset: 5px; }

.h-game__art {
  position: relative;
  justify-self: center;
  width: min(13rem, 52vw);
  margin-block: 0.5rem;
  aspect-ratio: 560 / 798;
  max-width: 100%;
}

.h-game__box {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 1.4rem 1.4rem rgb(0 0 0 / 0.55));
  animation: h-float 6s ease-in-out infinite;
}

.h-game__card {
  position: absolute;
  z-index: 1;
  width: 62%;
  height: auto;
  top: 8%;
  /* New card art (825×1125) has a cream border with square corners; round the outer edge */
  border-radius: 7.5%/5.35%;
  box-shadow: 0 0.8rem 1.6rem rgb(0 0 0 / 0.5);
  transition: transform 0.4s ease;
}

.h-game__card--a { right: -30%; top: 12%; transform: rotate(16deg); }
.h-game__card--b { left: -30%; top: 12%; transform: rotate(-14deg); }

.h-game:hover .h-game__card--a { transform: rotate(20deg) translateX(5%); }
.h-game:hover .h-game__card--b { transform: rotate(-18deg) translateX(-5%); }

@keyframes h-float {
  50% { transform: translateY(-0.5rem); }
}

.h-game__copy { min-width: 0; }

.h-game__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  margin: 0 0 1rem;
  color: #b9b4ab;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.h-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--pinto-red);
  color: #fff;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
}

.h-soon::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #fff;
  animation: h-pulse 1.6s ease-in-out infinite;
}

@keyframes h-pulse { 50% { opacity: 0.3; } }

.h-game__name { margin: 0; line-height: 0; }

.h-game__name img {
  display: block;
  width: min(100%, 17rem);
  height: auto;
}

.h-game__tag {
  margin: 1rem 0 0;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.h-game__tag span { color: var(--pinto-red); }

.h-game__text {
  max-width: 30rem;
  margin: 0.8rem 0 0;
  color: #b9b4ab;
}

/* Mismo chip que .p-facts en pinto.css (ícono + dato), para que home y PINTO se vean iguales */
.h-game__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.h-game__facts li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem 0.5rem 0.7rem;
  border: 1px solid rgb(245 240 232 / 0.14);
  border-radius: 999px;
  background: rgb(245 240 232 / 0.04);
  font-size: 0.9rem;
}

.h-game__facts svg { flex: none; width: 1.25rem; height: 1.25rem; color: #f5f0e8; }

.h-game__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: #f5f0e8;
  color: var(--asphalt);
  font-weight: 700;
  transition: background-color 0.2s ease;
}
.h-game:hover .h-game__link { background: #fff; }

.h-game:hover .h-game__link span { transform: translateX(3px); }
.h-game__link span { transition: transform 0.2s ease; }

.h-game__rainbow {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  height: 0.4rem;
}

.h-game__rainbow i { flex: 1; }
.h-game__rainbow i:nth-child(1) { background: #e63c3c; }
.h-game__rainbow i:nth-child(2) { background: #f08c28; }
.h-game__rainbow i:nth-child(3) { background: #f2c230; }
.h-game__rainbow i:nth-child(4) { background: #3dba6a; }
.h-game__rainbow i:nth-child(5) { background: #22b3c4; }
.h-game__rainbow i:nth-child(6) { background: #2f86de; }
.h-game__rainbow i:nth-child(7) { background: #9b4fd8; }
.h-game__rainbow i:nth-child(8) { background: #e23b86; }

/* Próximo juego */
.h-next {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1rem 0 0;
  padding: 1rem 1.25rem;
  border: 1.5px dashed rgb(247 243 234 / 0.28);
  border-radius: 1rem;
  color: var(--cream-dim);
}

.h-next > span:last-child { min-width: 0; text-wrap: pretty; }

.h-next__dot {
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  transform: rotate(45deg);
  background: var(--peach);
}

.h-next a {
  color: var(--cream);
  font-weight: 700;
  text-decoration-color: var(--peach);
  text-underline-offset: 0.2em;
}

/* --- Suscripción -------------------------------------------------------- */

html { scroll-behavior: smooth; }
/* --- En el taller (games in development, horizontal carousel) ---------- */

.h-lab { padding-top: clamp(2.5rem, 6vw, 4rem); scroll-margin-top: 1.5rem; }

.h-lab__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.h-lab__lead {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: var(--cream-dim);
  font-size: 1.05rem;
  text-wrap: pretty;
}

.h-lab__nav { display: flex; gap: 0.5rem; }
.h-lab__nav[hidden] { display: none; }

.h-lab__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1.5px solid rgb(247 243 234 / 0.4);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.h-lab__btn:hover:not(:disabled) { background: var(--cream); color: var(--forest); }
.h-lab__btn:disabled { opacity: 0.35; cursor: default; }
.h-lab__btn:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; }

.h-lab__track {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  scrollbar-width: none;
  border-radius: 1.25rem;
}
.h-lab__track::-webkit-scrollbar { display: none; }
.h-lab__track:focus-visible { outline: 3px solid var(--peach); outline-offset: 4px; }

.h-lab__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78%, 17rem);
  gap: 1rem;
  margin: 0;
  padding: 0.5rem 0 0.25rem;
  list-style: none;
}

.h-lab__item {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgb(247 243 234 / 0.12);
  border-radius: 1.25rem;
  background: var(--asphalt);
  color: #f5f0e8;
  scroll-snap-align: start;
}

.h-lab__art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgb(254 228 193 / 0.1), transparent 70%),
    #1b1c20;
}
.h-lab__art img { width: 88%; height: auto; }

/* Locked: a "character to unlock" silhouette */
.h-lab__item--locked .h-lab__art {
  background:
    repeating-linear-gradient(135deg, rgb(255 255 255 / 0.025) 0 10px, transparent 10px 20px),
    #0d0e10;
}

.h-lab__lock {
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  width: 1.4rem;
  height: 1.4rem;
  color: rgb(247 243 234 / 0.45);
}

.h-lab__type {
  margin: 0;
  color: var(--cream-dim);
  font-size: 0.9rem;
}

.h-lab__info {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 1rem 1.15rem 1.2rem;
  border-top: 1px solid rgb(247 243 234 / 0.08);
}

.h-lab__code {
  margin: 0;
  color: var(--peach);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.h-lab__name { margin: 0; font-size: 1.2rem; line-height: 1.2; }
/* Status tag ("En desarrollo") under the game type, in the normal flow so it never covers the art */
.h-lab__status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0 0;
  padding: 0.28rem 0.7rem 0.28rem 0.5rem;
  border: 1px solid rgb(254 228 193 / 0.35);
  border-radius: 999px;
  background: rgb(254 228 193 / 0.08);
  color: var(--peach);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.h-lab__status svg { flex: none; width: 0.95rem; height: 0.95rem; animation: h-gear 6s linear infinite; }
@keyframes h-gear { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .h-lab__status svg { animation: none; } }
.h-lab__item--locked .h-lab__name { color: rgb(245 240 232 / 0.55); }

.h-lab__stage {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.35rem 0 0;
  color: var(--cream-dim);
  font-size: 0.88rem;
}

.h-lab__dots { display: inline-flex; gap: 0.3rem; }
.h-lab__dots i {
  width: 0.55rem;
  height: 0.55rem;
  transform: rotate(45deg);
  border: 1.5px solid rgb(254 228 193 / 0.5);
}
.h-lab__dots i.is-done { border-color: var(--peach); background: var(--peach); }

.h-lab__note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.75rem 0 0;
  color: var(--cream-dim);
}

.h-btn--small {
  min-height: 2.6rem;
  padding: 0.5rem 1.1rem;
  background: var(--cream);
  color: var(--forest);
  font-size: 0.95rem;
}
.h-btn--small:hover { background: var(--peach); transform: translateY(-2px); }

@media (min-width: 56rem) {
  /* Three across; with more games the row scrolls and the arrows appear */
  .h-lab__list { grid-auto-columns: calc((100% - 2rem) / 3); }
}

@media (hover: hover) and (pointer: fine) {
  .h-lab__item { transition: transform 0.3s ease, border-color 0.3s ease; }
  .h-lab__item:hover { transform: translateY(-4px); border-color: rgb(254 228 193 / 0.4); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* --- Contacto (replaced the newsletter, Nov 2026) --------------------- */

.h-contact { padding-top: 0; scroll-margin-top: 1.5rem; }

.h-contact__card {
  display: grid;
  gap: 1.75rem;
  padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 5vw, 3rem);
  border: 1.5px solid rgb(254 228 193 / 0.35);
  border-radius: 1.5rem;
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgb(254 228 193 / 0.1), transparent 70%),
    var(--forest-deep);
  box-shadow: 0 1.5rem 3rem rgb(10 30 20 / 0.35);
}

.h-contact__lead {
  max-width: 28rem;
  margin: 1rem 0 0;
  color: var(--cream-dim);
  font-size: clamp(1.02rem, 1rem + 0.3vw, 1.15rem);
  text-wrap: pretty;
}

.h-contact__cta { margin-top: 0.6rem; color: var(--peach); font-weight: 700; }

.h-contact__list { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; align-content: center; }

.h-contact__item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgb(247 243 234 / 0.14);
  border-radius: 1rem;
  background: rgb(247 243 234 / 0.06);
  color: var(--cream);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.h-contact__item:hover { transform: translateY(-2px); border-color: var(--peach); background: rgb(247 243 234 / 0.1); }
.h-contact__item:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; }

.h-contact__icon { display: grid; flex: none; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: var(--peach); color: var(--forest-deep); }
.h-contact__icon svg { width: 1.4rem; height: 1.4rem; }
.h-contact__txt { display: grid; gap: 0.15rem; flex: 1; min-width: 0; }
.h-contact__txt b { font-size: 1.05rem; }
.h-contact__txt span { overflow-wrap: anywhere; color: var(--cream-dim); font-size: 0.92rem; line-height: 1.35; }
.h-contact__arrow { flex: none; color: var(--peach); font-weight: 700; }

@media (min-width: 52rem) {
  .h-contact__card { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .h-contact__item, .h-contact__item:hover { transition: none; transform: none; }
}

@media (max-width: 30rem) {
  .site-nav { gap: 0.8rem; }
  .site-nav__link { font-size: 0.74rem; letter-spacing: 0.08em; }
  /* Three links + the Instagram icon don't fit on phones: Instagram stays in Contacto and the footer */
  .site-nav__icon { display: none; }
}

/* Very narrow phones (≤ 358 px): tighter nav so the three links fit */
@media (max-width: 22.4rem) {
  .site-nav { gap: 0.55rem; }
  .site-nav__link { font-size: 0.68rem; letter-spacing: 0.04em; }
}

/* --- Valores ------------------------------------------------------------ */

.h-values { border-top: 1px solid var(--line); }

.h-values__list {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.h-values__list li {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.5rem;
}

.h-values__icon {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background: var(--cream);
  color: var(--forest);
}

.h-values__icon svg { width: 2.6rem; height: 2.6rem; }

.h-values h3 {
  margin: 0;
  font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.4rem);
  font-weight: 700;
  line-height: 1.05;
}

.h-values__list p {
  max-width: 18rem;
  margin: 0;
  color: var(--cream-dim);
}

/* --- Pie ---------------------------------------------------------------- */

/* Móvil: todo centrado en columna. Desde tablet: a los lados. */
.h-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
}

@media (min-width: 40rem) {
  .h-footer {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    text-align: left;
  }
}

.h-footer__ig {
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgb(247 243 234 / 0.35);
}

.h-footer__ig:hover { border-color: var(--peach); color: var(--peach); }
.h-footer__ig:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; }

.h-footer__link {
  color: var(--cream);
  text-decoration-color: var(--peach);
  text-underline-offset: 0.2em;
}

.h-footer__link:hover { color: var(--peach); }

.h-footer__link:focus-visible { outline: 3px solid var(--peach); outline-offset: 3px; border-radius: 2px; }

/* --- Tablet ------------------------------------------------------------- */

@media (min-width: 40rem) {
  .h-values__list { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

/* --- Escritorio --------------------------------------------------------- */

@media (min-width: 56rem) {
  .h-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    justify-items: stretch;
    align-items: center;
    column-gap: clamp(2rem, 6vw, 5rem);
    text-align: left;
  }

  .h-hero__lead { margin-inline: 0; }
  .h-actions { justify-content: flex-start; }

  .h-hero__art {
    justify-self: center;
    width: min(100%, 25rem);
  }

  .h-game {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
  }

  .h-game__art { width: min(100%, 14rem); }
}



@media (prefers-reduced-motion: reduce) {
  .h-game:hover, .h-lab__item:hover { transform: none; }
}

/* --- Taller: PINTO card (links to taller/pinto/) ------------------------- */
.h-lab__link { display: grid; grid-template-rows: auto 1fr; grid-row: 1 / -1; color: inherit; text-decoration: none; }
.h-lab__link:focus-visible { outline: 3px solid var(--peach); outline-offset: -3px; border-radius: 1.25rem; }
.h-lab__art--pinto { position: relative; overflow: hidden; }
.h-lab__badge { position: absolute; left: .7rem; top: .7rem; padding: .3rem .6rem; border-radius: 99px; background: #e5463b; color: #fff; font: 700 .68rem/1 var(--font); letter-spacing: .12em; text-transform: uppercase; }


/* --- PINTO process page (taller/pinto/) --------------------------------- */
.h-lab__art--pinto {
  display: grid; place-items: center; background-color: var(--asphalt);
  background-image: radial-gradient(ellipse 60% 70% at 25% 50%, rgb(229 70 59 / .12), transparent 70%),
    conic-gradient(from 45deg, var(--asphalt-2) 25%, transparent 0 50%, var(--asphalt-2) 0 75%, transparent 0);
  background-size: auto, 3.5rem 3.5rem;
}
.h-lab__art--pinto img { width: 72%; height: auto; }
.pp { display: block; padding: 1rem 0 4rem; }
.pp-title { margin: 0; line-height: 0; }
.pp-back { display: inline-flex; gap: .4rem; color: var(--cream-dim, #d9d3c5); font-weight: 700; text-decoration: none; }
.pp-back:hover { color: #f7f3ea; }
.pp-head { display: grid; justify-items: center; text-align: center; gap: .6rem; margin: 2rem auto 3rem; max-width: 36rem; }
.pp-logo { width: min(22rem, 70vw); height: auto; filter: drop-shadow(0 8px 18px rgb(0 0 0 / .35)); }
.pp-lead { margin: 0; color: rgb(247 243 234 / .8); font-size: 1.1rem; }
.pp-steps { list-style: none; margin: 0 auto; padding: 0; max-width: 60rem; position: relative; display: grid; gap: 3.5rem; }
.pp-steps::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 3px dashed rgb(254 228 193 / .35); }
.pp-step { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.pp-step::after { content: ""; position: absolute; left: 50%; top: 50%; width: 1rem; height: 1rem; margin: -.5rem 0 0 -.5rem; border-radius: 50%; background: #fee4c1; box-shadow: 0 0 0 5px rgb(254 228 193 / .2); }
.pp-step:nth-child(even) .pp-photo { order: 2; }
.pp-photo { margin: 0; padding: .7rem .7rem 1.6rem; background: #f7f3ea; border-radius: .5rem; box-shadow: 0 16px 36px rgb(0 0 0 / .35); transform: rotate(-2deg); transition: transform .3s ease; }
.pp-step:nth-child(even) .pp-photo { transform: rotate(2deg); }
.pp-photo:hover { transform: rotate(0) scale(1.02); }
.pp-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: .3rem; }
.pp-text h2 { margin: .3rem 0 .4rem; font-size: clamp(1.4rem, 3vw, 2rem); color: #f7f3ea; }
.pp-text p { margin: 0; color: rgb(247 243 234 / .8); font-size: 1.05rem; }
.pp-n { font: 700 .8rem/1 var(--font); letter-spacing: .16em; color: #fee4c1; }
.pp-end { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 4rem; }
@media (max-width: 47.99rem) {
  .pp-steps::before { left: .5rem; }
  .pp-step { grid-template-columns: 1fr; gap: 1rem; padding-left: 2rem; }
  .pp-step::after { left: .5rem; top: 1.5rem; }
  .pp-step:nth-child(even) .pp-photo { order: 0; }
}


@media (prefers-reduced-motion: reduce) {
  .pp-photo { transition: none; }
}

/* --- Sentido Figurado: its own card in Juegos (not a PINTO copy) + Taller item ---
   Copy on the left, a small "memory table" on the right: three figure cards that turn
   face down on hover/focus, the Media question card, a Veredicto card and loose shapes (no box here:
   the box lives on the game page). Sticker look from the box. */
.h-sf {
  --ink: #1e2433;
  position: relative;
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 2rem;
  background: #fff url("../juegos/sentido-figurado/img/fondo.svg") repeat 0 0 / 640px 640px;
  box-shadow: 7px 8px 0 var(--ink);
  color: var(--ink);
  font-family: "Outfit", var(--font);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.h-sf:hover { transform: translate(-2px, -3px); box-shadow: 10px 12px 0 var(--ink); }
.h-sf:focus-visible { outline: 3px solid var(--peach); outline-offset: 6px; }

.h-sf__copy { min-width: 0; position: relative; z-index: 1; }
.h-sf__soon {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 0.9rem;
  border: 2.5px solid var(--ink);
  border-radius: 0.6rem;
  background: #f03e3e;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  transform: rotate(-4deg);
}
.h-sf__name { margin: 0.6rem 0 0; line-height: 0; }
.h-sf__name img { width: min(100%, 21rem); height: auto; margin-left: -0.7rem; }
.h-sf__kind {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: #ffc21a;
  font-weight: 800;
  font-size: 1.05rem;
  transform: rotate(-2deg);
}
.h-sf__text { max-width: 28rem; margin: 1rem 0 0; color: #4a5163; font-size: 1.05rem; line-height: 1.5; }

/* Facts inside the three game shapes, like the box */
.h-sf__facts { display: flex; gap: 1.1rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.h-sf__fact { display: grid; justify-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 700; color: #4a5163; text-transform: uppercase; letter-spacing: 0.06em; }
.h-sf__fact strong {
  display: grid;
  place-items: center;
  width: 3.6rem;
  height: 3.6rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
}
.h-sf__fact--tri strong { background: #0e67af; clip-path: polygon(50% 4%, 100% 96%, 0 96%); padding-top: 1.2rem; font-size: 0.95rem; }
.h-sf__fact--sq strong { background: #ffc21a; color: var(--ink); border-radius: 0.7rem; width: 3.2rem; height: 3.2rem; margin-block: 0.2rem; }
.h-sf__fact--ci strong { background: #f03e3e; border-radius: 50%; font-size: 0.95rem; }

.h-sf__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.6rem;
  padding: 0.7rem 1.4rem;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #0e67af;
  box-shadow: 3px 4px 0 var(--ink);
  color: #fff;
  font-weight: 800;
}

/* The memory table: figure cards (face up), question and Veredicto cards, a brain, loose shapes */
.h-sf__table { position: relative; justify-self: center; width: min(100%, 32rem); aspect-ratio: 1 / 0.95; }
.h-sf__table img { display: block; height: auto; border-radius: 7%/5%; }
.h-sf__card, .h-sf__flip { position: absolute; width: 22%; aspect-ratio: 480 / 672; }
.h-sf__card { box-shadow: 0 0.4rem 1rem rgb(30 36 51 / 0.2); }
.h-sf__flip {
  transform-style: preserve-3d;
  transform: rotate(var(--r)) rotateY(0);
  transition: transform 0.6s cubic-bezier(.3,.7,.3,1.2) var(--d, 0s);
}
.h-sf__flip img { position: absolute; inset: 0; width: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0.4rem 1rem rgb(30 36 51 / 0.2); }
.h-sf__flip img + img { transform: rotateY(180deg); }
.h-sf__flip--1 { left: 2%;  top: 6%; --r: -10deg; }
.h-sf__flip--2 { left: 26%; top: 1%; --r: -3deg; --d: 0.07s; }
.h-sf__flip--3 { left: 50%; top: 2%; --r: 4deg; --d: 0.14s; }
.h-sf__flip--4 { left: 74%; top: 7%; --r: 11deg; --d: 0.21s; }
/* Owner prefers the cards face up: no flip on hover (the backs stay in the markup if it comes back) */

.h-sf__card--back1 { left: 0;    bottom: 6%; transform: rotate(-18deg); }
.h-sf__card--q     { left: 12%;  bottom: 1%; transform: rotate(-6deg); }
.h-sf__card--back2 { right: 0;   bottom: 6%; transform: rotate(18deg); }
.h-sf__card--v     { right: 12%; bottom: 1%; transform: rotate(7deg); }
.h-sf__brain { position: absolute; left: 33%; bottom: 4%; width: 34%; transition: transform 0.4s ease; }
.h-sf:hover .h-sf__brain { transform: rotate(-4deg) scale(1.05); }

/* Loose game shapes, sticker style */
.h-sf__deco { position: absolute; border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.h-sf__deco--ci  { left: 30%; bottom: 40%; width: 7%; aspect-ratio: 1; border-radius: 50%; background: #f03e3e; }
.h-sf__deco--ci2 { right: 2%; top: 48%; width: 5%; aspect-ratio: 1; border-radius: 50%; background: #0e67af; }
.h-sf__deco--sq  { right: 30%; bottom: 42%; width: 6.5%; aspect-ratio: 1; border-radius: 18%; background: #ffc21a; transform: rotate(14deg); }
.h-sf__deco--sq2 { left: 1%; top: 47%; width: 5%; aspect-ratio: 1; border-radius: 18%; background: #f03e3e; transform: rotate(-10deg); }
.h-sf__deco--tri, .h-sf__deco--tri2 { border: 0; box-shadow: none; clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(3px 3px 0 var(--ink)); }
.h-sf__deco--tri  { left: 45%; top: 44%; width: 8%; aspect-ratio: 1 / 0.9; background: #0e67af; transform: rotate(-12deg); }
.h-sf__deco--tri2 { right: 22%; top: 0; width: 6%; aspect-ratio: 1 / 0.9; background: #ffc21a; transform: rotate(20deg); }

/* Thought bubble from the brain */
.h-sf__hint {
  position: absolute;
  left: 50%;
  bottom: 38%;
  padding: 0.35rem 0.9rem;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 0.4rem) rotate(-3deg);
  transition: opacity 0.3s ease 0.4s, transform 0.3s ease 0.4s;
}
.h-sf:hover .h-sf__hint, .h-sf:focus-visible .h-sf__hint { opacity: 1; transform: translate(-50%, 0) rotate(-3deg); }

@media (min-width: 48rem) {
  .h-sf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 4vw, 3.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .h-sf, .h-sf__flip, .h-sf__hint, .h-sf__brain { transition: none; }
  .h-sf:hover { transform: none; }
}

.h-lab__art--sf { background: #fff url("../juegos/sentido-figurado/img/fondo.svg") repeat 0 0 / 420px 420px; }
.h-lab__art--sf img { width: 74%; height: auto; }
