/* Plantilla de gimnasio (hoja de rutina). Celular primero (360 y 390); escritorio desde 900 px. */
@font-face { font-family: "Archivo"; src: url("fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --maquina: #121212; --pared: #f2c230; --papel: #f6f6f4; --linea: #d6d6d1; --gris: #5b5d60;
  --gris-noche: #b8bcc2; --tinta-pared: #3d3a33; --borde: #8a8d92;
  --sans: "Archivo", system-ui, sans-serif; --mono: "Plex Mono", ui-monospace, monospace;
  --entra: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.5; color: var(--maquina); background: var(--papel); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--pared); outline-offset: 2px; }
.papel :focus-visible, .sala :focus-visible, .cierre :focus-visible, .semana :focus-visible { outline-color: var(--maquina); }
.w { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* Segunda voz fija de cada h2: parte chica en mono y grande en Archivo 800 */
h2 .chica { display: block; font: 500 14px/1.3 var(--mono); margin-bottom: 8px; }
h2 .grande { display: block; font-weight: 800; font-size: 32px; line-height: 1.02; letter-spacing: -.02em; }

/* Botones: uno lleno por pantalla */
.boton { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 20px; background: var(--pared); color: var(--maquina); font: 700 17px/1.2 var(--sans); border-radius: 2px; text-decoration: none; border: 0; cursor: pointer; transition: transform .12s; }
.boton i { flex: none; position: relative; width: 18px; height: 18px; border: 2px solid var(--maquina); }
.boton i::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border: solid var(--maquina); border-width: 0 2.5px 2.5px 0; transform: rotate(40deg) scale(1); opacity: 1; transition: transform .16s, opacity .16s; }
.boton:active { transform: scale(.97); }
.boton:active i::after { transform: rotate(40deg) scale(1.15); }
.enlace, .contorno { font-weight: 600; font-size: 15px; }
.enlace { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.contorno { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 2px solid currentColor; border-radius: 2px; text-decoration: none; transition: transform .12s; }
.contorno:active { transform: scale(.97); }

/* ---------- Cabecera: dos bloques pegados a los bordes ---------- */
.cabecera { position: absolute; z-index: 5; inset: 0 0 auto 0; display: flex; justify-content: space-between; pointer-events: none; }
.cabecera > * { pointer-events: auto; }
.marca, .cabecera .estado { display: flex; align-items: center; min-height: 44px; background: var(--maquina); color: var(--papel); padding: 0 12px; }
.marca { min-width: 0; max-width: 58%; text-decoration: none; }
.logo-t { font: 800 19px/1.05 var(--sans); letter-spacing: -.02em; overflow-wrap: anywhere; }
.cabecera .estado { flex: none; }
.estado { font: 500 13px/1.2 var(--mono); }
.cabecera .estado { gap: 8px; }
.cabecera .estado::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pared); }

/* ---------- Hero (hero B de la crítica 1) ---------- */
.hero { position: relative; display: flex; flex-direction: column; background: var(--maquina); color: var(--papel); overflow: hidden; }
.hero-foto { display: block; }
.hero-foto img { width: 100%; aspect-ratio: 12 / 11; object-fit: cover; }
.hero-bloque { position: relative; margin-top: -40px; background: var(--maquina); padding: 19px 16px 28px; }
.barra { position: absolute; z-index: 2; top: -11px; left: 0; width: 100vw; height: 22px; display: flex; align-items: center; color: var(--maquina); font: 500 16px/1 var(--mono); }
.barra::before { content: ""; position: absolute; inset: 0; background: var(--pared); transform-origin: left; }
.barra span { position: relative; margin-left: 16px; }
.letras { list-style: none; padding: 0; display: flex; justify-content: space-between; font: 500 12px/14px var(--mono); }
.letras li { position: relative; padding-bottom: 4px; }
.letras li:last-child { color: var(--pared); }
.letras li.hoy::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--pared); }
.hero h1 { margin-top: 16px; }
.hero h1 .chica { display: block; font-weight: 600; font-size: 22px; line-height: 1.1; }
.hero h1 .grande { display: block; margin-top: 6px; font-weight: 800; font-size: 52px; line-height: .94; letter-spacing: -.02em; color: var(--pared); }
.bajada { margin-top: 12px; font-size: 16px; line-height: 1.4; color: var(--gris-noche); }
.acciones { margin-top: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hero .enlace { color: var(--papel); }
.hero .boton { min-height: 52px; }

/* ---------- Sala ---------- */
.sala { background: var(--papel); padding: 64px 0; }
.sala .cab { margin-bottom: 40px; }
.sala .texto { font-size: 16px; color: var(--gris); max-width: 52ch; }
.sala h2 .chica { color: var(--gris); }
.hoja { list-style: none; padding: 0; display: grid; gap: 40px; }
.fila { display: grid; gap: 12px; }
.fila h3 { font-weight: 700; font-size: 22px; line-height: 1.15; }
.fila p { color: var(--gris); }
.foto { overflow: hidden; background: var(--linea); }
.foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s var(--entra); }
.foto:active img { transform: translateY(2px); }

/* ---------- Semana: la hoja de rutina ---------- */
.semana { background: var(--pared); color: var(--maquina); padding: 64px 0; }
.semana .w { display: grid; gap: 32px; }
.semana .cab { display: grid; gap: 20px; }
.semana h2 .chica { color: var(--tinta-pared); }
.oms { font-size: 16px; max-width: 52ch; }
.fuente { margin-top: 8px; font: 400 14px/1.4 var(--mono); color: var(--tinta-pared); }
.fuente b { font-weight: 500; color: var(--maquina); }
.hoja2 { display: grid; gap: 0; }
.banda { margin: 0; display: flex; align-items: center; min-height: 40px; padding: 0 12px; background: var(--maquina); color: var(--pared); font: 500 16px/1 var(--mono); font-variant-numeric: tabular-nums; }
.letras2 { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 2px solid var(--maquina); }
.letras2 li { text-align: center; padding: 10px 0 8px; font: 500 14px/1 var(--mono); }
.letras2 li:last-child { font-weight: 500; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.letras2 li.hoy { background: var(--maquina); color: var(--pared); }
.zona { border: 0; padding: 18px 0 0; margin: 0; min-width: 0; }
.zn { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: 18px; line-height: 1.2; }
.celdas { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--maquina); border-width: 0 0 0 1px; }
.celdas i { position: relative; display: block; height: 40px; border-right: 1px solid var(--maquina); border-bottom: 1px solid var(--maquina); }
.celdas i::after { content: ""; position: absolute; inset: 9px 4px; background: var(--maquina); transform-origin: left; clip-path: polygon(0 10%, 4% 0, 100% 6%, 98% 100%, 2% 92%); }
.celdas i:last-child::after { inset: 5px 4px; }
.casillas { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; }
.cas { position: relative; height: 44px; cursor: pointer; }
.cas input { position: absolute; inset: 0; width: 100%; opacity: 0; margin: 0; cursor: pointer; }
.cs { position: absolute; inset: 0; display: grid; place-items: center; border: 2px solid var(--maquina); margin-left: -1px; font: 500 14px/1 var(--mono); }
.cs i { position: absolute; inset: 0; background: var(--maquina); opacity: 0; transition: opacity .16s; }
.cs b { position: relative; font-weight: 500; }
.cas input:checked + .cs i { opacity: 1; }
.cas input:checked + .cs b { color: var(--pared); }
.cas input:focus-visible + .cs { outline: 3px solid var(--maquina); outline-offset: 2px; z-index: 1; }
.ayuda-f { margin-top: 6px; font-size: 15px; color: var(--tinta-pared); }
.estado-semana { margin-top: 0; font-size: 15px; font-weight: 500; }

/* ---------- Llegar ---------- */
.llegar { background: var(--maquina); color: var(--papel); padding: 64px 0; }
.llegar .w { display: grid; gap: 40px; }
.llegar h2 .chica { color: var(--gris-noche); }
.llegar h2 .grande { font-size: 40px; }
.dir { margin-top: 24px; font: 400 15px/1.4 var(--mono); }
.llegar .contorno { margin-top: 16px; color: var(--papel); }
.antes { margin-top: 24px; font-size: 15px; color: var(--gris-noche); max-width: 46ch; }
.llegar .boton { width: 100%; min-height: 56px; }
.llegar .boton span { text-wrap: balance; }
.panel { margin-top: 24px; border: 1px solid var(--borde); padding: 20px 16px; }
.panel h3 { font-weight: 700; font-size: 22px; line-height: 1.15; }
.entrada { margin-top: 4px; font-size: 15px; color: var(--gris-noche); }
.campo { margin-top: 16px; border: 0; padding: 0; min-width: 0; }
.campo label, .campo legend { display: block; padding: 0; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.campo input[type=text], .campo input[type=tel] { width: 100%; height: 48px; padding: 0 12px; background: transparent; color: var(--papel); border: 1px solid var(--borde); border-radius: 2px; font: 400 16px var(--sans); }
.campo input::placeholder { color: var(--gris-noche); opacity: .8; }
.campo input[aria-invalid=true] { border-color: var(--pared); }
.ayuda { margin-top: 4px; font-size: 14px; color: var(--gris-noche); }
.err { margin-top: 6px; font-size: 14px; font-weight: 500; color: var(--pared); }
.ops { display: flex; gap: 8px; }
.op { flex: 1; position: relative; margin: 0 !important; }
.op input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.op span { display: grid; place-items: center; min-height: 44px; border: 1px solid var(--borde); border-radius: 2px; font-weight: 600; font-size: 15px; }
.op input:checked + span { background: var(--papel); color: var(--maquina); border-color: var(--papel); }
.op input:focus-visible + span { outline: 3px solid var(--pared); outline-offset: 2px; }
.enviar { margin-top: 20px; width: 100%; background: transparent; color: var(--papel); border: 2px solid var(--papel); }
.llegar .precio { margin-top: 24px; }
.ok { margin-top: 8px; font-weight: 600; }
.ok:focus { outline: 0; }
.aviso { margin-top: 8px; font-size: 14px; font-weight: 400; color: var(--gris-noche); }

/* ---------- Cierre: la hoja entera marcada ---------- */
.cierre { background: var(--papel); padding: 64px 0 72px; }
.cierre .w { display: grid; gap: 32px; }
.cierre .w > * { min-width: 0; }
.mini { list-style: none; padding: 0; display: grid; gap: 8px; }
.mini li { display: grid; gap: 4px; font: 500 14px/1 var(--mono); color: var(--gris); }
.mini .celdas { border-color: var(--linea); }
.mini .celdas i { border-color: var(--linea); }
.mini .celdas i::after { background: var(--pared); }
.marca-grande { display: block; width: 100%; color: var(--maquina); text-decoration: none; }
.nombre-g { display: block; font: 800 40px/1.05 var(--sans); letter-spacing: -.03em; overflow-wrap: anywhere; white-space: nowrap; }
.nombre-g span, .nombre-g { background: linear-gradient(transparent 72%, var(--pared) 72% 94%, transparent 94%); }
.datos p { margin-top: 8px; }
.datos .enlaces { display: flex; flex-wrap: wrap; gap: 4px 24px; font-weight: 600; }
.datos .enlaces a { display: inline-flex; align-items: center; min-height: 44px; }
.datos .pie { margin-top: 16px; font: 400 14px/1.4 var(--mono); color: var(--gris); }

/* ---------- 404 ---------- */
.e404 { min-height: 100svh; display: grid; align-content: center; justify-items: start; gap: 16px; padding: 24px 16px; background: var(--maquina); color: var(--papel); }
.e404 .marca { padding: 0; background: none; }
.e404 h1 { font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -.02em; color: var(--pared); }

/* ---------- Movimiento (solo con html.mov; transform y opacity) ---------- */
.mov .e { opacity: 0; transform: translateX(-32px); }
.mov .e.ver { opacity: 1; transform: none; transition: opacity .45s var(--entra) var(--d, 0s), transform .45s var(--entra) var(--d, 0s); }
.mov .celdas i::after { transform: scaleX(0); }
.mov .ver .celdas i::after, .mov .e.ver .celdas i::after { transform: scaleX(1); transition: transform .5s cubic-bezier(.3, 0, .2, 1) calc(var(--k) * .09s + .1s); }
.mov .ver .celdas i:last-child::after { transition-delay: calc(6 * .09s + .45s); }
.mov .hero .barra::before { animation: barra .7s cubic-bezier(.6, 0, .2, 1) .15s both; }
.mov .hero .barra span { animation: aparece .3s ease .5s both; }
@keyframes barra { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@keyframes entra { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
@keyframes marca { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@supports (animation-timeline: view()) {
  .mov .e { opacity: 1; transform: none; animation: entra linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  .mov .e.ver { transition: none; }
  .mov .celdas i::after { transform: none; animation: marca linear both; animation-timeline: view(); animation-range: entry calc(8% + var(--k) * 5%) cover calc(22% + var(--k) * 4%); }
  .mov .celdas i:last-child::after { animation-range: entry 40% cover 52%; }
}
@media (hover: hover) {
  .boton:hover, .contorno:hover { transform: translateX(3px); }
  .enlace:hover { transform: translateX(2px); }
  .foto:hover img { transform: scale(1.03); }
  .enlace:hover { text-decoration: underline; text-underline-offset: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .mov .e, .mov .celdas i::after { opacity: 1; transform: none; animation: none; }
  * { transition: none !important; }
}

/* ---------- Escritorio ---------- */
@media (min-width: 900px) {
  .w { padding: 0 64px; }
  h2 .chica { font-size: 16px; margin-bottom: 12px; }
  h2 .grande { font-size: 64px; }
  .marca, .cabecera .estado { min-height: 56px; padding: 0 20px; }
  .logo-t { font-size: 24px; }
  .nombre-g { font-size: clamp(96px, 14vw, 200px); }
  .estado { font-size: 15px; }
  .cabecera .estado { padding: 0 24px; }

  .hero { min-height: min(100svh, 880px); }
  .hero-foto { position: absolute; inset: 0; }
  .hero-foto img { height: 100%; aspect-ratio: auto; object-position: 100% 35%; }
  .hero-bloque { margin-top: 160px; width: 832px; flex: 1; padding: 32px 64px 48px; }
  .barra { top: -13px; height: 26px; font-size: 20px; }
  .barra span { margin-left: 64px; }
  .letras { width: 704px; font-size: 14px; }
  .hero h1 { margin-top: 20px; }
  .hero h1 .chica { font-size: 40px; }
  .hero h1 .grande { font-size: 112px; line-height: .9; max-width: 11ch; margin-top: 8px; }
  .bajada { font-size: 18px; max-width: 52ch; margin-top: 16px; }
  .acciones { flex-direction: row; align-items: center; gap: 24px; margin-top: 24px; }
  .hero .boton { min-height: 56px; }



  .llegar h2 .grande { font-size: 48px; }
  .llegar .boton { min-height: 56px; }
  .contorno { display: inline-flex; width: auto; }
  .panel { padding: 28px; }
  .e404 { padding: 64px; }
  .e404 h1 { font-size: 72px; }
}

@media (min-width: 900px) {
  .sala .cab { margin-bottom: 48px; }
  .fila-t { min-height: 8rem; }
  .hoja { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .fila h3 { font-size: 28px; }
  .fila { align-content: start; }
  .semana .w { gap: 48px; }
  .semana .cab { grid-template-columns: 7fr 5fr; gap: 40px; align-items: end; }
  .banda { min-height: 56px; padding: 0 20px 0 200px; font-size: 22px; }
  .hoja2 { grid-template-columns: 200px repeat(7, 1fr); }
  .hoja2 > .banda { grid-column: 1 / -1; }
  .letras2 { grid-column: 2 / -1; }
  .letras2 li { font-size: 28px; padding: 14px 0 10px; font-weight: 500; }
  .hoja2 > .zona { display: contents; }
  .hoja2 .zn { grid-column: 1; align-self: center; margin: 0; padding: 0; font-size: 22px; }
  .hoja2 .celdas, .hoja2 .casillas { grid-column: 2 / -1; }
  .celdas i { height: 72px; }
  .celdas i::after { inset: 18px 8px; }
  .celdas i:last-child::after { inset: 12px 8px; }
  .cas { height: 72px; }
  .cs { font-size: 20px; }
  .hoja2 .ayuda-f { grid-column: 2 / -1; margin: 8px 0 0; }
  .hoja2 > .zona.fuerza { display: contents; }
  .hoja2 > .zona.fuerza legend { display: contents; }
  .llegar .w { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
  .cierre { padding: 96px 0; }
  .cierre .w { gap: 48px; }
  .mini { gap: 0; }
  .mini li { grid-template-columns: 200px 1fr; align-items: center; font-size: 18px; }
  .mini .celdas i { height: 48px; }
  .mini .celdas i::after { inset: 12px 8px; }
  .datos { display: flex; flex-wrap: wrap; gap: 8px 40px; align-items: baseline; }
  .datos p { margin: 0; }
  .datos .pie { margin-left: auto; }
}
