@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* Screen-reader-only status and reduced-motion safety for Scroll World. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (prefers-reduced-motion: reduce) {
  .sw-wrapper *, .sw-wrapper *::before, .sw-wrapper *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  
  /* Bright Luxury Color Palette */
  --bg-sand: #FAF9F6;
  --bg-travertine: #F4F2EC;
  --bg-pure: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  
  /* Accent Colors */
  --accent-blue: #0284C7;
  --accent-blue-light: #E0F2FE;
  --accent-emerald: #059669;
  --accent-emerald-light: #ECFDF5;
  --accent-gold: #D97706;
  --accent-gold-light: #FEF3C7;
  
  /* Borders and Glass */
  --border-glass: rgba(255, 255, 255, 0.85);
  --border-subtle: rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-sand);
  color: var(--text-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

#dubai, #abudhabi, #rak, #sharjah {
  scroll-margin-top: 100px;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(244, 242, 236, 0.8);
}
::-webkit-scrollbar-thumb {
  background: rgba(2, 132, 199, 0.4);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(2, 132, 199, 0.7);
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.08), 
              0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.glass-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.04);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.glass-card-interactive {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.07);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card-interactive:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 60px -20px rgba(2, 132, 199, 0.15),
              0 0 0 1px rgba(2, 132, 199, 0.2);
}

/* ==========================================================================
   SCROLL-WORLD SPECIFIC ARCHITECTURE & STYLING
   ========================================================================== */

.sw-wrapper {
  position: relative;
  width: 100%;
}

/* Top Progress Bar */
.sw-scrollbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: rgba(15, 23, 42, 0.06);
}

.sw-scrollbar span {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, #0284C7, #059669);
  transition: transform 0.05s linear;
}

/* Video Stage */
.sw-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  overflow: hidden;
  background-color: #0b0f19;
  pointer-events: none;
  transform: translateZ(0);
  contain: strict;
}

.sw-poster,
.sw-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: translateZ(0);
  will-change: transform;
}

.sw-poster {
  z-index: 11;
  transition: opacity 0.6s ease-out;
}

.sw-video {
  z-index: 12;
}

/* Subtle Edge Vignette (Removes heavy white wash so the video is 100% vibrant) */
.sw-veil {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2) 0%, transparent 12%, transparent 85%, rgba(15, 23, 42, 0.25) 100%);
  pointer-events: none;
}

/* Pinned Copy Layer - Luxury Floating Glass HUD Card */
.sw-copylayer {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

.sw-copy {
  position: absolute;
  left: clamp(24px, 6vw, 96px);
  top: 50%;
  transform: translate3d(0, -50%, 0);
  width: min(45vw, 540px);
  opacity: 0;
  will-change: opacity, transform;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 32px;
  padding: clamp(24px, 2.8vw, 36px);
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.sw-header-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sw-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.sw-loc {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748B;
}

.sw-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sw-accent, #0284C7);
  margin-bottom: 8px;
}

.sw-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #0F172A;
  margin-bottom: 6px;
  text-shadow: 0 2px 25px rgba(255, 255, 255, 0.8);
}

.sw-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: #0284C7;
  margin-bottom: 14px;
}

.sw-body {
  font-size: clamp(0.95rem, 1.25vw, 1.12rem);
  line-height: 1.6;
  color: #334155;
  margin-bottom: 20px;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.9);
}

/* Tag Pills */
.sw-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  padding: 0;
}

.sw-tags li {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0F172A;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* CTA Row */
.sw-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  pointer-events: auto;
}

.sw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-btn-primary {
  background: #0F172A;
  color: #FFFFFF;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.25);
}

.sw-btn-primary:hover {
  background: #0284C7;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(2, 132, 199, 0.35);
}

.sw-btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: #065F46;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.sw-btn-secondary:hover {
  background: #ECFDF5;
  transform: translateY(-2px);
}

/* AI Interactive Card inside Scene 3 */
.sw-ai-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px -10px rgba(2, 132, 199, 0.15);
}

.sw-ai-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0F172A;
}

.sw-ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #059669;
  animation: pulse-ring 2s infinite;
}

.sw-ai-dialog {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
}

.sw-ai-bubble-user {
  align-self: flex-start;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 8px 12px;
  border-radius: 12px;
  border-top-left-radius: 2px;
  color: #1E293B;
}

.sw-ai-bubble-bot {
  align-self: flex-start;
  background: #E0F2FE;
  border: 1px solid #BAE6FD;
  padding: 8px 12px;
  border-radius: 12px;
  border-top-left-radius: 2px;
  color: #0369A1;
  font-weight: 500;
}

/* Vertical Route Rail (Right Side) */
.sw-route {
  position: fixed;
  right: clamp(18px, 3vw, 44px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 16px 8px;
}

.sw-route::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 20px;
  bottom: 20px;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.12);
}

.sw-route-dot {
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0;
}

.sw-route-dot i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-route-dot:hover i {
  transform: scale(1.4);
  background: var(--sw-accent, #0284C7);
}

.sw-route-dot.is-active i {
  background: var(--sw-accent, #0284C7);
  transform: scale(1.6);
  box-shadow: 0 0 0 5px rgba(2, 132, 199, 0.2);
}

.sw-route-label {
  position: absolute;
  right: 26px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0F172A;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 9999px;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-route-dot:hover .sw-route-label,
.sw-route-dot.is-active .sw-route-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Scroll Hint (Bottom Center) */
.sw-hint {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 35;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #64748B;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sw-hint i {
  width: 20px;
  height: 32px;
  border-radius: 10px;
  border: 2px solid rgba(15, 23, 42, 0.3);
  position: relative;
}

.sw-hint i::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 6px;
  width: 4px;
  height: 6px;
  border-radius: 2px;
  background: #0284C7;
  transform: translateX(-50%);
  animation: sw-wheel 1.6s ease-in-out infinite;
}

@keyframes sw-wheel {
  0% { opacity: 0; top: 5px; }
  40% { opacity: 1; }
  100% { opacity: 0; top: 15px; }
}

/* HUD Time Pill (Bottom Left) */
.sw-hud-pill {
  position: fixed;
  left: clamp(20px, 4vw, 48px);
  bottom: 24px;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  font-size: 0.75rem;
  font-weight: 700;
  color: #0F172A;
  pointer-events: none;
}

.sw-hud-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0284C7;
  animation: pulse-ring 2s infinite;
}

.sw-hud-divider {
  color: #CBD5E1;
}

.sw-hud-time {
  font-family: var(--font-mono);
  color: #64748B;
  font-weight: 500;
}

/* Scroll Track Driver */
.sw-track {
  position: relative;
  z-index: 1;
  width: 100%;
  pointer-events: none;
}

/* Responsive Mobile Layout */
@media (max-width: 860px) {
  .sw-veil {
    display: none;
  }

  .sw-copy {
    left: 20px;
    right: 20px;
    top: 50%;
    bottom: auto;
    transform: translate3d(0, -50%, 0);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    width: auto;
    max-width: none;
  }

  .sw-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .sw-body {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .sw-route {
    display: none;
  }

  .sw-hud-pill {
    display: none;
  }
}

/* Interactive Slider */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  background: #E2E8F0;
  height: 6px;
  border-radius: 9999px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0284C7;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
  transition: all 0.15s ease-in-out;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 6px rgba(2, 132, 199, 0.3);
}

/* Pulse Animation */
@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

.pulse-node {
  position: relative;
}
.pulse-node::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  animation: pulse-ring 2.5s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: -1;
}
