/* VIRAS VISA - Luxury Obsidian & Champagne Gold Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: #07080A;
  color: #F8FAFC;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* RTL Typography & Persian Ligatures */
[dir="rtl"] {
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif !important;
  text-rendering: optimizeLegibility;
}

[dir="rtl"] #hero-title {
  letter-spacing: 0 !important;
  word-spacing: 0.25rem !important;
}

[dir="rtl"] .tracking-widest,
[dir="rtl"] .tracking-wider,
[dir="rtl"] .tracking-tight {
  letter-spacing: 0 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #07080A;
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.6);
}

/* Vignette and Atmospheric Fog */
.cinematic-vignette {
  background: radial-gradient(circle at 50% 50%, rgba(7, 8, 10, 0.15) 20%, rgba(10, 12, 14, 0.85) 75%, rgba(4, 5, 7, 0.98) 100%);
}

.light-cone {
  background: radial-gradient(ellipse at 50% -10%, rgba(212, 175, 55, 0.14) 0%, rgba(197, 160, 89, 0.04) 45%, transparent 70%);
  transform-origin: top center;
  filter: blur(60px);
}

/* Custom Luxury Magnetic Cursor */
.custom-cursor-dot {
  width: 7px;
  height: 7px;
  background-color: #E5C158;
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 100;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  box-shadow: 0 0 12px rgba(229, 193, 88, 0.9);
}

.custom-cursor-outline {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 99;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out, width 0.3s, height 0.3s, border-color 0.3s, background-color 0.3s;
}

.custom-cursor-label {
  position: fixed;
  pointer-events: none;
  z-index: 101;
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: #F3E5AB;
  text-transform: uppercase;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

@media (hover: none) and (pointer: coarse) {
  .custom-cursor-dot, .custom-cursor-outline, .custom-cursor-label {
    display: none !important;
  }
}

/* Glassmorphism & Portal Cards */
.portal-card {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.6s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.portal-card:hover {
  transform: translateY(-8px) scale(1.015);
}

[dir="rtl"] .portal-card:hover .portal-arrow {
  transform: translateX(-6px);
}

/* Scene Views & Transitions */
.scene-view {
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), filter 0.7s ease;
  width: 100%;
}

.scene-hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.97) translateY(16px);
  filter: blur(6px);
}

.scene-visible {
  display: flex !important;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  filter: blur(0);
  animation: sceneFadeIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sceneFadeIn {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(16px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

/* Geodetic Flight Arcs Animation */
@keyframes dashPulse {
  0% { stroke-dashoffset: 1000; }
  100% { stroke-dashoffset: 0; }
}

.migration-arc {
  stroke-dasharray: 6 12;
  animation: dashPulse 45s linear infinite;
}

.migration-arc-fast {
  stroke-dasharray: 4 10;
  animation: dashPulse 30s linear infinite;
}

/* Radar rotation */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-slow {
  animation: spinSlow 120s linear infinite;
}

.spin-reverse-slow {
  animation: spinSlow 160s linear infinite reverse;
}

/* Jet stream animations */
@keyframes flightCorridorMain {
  0% { transform: translate3d(-18vw, 76vh, 0) rotate(-7deg); opacity: 0; }
  6% { opacity: 0.95; }
  85% { opacity: 0.95; }
  100% { transform: translate3d(118vw, 55vh, 0) rotate(-7deg); opacity: 0; }
}

@keyframes flightCorridorNorth {
  0% { transform: translate3d(118vw, 20vh, 0) rotate(172deg); opacity: 0; }
  8% { opacity: 0.75; }
  88% { opacity: 0.75; }
  100% { transform: translate3d(-18vw, 36vh, 0) rotate(172deg); opacity: 0; }
}

@keyframes flightCorridorDiagonal {
  0% { transform: translate3d(-15vw, 38vh, 0) rotate(-11deg); opacity: 0; }
  10% { opacity: 0.55; }
  90% { opacity: 0.55; }
  100% { transform: translate3d(115vw, 15vh, 0) rotate(-11deg); opacity: 0; }
}

.jet-stream-primary {
  animation: flightCorridorMain 22s cubic-bezier(0.35, 0, 0.65, 1) infinite;
  will-change: transform, opacity;
}

.jet-stream-secondary {
  animation: flightCorridorNorth 34s cubic-bezier(0.35, 0, 0.65, 1) infinite;
  animation-delay: 8s;
  will-change: transform, opacity;
}

.jet-stream-tertiary {
  animation: flightCorridorDiagonal 42s linear infinite;
  animation-delay: 3s;
  will-change: transform, opacity;
}

/* Letter and Word Reveal Animations */
@keyframes charRevealAnim {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.9) rotateX(15deg);
    filter: blur(8px);
  }
  60% {
    opacity: 0.95;
    transform: translateY(-2px) scale(1.02) rotateX(0deg);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0deg);
    filter: blur(0px);
  }
}

.reveal-char {
  display: inline-block;
  opacity: 0;
  animation: charRevealAnim 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes wordRevealAnim {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    filter: blur(8px);
  }
  60% {
    opacity: 0.9;
    transform: translateY(-2px) scale(1.01);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

.reveal-word {
  display: inline-block;
  opacity: 0;
  animation: wordRevealAnim 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.viras-char-first, .viras-word-first {
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 45%, #94A3B8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.viras-char-gold, .viras-word-gold {
  background: linear-gradient(180deg, #F9F3DC 0%, #E5C158 35%, #C5A059 70%, #8A6418 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.4));
}

/* Golden luxury gradient text helper */
.gold-gradient-text {
  background: linear-gradient(180deg, #F9F3DC 0%, #E5C158 35%, #C5A059 70%, #8A6418 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Floating particles canvas */
#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}
