/**
 * RBX Nexus — Halloween overrides for /cursor (loads last)
 * Fixes styles.css / scale.css white leaks + layout polish.
 */
body#top {
  --bg: #050304;
  --bg-2: #0f0b09;
  --bg-3: #16120f;
  --ink: #e8d4c0;
  --ink-2: #c4a890;
  --ink-3: #8a7060;
  --border: rgba(255, 140, 60, 0.16);
  --border-hi: rgba(255, 140, 60, 0.32);
  --accent: #ff8a3d;
  --accent-2: #ff9f43;
  --accent-glow: rgba(255, 138, 61, 0.28);
  --glass: rgba(255, 140, 60, 0.04);
  --glass-border: rgba(255, 140, 60, 0.14);
}

/* Kill default white CTAs from styles.css */
body#top .pill-btn {
  background: linear-gradient(135deg, #ff8a3d, #e85d04) !important;
  color: #1a0800 !important;
  box-shadow: 0 0 0 1px rgba(255, 140, 60, 0.35), 0 8px 28px rgba(255, 100, 30, 0.25) !important;
}

body#top .pill-btn:hover {
  background: linear-gradient(135deg, #ff9f43, #ff8a3d) !important;
  opacity: 1 !important;
}

body#top .cta-btn {
  background: linear-gradient(135deg, #ff8a3d, #e85d04) !important;
  color: #1a0800 !important;
}

/* Ambient — single fixed layer (no per-section glow seams) */
body#top {
  background: #050304 !important;
}

body#top .hero::before {
  display: none !important;
  content: none !important;
}

body#top .bg-glow {
  background:
    radial-gradient(ellipse 100% 80% at 12% -8%, rgba(255, 110, 35, 0.14), transparent 58%),
    radial-gradient(ellipse 70% 55% at 88% 8%, rgba(90, 35, 5, 0.09), transparent 55%),
    radial-gradient(ellipse 90% 50% at 50% 105%, rgba(40, 18, 4, 0.1), transparent 60%) !important;
  opacity: 1;
}

body#top .trust-strip-inner {
  background: rgba(8, 5, 4, 0.35) !important;
  backdrop-filter: blur(10px);
  border-color: rgba(255, 140, 60, 0.12) !important;
  box-shadow: none !important;
}

body#top .halftone-bg {
  opacity: 0.35 !important;
  background-image: radial-gradient(circle, rgba(255, 120, 40, 0.22) 1px, transparent 1px) !important;
}

body#top .orb-1 {
  background: rgba(255, 115, 35, 0.14) !important;
}

body#top .orb-2 {
  background: rgba(160, 55, 10, 0.1) !important;
}

body#top .orb-3 {
  background: rgba(35, 15, 4, 0.22) !important;
}

body#top .compare-card,
body#top .seo-card {
  background: linear-gradient(160deg, rgba(255, 140, 60, 0.06), rgba(14, 10, 8, 0.95)) !important;
  border-color: var(--border) !important;
}

body#top .h1-grad {
  color: var(--ink) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

/* Sections */
body#top .features,
body#top .install,
body#top .faq-section,
body#top .guides-hub,
body#top .gallery,
body#top .trust-strip,
body#top main {
  background: transparent !important;
}

body#top .section-head .eyebrow,
body#top .guides-hub .eyebrow {
  color: #ff9f43 !important;
}

body#top .feat-card,
body#top a.feat-card.rbx-game-link {
  background: linear-gradient(165deg, rgba(255, 140, 60, 0.06) 0%, rgba(18, 14, 12, 0.98) 42%, #16120f 100%) !important;
  border-color: var(--border) !important;
}

body#top .feat-card:hover,
body#top a.feat-card.rbx-game-link:hover {
  border-color: var(--border-hi) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45) !important;
}

body#top .feat-img-wrap--game {
  background: #0a0706 !important;
}

body#top .feat-tag {
  color: #ff9f43 !important;
}

/* Photo booth — fully dark shell */
body#top .photo-booth {
  background: linear-gradient(165deg, rgba(255, 138, 61, 0.1) 0%, #120e0c 42%, #0a0605 100%) !important;
}

body#top .photo-booth__bar {
  background: rgba(14, 10, 8, 0.95) !important;
  color: var(--ink-2) !important;
  border-bottom-color: rgba(255, 140, 60, 0.14) !important;
}

body#top .photo-booth__mirror {
  background: linear-gradient(180deg, #14100d 0%, #0c0907 100%) !important;
}

body#top .mirror-caption {
  background: rgba(8, 6, 5, 0.88) !important;
  border-color: rgba(255, 140, 60, 0.2) !important;
  color: var(--ink-2) !important;
}

body#top .photo-booth__control {
  background: rgba(12, 9, 7, 0.95) !important;
  color: var(--ink-2) !important;
}

body#top .photo-booth__control em {
  color: var(--ink) !important;
}

body#top .photo-booth__control i {
  background: rgba(255, 138, 61, 0.25) !important;
}

body#top .photo-booth__control i::after {
  background: linear-gradient(90deg, #ff8a3d, #ff9f43) !important;
}

/* Install / FAQ */
body#top .steps-row {
  border-color: rgba(255, 140, 60, 0.12) !important;
}

body#top .step {
  background: var(--bg-2) !important;
  border-right-color: rgba(255, 140, 60, 0.1) !important;
}

body#top .step:hover {
  background: var(--bg-3) !important;
}

body#top .step-tag {
  color: rgba(255, 159, 67, 0.35) !important;
}

body#top .browser-tab.is-active {
  background: linear-gradient(135deg, #ff8a3d, #e85d04) !important;
  color: #1a0800 !important;
  border-color: transparent !important;
}

body#top .dl-card {
  background: var(--bg-2) !important;
  border-color: rgba(255, 140, 60, 0.18) !important;
}

body#top .dl-icon-box {
  background: rgba(255, 140, 60, 0.1) !important;
  border-color: rgba(255, 140, 60, 0.22) !important;
  color: #ff9f43 !important;
}

body#top .faq-item {
  border-color: rgba(255, 140, 60, 0.12) !important;
}

body#top .faq-q:hover,
body#top .faq-item[open] .faq-q {
  color: var(--ink) !important;
}

body#top .faq-item[open] .faq-icon::before,
body#top .faq-item[open] .faq-icon::after {
  background: #ff9f43 !important;
}

body#top .footer {
  border-top-color: rgba(255, 140, 60, 0.12) !important;
}

body#top .mosaic-item {
  border: 1px solid rgba(255, 140, 60, 0.14) !important;
  background: #0f0b09;
}

body#top .guide-card {
  background: linear-gradient(165deg, rgba(255, 140, 61, 0.08), rgba(14, 10, 8, 0.96) 55%) !important;
}

body#top .guides-hub__panel {
  background: rgba(14, 10, 8, 0.92) !important;
  border-color: var(--border) !important;
}

body#top .guides-hub__list a {
  color: var(--ink-2) !important;
}

body#top .guides-hub__list a:hover {
  color: #ff9f43 !important;
}

/* Sticky bar + toast */
body#top .sticky-bar {
  background: rgba(5, 3, 4, 0.96) !important;
  border-top: 1px solid rgba(255, 140, 60, 0.18) !important;
}

body#top .dl-toast {
  background: #16120f !important;
  border-color: rgba(255, 140, 60, 0.25) !important;
}

body#top .dl-progress-bar {
  background: linear-gradient(90deg, #ff8a3d, #e85d04) !important;
}

/* Custom cursor widget — dark */
body#top .site-pointer__ring {
  background: radial-gradient(circle at 35% 30%, rgba(255, 159, 67, 0.35) 0%, rgba(20, 14, 10, 0.9) 42%, #0a0605 100%) !important;
  border-color: rgba(255, 140, 60, 0.45) !important;
}

/* Layout fixes */
body#top .hero {
  gap: clamp(1.5rem, 4vw, 3rem);
}

@media (min-width: 961px) {
  body#top .hero {
    max-width: var(--max);
    grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
    gap: clamp(2.25rem, 5vw, 4.25rem);
    padding-left: clamp(0.5rem, 1.2vw, 1rem);
    padding-right: clamp(0.25rem, 0.75vw, 0.5rem);
    align-items: center;
  }

  body#top .hero-copy {
    justify-self: start;
    align-self: center;
    max-width: 500px;
  }

  body#top .hero-visual {
    justify-self: end;
    align-self: center;
    justify-content: flex-end;
    width: 100%;
    max-width: 440px;
  }

  body#top .hero-visual .photo-booth {
    width: 100%;
    max-width: 440px;
    margin: 0;
  }

  body#top .photo-booth__mirror {
    min-height: clamp(220px, 22vw, 280px);
    aspect-ratio: 16 / 11;
  }
}

body#top .topbar {
  z-index: 200;
}

body#top .brand::before {
  content: none;
  display: none;
}

body#top .brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

body#top .brand-mark img {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(255, 138, 61, 0.25);
}

body#top .brand-text {
  font-family: var(--display);
  letter-spacing: 0.04em;
}

@media (max-width: 960px) {
  body#top .hero-visual {
    justify-content: center;
  }

  body#top .hero-visual .photo-booth {
    width: min(100%, 520px);
    margin-inline: auto;
  }

  body#top .hero .hero-copy .hero-h1 {
    font-size: clamp(3.2rem, 12vw, 6.5rem) !important;
  }
}

@media (max-width: 680px) {
  body#top .steps-row {
    flex-direction: column;
  }

  body#top .step {
    border-right: none !important;
    border-bottom: 1px solid rgba(255, 140, 60, 0.1);
  }

  body#top .step:last-child {
    border-bottom: none;
  }

  body#top .trust-strip-inner {
    justify-content: center;
    text-align: center;
  }
}

/* ── Sky: moons, webs, bats (same as main site Halloween) ── */
.hw-sky {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

body#top main,
body#top .footer,
body#top .sticky-bar,
body#top .marquee-wrap {
  position: relative;
  z-index: 10;
}

.hw-moon {
  position: absolute;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #f5e6b8, #d4a843 48%, #8a5a18 100%);
  box-shadow:
    0 0 48px rgba(255, 200, 120, 0.22),
    0 0 100px rgba(255, 140, 40, 0.12),
    inset -14px -10px 0 rgba(5, 3, 4, 0.4);
  animation: hw-moon-pulse 7s ease-in-out infinite;
  pointer-events: none;
}

.hw-moon::before {
  content: "";
  position: absolute;
  inset: -120%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 140, 0.14) 0%, transparent 62%);
  z-index: -1;
}

.hw-moon::after {
  content: "";
  position: absolute;
  width: 22%;
  height: 22%;
  border-radius: 50%;
  background: rgba(8, 5, 4, 0.22);
  top: 26%;
  left: 40%;
  box-shadow:
    1.1em 1.4em 0 -0.35em rgba(8, 5, 4, 0.16),
    -0.65em 1.6em 0 -0.45em rgba(8, 5, 4, 0.14),
    0.4em -0.5em 0 -0.2em rgba(8, 5, 4, 0.12);
}

.hw-moon--a {
  left: 6%;
  top: 12%;
  width: 88px;
  height: 88px;
  opacity: 0.9;
}

.hw-moon--b {
  right: 8%;
  top: 58%;
  width: 52px;
  height: 52px;
  opacity: 0.42;
  animation-delay: -2.5s;
}

.hw-moon--b::before {
  inset: -90%;
  opacity: 0.7;
}

@keyframes hw-moon-pulse {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.1); }
}

.hw-web {
  position: absolute;
  width: 160px;
  height: 160px;
  opacity: 0.35;
  background:
    radial-gradient(circle at 0 0, transparent 28%, rgba(232, 220, 200, 0.35) 29%, transparent 30%),
    repeating-conic-gradient(from 0deg at 0 0, transparent 0deg 18deg, rgba(232, 220, 200, 0.25) 18deg 19deg);
  mask-image: radial-gradient(circle at 0 0, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 0 0, #000 0%, transparent 72%);
}

.hw-web--tl { top: 0; left: 0; }
.hw-web--tr { top: 0; right: 0; transform: scaleX(-1); }

.hw-bat {
  position: absolute;
  top: var(--hw-y, 20%);
  left: -8vw;
  width: 34px;
  height: 16px;
  opacity: 0.6;
  animation: hw-bat-fly var(--hw-dur, 20s) linear infinite;
  animation-delay: var(--hw-delay, 0s);
}

.hw-bat::before,
.hw-bat::after {
  content: "";
  position: absolute;
  top: 0;
  width: 16px;
  height: 16px;
  background: #120a08;
  border-radius: 50% 50% 0 50%;
  box-shadow: 0 0 0 1px rgba(255, 140, 60, 0.08);
}

.hw-bat::before {
  left: 0;
  transform: rotate(-25deg);
  transform-origin: right center;
  animation: hw-wing 0.28s ease-in-out infinite alternate;
}

.hw-bat::after {
  right: 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(25deg);
  transform-origin: left center;
  animation: hw-wing 0.28s ease-in-out infinite alternate-reverse;
}

@keyframes hw-wing {
  from { transform: rotate(-38deg) scaleY(0.8); }
  to { transform: rotate(-8deg) scaleY(1.15); }
}

@keyframes hw-bat-fly {
  0% { transform: translate(0, 0) scale(0.7); }
  25% { transform: translate(30vw, -4vh) scale(1); }
  50% { transform: translate(55vw, 3vh) scale(0.9); }
  75% { transform: translate(80vw, -2vh) scale(1.05); }
  100% { transform: translate(112vw, 4vh) scale(0.75); }
}

@media (max-width: 960px) {
  .hw-moon--a {
    left: 4%;
    top: 8%;
    width: 64px;
    height: 64px;
  }

  .hw-moon--b {
    right: 5%;
    top: 50%;
    width: 40px;
    height: 40px;
    opacity: 0.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hw-moon,
  .hw-bat {
    animation: none !important;
  }
}

/* ── Audit fixes: a11y, mobile nav, trust strip, preview sliders ── */
body#top a:focus-visible,
body#top button:focus-visible,
body#top summary:focus-visible,
body#top input:focus-visible,
body#top .hero-preset-chip:focus-visible {
  outline: 2px solid #ff9f43;
  outline-offset: 3px;
}

body#top .topbar-drawer__nav a:focus-visible {
  outline-offset: 2px;
}

body#top .trust-logo--browser {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

body#top .trust-logo--browser img {
  display: block;
  opacity: 0.92;
}

body#top .photo-booth__control {
  position: relative;
  cursor: pointer;
}

body#top .photo-booth__control input[type="range"] {
  position: absolute;
  inset: auto 0 0 0;
  top: 1.35rem;
  width: 100%;
  height: 1.25rem;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

body#top .photo-booth__control:focus-within {
  border-color: rgba(255, 140, 60, 0.45);
}

body#top .faq-item[open] {
  background: rgba(255, 140, 60, 0.04) !important;
  border-color: rgba(255, 140, 60, 0.22) !important;
}

body#top .topbar-drawer {
  border-top: 1px solid rgba(255, 140, 60, 0.12);
}

body#top .topbar-drawer__nav {
  border-color: rgba(255, 140, 60, 0.18) !important;
  background: rgba(8, 5, 4, 0.96) !important;
}

body#top .topbar-drawer__nav a:hover {
  background: rgba(255, 140, 60, 0.1) !important;
  color: var(--ink) !important;
}

body#top .ghost-btn {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  color: var(--ink-2) !important;
}

body#top .ghost-btn:hover {
  background: transparent !important;
  color: #ff9f43 !important;
}

body#top .topbar-menu-btn {
  border-color: rgba(255, 140, 60, 0.22);
  background: rgba(255, 140, 60, 0.06);
}

body#top .site-pointer-trail,
body#top .site-pointer__spark {
  display: none !important;
}

body#top .footer {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
}
