/* ===================================================================
   Brief Results Page — Slider comparison
   Uses style.css for nav/footer/base. Prefix: rs-*
   =================================================================== */

/* === HERO ============================================================ */
.rs-hero {
  position: relative;
  padding: clamp(64px, 8vw, 100px) 0 48px;
  text-align: center;
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
}
.rs-hero .aurora-glow { top: -80px; }

.rs-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -2.5px;
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 18px;
}

.rs-hero .rs-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

.rs-hero-animate {
  opacity: 0;
  transform: translateY(18px);
  animation: rs-hero-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--delay, 0ms);
}
@keyframes rs-hero-in { to { opacity: 1; transform: translateY(0); } }

/* === COMPARISON SECTION ============================================== */
.rs-section {
  padding: 0 0 80px;
  background: var(--bg);
}

/* === PROMPT CARDS ===================================================== */
.rs-prompt-area {
  position: relative;
  margin-bottom: 32px;
}

.rs-prompt-card {
  padding: 20px 24px;
  border-radius: 12px;
}

/* Before prompt — visible by default */
.rs-prompt-before-card {
  background: var(--surface);
  border: 1px solid var(--border);
}

/* After prompt — dark card, fades in */
.rs-prompt-after-card {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: #1c2333;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 12px;
  padding: 20px 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.rs-prompt-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

.rs-prompt-before-card .rs-prompt-label {
  color: var(--text-3);
}

.rs-prompt-after-card .rs-prompt-label {
  color: #60A5FA;
}

.rs-prompt-label svg { flex-shrink: 0; }

.rs-prompt-text {
  font-size: 17px;
  line-height: 1.7;
  font-weight: 450;
}

.rs-prompt-before-card .rs-prompt-text {
  color: var(--text);
}

.rs-prompt-after-card .rs-prompt-text {
  color: rgba(255, 255, 255, 0.85);
}

.rs-prompt-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Expand button */
.rs-prompt-expand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #60A5FA;
  cursor: pointer;
  transition: color 0.15s;
}

.rs-prompt-expand:hover {
  color: #93bbfd;
}

.rs-prompt-expand svg {
  transition: transform 0.2s ease;
}

/* === POPUP OVERLAY =================================================== */
.rs-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.rs-popup-overlay.rs-popup-open {
  opacity: 1;
  pointer-events: auto;
}

.rs-popup-card {
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  background: #1c2333;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 16px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(96, 165, 250, 0.06);
  transform: translateY(20px) perspective(800px) rotateX(2deg);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.rs-popup-open .rs-popup-card {
  transform: translateY(0) perspective(800px) rotateX(0deg);
  opacity: 1;
}

.rs-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.rs-popup-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #60A5FA;
}

.rs-popup-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.rs-popup-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.rs-popup-body {
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.rs-popup-body p {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 16px;
}

.rs-popup-body p:last-child {
  margin-bottom: 0;
}

.rs-popup-body p strong {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.rs-popup-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.rs-popup-body li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}

.rs-popup-body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #60A5FA;
  opacity: 0.6;
}

/* === COMPARISON WRAPPER ============================================== */
.rs-comp-wrapper {
  position: relative;
}

/* === OVERLAY LABELS (inside comparison box) ========================== */
.rs-label-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
}

.rs-overlay-label {
  position: absolute;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.rs-overlay-label-before {
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
}

.rs-overlay-label-after {
  left: 16px;
  background: rgba(37, 99, 235, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60A5FA;
}

/* === COMPARISON BOX (framed panel) =================================== */
.rs-comp-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0a0a0a;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.08);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

/* === LAYERS ========================================================== */
.rs-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.rs-layer-after {
  clip-path: inset(0 100% 0 0);
  z-index: 2;
}

.rs-layer iframe {
  width: 142.86%;
  height: 142.86%;
  border: none;
  pointer-events: none;
  transform: scale(0.7);
  transform-origin: top left;
}

/* === SLIDER HANDLE =================================================== */
.rs-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.rs-handle-line {
  flex: 1;
  width: 2px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.rs-handle-grip {
  width: 40px;
  height: 56px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: col-resize;
  pointer-events: auto;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.rs-handle-grip:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.rs-handle-grip:active {
  background: rgba(255, 255, 255, 0.3);
}

.rs-handle-arrows {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.5);
}

.rs-handle-arrows svg {
  width: 8px;
  height: 12px;
}

/* === DRAG HINT ======================================================= */
.rs-drag-hint {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.5s ease;
}

.rs-drag-hint.rs-hidden { opacity: 0; pointer-events: none; }

.rs-hint-arrow {
  display: inline-block;
  font-size: 15px;
}

.rs-hint-arrow-left {
  animation: rs-nudge-left 1.4s ease-in-out infinite;
}

.rs-hint-arrow-right {
  animation: rs-nudge-right 1.4s ease-in-out infinite;
}

@keyframes rs-nudge-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-5px); }
}

@keyframes rs-nudge-right {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

/* === CTA (uses shared cta-footer from style.css) ==================== */

/* === RESPONSIVE ====================================================== */
@media (max-width: 768px) {
  .rs-hero h1 { letter-spacing: -1.5px; }

  .rs-comp-box {
    border-radius: 12px;
    aspect-ratio: 9 / 14;
  }

  .rs-layer iframe {
    width: 100%;
    height: 100%;
    transform: none;
  }

  .rs-handle-grip {
    width: 30px;
    height: 44px;
  }

  .rs-prompt-text { font-size: 15px; }
  .rs-prompt-card { padding: 16px 18px; }
  .rs-overlay-label { font-size: 11px; padding: 6px 12px; bottom: 10px; }
  .rs-overlay-label-before { right: 10px; }
  .rs-overlay-label-after { left: 10px; }

  .rs-popup-card {
    width: 95%;
    max-height: 85vh;
  }
}

@media (max-width: 480px) {
  .rs-comp-box {
    aspect-ratio: 9 / 16;
  }
  .rs-handle-grip {
    width: 28px;
    height: 40px;
    border-radius: 10px;
  }
  .rs-overlay-label { font-size: 10px; padding: 5px 10px; bottom: 8px; }
  .rs-overlay-label-before { right: 8px; }
  .rs-overlay-label-after { left: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .rs-hero-animate {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .rs-hint-arrow { animation: none; }
  .rs-popup-card { transform: none; }
}
