/* RankRadar — full-bleed cinematic product ad */

.rr-cinema {
  position: relative;
  width: 100%;
  /* Prefer small/visual viewport so the progress bar is never clipped under browser chrome */
  --rr-vh: 100svh;
  height: var(--rr-vh);
  min-height: var(--rr-vh);
  max-height: var(--rr-vh);
  background: #07080c;
  color: #fafafa;
  overflow: hidden;
  isolation: isolate;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
}
.rr-cinema * { box-sizing: border-box; }

.rr-cinema__stage { position: absolute; inset: 0; overflow: hidden; }
.rr-topo { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.rr-camera {
  position: absolute; inset: 0; z-index: 2;
  transform-origin: 50% 50%;
  will-change: transform;
  transition: transform 1.05s cubic-bezier(0.65, 0.05, 0.36, 1);
}
.rr-scene {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
  pointer-events: none;
}
.rr-scene.is-on { opacity: 1; visibility: visible; }
/* Instant cut when leaving a scene — prevents UI copy stacking under kinetic type */
.rr-scene.is-snap-out {
  transition: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.rr-kinetic {
  position: absolute; inset: 0; z-index: 30;
  display: grid; place-items: center;
  padding: clamp(20px, 4vh, 56px) clamp(24px, 6vw, 72px);
  /* Keep copy above progress + caption */
  padding-bottom: clamp(48px, 8vh, 72px);
  pointer-events: none; text-align: center;
}
.rr-kinetic[data-mode="left"] { place-items: center; text-align: center; }
.rr-kinetic[data-mode="bottom"] { place-items: center; text-align: center; padding-bottom: clamp(48px, 8vh, 72px); }
.rr-kinetic__stack {
  position: relative;
  max-width: min(900px, 94vw);
  padding: clamp(16px, 3vh, 36px) clamp(20px, 4vw, 48px);
  isolation: isolate;
}
.rr-kinetic__stack::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -18% -8%;
  border-radius: 48% 52% 46% 54% / 54% 48% 52% 46%;
  background:
    radial-gradient(ellipse 72% 58% at 50% 48%, rgba(7, 8, 12, 0.9) 0%, rgba(7, 8, 12, 0.58) 42%, rgba(7, 8, 12, 0.18) 68%, transparent 78%);
  filter: blur(14px);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.55s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.rr-kinetic__stack::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% 12%;
  border-radius: 40%;
  background: radial-gradient(ellipse at 50% 50%, rgba(30, 16, 8, 0.4), transparent 70%);
  filter: blur(28px);
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}
.rr-kinetic.is-in .rr-kinetic__stack::before {
  opacity: 1;
  transform: scale(1);
}
.rr-kinetic.is-in .rr-kinetic__stack::after { opacity: 1; }
.rr-kinetic__eyebrow {
  position: relative;
  font-size: clamp(10px, 1.1vw, 12px); font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(250, 250, 250, 0.62); margin-bottom: 14px;
  opacity: 0; transform: translateY(14px);
  text-shadow: 0 2px 24px rgba(7, 8, 12, 0.9);
}
.rr-kinetic__line {
  position: relative;
  font-weight: 750; font-size: clamp(26px, 4.8vw + 0.6vh, 60px);
  line-height: 1.22; letter-spacing: -0.035em; color: #fff;
  text-wrap: balance;
  text-align: center;
  opacity: 0; transform: translateY(18px);
  text-shadow: 0 4px 28px rgba(7, 8, 12, 0.7);
}
.rr-kinetic.has-phrases .rr-kinetic__line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12em;
  font-size: clamp(28px, 5vw + 0.8vh, 56px);
  line-height: 1.15;
  max-width: min(18ch, 92vw);
  margin-left: auto;
  margin-right: auto;
}
.rr-kinetic__line .rr-word {
  display: inline;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.rr-kinetic__line .rr-phrase {
  display: block;
  width: 100%;
  text-align: center;
  text-shadow: 0 4px 28px rgba(7, 8, 12, 0.55);
}
.rr-kinetic.is-in .rr-kinetic__eyebrow {
  opacity: 1; transform: none;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.rr-kinetic.is-in .rr-kinetic__line {
  opacity: 1; transform: none;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.rr-kinetic.is-in .rr-word { opacity: 1; }
.rr-kinetic.is-out .rr-kinetic__eyebrow,
.rr-kinetic.is-out .rr-kinetic__line,
.rr-kinetic.is-out .rr-word,
.rr-kinetic.is-out .rr-kinetic__sub {
  opacity: 0; transform: translateY(-10px);
  /* transition-delay forced to 0 via JS — keep exit short and uniform */
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.rr-kinetic.is-out .rr-word {
  transition-delay: 0s !important;
}
.rr-kinetic:not(.is-in):not(.is-out) .rr-kinetic__eyebrow,
.rr-kinetic:not(.is-in):not(.is-out) .rr-kinetic__line,
.rr-kinetic:not(.is-in):not(.is-out) .rr-word,
.rr-kinetic:not(.is-in):not(.is-out) .rr-kinetic__sub {
  opacity: 0;
  visibility: hidden;
}
.rr-kinetic__sub {
  position: relative;
  margin: 18px auto 0; font-size: clamp(13px, 1.5vw, 17px);
  font-weight: 500; color: rgba(250, 250, 250, 0.88); line-height: 1.45;
  max-width: 34em; opacity: 0; transform: translateY(12px);
  text-shadow: 0 2px 20px rgba(7, 8, 12, 0.85);
}
.rr-kinetic[data-mode="left"] .rr-kinetic__sub { margin-left: auto; margin-right: auto; }
/* Sub after main title — delay from JS via --rr-sub-delay */
.rr-kinetic.is-in .rr-kinetic__sub {
  opacity: 1; transform: none;
  transition:
    opacity 0.5s ease var(--rr-sub-delay, 0.55s),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--rr-sub-delay, 0.55s);
}
/* Solid tones only — background-clip:text + staggered spans double-paints a ghost layer */
.rr-kinetic[data-tone="ember"] .rr-kinetic__line {
  color: #fb923c;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #fb923c;
  text-shadow: 0 4px 32px rgba(232, 114, 12, 0.28);
  filter: none;
}
.rr-kinetic[data-tone="blue"] .rr-kinetic__line {
  color: #60a5fa;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: #60a5fa;
  text-shadow: 0 4px 32px rgba(37, 99, 235, 0.28);
  filter: none;
}

.rr-scrim {
  position: absolute; inset: 0; z-index: 25; pointer-events: none; opacity: 0;
  transition: opacity 0.55s ease;
  background: radial-gradient(ellipse 72% 62% at 50% 46%, rgba(7, 8, 12, 0.8) 0%, rgba(7, 8, 12, 0.45) 48%, rgba(7, 8, 12, 0.12) 72%, transparent 86%);
}
.rr-scrim.is-on { opacity: 1; }

.rr-cinema.is-reading .rr-camera {
  filter: brightness(0.36) saturate(0.8) blur(1.6px);
  transition: filter 0.55s ease;
}
.rr-cinema.is-reading .rr-topo {
  opacity: 0.2;
  transition: opacity 0.55s ease;
}
.rr-cinema.is-reading .rr-mark {
  opacity: 0 !important;
  transition: opacity 0.4s ease;
}
.rr-camera,
.rr-topo {
  transition: filter 0.55s ease, opacity 0.55s ease;
}

.rr-cursor {
  position: absolute; z-index: 40; left: 0; top: 0; width: 22px; height: 22px;
  opacity: 0; pointer-events: none; will-change: transform;
  transform: translate3d(-100px, -100px, 0);
}
.rr-cursor.is-on { opacity: 1; }
.rr-cursor.is-clicking svg { transform: scale(0.86); }
.rr-cursor svg {
  display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.45));
  transition: transform 0.12s ease;
}
.rr-cursor__you {
  position: absolute; left: 18px; top: 16px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; background: #111; color: #fafafa;
  border: 1px solid rgba(255,255,255,.16); white-space: nowrap;
}
.rr-cursor__ring {
  position: absolute; left: -12px; top: -12px; width: 46px; height: 46px;
  border-radius: 50%; border: 2px solid rgba(232, 114, 12, 0.9);
  opacity: 0; transform: scale(0.35);
}
.rr-cursor__ring.pulse { animation: rr-ring 0.5s ease-out; }
@keyframes rr-ring {
  0% { opacity: 0.95; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(1.4); }
}

.rr-progress {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 4px;
  z-index: 60;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.rr-progress__bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #fb923c, #e8720c 55%, #f59e0b);
  box-shadow: 0 0 12px rgba(232, 114, 12, 0.55);
}

.rr-ui {
  position: absolute; left: 50%; top: 48%; width: min(92%, 920px);
  max-height: calc(100% - 96px);
  transform: translate(-50%, -50%) scale(0.92);
  border-radius: 18px; overflow: hidden; background: #12141c;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 40px 100px -28px rgba(0,0,0,0.7);
  transition: transform 1s cubic-bezier(0.65, 0.05, 0.36, 1);
}
.rr-scene.is-on .rr-ui { transform: translate(-50%, -50%) scale(1); }
.rr-scene.is-zoom .rr-ui { transform: translate(-50%, -48%) scale(1.08); }
.rr-scene.is-zoom-deep .rr-ui { transform: translate(-46%, -45%) scale(1.18); }

.rr-tb {
  display: flex; align-items: center; gap: 8px; padding: 11px 14px;
  background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.07);
}
.rr-tb__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c,#666); }
.rr-tb__title {
  margin-left: 6px; font-size: 11px; letter-spacing: 0.04em;
  color: rgba(250,250,250,0.5);
}
.rr-tb__pill {
  margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: rgba(232,114,12,0.2); color: #fdba74;
}

.rr-mark-wrap { position: absolute; inset: 0; display: grid; place-items: center; }
.rr-mark {
  width: clamp(88px, 14vw, 130px); height: clamp(88px, 14vw, 130px);
  border-radius: 50%; border: 2px solid rgba(232,114,12,0.55);
  display: grid; place-items: center; position: relative;
  box-shadow: 0 0 80px rgba(232,114,12,0.28);
  transform: scale(0.75); opacity: 0;
  transition: transform 0.9s cubic-bezier(0.22,1,0.36,1), opacity 0.6s ease;
}
.rr-scene--open.is-on .rr-mark { transform: scale(1); opacity: 1; }
.rr-mark::before {
  content: ""; position: absolute; inset: 18%; border-radius: 50%;
  border: 1.5px solid rgba(232,114,12,0.7);
}
.rr-mark::after {
  content: ""; position: absolute; width: 40%; height: 2px; background: #e8720c;
  top: 48%; left: 50%; transform-origin: left center; transform: rotate(-28deg);
  border-radius: 2px;
}

.rr-fleet {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 16px;
}
.rr-card {
  border-radius: 14px; background: #15151a; border: 1px solid rgba(255,255,255,0.08);
  padding: 12px; min-height: 148px; transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.rr-card.is-hot {
  border-color: rgba(232,114,12,0.55);
  box-shadow: 0 0 0 1px rgba(232,114,12,0.25), 0 16px 36px rgba(232,114,12,0.18);
  transform: translateY(-3px) scale(1.03);
}
.rr-card .city { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #93939f; margin-bottom: 6px; }
.rr-card h5 { margin: 0 0 8px; font-size: 14px; font-weight: 650; letter-spacing: -0.02em; color: #fafafa; }
.rr-card .rank {
  font-size: 28px; font-weight: 700; letter-spacing: -0.04em; color: #fafafa;
}
.rr-card .rank em { font-style: normal; color: #e8720c; }
.rr-card .delta { font-size: 11px; margin-top: 6px; font-weight: 600; }
.rr-card .delta.down { color: #f87171; }
.rr-card .delta.up { color: #4ade80; }
.rr-card .plat { font-size: 10px; color: #75758a; margin-top: 10px; }

.rr-insight-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 12px; padding: 14px 16px 16px;
}
.rr-shot {
  border-radius: 14px; background: linear-gradient(160deg, #1a120c, #12141c);
  border: 1px solid rgba(255,255,255,0.08); min-height: 250px; position: relative; overflow: hidden;
}
.rr-shot__bar {
  position: absolute; left: 12px; right: 12px; top: 12px; height: 36px;
  border-radius: 10px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 8px; padding: 0 10px;
  font-size: 11px; color: rgba(250,250,250,0.7);
}
.rr-shot__list { position: absolute; left: 16px; right: 16px; top: 64px; display: flex; flex-direction: column; gap: 8px; }
.rr-shot__row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
  font-size: 12px; color: #e7e7ea; transition: border-color 0.25s, background 0.25s;
}
.rr-shot__row.is-hot {
  border-color: rgba(232,114,12,0.55); background: rgba(232,114,12,0.12);
}
.rr-shot__n {
  width: 22px; height: 22px; border-radius: 6px; background: #e8720c; color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.rr-side { display: flex; flex-direction: column; gap: 8px; }
.rr-alert {
  border-radius: 12px; padding: 12px; background: rgba(239,68,68,0.06);
  border: 1px solid rgba(239,68,68,0.35); transition: transform 0.25s, box-shadow 0.25s;
}
.rr-alert.is-hot { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(239,68,68,0.15); }
.rr-alert .sev { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: #ef4444; font-weight: 700; margin-bottom: 6px; }
.rr-alert h5 { margin: 0 0 4px; font-size: 13px; color: #fafafa; }
.rr-alert p { margin: 0; font-size: 11px; color: #93939f; line-height: 1.4; }
.rr-btn {
  margin-top: 4px; align-self: flex-start; padding: 9px 14px; border-radius: 999px;
  background: #e8720c; color: #fff; font-size: 12px; font-weight: 700; border: none;
  box-shadow: 0 8px 22px rgba(232,114,12,0.35); transition: transform 0.15s;
}
.rr-btn.is-hit { transform: scale(0.94); }

.rr-platforms {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.rr-plat-row {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
  width: min(94%, 880px);
}
.rr-plat {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 14px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1); font-weight: 650; font-size: 14px;
  color: #fafafa;
  opacity: 0.35; transform: translateY(12px);
  transition: opacity 0.35s, transform 0.4s, border-color 0.35s, box-shadow 0.35s;
}
.rr-plat.is-hot {
  opacity: 1; transform: none;
  border-color: rgba(232,114,12,0.45);
  box-shadow: 0 12px 32px rgba(232,114,12,0.18);
  background: rgba(255,255,255,0.07);
}
.rr-plat__logo {
  display: block; height: 22px; width: auto; max-width: 96px;
  object-fit: contain;
}
.rr-plat__logo--wide { height: 24px; max-width: 110px; }
.rr-plat__icon {
  width: 22px; height: 22px; flex-shrink: 0; object-fit: contain; display: block;
  border-radius: 6px;
}
.rr-plat__icon--round {
  border-radius: 6px; background: #fff; padding: 2px;
}
.rr-card .plat {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; color: #75758a; margin-top: 10px;
}
.rr-card .plat img {
  height: 12px; width: auto; max-width: 54px; object-fit: contain;
  filter: brightness(1.05);
}
.rr-card .plat img.is-icon {
  height: 14px; width: 14px; border-radius: 3px;
}

.rr-finale { position: absolute; inset: 0; display: grid; place-items: center; }
.rr-cta {
  margin-top: 26vh; padding: 12px 22px; border-radius: 999px;
  background: #e8720c; color: #fff; font-weight: 700; font-size: clamp(13px, 1.5vw, 16px);
  text-decoration: none; opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s, transform 0.6s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 16px 40px rgba(232,114,12,0.35);
}
.rr-scene--finale.is-cta .rr-cta { opacity: 1; transform: none; }

.rr-cinema__caption {
  position: absolute; left: 24px; bottom: 16px; z-index: 45;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(250,250,250,0.35); font-weight: 600;
}

@media (max-width: 800px) {
  .rr-fleet { grid-template-columns: repeat(2, 1fr); }
  .rr-insight-grid { grid-template-columns: 1fr; }
  .rr-cursor__you { display: none; }
  .rr-shot { min-height: 180px; }
}
@media (max-height: 760px) {
  .rr-kinetic__line { font-size: clamp(22px, 5.2vh, 44px); }
  .rr-card { min-height: 0; padding: 10px; }
  .rr-card .rank { font-size: 22px; }
  .rr-fleet { gap: 8px; padding: 12px; }
  .rr-ui { width: min(94%, 860px); }
  .rr-scene.is-zoom .rr-ui { transform: translate(-50%, -50%) scale(1.04); }
  .rr-scene.is-zoom-deep .rr-ui { transform: translate(-48%, -48%) scale(1.1); }
  .rr-cta { margin-top: 18vh; }
}
@media (prefers-reduced-motion: reduce) {
  .rr-cursor__ring.pulse { animation: none !important; }
  .rr-camera, .rr-ui, .rr-scene, .rr-kinetic__line, .rr-word { transition: none !important; }
}
