/* ═══════════════════════════════════════════════════════════════
   Torno Cisneros — Hub de Retos (/retos/)
   Namespace .tph-  ·  usa tokens.css y la base .tpc- de retos.css
═══════════════════════════════════════════════════════════════ */

.tph-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(ellipse 60% 70% at 85% 10%, rgba(30, 111, 255, 0.22), transparent 60%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(0, 207, 255, 0.08), transparent 60%),
    linear-gradient(var(--color-forge), var(--color-steel));
}
.tph-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(60, 90, 140, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(60, 90, 140, 0.16) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 90% at 60% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 60% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.tph-hero .tpc-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.tph-hero h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); line-height: 0.95; }
.tph-hero h1 em { font-style: normal; color: var(--color-cyan); }
.tph-lead { max-width: 56ch; margin: 1.4rem 0 2rem; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--color-vapor); }
.tph-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 0; margin: 2.2rem 0 0; padding: 0; list-style: none; border: 1px solid var(--color-border); border-radius: 6px; background: rgba(14, 21, 37, 0.7); width: fit-content; }
.tph-stats li { padding: 0.9rem 1.4rem; border-right: 1px solid var(--color-border-soft); }
.tph-stats li:last-child { border-right: 0; }
.tph-stats b { display: block; font-family: var(--font-heading); font-weight: 800; font-size: 2rem; line-height: 1; color: var(--color-white); }
.tph-stats span { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-chrome); }

/* pila de capturas del hero */
.tph-stack { position: relative; aspect-ratio: 1 / 1; }
.tph-stack figure { position: absolute; margin: 0; width: 70%; border-radius: 8px; overflow: hidden; border: 1px solid var(--color-border); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.04) inset; background: var(--color-steel); }
.tph-stack img { display: block; width: 100%; height: auto; }
.tph-stack figure:nth-child(1) { top: 0; left: 0; transform: rotate(-3deg); z-index: 1; }
.tph-stack figure:nth-child(2) { top: 29%; right: 0; transform: rotate(2.2deg); z-index: 2; }
.tph-stack figure:nth-child(3) { bottom: 2%; left: 6%; transform: rotate(-1.4deg); z-index: 3; }
.tph-stack figcaption { position: absolute; left: 0.7rem; bottom: 0.6rem; padding: 0.2rem 0.6rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-white); background: rgba(8, 12, 20, 0.82); border: 1px solid var(--color-border); border-radius: 2px; }

/* tarjetas de retos */
.tph-games { padding: clamp(3rem, 6vw, 5rem) 0; border-top: 1px solid var(--color-border-soft); }
.tph-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.tph-head h2 { margin: 0; }
.tph-head p { margin: 0; max-width: 46ch; color: var(--color-chrome); }
.tph-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.2rem, 2.4vw, 2rem); }
.tph-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(21, 30, 48, 0.9), rgba(14, 21, 37, 0.95));
  border: 1px solid var(--color-border);
  border-radius: 10px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.tph-card:hover, .tph-card:focus-within { border-color: var(--color-blue-glow); transform: translateY(-4px); box-shadow: 0 30px 70px -30px rgba(30, 111, 255, 0.55); }
.tph-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--color-forge); }
.tph-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out, ease); }
.tph-card:hover .tph-cover img { transform: scale(1.05); }
.tph-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 12, 20, 0) 45%, rgba(8, 12, 20, 0.85)); }
.tph-badge { position: absolute; z-index: 2; top: 0.9rem; left: 0.9rem; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.7rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: #07210f; background: oklch(78% 0.17 150); border-radius: 3px; }
.tph-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #07210f; }
.tph-cover-meta { position: absolute; z-index: 2; left: 1rem; right: 1rem; bottom: 0.9rem; display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.tph-cover-meta strong { font-family: var(--font-heading); font-weight: 800; font-size: 2.6rem; line-height: 0.9; color: var(--color-white); }
.tph-cover-meta span { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-vapor); }
.tph-body { display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.3rem, 2.4vw, 1.9rem); flex: 1; }
.tph-tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--color-cyan); }
.tph-card h3 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.tph-card p { margin: 0; color: var(--color-vapor); }
.tph-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }
.tph-chips li { padding: 0.28rem 0.65rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-vapor); border: 1px solid var(--color-border); border-radius: 2px; background: rgba(8, 12, 20, 0.5); }
.tph-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: var(--color-border-soft); border: 1px solid var(--color-border-soft); }
.tph-specs div { padding: 0.7rem 0.8rem; background: var(--color-steel); }
.tph-specs dt { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--color-chrome); }
.tph-specs dd { margin: 0.15rem 0 0; font-family: var(--font-heading); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--color-white); }
.tph-level { display: flex; align-items: center; gap: 0.7rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-chrome); }
.tph-level i { display: block; width: 140px; height: 6px; border-radius: 3px; background: rgba(60, 90, 140, 0.35); overflow: hidden; }
.tph-level i::after { content: ''; display: block; height: 100%; width: var(--w, 60%); background: linear-gradient(90deg, var(--color-blue), var(--color-cyan)); }
.tph-go { margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem; min-height: 54px; padding: 0.7rem 1.4rem; font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: #fff; background: var(--color-blue); border: 1px solid var(--color-blue-glow); border-radius: 4px; box-shadow: 0 12px 30px -12px rgba(30, 111, 255, 0.8); }
.tph-go::after { content: ''; position: absolute; inset: 0; } /* toda la tarjeta es clicable */
.tph-go svg { width: 20px; height: 20px; transition: transform 0.25s; }
.tph-card:hover .tph-go svg { transform: translateX(4px); }
.tph-card .tph-go:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }

/* tarjeta destacada a todo el ancho (cubierta a la izquierda, contenido a la derecha) */
.tph-card--wide { grid-column: 1 / -1; flex-direction: row; }
.tph-card--wide .tph-cover { flex: 1.2 1 0; aspect-ratio: auto; min-height: 360px; }
.tph-card--wide .tph-body { flex: 1 1 0; justify-content: center; }

.tph-soon { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 1.5rem; padding: clamp(1.2rem, 2.4vw, 1.8rem); border-style: dashed; background: transparent; }
.tph-soon:hover { transform: none; box-shadow: none; border-color: var(--color-border); }
.tph-soon .tph-ico { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border: 1px dashed var(--color-chrome); border-radius: 50%; color: var(--color-chrome); }
.tph-soon h3 { font-size: 1.5rem; }

/* cómo funcionan */
.tph-how { padding: clamp(3rem, 6vw, 5rem) 0; border-top: 1px solid var(--color-border-soft); background: var(--color-steel); }
.tph-how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 2rem; background: var(--color-border-soft); border: 1px solid var(--color-border-soft); }
.tph-how-grid article { padding: 1.8rem; background: var(--color-forge); counter-increment: how; }
.tph-how-grid { counter-reset: how; }
.tph-how-grid article::before { content: '0' counter(how); display: block; margin-bottom: 0.9rem; font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.2em; color: var(--color-cyan); }
.tph-how-grid h3 { font-size: 1.5rem; }
.tph-how-grid p { margin: 0; color: var(--color-vapor); }

.tph-compare { margin-top: 2.5rem; }
.tph-compare .tpc-parts { min-width: 640px; }

@media (max-width: 980px) {
  .tph-hero .tpc-wrap { grid-template-columns: 1fr; }
  .tph-stack { max-width: 560px; }
  .tph-grid { grid-template-columns: 1fr; }
  .tph-card--wide { flex-direction: column; }
  .tph-card--wide .tph-cover { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .tph-how-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tph-stats { grid-template-columns: repeat(3, auto); width: 100%; }
  .tph-stats li { padding: 0.7rem 0.8rem; }
  .tph-stats b { font-size: 1.6rem; }
  .tph-specs { grid-template-columns: 1fr; }
  .tph-soon { flex-direction: column; align-items: flex-start; }
  .tph-stack figure { width: 78%; }
}
@media (prefers-reduced-motion: reduce) {
  .tph-card, .tph-cover img, .tph-go svg { transition: none; }
  .tph-card:hover { transform: none; }
}

/* sección beta (separada de los retos disponibles) */
.tph-beta { padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--color-border-soft); background: linear-gradient(180deg, rgba(0, 207, 255, 0.04), transparent); }
.tph-grid--one { grid-template-columns: 1fr; }
.tph-badge--beta { color: #04202b; background: var(--color-cyan); }
.tph-badge--beta::before { background: #04202b; }
.tph-beta-note { padding: 0.7rem 0.9rem; border-left: 3px solid var(--color-cyan); background: rgba(0, 207, 255, 0.07); color: var(--color-white); font-size: 0.92rem; }
