/* ============================================
   FUTURA POS — Custom CSS (Light Theme Redesign)
   (TailwindCSS handles utility classes)
   This file covers: parallax, glassmorphism,
   particles, 3D tilt, animations, scrollbar
   ============================================ */

/* ---------- Base & Scrollbar ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #F8FAFC;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00D4FF, #0066CC);
  border-radius: 99px;
}

::selection {
  background: rgba(0, 212, 255, 0.2);
  color: #0066CC;
}

/* ---------- Skip Link ---------- */
.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  padding: 10px 16px;
  color: #fff;
  background: #0066CC;
  border-radius: 10px;
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform 0.3s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Navbar ---------- */
#navbar {
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03), inset 0 -1px 0 rgba(0, 102, 204, 0.05);
}

/* Mobile nav drawer */
.mobile-nav {
  transform: translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Particle Canvas ---------- */
#heroParticles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Parallax System ---------- */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

@supports not (background-attachment: fixed) {
  .parallax-bg {
    background-attachment: scroll;
  }
}

/* Parallax floating orbs */
.parallax-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ---------- Gradient Text ---------- */
.gradient-text {
  background: linear-gradient(135deg, #0066CC 0%, #00D4FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-brand {
  background: linear-gradient(135deg, #00D4FF 0%, #0066CC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Glassmorphism Cards ---------- */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 8px 40px rgba(0, 102, 204, 0.08), 0 0 0 1px rgba(0, 212, 255, 0.1);
  transform: translateY(-6px);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

/* ---------- 3D Tilt Effect ---------- */
.tilt-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.15s ease;
}

.tilt-card .tilt-inner {
  transition: transform 0.15s ease;
}

/* ---------- Gradient Border ---------- */
.gradient-border {
  position: relative;
  overflow: hidden;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #00D4FF, #0066CC, #00D4FF);
  background-size: 200% 200%;
  animation: borderShift 4s ease-in-out infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes borderShift {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* ---------- Animated Gradient Glow ---------- */
.glow-btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.glow-btn::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #00D4FF, #0066CC, #00B4D8, #0066CC);
  background-size: 300% 300%;
  border-radius: inherit;
  z-index: -1;
  animation: glowShift 3s ease-in-out infinite;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.glow-btn:hover::after {
  opacity: 0.6;
}

@keyframes glowShift {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* ---------- Feature Icon Glow ---------- */
.icon-glow {
  position: relative;
}

.icon-glow::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(0, 102, 204, 0.3));
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.group:hover .icon-glow::after {
  opacity: 1;
}

/* ---------- Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-up {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-scale {
  transform: scale(0.92);
}

.reveal.is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Stagger children */
.stagger-children .reveal:nth-child(1) {
  transition-delay: 0ms;
}

.stagger-children .reveal:nth-child(2) {
  transition-delay: 100ms;
}

.stagger-children .reveal:nth-child(3) {
  transition-delay: 200ms;
}

.stagger-children .reveal:nth-child(4) {
  transition-delay: 300ms;
}

.stagger-children .reveal:nth-child(5) {
  transition-delay: 400ms;
}

.stagger-children .reveal:nth-child(6) {
  transition-delay: 500ms;
}

/* ---------- Hero Animations ---------- */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes floatSlow {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-12px) rotate(2deg);
  }
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.2), 0 18px 38px rgba(0, 102, 204, 0.08);
  }

  50% {
    box-shadow: 0 0 0 16px rgba(0, 102, 204, 0), 0 18px 38px rgba(0, 102, 204, 0.08);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.2), 0 18px 38px rgba(0, 102, 204, 0.08);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
  animation: floatSlow 8s ease-in-out infinite;
}

.animate-pulse-ring {
  animation: pulse-ring 2.2s ease-in-out infinite;
}

/* ---------- Parallax Divider ---------- */
.parallax-divider {
  position: relative;
  height: 300px;
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.parallax-divider::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      #ffffff 0%,
      rgba(255, 255, 255, 0.1) 40%,
      rgba(255, 255, 255, 0.1) 60%,
      #ffffff 100%);
}

/* ---------- Stats Counter ---------- */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ---------- Dot indicators ---------- */
.dot-red::before {
  content: '';
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

.dot-green::before {
  content: '';
  position: absolute;
  top: 0.65em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

/* ---------- Device Lab ---------- */
.device-tab {
  transition: all 0.3s ease;
}

.device-tab.is-active {
  background: linear-gradient(135deg, #00D4FF, #0066CC);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.25);
}

.device-frame {
  background: #0f172a;
  border: 4px solid #1e293b;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

.device-frame[data-mode="web"] {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.device-frame[data-mode="apk"] {
  max-width: 320px;
  min-height: 520px;
  margin: 0 auto;
  border-radius: 28px;
}

.screen-hero-inner {
  background: linear-gradient(145deg, #00D4FF, #0066CC);
}

.screen-tile {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.3s ease;
}

.screen-tile:hover {
  background: rgba(255, 255, 255, 0.12);
}

.device-frame[data-mode="web"] .screen-tile {
  background: #fff;
  color: #1e293b;
  border-color: #e2e8f0;
}

.screen-meter {
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 12px;
}

.device-frame[data-mode="web"] .screen-meter {
  background: #e2e8f0;
}

.screen-meter i {
  display: block;
  height: 100%;
  width: var(--meter);
  background: linear-gradient(90deg, #00D4FF, #0066CC);
  border-radius: inherit;
  transition: width 0.6s ease;
}

/* ---------- Map ---------- */
.map-wrap {
  border-radius: 16px;
  overflow: hidden;
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: block;
  border: 0;
  transition: filter 0.4s ease;
}

/* ---------- Floating WhatsApp ---------- */
.floating-wa {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4), 0 8px 24px rgba(37, 211, 102, 0.3);
  animation: pulse-wa 2.2s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.floating-wa:hover {
  transform: scale(1.1);
}

.floating-wa svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

@keyframes pulse-wa {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4), 0 8px 24px rgba(37, 211, 102, 0.3);
  }

  50% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0), 0 8px 24px rgba(37, 211, 102, 0.3);
  }
}

/* ---------- Hamburger Animation ---------- */
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #1e293b;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
  .parallax-bg {
    background-attachment: scroll;
  }

  .parallax-divider {
    height: 200px;
    background-attachment: scroll;
  }

  .floating-wa {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
  }

  .floating-wa svg {
    width: 26px;
    height: 26px;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .reveal-bg {
    background-attachment: scroll;
  }
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 101;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.lightbox-close:focus-visible {
  outline: 2px solid #00D4FF;
  outline-offset: 2px;
}