/* ==========================================================================
   NEXUS · Intelligence Artificial Agency (nexusaia.com)
   Flagship $10K Design System — Anti-Slop Luxury Editorial + WebGL + Motion
   ========================================================================== */

:root,
[data-theme="cobalt"] {
  --bg-obsidian: #030712;
  --bg-elevated: #070d1f;
  --bg-card: rgba(11, 19, 43, 0.62);
  --accent-primary: #00e5ff;
  --accent-secondary: #0066ff;
  --accent-tertiary: #39ff14;
  --accent-glow: rgba(0, 229, 255, 0.34);
  --accent-laser: linear-gradient(90deg, transparent 0%, #0066ff 28%, #00e5ff 50%, #39ff14 72%, transparent 100%);
  --btn-surface: linear-gradient(135deg, #061b48 0%, #0057e7 50%, #082d6e 100%);
  --btn-border: rgba(0, 229, 255, 0.62);
  --btn-shadow: rgba(0, 110, 255, 0.44);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --glass-border: rgba(255, 255, 255, 0.11);
  --glass-specular: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.03) 48%, rgba(0, 229, 255, 0.08) 100%);
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

[data-theme="champagne"] {
  --bg-obsidian: #070609;
  --bg-elevated: #110f16;
  --bg-card: rgba(22, 19, 28, 0.68);
  --accent-primary: #f5d08a;
  --accent-secondary: #d97706;
  --accent-tertiary: #fde68a;
  --accent-glow: rgba(245, 208, 138, 0.3);
  --accent-laser: linear-gradient(90deg, transparent 0%, #b45309 25%, #f5d08a 50%, #fef3c7 75%, transparent 100%);
  --btn-surface: linear-gradient(135deg, #2b1a06 0%, #9a5b13 50%, #432708 100%);
  --btn-border: rgba(245, 208, 138, 0.68);
  --btn-shadow: rgba(217, 119, 6, 0.42);
  --glass-specular: linear-gradient(135deg, rgba(255, 248, 231, 0.2) 0%, rgba(255, 255, 255, 0.02) 50%, rgba(245, 208, 138, 0.09) 100%);
}

[data-theme="emerald"] {
  --bg-obsidian: #020b09;
  --bg-elevated: #061714;
  --bg-card: rgba(8, 28, 24, 0.65);
  --accent-primary: #10f5a0;
  --accent-secondary: #059669;
  --accent-tertiary: #00e5ff;
  --accent-glow: rgba(16, 245, 160, 0.3);
  --accent-laser: linear-gradient(90deg, transparent 0%, #059669 25%, #10f5a0 50%, #00e5ff 75%, transparent 100%);
  --btn-surface: linear-gradient(135deg, #042b1f 0%, #058560 50%, #074131 100%);
  --btn-border: rgba(16, 245, 160, 0.62);
  --btn-shadow: rgba(5, 150, 105, 0.45);
  --glass-specular: linear-gradient(135deg, rgba(220, 255, 244, 0.2) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(16, 245, 160, 0.09) 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background-color: var(--bg-obsidian);
  color: var(--text-primary);
  accent-color: var(--accent-primary);
  overflow-x: clip;
  position: relative;
  line-height: 1.6;
}

.font-editorial {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.font-mono-tech {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

/* ==========================================================================
   1. SCROLL PROGRESS INDICATOR (modern-web-guidance: scroll-progress-indicator)
   ========================================================================== */
#scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  z-index: 120;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary), var(--accent-tertiary));
  box-shadow: 0 0 16px var(--accent-glow);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    @keyframes grow-nexus-progress {
      from { transform: scaleX(0); }
      to { transform: scaleX(1); }
    }

    #scroll-progress {
      animation: grow-nexus-progress auto linear;
      animation-timeline: scroll(block root);
    }
  }
}

/* ==========================================================================
   2. SHRINKING REFRACTIVE HEADER (Translucent Liquid-Crystal Glass on Scroll)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 92px;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  background: rgba(4, 9, 22, 0.26);
  backdrop-filter: blur(14px) saturate(165%);
  -webkit-backdrop-filter: blur(14px) saturate(165%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 28px rgba(0, 0, 0, 0.22);
  transition: background-color 0.35s var(--ease-luxury), border-color 0.35s var(--ease-luxury);
}

.site-header.is-compact {
  background: rgba(4, 9, 22, 0.44);
  border-bottom-color: rgba(0, 229, 255, 0.24);
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
    @keyframes shrink-nexus-header {
      to {
        height: 66px;
        background-color: rgba(4, 9, 22, 0.44);
      }
    }

    .site-header {
      animation: shrink-nexus-header auto linear both;
      animation-timeline: scroll(block root);
      animation-range: 0px 140px;
    }
  }
}

.main-shell {
  padding-top: 92px;
}

/* ==========================================================================
   3. VEXMO CINEMATIC PRELOADER & ANAMORPHIC LASER FLARE
   ========================================================================== */
.vexmo-preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 45%, #091532 0%, #030712 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  transition: opacity 0.65s var(--ease-luxury), transform 0.65s var(--ease-luxury);
}

.vexmo-preloader.is-done {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .vexmo-preloader {
    display: none !important;
  }
}

/* Preloader Soft Luxury Logo Reveal */
.preloader-logo-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.preloader-aura {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.28) 0%, rgba(99, 102, 241, 0.16) 45%, transparent 70%);
  filter: blur(52px);
  pointer-events: none;
  animation: preloaderAuraPulse 3.2s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes preloaderAuraPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
}

.preloader-logo-wrapper {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 1.25rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: preloaderLogoSoftEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes preloaderLogoSoftEntrance {
  0% {
    opacity: 0;
    filter: blur(14px) brightness(1.35);
    transform: scale(0.92) translateY(12px);
  }
  100% {
    opacity: 1;
    filter: blur(0px) brightness(1);
    transform: scale(1) translateY(0);
  }
}

.preloader-logo-img {
  filter: drop-shadow(0 0 28px rgba(0, 229, 255, 0.45));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.preloader-shimmer-sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    transparent 25%,
    rgba(255, 255, 255, 0.38) 48%,
    rgba(0, 229, 255, 0.5) 52%,
    transparent 72%
  );
  transform: translateX(-120%);
  pointer-events: none;
  animation: shimmerSweepLoop 2.6s cubic-bezier(0.25, 1, 0.5, 1) infinite 0.4s;
}

@keyframes shimmerSweepLoop {
  0% {
    transform: translateX(-120%);
  }
  60%, 100% {
    transform: translateX(130%);
  }
}

.anamorphic-flare {
  width: min(520px, 86vw);
  height: 2px;
  background: var(--accent-laser);
  box-shadow: 0 0 26px var(--accent-primary), 0 0 60px var(--accent-secondary);
  position: relative;
  transition: width 0.3s ease-out;
  z-index: 2;
}

.anamorphic-flare::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 90px;
  height: 8px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, #ffffff 0%, var(--accent-primary) 45%, transparent 80%);
  filter: blur(2px);
}

/* Header Navbar Logo Soft Glow */
.header-logo-box {
  position: relative;
  display: flex;
  align-items: center;
}

.header-logo-glow {
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.32) 0%, transparent 72%);
  filter: blur(14px);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.header-brand-link:hover .header-logo-glow {
  opacity: 1;
}

.header-brand-link:hover #header-logo-img {
  filter: drop-shadow(0 0 16px rgba(0, 229, 255, 0.5));
}

/* ==========================================================================
   4. CUSTOM CURSOR SPOTLIGHT & REFRACTIVE GLASS PORTALS
   ========================================================================== */
.cursor-aura {
  position: fixed;
  left: 0;
  top: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  filter: blur(36px);
  transition: opacity 0.4s ease;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor-aura.is-active {
    opacity: 0.36;
  }
}

.glass-portal {
  background: var(--bg-card);
  background-image: var(--glass-specular);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--glass-border);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
    0 24px 60px -16px rgba(0, 0, 0, 0.72);
  border-radius: 1.5rem;
}

/* 21st.dev Mouse-Tracking Radial Spotlight Card */
.spotlight-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 1.4rem;
  overflow: hidden;
  transition: transform 0.45s var(--ease-luxury), border-color 0.35s ease;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    480px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(0, 229, 255, 0.16),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.spotlight-card:hover::before {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .spotlight-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 229, 255, 0.38);
  }
}

/* ==========================================================================
   5. HERO: TERRA 3D DEPTH-MASKED TYPOGRAPHY + WEBGL NEURAL STAGE + ASHLAR
   ========================================================================== */
.hero-stage {
  position: relative;
  min-height: calc(100vh - 92px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 2.5rem 0 4rem;
}

.terra-giant-word {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  font-size: clamp(6.2rem, 21vw, 21rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(0, 229, 255, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(0, 229, 255, 0.02) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
}

#nexus-webgl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.hero-content-layer {
  position: relative;
  z-index: 5;
  width: 100%;
}

.text-gradient-nexus {
  background: linear-gradient(110deg, #ffffff 10%, var(--accent-primary) 52%, var(--accent-tertiary) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Luxury Obsidian-Prism Primary CTA (Crisp White Text + Theme-Reactive Rim & Specular Sweep) */
.btn-magnetic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 52px;
  padding: 0.85rem 1.75rem;
  border-radius: 0.95rem;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  background: var(--btn-surface);
  border: 1px solid var(--btn-border);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.38),
    inset 0 -8px 18px -8px var(--accent-glow),
    0 12px 32px -6px var(--btn-shadow),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.32s var(--ease-luxury),
    box-shadow 0.32s var(--ease-luxury),
    border-color 0.32s ease;
}

.btn-magnetic::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.28) 50%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 0.65s var(--ease-luxury);
  pointer-events: none;
}

.btn-magnetic:hover::after {
  left: 145%;
}

@media (prefers-reduced-motion: no-preference) {
  .btn-magnetic:hover {
    transform: translateY(-2px);
    border-color: #ffffff;
    box-shadow:
      inset 0 1px 0 0 rgba(255, 255, 255, 0.55),
      inset 0 -10px 22px -6px var(--accent-glow),
      0 18px 42px -6px var(--btn-shadow),
      0 0 24px -4px var(--accent-glow);
  }
}

.btn-arrow-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.8rem;
  transition: transform 0.3s var(--ease-luxury), background-color 0.3s ease;
}

.btn-magnetic:hover .btn-arrow-chip,
.btn-plan-outline:hover .btn-arrow-chip {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.26);
}

/* Secondary Plan & Action Buttons (Smoked Glass + Crisp White Text + Theme Border) */
.btn-plan-outline,
.btn-glass {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.85rem 1.55rem;
  border-radius: 0.95rem;
  font-weight: 700;
  font-size: 0.94rem;
  color: #ffffff !important;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88) 0%, rgba(7, 12, 26, 0.95) 100%);
  border: 1px solid var(--btn-border);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
    0 10px 26px -10px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s var(--ease-luxury);
}

.btn-plan-outline:hover,
.btn-glass:hover {
  background: var(--btn-surface);
  border-color: #ffffff;
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.35),
    0 14px 34px -8px var(--btn-shadow);
  transform: translateY(-2px);
}

/* ==========================================================================
   6. DEFERRED BELOW-THE-FOLD SECTIONS (modern-web-guidance: defer-rendering-heavy-content)
   ========================================================================== */
.deferred-section {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 780px;
}

/* ==========================================================================
   7. @samjhoyaarai ("SLIDE") GLIDING ONE-AT-A-TIME 3D AGENT STAGE
   ========================================================================== */
.glide-stage-viewport {
  position: relative;
  min-height: 470px;
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1.5rem 0;
  touch-action: pan-y;
}

.glide-agent-card {
  position: absolute;
  width: min(680px, 92vw);
  padding: 2rem;
  border-radius: 1.75rem;
  background: rgba(8, 15, 34, 0.86);
  background-image: var(--glass-specular);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.82);
  transition:
    transform 0.65s var(--ease-luxury),
    opacity 0.65s var(--ease-luxury);
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .glide-agent-card {
    transition: opacity 0.2s linear;
  }
}

.glide-agent-card[data-pos="0"] {
  transform: translate3d(0, 0, 0) scale(1) rotateY(0deg);
  opacity: 1;
  z-index: 10;
  border-color: var(--accent-primary);
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.24),
    0 32px 80px -18px rgba(0, 229, 255, 0.24);
}

.glide-agent-card[data-pos="-1"] {
  transform: translate3d(-62%, 14px, -180px) scale(0.84) rotateY(18deg);
  opacity: 0.36;
  z-index: 5;
  pointer-events: none;
}

.glide-agent-card[data-pos="1"] {
  transform: translate3d(62%, 14px, -180px) scale(0.84) rotateY(-18deg);
  opacity: 0.36;
  z-index: 5;
  pointer-events: none;
}

.glide-agent-card[data-pos="hidden"] {
  transform: translate3d(0, 40px, -360px) scale(0.7);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

/* ==========================================================================
   8. @himanshubuilds SCROLLTIDE STICKY ARCHITECTURE & TILTED CARD STACK
   ========================================================================== */
.scrolltide-track {
  position: relative;
}

@media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
  .scrolltide-track {
    min-height: 210vh;
  }
  .scrolltide-sticky {
    position: sticky;
    top: 86px;
    padding: 2rem 0 3rem;
  }
}

.arch-step {
  border-left: 2px solid rgba(148, 163, 184, 0.2);
  padding-left: 1.25rem;
  transition: border-color 0.35s ease, opacity 0.35s ease, transform 0.35s var(--ease-luxury);
  opacity: 0.48;
}

.arch-step.is-lit {
  border-left-color: var(--accent-primary);
  opacity: 1;
  transform: translateX(6px);
}

.tilted-card-stack {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .tilted-card-old {
    transform: rotate(-1.5deg);
    transition: transform 0.45s var(--ease-luxury);
  }
  .tilted-card-nexus {
    transform: rotate(1.2deg);
    transition: transform 0.45s var(--ease-luxury);
  }
  .tilted-card-old:hover,
  .tilted-card-nexus:hover {
    transform: rotate(0deg) translateY(-4px);
  }
}

/* ==========================================================================
   9. SANDBOX TABS (cached-view with content-visibility fallback)
   ========================================================================== */
.sandbox-panel {
  display: none;
}

.sandbox-panel.is-active {
  display: block;
}

@supports (content-visibility: hidden) {
  .sandbox-panel {
    display: block;
    content-visibility: hidden;
  }
  .sandbox-panel.is-active {
    content-visibility: visible;
  }
}

/* ==========================================================================
   10. MOBILE THUMB-ZONE STICKY DOCK & FLOATING WHATSAPP PULSE
   ========================================================================== */
.mobile-thumb-dock {
  position: fixed;
  bottom: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, 94vw);
  z-index: 95;
  background: rgba(5, 10, 24, 0.88);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-radius: 9999px;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

@media (min-width: 1024px) {
  .mobile-thumb-dock {
    display: none;
  }
}

.wa-float-btn {
  position: fixed;
  right: 1.35rem;
  bottom: 5.5rem;
  z-index: 96;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.45);
  text-decoration: none;
  transition: transform 0.3s var(--ease-luxury);
}

@media (min-width: 1024px) {
  .wa-float-btn {
    bottom: 1.6rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .wa-float-btn:hover {
    transform: scale(1.09);
  }
}

/* Subtle section reveal */
.reveal-up {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .js-ready .reveal-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-luxury), transform 0.7s var(--ease-luxury);
  }
  .js-ready .reveal-up.in-view {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ==========================================================================
   11. LIVE REAL-TIME CONCIERGE DRAWER (<dialog popover="manual"> Rule 2)
   ========================================================================== */
.concierge-float-launcher {
  position: fixed;
  right: 1.35rem;
  bottom: 5.4rem;
  z-index: 96;
  height: 54px;
  padding: 0 1.25rem;
  border-radius: 0.95rem;
  background: var(--btn-surface);
  color: #ffffff;
  border: 1px solid var(--btn-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 16px 38px -6px var(--btn-shadow);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.3s var(--ease-luxury), box-shadow 0.3s ease;
}

@media (min-width: 1024px) {
  .concierge-float-launcher {
    bottom: 1.6rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .concierge-float-launcher:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: #ffffff;
  }
}

/* MANDATORY: Scope display to open popover state only so closed <dialog popover> stays hidden */
#nexus-concierge-drawer {
  margin: 0;
  inset: auto 1.25rem 5.4rem auto;
  width: min(420px, calc(100vw - 2rem));
  height: min(590px, calc(100vh - 7.5rem));
  padding: 0;
  border-radius: 1.35rem;
  background: rgba(5, 10, 25, 0.96);
  backdrop-filter: blur(24px) saturate(165%);
  -webkit-backdrop-filter: blur(24px) saturate(165%);
  border: 1px solid var(--btn-border);
  color: var(--text-primary);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85), 0 0 36px -10px var(--accent-glow);
  overflow: hidden;
}

@media (min-width: 1024px) {
  #nexus-concierge-drawer {
    inset: auto 1.35rem 5.4rem auto;
  }
}

#nexus-concierge-drawer:is(:popover-open, .\:popover-open),
#nexus-concierge-drawer[open] {
  display: flex;
  flex-direction: column;
}

/* CLIENT LOGIN MODAL */
#nexus-login-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  border: none;
  background: transparent;
  padding: 0;
  overflow: visible;
  z-index: 9999;
}

#nexus-login-modal::backdrop {
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Fallback for browsers without accent-color support (modern-web-guidance: brand-consistent-forms) */
@supports not (accent-color: #00e5ff) {
  input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
  }
  input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--accent-primary) var(--progress, 40%), #1e293b var(--progress, 40%));
  }
  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    margin-top: -4px;
    cursor: pointer;
  }
}


/* ==========================================================================
   CONCIERGE STANDALONE QUOTE CARD & STRIPE PAYMENT BUTTON (WF-015)
   ========================================================================== */
.concierge-quote-card {
  border-radius: 1rem;
  background: linear-gradient(155deg, rgba(6, 22, 34, 0.95) 0%, rgba(4, 11, 24, 0.98) 100%);
  border: 1px solid rgba(16, 245, 160, 0.38);
  padding: 0.85rem 0.95rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 28px -10px rgba(0, 0, 0, 0.75);
}

.btn-pay-stripe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0.65rem 1rem;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 800;
  color: #ffffff !important;
  text-decoration: none;
  background: linear-gradient(135deg, #065f46 0%, #047857 48%, #0e7490 100%);
  border: 1px solid rgba(110, 231, 183, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 10px 24px -6px rgba(16, 185, 129, 0.45);
  transition: transform 0.25s ease, filter 0.25s ease, border-color 0.25s ease;
}

.btn-pay-stripe:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
  border-color: #ffffff;
}
