/* RUTE Berkeadilan Jawa Barat - Main Stylesheet */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

/* CSS Files - Order matters! */
@import url('reset.css');
@import url('variables.css');
@import url('typography.css');
@import url('layout.css');
@import url('components.css');
@import url('sections.css');
@import url('animations.css');

/* ===================== */
/* GLOBAL STYLES        */
/* ===================== */

html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Smooth scrolling for elements */
.smooth-scroll {
  scroll-behavior: smooth;
}

/* Image pixelation overlay */
.pixel-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, transparent 50%, rgba(10, 15, 28, 0.1) 50%),
    linear-gradient(to right, transparent 50%, rgba(10, 15, 28, 0.05) 50%);
  background-size: 4px 4px, 4px 4px;
  pointer-events: none;
  z-index: 2;
}

/* Energy glow effect */
.energy-glow {
  position: relative;
}

.energy-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: radial-gradient(
    ellipse at center,
    rgba(60, 56, 222, 0.3) 0%,
    transparent 70%
  );
  filter: blur(20px);
  z-index: -1;
  animation: pulse 4s ease-in-out infinite;
}

/* Route visualization container */
.route-container {
  position: relative;
}

.route-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Section number badge */
.section-number {
  position: absolute;
  top: var(--space-8);
  left: var(--space-8);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent-lime);
  opacity: 0.6;
}

/* Background pattern */
.bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(60, 56, 222, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(184, 222, 50, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Floating elements */
.float-element {
  animation: float 6s ease-in-out infinite;
}

.float-element:nth-child(odd) {
  animation-duration: 8s;
  animation-delay: -2s;
}

/* Glassmorphism card */
.glass-card {
  background: rgba(20, 27, 45, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}

/* Pixel art decorative squares */
.pixel-square {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  opacity: 0.1;
  position: absolute;
}

.pixel-square:nth-child(1) {
  top: 10%;
  left: 5%;
  animation: floatSlow 8s ease-in-out infinite;
}

.pixel-square:nth-child(2) {
  top: 20%;
  right: 10%;
  width: 60px;
  height: 60px;
  background: var(--color-accent-lime);
  animation: floatSlow 6s ease-in-out infinite;
  animation-delay: -1s;
}

.pixel-square:nth-child(3) {
  bottom: 30%;
  left: 15%;
  width: 30px;
  height: 30px;
  background: var(--color-accent-yellow);
  animation: floatSlow 7s ease-in-out infinite;
  animation-delay: -3s;
}

/* Marquee section styling */
.marquee-section {
  position: relative;
}

.marquee-section::before,
.marquee-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.marquee-section::before {
  left: 0;
  background: linear-gradient(90deg, var(--color-bg-mid), transparent);
}

.marquee-section::after {
  right: 0;
  background: linear-gradient(-90deg, var(--color-bg-mid), transparent);
}

/* Responsive utilities */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .hide-tablet {
    display: none !important;
  }
}

/* Aspect ratios */
.aspect-square {
  aspect-ratio: 1/1;
}

.aspect-video {
  aspect-ratio: 16/9;
}

.aspect-photo {
  aspect-ratio: 4/3;
}

.aspect-portrait {
  aspect-ratio: 3/4;
}

/* Object fit helpers */
.object-cover {
  object-fit: cover;
}

.object-contain {
  object-fit: contain;
}

/* Overflow helpers */
.overflow-hidden {
  overflow: hidden;
}

.overflow-visible {
  overflow: visible;
}

.overflow-auto {
  overflow: auto;
}

/* Interactive cursor for interactive elements */
[data-cursor="pointer"] {
  cursor: pointer;
}

[data-cursor="grab"] {
  cursor: grab;
}

[data-cursor="grab"]:active {
  cursor: grabbing;
}

/* Utility classes */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Debug grid (remove in production) */
.debug-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image:
    linear-gradient(rgba(255, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
