/* Cuba Despierta · Récords cubanos (views/records.php). Se carga solo en /descubre-cuba/records-cubanos.
   Paleta de site.css más el ámbar del marcador y el oro de los trofeos.
   Animaciones comunes de redesign.css (kenburns, fadeup, lineup, data-reveal). Interacción: js/records.js. */
.rz { --amber: #f5c542; --gold: #d4a62a; --gold-light: #f1d27a; --silver: #b9bec6; --board: #101010; }

/* ---------- 1. Cabecera con marcador ---------- */
.rh { position: relative; display: flex; align-items: flex-end; min-height: min(100svh, 900px); padding: calc(var(--hdr-h) + 4rem) 0 5rem; background: var(--ink-950); color: #fff; overflow: hidden; isolation: isolate; }
.rh-media { position: absolute; inset: 0; z-index: -2; }
.rh-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transform-origin: 50% 30%; filter: grayscale(.25) contrast(1.05); }
html.js .rh-media img { animation: kenburns 26s var(--ease-out) both, hx-drift 46s ease-in-out 26s infinite alternate; }
.rh::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14,14,14,.94) 0%, rgba(14,14,14,.78) 45%, rgba(14,14,14,.35) 100%), linear-gradient(to top, rgba(14,14,14,.9) 0%, rgba(14,14,14,0) 50%); }
/* Focos del estadio: se encienden con un parpadeo al cargar */
.rh-lights { position: absolute; top: -10%; right: 8%; z-index: -1; display: flex; gap: 4vw; pointer-events: none; }
.rh-lights i { width: 18vw; height: 70vh; background: radial-gradient(ellipse at 50% 0%, rgba(255,244,210,.35), rgba(255,244,210,.06) 45%, transparent 70%); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); transform: rotate(14deg); transform-origin: top; mix-blend-mode: screen; }
.rh-lights i:nth-child(2) { transform: rotate(4deg); }
.rh-lights i:nth-child(3) { transform: rotate(-8deg); }
html.js .rh-lights i { animation: rz-on 1.6s ease both; }
html.js .rh-lights i:nth-child(2) { animation-delay: .25s; }
html.js .rh-lights i:nth-child(3) { animation-delay: .5s; }
@keyframes rz-on { 0% { opacity: 0; } 20% { opacity: .9; } 30% { opacity: .1; } 45% { opacity: 1; } 55% { opacity: .4; } 100% { opacity: 1; } }
@media (max-width: 767px) { .rh::before { background: linear-gradient(to top, rgba(14,14,14,.96) 0%, rgba(14,14,14,.75) 55%, rgba(14,14,14,.5) 100%); } .rh-lights { display: none; } }
.rh-in { position: relative; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: end; }
@media (min-width: 1024px) { .rh-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
.rh-kicker { margin-top: 1.8rem; display: flex; align-items: center; gap: .9rem; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.rh-title { margin-top: 1.2rem; font-size: clamp(2.8rem, .9rem + 6.8vw, 6.8rem); font-weight: 800; line-height: .92; letter-spacing: -.035em; text-transform: uppercase; }
.rh-title .serif { color: var(--amber); font-size: 1.08em; text-transform: none; }
.rh-lead { margin-top: 1.4rem; max-width: 34rem; font-size: clamp(1rem, .95rem + .35vw, 1.2rem); line-height: 1.65; color: #e0e0e0; }
.rh-ctas { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
/* Marcador: panel negro con paletas que giran (split-flap) */
.rh-board { padding: 1.2rem 1.2rem 1rem; background: var(--board); border: 1px solid #2a2a2a; box-shadow: 0 30px 60px -20px rgba(0,0,0,.9), inset 0 0 0 4px #0a0a0a; }
.rh-row1, .rh-row2 { display: flex; justify-content: space-between; gap: 1rem; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--amber); }
.rh-row2 { color: #9a9a9a; }
.rh-flaps { margin: .9rem 0; display: flex; gap: clamp(4px, .6vw, 8px); }
.rh-flap { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 1; min-width: 0; height: clamp(4.6rem, 3rem + 5vw, 7.6rem); background: linear-gradient(#262626 0 49.5%, #1c1c1c 50.5% 100%); border-radius: 6px; font-size: clamp(3rem, 2rem + 4vw, 5.6rem); font-weight: 900; line-height: 1; color: #f7f7f7; font-variant-numeric: tabular-nums; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 6px 10px rgba(0,0,0,.5); overflow: hidden; }
.rh-flap::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; translate: 0 -50%; background: #0a0a0a; }
.rh-flap.is-gap { flex: .35; background: none; box-shadow: none; }
.rh-flap.is-gap::after { display: none; }
.rh-flap:last-child { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.4rem); color: var(--amber); }
.rh-flap.is-flip { animation: rz-flip .09s linear; }
@keyframes rz-flip { 0% { transform: rotateX(0); } 50% { transform: rotateX(80deg); filter: brightness(.6); } 100% { transform: rotateX(0); } }

/* ---------- 2. La vitrina ---------- */
.rv { padding-block: clamp(4rem, 3rem + 4vw, 7rem); scroll-margin-top: var(--hdr-h); }
.rv-note { max-width: 24rem; font-size: 15px; line-height: 1.6; color: var(--muted); }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 640px) { .rv-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .rv-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rv-item.is-gold { grid-row: span 2; } }
.rv-card { position: relative; display: flex; flex-direction: column; gap: .6rem; height: 100%; padding: 1.8rem 1.6rem 1.4rem; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--silver); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform .5s var(--ease-out), box-shadow .5s, border-color .3s; }
/* Destello que cruza el trofeo al pasar el ratón */
.rv-card::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.7), transparent); transform: skewX(-18deg); transition: left .9s var(--ease-out); pointer-events: none; }
.rv-card:hover::after { left: 130%; }
.rv-card:hover, .rv-card:focus-visible { transform: translateY(-6px); box-shadow: 0 30px 50px -32px rgba(0,0,0,.5); }
.rv-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.rv-rank { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: #7b7f86; }
.rv-v { display: flex; align-items: baseline; gap: .3rem; margin-top: .4rem; }
.rv-v b { font-size: clamp(3rem, 2.4rem + 2vw, 4.2rem); font-weight: 900; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.rv-v small { font-size: 1.3rem; font-weight: 800; color: var(--muted); }
.rv-t { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-dark); }
.rv-d { font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.rv-go { margin-top: auto; padding-top: .8rem; display: inline-flex; align-items: center; gap: .35rem; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-dark); }
.rv-go svg { transition: transform .45s var(--ease-out); }
.rv-card:hover .rv-go svg { transform: translateX(5px); }
/* La primera marca es el oro: ocupa más y brilla */
.rv-item.is-gold .rv-card { background: var(--ink-900); color: #fff; border-color: var(--ink-900); border-top-color: var(--gold); justify-content: center; }
.rv-item.is-gold .rv-card::after { background: linear-gradient(100deg, transparent, rgba(241,210,122,.25), transparent); }
.rv-item.is-gold .rv-rank { background: var(--gold); color: var(--ink); }
.rv-item.is-gold .rv-v b { font-size: clamp(4.4rem, 3rem + 5vw, 7.5rem); color: var(--gold-light); }
.rv-item.is-gold .rv-v small { color: var(--gold-light); }
.rv-item.is-gold .rv-t { color: var(--amber); }
.rv-item.is-gold .rv-d { color: #d6d6d6; font-size: 16px; }
.rv-item.is-gold .rv-go { color: #fff; }

/* ---------- 3. ¿Cuánto es 2,45 m? ---------- */
.rl { padding-block: clamp(4rem, 3rem + 4vw, 7rem); background: var(--ink-900); color: #fff; scroll-margin-top: var(--hdr-h); }
.rl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; align-items: center; }
@media (min-width: 900px) { .rl-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; } }
.rl-p { margin-top: 1rem; max-width: 30rem; font-size: 16px; line-height: 1.7; color: #d6d6d6; }
.rl-input { margin-top: 2rem; display: flex; flex-direction: column; gap: .7rem; max-width: 26rem; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #bdbdbd; }
.rl-input b { font-size: 1.6rem; letter-spacing: 0; color: #fff; font-variant-numeric: tabular-nums; }
.rl-input input { width: 100%; accent-color: var(--brand); }
.rl-input input:focus-visible { outline: 2px solid var(--brand-light); outline-offset: 4px; }
html:not(.js) .rl-input, html:not(.js) .rl-out { display: none; }
.rl-out { margin-top: 1.4rem; font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem); line-height: 1.5; color: #e5e5e5; }
.rl-out b { color: var(--amber); }
/* Escala vertical de 0 a 260 cm */
.rl-scale { --max: 260; position: relative; height: clamp(320px, 50vh, 440px); margin: 0 0 2rem 2.5rem; border-left: 2px solid rgba(255,255,255,.3); border-bottom: 2px solid rgba(255,255,255,.3); }
.rl-ticks span { position: absolute; left: -2.6rem; bottom: calc(var(--y) / var(--max) * 100%); translate: 0 50%; width: 2.2rem; text-align: right; font-size: 11px; font-weight: 700; color: #8a8a8a; font-variant-numeric: tabular-nums; }
.rl-ticks span::after { content: ''; position: absolute; left: calc(100% + 4px); top: 50%; width: 8px; height: 1px; background: rgba(255,255,255,.35); }
.rl-bar { position: absolute; left: 0; right: 0; bottom: calc(var(--y) / var(--max) * 100%); height: 6px; translate: 0 50%; background: repeating-linear-gradient(90deg, var(--brand) 0 22px, #fff 22px 44px); box-shadow: 0 0 20px rgba(255,90,71,.5); transform-origin: left; }
.rl-bar span { position: absolute; right: 0; bottom: 12px; padding: .2rem .5rem; background: var(--brand); font-size: 12px; font-weight: 900; letter-spacing: .06em; }
html.js .rl-scale.is-in .rl-bar { animation: rz-bar 1s var(--ease-out) .3s both; }
@keyframes rz-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rl-who { position: absolute; bottom: 0; width: 22%; height: calc(var(--h) / var(--max) * 100%); transition: height .5s var(--ease-out); }
.rl-who svg { display: block; width: 100%; height: 100%; }
.rl-who em { position: absolute; left: 50%; bottom: -1.8rem; translate: -50% 0; font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #bdbdbd; white-space: nowrap; }
.rl-you { left: 18%; }
.rl-you svg { fill: var(--brand-light); }
.rl-soto { left: 56%; }
.rl-soto svg { fill: rgba(255,255,255,.55); }

/* ---------- 4. Hazañas ---------- */
.rp { padding-block: clamp(4rem, 3rem + 4vw, 7rem); }
.rp-count { font-size: 14px; color: var(--muted); }
.rp-count b { font-size: 1.6rem; font-weight: 900; color: var(--ink); }
.rp-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 2rem; }
@media (min-width: 760px) { .rp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-list.is-solo { grid-template-columns: minmax(0, 1fr); } }
.rp-card { display: flex; flex-direction: column; gap: 1.3rem; color: var(--ink); text-decoration: none; }
.rp-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; }
.rp-img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; box-shadow: 0 30px 50px -30px rgba(0,0,0,.6); }
.rp-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.rp-card:hover .rp-img img { transform: scale(1.05); }
/* Medalla: disco dorado con el número y su cinta detrás */
.rp-medal { position: absolute; top: 34px; right: 1.4rem; z-index: 1; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 60%, #9c7a1c); box-shadow: 0 6px 12px rgba(0,0,0,.45); font-size: 18px; font-weight: 900; color: #4a3610; transition: transform .6s var(--ease-out); }
.rp-medal::before { content: ''; position: absolute; top: -34px; left: 50%; z-index: -1; width: 34px; height: 46px; translate: -50% 0; background: linear-gradient(90deg, var(--brand) 0 50%, #1f3a68 50%); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.rp-card:hover .rp-medal { transform: rotate(-10deg) translateY(4px); }
.rp-body { display: flex; flex-direction: column; gap: .6rem; }
.rp-meta { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-dark); }
.rp-t { font-size: clamp(1.15rem, 1rem + .5vw, 1.4rem); font-weight: 800; line-height: 1.2; text-transform: uppercase; transition: color .3s; }
.rp-card:hover .rp-t { color: var(--brand-dark); }
.rp-d { font-size: 15px; line-height: 1.6; color: var(--muted); }
.rp-go { display: inline-flex; align-items: center; gap: .4rem; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-dark); }
.rp-go svg { transition: transform .45s var(--ease-out); }
.rp-card:hover .rp-go svg { transform: translateX(5px); }
@media (min-width: 900px) {
  .rp-list.is-solo .rp-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 4rem; align-items: center; }
  .rp-list.is-solo .rp-t { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; font-size: clamp(2rem, 1.4rem + 1.8vw, 3rem); line-height: 1.02; }
}
.rp-empty { padding: 2rem; border: 1px dashed var(--line-strong); color: var(--muted); }

/* ---------- 5. Sigue descubriendo ---------- */
.rx { padding-block: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); border-top: 1px solid var(--line); }
.rx ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
@media (min-width: 560px) { .rx ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .rx ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .rx ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rx a { display: flex; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .3s, transform .5s var(--ease-out); }
.rx-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; background: var(--soft); color: var(--brand-dark); transition: background-color .35s, color .35s, transform .5s var(--ease-out); }
.rx-txt { display: flex; flex: 1; flex-direction: column; gap: .15rem; min-width: 0; }
.rx-n { font-size: 14.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.rx-c { font-size: 12px; color: var(--muted); }
.rx a > svg { color: var(--brand); transition: transform .45s var(--ease-out); }
.rx a:hover { border-color: var(--ink); transform: translateY(-3px); }
.rx a:hover .rx-ico { background: var(--brand); color: #fff; transform: rotate(-8deg); }
.rx a:hover > svg { transform: translateX(5px); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js .rh-lights i, .rh-flap.is-flip, html.js .rl-scale.is-in .rl-bar { animation: none; }
  .rv-card, .rv-card::after, .rl-who, .rp-img img, .rp-medal, .rx a { transition: none; }
}

/* ---------- Archivo (views/_cat_archivo.php): el número es una medalla ---------- */
.arc.is-records { --arc-accent: var(--gold); }
.arc.is-records .arc-n { left: .7rem; bottom: .7rem; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--gold-light), var(--gold) 60%, #9c7614); color: #2a1d02; box-shadow: 0 4px 10px rgba(0,0,0,.35); }
