/* ==========================================================================
   Recursos Worship — Heros del calendario de ofertas (prefijo chr-)
   Mismo lenguaje que home-bf-hero.css / black-friday.html: escenario con
   degradado negro → índigo → violeta, número con el cielo recortado al texto,
   porcentajes 3D flotando y la etiqueta morado → rosa. Debajo, pantallas
   reales de los productos que salen del borde inferior.
   Dos usos: el anuncio del calendario (home) y un hero por cada día.
   Se carga después de styles.css + nav.css. No toca nada compartido.
   ========================================================================== */

.chr {
  --chr-ink: #ffffff;
  --chr-ink-2: rgba(255, 255, 255, 0.78);
  --chr-muted: rgba(255, 255, 255, 0.58);
  --chr-dim: #4a4a4a;
  --chr-line: rgba(255, 255, 255, 0.16);
  --chr-grad: var(--grad, linear-gradient(95deg, #5b21f5 0%, #9d2cf6 45%, #ff3d9a 100%));
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(112px, 9.6vw, 142px) 0 0;
  border-radius: 0 0 var(--r-hero) var(--r-hero);
  color: var(--chr-ink); text-align: center;
  background:
    radial-gradient(44% 40% at 100% 100%, var(--g2, rgba(112, 70, 240, 0.42)) 0%, transparent 72%),
    radial-gradient(40% 36% at 0% 100%, var(--g1, rgba(232, 52, 160, 0.27)) 0%, transparent 72%),
    radial-gradient(130% 92% at 50% 100%, var(--b0, #22134d) 0%, var(--b1, #180d36) 20%, var(--b2, #0f0820) 40%, var(--b3, #07040f) 60%, var(--b4, #020104) 80%, #000 100%),
    #000;
}
.chr :focus-visible { outline-color: #fff; }
.chr[hidden] { display: none; }

.chr-in { position: relative; z-index: 2; display: grid; justify-items: center; gap: clamp(18px, 2.2vw, 28px); }

/* Etiqueta morado → rosa */
.chr-badge {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px;
  padding: 6px 18px; border-radius: 999px; background: var(--chr-grad);
  font-size: 14.5px; font-weight: 500; line-height: 1.2;
}
.chr-badge b { font-weight: 700; }
.chr-sep { width: 1px; height: 14px; background: rgba(255, 255, 255, 0.45); }
.chr-left { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px; margin: 0 -12px 0 4px; border-radius: 999px; background: #fff; color: #2a0f5c; font-size: 13.5px; font-weight: 560; }
.chr-left[hidden] { display: none; }
.chr-left b { font-variant-numeric: tabular-nums; }
.chr-badge:has(.chr-left:not([hidden])) { padding-right: 6px; }
.chr-badge:has(.chr-left:not([hidden])) .chr-left { margin-right: 0; }

.chr-title {
  max-width: 19ch; font-size: clamp(34px, 4.4vw, 74px); font-weight: 650; line-height: 1; letter-spacing: -0.045em;
  color: var(--chr-ink-2); text-wrap: balance;
}
.chr-title b { font-weight: 650; color: var(--chr-ink); }
.chr-dim { color: var(--chr-dim); }

/* Número con el cielo en movimiento dentro de las letras */
.chr-offer { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 2.4vw, 36px); }
.chr-pct {
  font-size: clamp(120px, 18vw, 290px); font-weight: 700; line-height: 0.76; letter-spacing: -0.07em;
  padding: 0.05em 0.06em 0.03em 0; white-space: nowrap;
  background-color: #8fbcff;
  background-image: url("../assets/black-friday/sky-07-anim.webp"), url("../assets/presenter-b/video/sky-07-poster.webp");
  background-size: cover; background-position: center;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chr-offer-k { display: grid; gap: 6px; text-align: left; font-size: clamp(22px, 2.3vw, 36px); font-weight: 650; line-height: 1.04; letter-spacing: -0.03em; }
.chr-offer-k small { font-size: clamp(14px, 1.15vw, 17px); font-weight: 450; letter-spacing: 0; line-height: 1.4; color: var(--chr-muted); max-width: 26ch; }
.chr-up { justify-self: start; display: inline-flex; align-items: center; height: 32px; padding: 0 14px; margin-top: 4px; border-radius: 999px; background: var(--chr-grad); font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: #fff; }

.chr-sub { max-width: 54ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--chr-muted); text-wrap: pretty; }
.chr-sub strong { color: var(--chr-ink); font-weight: 560; }

/* Ventanas del día */
.chr-slots { display: grid; gap: 8px; width: min(100%, 640px); }
.chr-slot {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 10px 10px 10px 16px;
  border-radius: 18px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--chr-line); text-align: left;
}
.chr-slot-time { font: 500 13px/1.2 var(--font, "Geist", system-ui, sans-serif); letter-spacing: 0; color: var(--chr-ink-2); white-space: nowrap; }
.chr-slot-what { min-width: 0; display: flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.chr-slot-what img { width: 20px; height: 20px; flex: none; }
.chr-slot-what span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chr-slot-what em { font-style: normal; font-weight: 800; background: var(--chr-grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.chr-slot-st { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 12.5px; font-weight: 600; color: var(--chr-ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chr-slot[data-state="live"] { box-shadow: inset 0 0 0 1.5px #4ade80; background: rgba(34, 197, 94, 0.1); }
.chr-slot[data-state="live"] .chr-slot-st { background: #fff; color: #0a3d1d; }
.chr-slot[data-state="live"] .chr-slot-st::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: #22c55e; animation: chr-pulse 1.6s ease-in-out infinite; }
.chr-slot[data-state="after"] { opacity: 0.5; }
@keyframes chr-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }

/* Dos botones */
.chr-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chr-btn { background: #fff; color: #0a0a0a; }
.chr-btn:hover { background: #e8e8ea; }
.chr-btn--ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.34); }
.chr-btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.chr-btn[aria-disabled="true"] { opacity: 0.55; pointer-events: none; }
.chr-note { font-size: 13.5px; color: var(--chr-muted); }

/* Carril de los 12 días (anuncio) */
.chr-rail { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: 6px; width: min(100%, 1040px); }
.chr-day {
  display: grid; justify-items: center; gap: 4px; padding: 12px 4px 11px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--chr-line); color: var(--chr-ink);
  transition: background-color 0.18s;
}
.chr-day:hover { background: rgba(255, 255, 255, 0.14); }
.chr-day b { font-size: clamp(20px, 2vw, 30px); font-weight: 650; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.chr-day i { font-style: normal; font: 500 12.5px/1 var(--font, "Geist", system-ui, sans-serif); letter-spacing: 0; color: var(--chr-muted); }
.chr-day em { font-style: normal; font-size: 12px; font-weight: 750; letter-spacing: -0.01em; background: var(--chr-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.chr-day--hot { background: var(--chr-grad); box-shadow: none; }
.chr-day--hot em, .chr-day--hot i { background: none; color: #fff; -webkit-text-fill-color: #fff; }
.chr-day[data-state="today"] { box-shadow: inset 0 0 0 2px #fff; }
.chr-day[data-state="past"] { opacity: 0.45; }

/* Pantallas reales que salen del borde inferior */
.chr-shelf {
  --bleed: clamp(40px, 6vw, 96px);
  position: relative; z-index: 3; display: grid; grid-template-columns: 0.78fr 1.12fr 1.62fr 1.12fr 0.78fr; align-items: end; gap: clamp(10px, 1.1vw, 18px);
  width: min(100% - 2 * var(--gutter), var(--w-wide)); margin: clamp(36px, 4vw, 60px) auto calc(-1 * var(--bleed));
  text-align: left;
}
.chr-shelf li { display: grid; gap: 12px; min-width: 0; }
.chr-shelf p { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 560; color: var(--chr-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chr-shelf p img { width: 18px; height: 18px; flex: none; }
.chr-screen { aspect-ratio: 16 / 10.4; border-radius: 14px 14px 0 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.18); border-bottom: 0; background: #0e0e0e; }
.chr-shelf li:nth-child(1) .chr-screen, .chr-shelf li:nth-child(5) .chr-screen { aspect-ratio: 16 / 12; }
.chr-screen img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }

/* Porcentajes 3D flotando */
.chr-floats { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.chr-float {
  position: absolute; left: var(--x); top: var(--y); width: var(--s);
  transform: translate(-50%, -50%) translate3d(calc(var(--mx, 0) * var(--d) * 1px), calc(var(--my, 0) * var(--d) * 1px), 0); will-change: transform;
}
.chr-float img { width: 100%; height: auto; transform: rotate(var(--r, 0deg)); animation: chr-bob var(--dur, 8s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes chr-bob { 0%, 100% { transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); } 50% { transform: translate3d(0, -16px, 0) rotate(calc(var(--r, 0deg) + 6deg)); } }

@media (max-width: 1180px) {
  .chr-shelf { grid-template-columns: 1.1fr 1.62fr 1.1fr; }
  .chr-shelf li:nth-child(1), .chr-shelf li:nth-child(5) { display: none; }
}
@media (max-width: 900px) {
  .chr-offer { flex-direction: column; gap: 10px; }
  .chr-offer-k { text-align: center; justify-items: center; }
  .chr-up { justify-self: center; }
  .chr-rail { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .chr-float--wide { display: none; }
}
@media (max-width: 760px) {
  .chr { padding-top: 104px; }
  .chr-badge { border-radius: 18px; padding: 8px 14px; font-size: 13.5px; gap: 6px 10px; }
  .chr-badge:has(.chr-left:not([hidden])) { padding-right: 8px; }
  .chr-badge > .chr-sep:nth-of-type(2) { display: none; }
  .chr-pct { font-size: min(44vw, 220px); }
  .chr-title { font-size: clamp(32px, 9vw, 42px); }
  .chr-cta { width: 100%; }
  .chr-cta .btn { width: 100%; }
  .chr-slot { grid-template-columns: minmax(0, 1fr) auto; }
  .chr-slot-time { grid-column: 1 / -1; }
  .chr-shelf { display: flex; gap: 12px; width: 100%; margin: 40px 0 0; padding: 0 var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .chr-shelf::-webkit-scrollbar { display: none; }
  .chr-shelf li, .chr-shelf li:nth-child(1), .chr-shelf li:nth-child(5) { display: grid; flex: 0 0 78%; scroll-snap-align: start; }
  .chr-screen { border-radius: 12px 12px 0 0; }
  .chr-float:nth-child(1) { --x: 92% !important; --y: 14% !important; --s: 70px !important; }
  .chr-float:nth-child(2) { --x: 7% !important; --y: 36% !important; --s: 56px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .chr-float img { animation: none; }
  .chr-float { transform: translate(-50%, -50%); }
  .chr-pct { background-image: url("../assets/presenter-b/video/sky-07-poster.webp"); }
  .chr-slot[data-state="live"] .chr-slot-st::before { animation: none; }
}
.chr-slot-what em { background: none; color: #fff; -webkit-text-fill-color: #fff; }
