/* Resultados: muro de pantallas, baraja de casos, campañas, riel de redes, tablero de cifras e índice */

/* muro inclinado */
.r-hero { position: relative; height: 100dvh; min-height: 620px; overflow: hidden; background: #0B0E10; color: #F3F4F3; display: grid; place-items: center; }
.wall { position: absolute; inset: 0; perspective: 1500px; perspective-origin: 50% 40%; overflow: hidden; }
.wall-in { position: absolute; left: 50%; top: 50%; display: grid; grid-template-columns: repeat(5, 380px); gap: 18px; transform: translate(-50%, -50%) rotateX(52deg) rotateZ(-26deg) scale(1.15); transform-style: preserve-3d; }
.wall-col { display: grid; gap: 18px; will-change: transform; }
.wall-col:nth-child(even) { margin-top: -140px; }
.wall-col img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; border-radius: 14px; box-shadow: 0 30px 50px -30px rgb(0 0 0 / .8); }
.r-veil { position: absolute; inset: 0; background: radial-gradient(ellipse 58% 52% at 50% 50%, rgb(11 14 16 / .92) 30%, rgb(11 14 16 / .2) 100%), linear-gradient(to top, #0B0E10, transparent 26%); }
.r-copy { position: relative; z-index: 2; width: min(100%, 980px); padding: var(--nav-h) var(--gutter) 0; text-align: center; }
.r-copy .kicker { color: #4FD8CB; }
.r-copy h1 { font-size: clamp(3rem, 7vw, 7rem); }
.r-copy h1 .ln { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.r-copy h1 .ln > span { display: inline-block; }
.r-sub { max-width: 32em; margin: var(--s-5) auto 0; font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.38; color: #C9D2D6; text-wrap: balance; }
.js-anim [data-r-copy] { visibility: hidden; }

/* la navegación se lee sobre el muro oscuro antes de volverse sólida */
.p-resultados .nav:not(.is-solid) .nav-pill { background: color-mix(in srgb, var(--card) 92%, transparent); }

/* baraja de casos */
.r-deck { display: flex; flex-direction: column; min-height: 100dvh; padding: calc(var(--nav-h) + 34px) var(--gutter) 30px; background: var(--bg); overflow: hidden; }
.deck-head { display: flex; align-items: center; gap: var(--s-6); width: min(1180px, 100%); margin: 0 auto var(--s-5); }
.deck-head h2 { flex: none; font-size: clamp(1.875rem, 3.2vw, 3rem); }
.deck-bar { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.deck-bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.deck { position: relative; flex: 1; min-height: 0; width: min(1180px, 100%); margin-inline: auto; }
.case {
  position: absolute; inset: 0 0 44px;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  border-radius: var(--r-card); background: var(--card); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -44px rgb(14 37 51 / .5);
  transform-origin: 50% 100%; will-change: transform;
}
.case-shot { display: grid; place-items: center; min-height: 0; padding: clamp(.75rem, 2.4vw, 2rem); background: var(--mist); overflow: hidden; }
.case-win { display: flex; flex-direction: column; width: 100%; max-height: 100%; border-radius: 14px; background: var(--card); overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 24px 44px -30px rgb(14 37 51 / .45); }
.case-bar { flex: none; padding: .45rem 1rem; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: .8125rem; line-height: 1.3; text-align: center; }
.case-win img { flex: 1; min-height: 0; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; }
.case-info { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.25rem, 3vw, 2.5rem); }
.case-type { color: var(--accent); font-weight: 600; font-size: .9375rem; }
.case h3 { margin-top: .3rem; font-size: clamp(1.625rem, 2.8vw, 2.5rem); line-height: 1.08; letter-spacing: -.03em; }
.case-sum { margin-top: var(--s-3); color: var(--ink-2); }
.case-metrics { margin-block: var(--s-5); display: grid; gap: .5rem; }
.case-metrics div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.case-metrics dt { color: var(--ink-2); font-size: .9375rem; }
.case-metrics dd { margin: 0; font-size: 1.375rem; font-weight: 500; letter-spacing: -.02em; }
.is-pending { position: relative; overflow: hidden; align-self: flex-start; flex: none; padding: .1em .6em; border-radius: 999px; background: var(--mist); color: var(--ink-2); font-size: .8125rem !important; font-weight: 500; letter-spacing: 0 !important; }
.is-pending::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .55) 50%, transparent 70%); transform: translateX(-100%); animation: shine 2.6s var(--out) infinite; }
@keyframes shine { 60%, 100% { transform: translateX(100%); } }
[data-theme="dark"] .is-pending::after { background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .12) 50%, transparent 70%); }
.case-off { color: var(--ink-2); font-size: .9375rem; }

/* tablero de cifras */
.r-band { padding-block: var(--sec); background: #0B7676; color: #fff; }
.r-band h2 { max-width: 14em; }
.r-band .lead { color: #D7EFEC; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: var(--s-7); }
.slot-n { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-6); min-height: 240px; padding: 1.25rem; border-radius: var(--r-card); background: rgb(0 0 0 / .18); }
.slot-n b { font-weight: 500; line-height: 1.2; }
.flaps { display: flex; gap: 4px; font-size: clamp(2.25rem, 4.4vw, 4rem); font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; }
.flap { position: relative; display: grid; font-style: normal; place-items: center; width: .82em; height: 1.28em; border-radius: 10px; background: #063F3F; overflow: hidden; }
.flap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgb(0 0 0 / .45); }
.flap span { display: block; }
.slot-n small { margin-top: .5rem; display: block; color: #D7EFEC; font-size: .875rem; }

/* índice */
.r-index { padding-block: var(--sec); background: var(--bg); }
.ix-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: var(--s-4); margin-bottom: var(--s-6); }
.ix-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.ix-filters button { min-height: 44px; padding: 0 1.05rem; border: 0; border-radius: 999px; background: var(--mist); color: var(--ink-2); font-size: .9375rem; font-weight: 500; transition: background-color .25s var(--out), color .25s var(--out), transform .18s var(--spring); }
.ix-filters button:active { transform: scale(.97); }
.ix-filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ix-row { border-top: 1px solid var(--line); }
.ix-row:last-child { border-bottom: 1px solid var(--line); }
.ix-row[hidden] { display: none; }
.ix-link { position: relative; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr) minmax(0, 2fr) 40px; align-items: center; gap: var(--s-4); padding-block: clamp(.9rem, 1.6vw, 1.35rem); color: var(--ink); transition: opacity .25s var(--out), transform .4s var(--spring); }
.ix-list:hover .ix-link { opacity: .34; }
.ix-list .ix-link:hover, .ix-list .ix-link:focus-visible { opacity: 1; transform: translateX(10px); }
.ix-name { font-size: clamp(1.5rem, 3.4vw, 3rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.08; }
.ix-sum { color: var(--ink-2); font-size: .9688rem; line-height: 1.3; }
.ix-tag { color: var(--ink-2); font-size: .9375rem; }
.ix-go { justify-self: end; color: var(--accent); }
.ix-thumb { display: none; }
.ix-float { position: fixed; left: 0; top: 0; z-index: 20; width: min(440px, 32vw); aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; pointer-events: none; opacity: 0; box-shadow: 0 40px 70px -30px rgb(14 37 51 / .55); will-change: transform, opacity; }
.ix-float img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

/* cierre */
.r-end { padding-block: var(--sec); background: var(--mist); text-align: center; overflow: hidden; }
.r-strip { display: flex; justify-content: center; margin-bottom: var(--s-8); }
.r-strip-in { flex: none; display: flex; align-items: center; gap: clamp(10px, 1.4vw, 18px); }
.r-strip img, .slot-site { flex: none; width: clamp(190px, 21vw, 320px); aspect-ratio: 16 / 10; border-radius: var(--r-tile); }
.r-strip img { height: auto; object-fit: cover; object-position: 50% 0; }
.slot-site { display: grid; place-items: center; padding: 1rem; border: 2px dashed var(--accent); background: var(--bg); color: var(--accent); font-weight: 600; font-size: clamp(1.0625rem, 1.6vw, 1.5rem); letter-spacing: -.02em; overflow: hidden; }
.slot-site span { max-width: 100%; overflow-wrap: anywhere; }
.r-end-in { width: min(100%, 820px); margin-inline: auto; padding-inline: var(--gutter); }
.r-end h2 { font-size: clamp(2.6rem, 5.6vw, 5.25rem); line-height: 1.02; letter-spacing: -.04em; }
.r-end .lead { margin: var(--s-4) auto var(--s-6); }

@media (max-width: 1023px) {
  .case { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .case-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-block: var(--s-3); }
  .case-metrics div { flex-direction: column; gap: .15rem; padding-bottom: 0; border: 0; }
  .case-metrics dt { font-size: .8125rem; line-height: 1.15; }
  .case-sum { margin-top: .35rem; font-size: .9688rem; line-height: 1.3; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ix-link { grid-template-columns: 96px minmax(0, 1fr) 28px; }
  .ix-thumb { display: block; width: 96px; height: auto; aspect-ratio: 16 / 10; border-radius: 10px; object-fit: cover; object-position: 50% 0; }
  .ix-sum { grid-column: 2 / 3; grid-row: 2; }
  .ix-tag { display: none; }
  .ix-go { grid-column: 3; grid-row: 1 / 3; }
  .ix-name { grid-column: 2 / 3; grid-row: 1; }
  .ix-thumb { grid-row: 1 / 3; }
  .ix-float { display: none; }
  .ix-list:hover .ix-link { opacity: 1; }
  .ix-list .ix-link:hover { transform: none; }
}

@media (max-width: 767px) {
  .wall-in { grid-template-columns: repeat(5, 240px); gap: 12px; }
  .wall-col { gap: 12px; }
  .r-veil { background: radial-gradient(ellipse 90% 46% at 50% 50%, rgb(11 14 16 / .94) 40%, rgb(11 14 16 / .35) 100%), linear-gradient(to top, #0B0E10, transparent 26%); }
  .deck-head { flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }
  .deck-bar { flex-basis: 100%; }
  .r-deck { padding-top: calc(var(--nav-h) + 26px); }
  .case-info { padding: 1rem 1.1rem 1.1rem; }
  .slot-n { min-height: 170px; padding: 1rem; border-radius: 20px; }
  .flap { border-radius: 7px; }
}

/* sin motion: la baraja se vuelve una lista */
html:not(.js-anim) .r-deck { min-height: 0; overflow: visible; }
html:not(.js-anim) .deck { display: grid; gap: 20px; }
html:not(.js-anim) .case { position: relative; inset: auto; min-height: 460px; }
html:not(.js-anim) .deck-bar { display: none; }

/* anclas del encabezado y piezas en el muro */
.wall-col img.is-post { aspect-ratio: 1; }
.wall-col img.is-reel { aspect-ratio: 9 / 16; }
.r-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: var(--s-6); }
.r-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1.15rem; border-radius: 999px; background: rgb(255 255 255 / .12); color: #F3F4F3; font-size: .9375rem; font-weight: 500; transition: background-color .25s var(--out), transform .18s var(--spring); }
.r-jump a:hover { background: rgb(255 255 255 / .22); }
.r-jump a:active { transform: scale(.97); }

/* campañas: pestañas y cinta de piezas en su fecha */
.r-camp { padding-block: var(--sec); background: var(--mist); overflow: hidden; }
.camp-head h2 { max-width: 13em; }
.tabs { position: relative; display: inline-flex; max-width: 100%; margin-top: var(--s-6); padding: 4px; border-radius: 999px; background: var(--bg); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs-ind { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: 999px; background: var(--ink); transition: transform .45s var(--spring), width .45s var(--spring); }
.tabs button { position: relative; flex: none; min-height: 44px; padding: 0 1.1rem; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-size: .9375rem; font-weight: 500; white-space: nowrap; transition: color .25s var(--out); }
.tabs button[aria-selected="true"] { color: var(--bg); }
.camp { margin-top: var(--s-7); }
.camp[hidden] { display: none; }
.camp-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: var(--s-7); }
.camp-txt h3 { margin-top: .3rem; font-size: clamp(1.75rem, 3.2vw, 3rem); font-weight: 500; line-height: 1.06; letter-spacing: -.03em; }
.camp-sum { max-width: 34em; margin-top: var(--s-3); color: var(--ink-2); font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.4; text-wrap: pretty; }
.camp-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-block: var(--s-4); list-style: none; }
.camp-facts li { padding: .3rem .75rem; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: .875rem; line-height: 1.3; }
.camp-metrics { margin-block: 0; }
.ribbon { --pz-h: clamp(230px, 25vw, 340px); margin-top: var(--s-6); will-change: transform; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2)); scrollbar-width: none; cursor: grab; }
.ribbon::-webkit-scrollbar { display: none; }
.ribbon.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.ribbon:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ribbon-in { display: flex; align-items: flex-start; gap: clamp(10px, 1.2vw, 16px); width: max-content; padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); list-style: none; }
.pz { flex: none; width: max(168px, min(calc(var(--pz-h) * var(--ar)), 82vw)); scroll-snap-align: start; }
.pz-media { position: relative; display: block; width: 100%; height: min(var(--pz-h), calc(82vw / var(--ar))); padding: 0; border: 0; border-radius: var(--r-tile); background: var(--card); overflow: hidden; box-shadow: 0 0 0 1px var(--line); transition: transform .35s var(--spring); }
button.pz-media { cursor: pointer; }
button.pz-media:active { transform: scale(.985); }
.pz-media img, .pz-media video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; pointer-events: none; -webkit-user-drag: none; }
.pz-state { position: absolute; left: 10px; bottom: 10px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(11 14 16 / .62); color: #fff; transition: opacity .25s var(--out), transform .25s var(--out); }
.pz.is-playing .pz-state { opacity: 0; transform: scale(.8); }
.pz-when { margin-top: .6rem; color: var(--ink-2); font-size: .875rem; line-height: 1.3; }
.pz-when b { color: var(--ink); font-weight: 600; }
.pz-cap { margin-top: .15rem; font-size: .9375rem; line-height: 1.3; text-wrap: pretty; }
.pz-links { display: flex; gap: 2px; margin-top: .25rem; margin-left: -8px; }
.pz-links a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); transition: color .2s var(--out), background-color .2s var(--out), transform .18s var(--spring); }
.pz-links a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.pz-links a:active { transform: scale(.94); }
.pz-empty { display: grid; place-items: center; padding: 1rem; border: 2px dashed var(--accent); background: var(--bg); box-shadow: none; color: var(--accent); font-weight: 600; text-align: center; }
.ribbon-axis { height: 3px; margin-top: var(--s-4); border-radius: 3px; background: var(--line); overflow: hidden; }
.ribbon-axis i { display: block; height: 100%; background: var(--accent); transform: scaleX(.08); transform-origin: 0 50%; }

/* redes: riel de piezas, la del centro se reproduce */
.r-social { --reel-h: clamp(420px, 66vh, 640px); padding-block: var(--sec); background: #0B0E10; color: #F3F4F3; overflow: hidden; }
.r-social .kicker { color: #4FD8CB; }
.soc-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: var(--s-5); }
.soc-head h2 { max-width: 11em; }
.r-social .ix-filters button { background: rgb(255 255 255 / .1); color: #C9D2D6; }
.r-social .ix-filters button[aria-pressed="true"] { background: #F3F4F3; color: #0B0E10; }
.rail { position: relative; margin-top: var(--s-7); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; cursor: grab; }
.rail::-webkit-scrollbar { display: none; }
.rail.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.rail:focus-visible { outline: 2px solid #4FD8CB; outline-offset: -2px; }
.rail-in { display: flex; align-items: flex-start; gap: clamp(10px, 1.6vw, 22px); width: max-content; list-style: none; }
.rail-in::before, .rail-in::after { content: ""; flex: none; width: 50vw; }
.reel { flex: none; width: min(calc(var(--reel-h) * var(--ar)), 84vw); scroll-snap-align: center; }
.reel[hidden] { display: none; }
.reel-stage { display: grid; place-items: center; height: var(--reel-h); }
.reel-frame { position: relative; display: block; width: 100%; aspect-ratio: var(--ar); padding: 0; border: 0; border-radius: 22px; background: #15191C; color: #fff; overflow: hidden; transform-origin: 50% 50%; will-change: transform, opacity; }
button.reel-frame { cursor: pointer; }
.reel-frame img, .reel-frame video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.reel-slides { position: absolute; inset: 0; display: block; }
.reel-slides img { position: absolute; inset: 0; opacity: 0; transition: opacity .35s var(--out); }
.reel-slides img.is-on { opacity: 1; }
.reel-bars { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; gap: 4px; }
.reel-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgb(14 37 51 / .28); overflow: hidden; }
.reel-bars b { display: block; height: 100%; background: #0B7676; transform: scaleX(0); transform-origin: 0 50%; }
.reel-state { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgb(11 14 16 / .62); font-size: 1.25rem; opacity: 0; transition: opacity .25s var(--out), transform .25s var(--out); }
.reel.is-on:not(.is-playing) .reel-state { opacity: 1; }
.reel-info { padding-top: var(--s-4); }
.reel-meta { color: #C9D2D6; font-size: .875rem; line-height: 1.3; }
.reel-meta b { color: #F3F4F3; font-weight: 600; }
.reel-cap { margin-top: .2rem; font-size: 1.0625rem; font-weight: 500; line-height: 1.28; letter-spacing: -.01em; text-wrap: pretty; }
.reel-m { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: var(--s-3); }
.reel-m div { display: flex; flex-direction: column; gap: .15rem; }
.reel-m dt { color: #C9D2D6; font-size: .8125rem; line-height: 1.2; }
.reel-m dd { margin: 0; font-size: 1.125rem; font-weight: 500; }
.r-social .is-pending { background: rgb(255 255 255 / .1); color: #C9D2D6; }
.r-social .is-pending::after { background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / .12) 50%, transparent 70%); }
.r-social .pz-links a { color: #C9D2D6; }
.r-social .pz-links a:hover { background: rgb(255 255 255 / .1); color: #fff; }
.rail-ctl { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.rail-btn, .rail-sound { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .1); color: #F3F4F3; font-size: .9375rem; font-weight: 500; transition: background-color .25s var(--out), transform .18s var(--spring); }
.rail-btn { width: 44px; }
.rail-sound { margin-left: var(--s-3); padding: 0 1.05rem; }
.rail-sound[hidden] { display: none; }
.rail-btn:hover, .rail-sound:hover { background: rgb(255 255 255 / .2); }
.rail-btn:active, .rail-sound:active { transform: scale(.96); }
.rail-sound[aria-pressed="true"] { background: #F3F4F3; color: #0B0E10; }
.rail-count { min-width: 4.5em; color: #C9D2D6; font-size: .9375rem; font-variant-numeric: tabular-nums; text-align: center; }

/* cierre y vista previa con piezas */
.r-strip img.is-post { width: calc(clamp(190px, 21vw, 320px) * .625); aspect-ratio: 1; }

@media (max-width: 1023px) {
  .camp-top { grid-template-columns: 1fr; gap: var(--s-4); }
  .camp-metrics { margin-block: 0; }
}

@media (max-width: 767px) {
  .r-social { --reel-h: min(60vh, 124vw); }
  .tabs { display: flex; }
  .pz-cap { font-size: .875rem; }
  .rail-sound { margin-left: 0; }
}
