/**
 * PrimeRealOps - Main Stylesheet
 * Version: 1.0.0
 * 
 * This stylesheet contains:
 * - Global styles and typography
 * - Component-specific styles
 * - Animations and transitions
 * - Responsive design rules
 */

/* ================================
   1. IMPORTS & FONT LOADING
   ================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

/* ================================
   2. ROOT & COLOR VARIABLES
   ================================ */

:root {
  /* Navy color palette */
  --navy-900: #0B1120;
  --navy-800: #151e32;
  --navy-700: #23304a;
  
  /* Slate colors */
  --slate-card: #1E293B;
  --slate-lighter: #334155;
  
  /* Teal colors */
  --teal-accent: #38BDF8;
  --teal-dark: #0ea5e9;
  --teal-glow: rgba(56, 189, 248, 0.5);
  
  /* Gold colors */
  --gold-400: #FACC15;
  --gold-500: #EAB308;
  --gold-600: #CA8A04;
  
  /* Base colors */
  --white: #FFFFFF;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  
  /* Z-index layers */
  --z-toast: 100;
  --z-nav: 50;
  --z-modal: 50;
  --z-content: 10;
  --z-bg: -2;
}

/* ================================
   3. GLOBAL STYLES
   ================================ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  font-size: 18px;
  line-height: 1.6;
  background-color: var(--navy-900);
  color: var(--gray-300);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Font family utilities */
.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ================================
   4. SCROLLBAR STYLING
   ================================ */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--navy-900);
}

::-webkit-scrollbar-thumb {
  background: var(--teal-accent);
  border-radius: 5px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--teal-dark);
}

/* Custom scrollbar for Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--teal-accent) var(--navy-900);
}

/* ================================
   5. BACKGROUND & LAYOUT ELEMENTS
   ================================ */

.glass-panel {
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  transition: background 0.3s ease;
}

/* Technical Grid Background */
.bg-tech-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
}

/* Data Stream Lines */
.data-stream-left,
.data-stream-right {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(56, 189, 248, 0.1);
  z-index: 0;
  display: none; /* Hidden on mobile */
}

@media (min-width: 1024px) {
  .data-stream-left,
  .data-stream-right {
    display: block;
  }
}

.data-stream-left {
  left: 40px;
}

.data-stream-right {
  right: 40px;
}

.data-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--teal-accent), transparent);
  opacity: 0;
  animation: scanBeam 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.data-stream-right .data-beam {
  animation-delay: 4s;
}

/* Stars Background */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--navy-900) url('data:image/svg+xml;utf8,%3Csvg%20width%3D%22800%22%20height%3D%22800%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22%23FFF%22%20fill-opacity%3D%220.4%22%3E%3Ccircle%20cx%3D%22400%22%20cy%3D%22400%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%22200%22%20cy%3D%22100%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%22600%22%20cy%3D%22600%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%22100%22%20cy%3D%22700%22%20r%3D%221%22%2F%3E%3Ccircle%20cx%3D%22700%22%20cy%3D%22200%22%20r%3D%221%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E') repeat;
  animation: moveStars 100s linear infinite;
  z-index: -2;
  opacity: 0.6;
}

/* ================================
   6. COMPONENT STYLES
   ================================ */

.tech-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 40px -10px rgba(56, 189, 248, 0.25);
  border-color: rgba(56, 189, 248, 0.4);
}

.tech-input {
  transition: all 0.3s ease;
}

.tech-input:focus {
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
  border-color: var(--teal-accent) !important;
}

/* Ribbon badge */
.ribbon {
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  overflow: hidden;
}

.ribbon span {
  position: absolute;
  display: block;
  width: 180px;
  padding: 8px 0;
  background-color: var(--teal-accent);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  color: var(--navy-900);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  left: -25px;
  top: 25px;
  transform: rotate(45deg);
}

/* Shine effect for premium elements */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  animation: shine 6s infinite;
}

/* ================================
   7. ACCORDION STYLES
   ================================ */

.accordion-content {
  transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.accordion-content.open {
  max-height: 500px;
  opacity: 1;
}

/* ================================
   8. NAVIGATION STYLES
   ================================ */

.nav-link {
  position: relative;
  overflow: hidden;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--teal-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
  box-shadow: 0 0 10px var(--teal-accent);
}

.nav-link:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* ================================
   9. TIMELINE STYLES
   ================================ */

.timeline-line {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(56, 189, 248, 0.2);
  z-index: 0;
}

@media (max-width: 768px) {
  .timeline-line {
    left: 24px;
    width: 2px;
    height: 100%;
    top: 0;
    right: auto;
  }
}

/* ================================
   10. TOAST NOTIFICATION STYLES
   ================================ */

.toast {
  position: fixed;
  top: 7rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toast.error {
  background-color: #ef4444;
  color: white;
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

.toast.success {
  background-color: #14b8a6;
  color: white;
  box-shadow: 0 0 30px rgba(20, 184, 166, 0.3);
}

.toast.info {
  background-color: var(--navy-800);
  color: var(--teal-accent);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

/* ================================
   11. ANIMATION KEYFRAMES
   ================================ */

@keyframes scanBeam {
  0% {
    top: -200px;
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    top: 100vh;
    opacity: 0;
  }
}

@keyframes moveStars {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 1000px 1000px;
  }
}

@keyframes rotateOrbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes rotateSatellite {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes infinite-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.8);
  }
}

@keyframes check-bounce {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes pageIn {
  0% {
    opacity: 0;
    transform: scale(0.98) translateY(10px);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }
  20% {
    left: 200%;
  }
  100% {
    left: 200%;
  }
}

/* ================================
   12. ANIMATION UTILITY CLASSES
   ================================ */

.page-enter {
  animation: pageIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.review-item-enter {
  animation: slideUpFade 0.5s ease-out forwards;
}

.animate-scroll-tech {
  animation: infinite-scroll 20s linear infinite;
}

.animate-scroll-reviews {
  animation: infinite-scroll 32s linear infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-check-bounce {
  animation: check-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* ================================
   13. ORBIT & SATELLITE STYLES
   ================================ */

.orbit-container {
  position: relative;
  width: 550px;
  height: 550px;
  margin: 0 auto;
}

.orbit-track {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(56, 189, 248, 0.3);
  border-radius: 50%;
  animation: rotateOrbit 25s linear infinite;
}

.orbit-wrapper {
  position: absolute;
  inset: 0;
  animation: rotateOrbit 25s linear infinite;
}

.orbit-wrapper:hover {
  animation-play-state: paused;
}

.satellite {
  position: absolute;
  width: 120px;
  height: 120px;
  background: var(--navy-800);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: white;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  animation: rotateSatellite 25s linear infinite;
  transition: all 0.3s ease;
  padding: 10px;
  line-height: 1.2;
}

.orbit-wrapper:hover .satellite {
  animation-play-state: paused;
}

.satellite:hover {
  border-color: var(--teal-accent);
  box-shadow: 0 0 25px var(--teal-accent);
  transform: scale(1.15);
  z-index: 50;
  background: var(--slate-card);
}

.sat-1 {
  top: 0;
  left: 50%;
  margin-left: -60px;
  margin-top: -60px;
}

.sat-2 {
  top: 25%;
  right: 5%;
  margin-top: -60px;
}

.sat-3 {
  top: 75%;
  right: 5%;
  margin-top: -60px;
}

.sat-4 {
  bottom: 0;
  left: 50%;
  margin-left: -60px;
  margin-bottom: -60px;
}

.sat-5 {
  top: 75%;
  left: 5%;
  margin-top: -60px;
}

.sat-6 {
  top: 25%;
  left: 5%;
  margin-top: -60px;
}

/* ================================
   14. RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
  .orbit-container {
    width: 340px;
    height: 340px;
  }

  .satellite {
    width: 85px;
    height: 85px;
    font-size: 0.8rem;
  }

  .sat-1,
  .sat-4 {
    margin-left: -42px;
  }

  .sat-1 {
    margin-top: -42px;
  }

  .sat-4 {
    margin-bottom: -42px;
  }

  .sat-2,
  .sat-3,
  .sat-5,
  .sat-6 {
    margin-top: -42px;
  }

  body {
    font-size: 16px;
  }
}

/* ================================
   15. ACCESSIBILITY & PRINT STYLES
   ================================ */

/* Focus styles for keyboard navigation */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--teal-accent);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print styles */
@media print {
  .glass-panel,
  .data-stream-left,
  .data-stream-right,
  .bg-tech-grid,
  nav,
  footer {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}

/* ================================
   16. UTILITY CLASSES
   ================================ */

.custom-scrollbar {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--teal-accent) transparent;
}

.mask-linear-fade {
  mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.text-gradient {
  background: linear-gradient(to right, var(--teal-accent), #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.drop-shadow-glow {
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}
