/* ============================================================
   Xelta – Main Stylesheet
   ============================================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #050510;
  --bg2:       #080820;
  --accent:    #7c3aed;
  --accent2:   #06b6d4;
  --accent3:   #f59e0b;
  --text:      #e2e8f0;
  --text-dim:  #94a3b8;
  --card-bg:   rgba(255,255,255,0.04);
  --border:    rgba(124,58,237,0.3);
  --glow:      0 0 30px rgba(124,58,237,0.5);
  --glow2:     0 0 30px rgba(6,182,212,0.4);
  --cube-size: 280px;
  --font-head: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --radius:    12px;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Touch-friendly tap targets */
button, a, .nav-link, .carousel-arrow {
  -webkit-tap-highlight-color: rgba(124, 58, 237, 0.2);
  touch-action: manipulation;
}

/* Prevent text selection on interactive elements */
.carousel-arrow, .hamburger, .btn-primary, .btn-outline, .btn-glow, .btn-view-more {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ---------- Utility ---------- */
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.accent { color: var(--accent2); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(5,5,16,0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled {
  padding: 0.6rem 3rem;
  background: rgba(5,5,16,0.95);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  z-index: 1002;
}

/* Xelta logo image */
.logo-img {
  height: 60px;
  width: 140px;
  display: block;
  /* object-fit: contain; */
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
}

.logo-img:hover {
  opacity: 0.85;
}

.footer-logo-img {
  height: 40px;
  width: 100px;
  display: block;
  filter: brightness(0) invert(1);
  margin-bottom: 0.75rem;
}

.logo-icon {
  font-size: 1.6rem;
  color: var(--accent);
  animation: spin-slow 8s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-link {
  font-family: var(--font-head);
  font-size: 0.88rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.btn-glow {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: var(--glow);
  transition: var(--transition);
}
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(124,58,237,0.7); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: transparent;
  border: none;
  padding: 5px;
}
.hamburger span {
  display: block;
  width: 24px; 
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

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

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

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

/* ============================================================
   HOME SECTION
   ============================================================ */
.home-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

#particleCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(124,58,237,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.home-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

/* Hero Text */
.hero-text { flex: 1; max-width: 560px; }

.hero-tag {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  max-width: 440px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

.btn-primary {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: var(--glow);
  transition: var(--transition);
  display: inline-block;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 50px rgba(124,58,237,0.8); }

.btn-outline {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  color: var(--text);
  transition: var(--transition);
  display: inline-block;
}
.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(124,58,237,0.1);
  transform: translateY(-3px);
}

/* ============================================================
   3D CUBE
   ============================================================ */
.cube-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 1s 1s forwards;
}

.cube-scene {
  width: var(--cube-size);
  height: var(--cube-size);
  perspective: 900px;
  cursor: grab;
}
.cube-scene:active { cursor: grabbing; }

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: autoRotate 12s linear infinite;
  transition: transform 0.05s linear;
}
.cube.user-control { animation: none; }

@keyframes autoRotate {
  0%   { transform: rotateX(-20deg) rotateY(0deg); }
  100% { transform: rotateX(-20deg) rotateY(360deg); }
}

.face {
  position: absolute;
  width: var(--cube-size);
  height: var(--cube-size);
  border: 1px solid rgba(124,58,237,0.5);
  overflow: hidden;
  border-radius: 4px;
  backface-visibility: visible;
}

.face video { width: 100%; height: 100%; object-fit: cover; }

.face-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(6,182,212,0.1));
  pointer-events: none;
}

.face.front  { transform: translateZ(calc(var(--cube-size)/2)); }
.face.back   { transform: rotateY(180deg) translateZ(calc(var(--cube-size)/2)); }
.face.left   { transform: rotateY(-90deg) translateZ(calc(var(--cube-size)/2)); }
.face.right  { transform: rotateY(90deg)  translateZ(calc(var(--cube-size)/2)); }
.face.top    { transform: rotateX(90deg)  translateZ(calc(var(--cube-size)/2)); }
.face.bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube-size)/2)); }

/* Glow ring around cube */
.cube-scene::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 20px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.6), transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
}

.cube-hint {
  margin-top: 1.5rem;
  font-family: var(--font-head);
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:0.4} 50%{opacity:1} }

/* ============================================================
   SCROLL INDICATOR
   ============================================================ */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  animation: fadeIn 1s 1.5s both;
}
.scroll-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: bounce 1.5s ease-in-out infinite;
}
.arrow-line {
  width: 1px; height: 30px;
  background: linear-gradient(to bottom, transparent, var(--accent));
}
.arrow-head {
  width: 8px; height: 8px;
  border-right: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  transform: rotate(45deg);
  margin-top: -4px;
}
@keyframes bounce { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }

/* ============================================================
   CAMERA CAPTURE ANIMATION
   ============================================================ */
.camera-capture {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: #000;
  overflow: hidden;
}

.camera-capture.active {
  display: block;
  animation: captureSequence 2s ease-in-out forwards;
}

@keyframes captureSequence {
  0% { opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* Camera Flash Effect */
.camera-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  opacity: 0;
  animation: flashEffect 0.3s ease-out;
  animation-delay: 0.8s;
}

@keyframes flashEffect {
  0% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0; transform: scale(1); }
}

/* Camera Shutter Animation */
.camera-shutter {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
}

.shutter-blade {
  position: absolute;
  width: 50%;
  height: 50%;
  background: linear-gradient(45deg, #2a2a2a, #1a1a1a);
  transform-origin: 100% 100%;
  border-radius: 0 100% 0 0;
}

.shutter-1 { transform: rotate(0deg) translate(-50%, -50%); }
.shutter-2 { transform: rotate(60deg) translate(-50%, -50%); }
.shutter-3 { transform: rotate(120deg) translate(-50%, -50%); }
.shutter-4 { transform: rotate(180deg) translate(-50%, -50%); }
.shutter-5 { transform: rotate(240deg) translate(-50%, -50%); }
.shutter-6 { transform: rotate(300deg) translate(-50%, -50%); }

.camera-capture.active .shutter-blade {
  animation: shutterClose 0.6s ease-in-out;
  animation-delay: 0.2s;
}

@keyframes shutterClose {
  0% { transform: rotate(var(--rotation)) translate(-50%, -50%) scale(0); }
  30% { transform: rotate(var(--rotation)) translate(-50%, -50%) scale(1.2); }
  60% { transform: rotate(var(--rotation)) translate(-50%, -50%) scale(0.8); }
  100% { transform: rotate(var(--rotation)) translate(-50%, -50%) scale(0); }
}

.camera-capture.active .shutter-1 { --rotation: 0deg; }
.camera-capture.active .shutter-2 { --rotation: 60deg; animation-delay: 0.25s; }
.camera-capture.active .shutter-3 { --rotation: 120deg; animation-delay: 0.3s; }
.camera-capture.active .shutter-4 { --rotation: 180deg; animation-delay: 0.35s; }
.camera-capture.active .shutter-5 { --rotation: 240deg; animation-delay: 0.4s; }
.camera-capture.active .shutter-6 { --rotation: 300deg; animation-delay: 0.45s; }

/* Focus Ring Animation */
.camera-focus-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border: 3px solid rgba(124, 58, 237, 0.8);
  border-radius: 50%;
  opacity: 0;
}

.camera-capture.active .camera-focus-ring {
  animation: focusRing 1.5s ease-in-out;
  animation-delay: 0.1s;
}

@keyframes focusRing {
  0% { 
    opacity: 0; 
    transform: translate(-50%, -50%) scale(2); 
    border-color: rgba(124, 58, 237, 0.3);
  }
  30% { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1.2); 
    border-color: rgba(124, 58, 237, 0.8);
  }
  60% { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1); 
    border-color: rgba(6, 182, 212, 0.8);
  }
  100% { 
    opacity: 0; 
    transform: translate(-50%, -50%) scale(0.8); 
    border-color: rgba(6, 182, 212, 0.3);
  }
}

/* Camera Sound Effect Visualization */
.camera-capture::before {
  content: '';
  position: absolute;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.3), transparent);
  border-radius: 50%;
  opacity: 0;
}

.camera-capture.active::before {
  animation: soundWave 0.8s ease-out;
  animation-delay: 0.8s;
}

@keyframes soundWave {
  0% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 1; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(2); }
}

/* ============================================================
   DEMO SECTION
   ============================================================ */
.demo-section {
  position: relative;
  padding: 6rem 3rem;
  background: var(--bg2);
  min-height: 100vh;
}

.demo-header {
  text-align: center;
  margin-bottom: 2rem;
}
.section-tag {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ============================================================
   CINEMATIC VIDEO CAROUSEL
   ============================================================ */
.carousel-3d-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  padding: 3.5rem 0 2rem;
  background: transparent;
  overflow: visible;
  display: flex;
  align-items: center;
  gap: 0;
}

.carousel-arrow {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(147, 51, 234, 0.4);
  background: rgba(147, 51, 234, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
  z-index: 100;
  position: absolute;
}

.carousel-arrow-left {
  left: 20px;
}

.carousel-arrow-right {
  right: 20px;
}

.carousel-arrow:hover {
  background: rgba(147, 51, 234, 0.3);
  border-color: rgba(147, 51, 234, 0.8);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.4);
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
}

.carousel-3d-wrapper {
  position: relative;
  height: 450px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  overflow: visible;
}

.carousel-3d {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-3d-item {
  position: absolute;
  width: 260px;
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  opacity: 0;
  background: transparent;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

/* VISIBLE ITEMS - JS handles all transforms dynamically */
.carousel-3d-item.visible {
  opacity: 1;
}

/* FADE SIDE VIDEOS (NON-ACTIVE) */
.carousel-3d-item:not(.active) {
  opacity: 0.5;
  filter: brightness(0.7);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* SIDE CARDS - NO FILTER, SHOW VIDEOS */
.carousel-3d-item:not(.active) {
  background: transparent;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.carousel-3d-item:not(.active) .card-thumbnail {
  display: block;
  opacity: 1;
}

.carousel-3d-item:not(.active)::before {
  display: none;
}

/* CENTER CARD - ENHANCED */
.carousel-3d-item.active {
  width: 300px;
  height: 400px;
  border: 2px solid rgba(124, 58, 237, 0.6);
  box-shadow: 
    0 0 30px rgba(124, 58, 237, 0.4),
    0 20px 60px rgba(0, 0, 0, 0.6);
}

.carousel-3d-item.active .card-thumbnail {
  display: block;
}

.carousel-3d-item.active::before {
  display: none;
}

/* VIDEO/THUMBNAIL AREA */
.card-thumbnail {
  position: relative;
  width: 100%;
  height: 70%;
  overflow: hidden;
  background: #0d1033;
  isolation: isolate;
}

.card-thumbnail video,
.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* BADGE */
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: white;
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 4px;
  z-index: 5;
  isolation: isolate;
}

/* CARD INFO */
.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px;
  background: rgba(13, 16, 51, 0.95);
  z-index: 5;
  isolation: isolate;
  border-top: 1px solid rgba(147, 51, 234, 0.2);
}

.card-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  line-height: 1.2;
  isolation: isolate;
  position: relative;
  z-index: 6;
}

.card-subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.3;
  isolation: isolate;
  position: relative;
  z-index: 6;
}

/* ACTIVE CARD ENHANCED INFO */
.carousel-3d-item.active .card-info {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3));
}

.carousel-3d-item.active .card-title {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

/* CENTER CARD HOVER EFFECT - SCALE UP WITH WIDTH/HEIGHT INCREASE */
.carousel-3d-item.active:hover {
  width: 340px !important;
  height: 450px !important;
  transform: translateX(0) perspective(600px) rotateY(0deg) scale(1);
  box-shadow: 
    0 0 50px rgba(124, 58, 237, 0.7),
    0 30px 90px rgba(0, 0, 0, 0.9);
  border-color: rgba(124, 58, 237, 0.9);
  z-index: 15;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-3d-item.active:hover .card-thumbnail video {
  transform: scale(1.05);
}

/* FADE SIDE VIDEOS MORE WHEN CENTER IS HOVERED */
.carousel-3d-container:has(.carousel-3d-item.active:hover) .carousel-3d-item:not(.active) {
  opacity: 0.25;
  filter: brightness(0.5);
  transition: all 0.5s ease;
}

.card-thumbnail video {
  transition: transform 0.5s ease;
}

/* ── VIDEO POSTER FADE-OUT ─────────────────────────────────
   The poster image is shown by the browser natively.
   Once JS removes the poster attribute the video frame
   takes over — we add a fade on the video element itself
   so the switch is smooth rather than a hard cut.
   ──────────────────────────────────────────────────────── */
video {
  transition: opacity 0.4s ease;
}

video.poster-visible {
  opacity: 1;
}

video.poster-removed {
  animation: posterFadeIn 0.4s ease forwards;
}

@keyframes posterFadeIn {
  from { opacity: 0.6; }
  to   { opacity: 1; }
}

.carousel-3d-item.active .card-subtitle {
  font-size: 0.85rem;
}

/* HOVER EFFECTS */
.carousel-3d-item:not(.active):hover {
  transform: translateX(var(--x)) perspective(800px) rotateY(var(--rotY)) scale(calc(var(--scale) + 0.05));
}

.carousel-3d-item.active:hover {
  transform: translateX(0) perspective(800px) rotateY(0deg) scale(1.08);
  box-shadow: 
    0 0 50px rgba(147, 51, 234, 0.6),
    0 25px 80px rgba(0, 0, 0, 0.4);
}

.carousel-btn-3d {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: rgba(124,58,237,0.1);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

.carousel-btn-3d:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--glow);
  transform: scale(1.1);
}

.carousel-btn-3d svg {
  width: 24px;
  height: 24px;
}

/* ============================================================
   VIEW MORE BUTTON
   ============================================================ */
.view-more-container {
  text-align: center;
  margin: 1rem 0 2rem;
}

.btn-view-more {
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 1rem 3rem;
  border-radius: 50px;
  border: 2px solid var(--accent);
  background: rgba(124,58,237,0.15);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-view-more::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-view-more span,
.btn-view-more svg {
  position: relative;
  z-index: 1;
}

.btn-view-more:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(124,58,237,0.5);
  border-color: var(--accent2);
}

.btn-view-more:hover::before {
  opacity: 1;
}

.btn-view-more svg {
  transition: transform 0.4s ease;
}

.btn-view-more:hover svg {
  transform: translateY(4px);
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section {
  padding: 6rem 3rem;
  background: var(--bg);
  min-height: 100vh;
  animation: fadeIn 0.5s ease;
}

.gallery-header {
  max-width: 1400px;
  margin: 0 auto 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gallery-header .section-title {
  margin: 0;
}

.btn-back {
  font-family: var(--font-head);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: rgba(124,58,237,0.1);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn-back:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateX(-4px);
}

/* ============================================================
   VIDEO GRID (4 per row)
   ============================================================ */
.video-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.video-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(124,58,237,0.3);
  border-color: var(--accent);
}

.card-video-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg);
}

.card-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .card-video-wrap video {
  transform: scale(1.05);
}

.card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  background: rgba(5,5,16,0.9);
  font-family: var(--font-head);
  font-size: 0.7rem;
  color: var(--text);
}

.card-info {
  padding: 1rem;
}

.card-info h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.card-info p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ============================================================
   VIDEO MODAL
   ============================================================ */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.video-modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5,5,16,0.95);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 1100px;
  background: var(--bg2);
  border-radius: var(--radius);
  border: 2px solid var(--border);
  box-shadow: 0 30px 100px rgba(0,0,0,0.8);
  overflow: hidden;
  animation: modalSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(5,5,16,0.9);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: rotate(90deg);
}

.modal-content video {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.modal-info {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.modal-info h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.modal-info p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: #030308;
  border-top: 1px solid var(--border);
  /* padding: 4rem 3rem 0; */
  padding: 2rem 3rem 0;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  /* padding-bottom: 3rem; */
  /* border-bottom: 1px solid var(--border); */
}

.footer-brand .logo-text {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  display: block;
  margin: 0.5rem 0;
}
.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  max-width: 220px;
}

.footer-links h4, .footer-newsletter h4 {
  font-family: var(--font-head);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 1.2rem;
}
.footer-links ul li {
  margin-bottom: 0.7rem;
}
.footer-links ul li a {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-links ul li a:hover { color: var(--text); padding-left: 4px; }

.footer-newsletter p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.newsletter-form {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
}
.newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 0.7rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.newsletter-form input::placeholder { color: var(--text-dim); }
.newsletter-form button {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  padding: 0.7rem 1.2rem;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}
.newsletter-form button:hover { opacity: 0.85; }

.footer-bottom {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ============================================================
   FOOTER SOCIAL ICONS
   ============================================================ */
.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.footer-social-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.footer-social-btn svg {
  width: 18px;
  height: 18px;
}

.footer-social-btn:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* TABLET LANDSCAPE - 1100px */
@media (max-width: 1100px) {
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  
  .carousel-3d-container {
    padding: 3rem 1rem 1.5rem;
    gap: 1rem;
  }
  
  .carousel-arrow {
    width: 48px;
    height: 48px;
  }
  
  .carousel-3d-wrapper {
    height: 420px;
  }
  
  .carousel-3d-item {
    width: 240px !important;
    height: 320px !important;
  }
  
  .carousel-3d-item.active {
    width: 280px !important;
    height: 360px !important;
  }
}

/* TABLET PORTRAIT - 768px */
@media (max-width: 768px) {
  /* NAVBAR */
  .navbar { 
    padding: 1rem 1.5rem;
    justify-content: space-between;
  }
  .nav-links, .nav-cta { 
    display: none; 
  }
  .hamburger { 
    display: flex;
    order: 2;
  }
  .nav-logo {
    font-size: 1.1rem;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    order: 1;
    z-index: 1002;
  }
  .logo-icon {
    font-size: 1.4rem;
    display: inline-block !important;
  }
  .logo-text {
    display: inline-block !important;
  }

  .footer-social{
    margin: auto;
    align-items: center;
    justify-content: center;
    display: flex;
  }

  /* HOME SECTION */
  .home-section {
    padding: 5rem 1.5rem 3rem;
  }
  
  .home-content {
    flex-direction: column;
    padding: 2rem 1.5rem;
    text-align: center;
    gap: 3rem;
  }
  
  .hero-text {
    max-width: 100%;
  }
  
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }
  
  .hero-sub {
    font-size: 1rem;
    margin: 0 auto 2rem;
    max-width: 90%;
  }
  
  .hero-btns { 
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
  }
  
  .btn-primary, .btn-outline {
    padding: 0.9rem 2rem;
    font-size: 0.85rem;
  }

  /* CUBE */
  :root { --cube-size: 220px; }
  
  .cube-wrapper {
    margin-top: 2rem;
  }
  
  .cube-hint {
    font-size: 0.8rem;
  }

  /* SCROLL INDICATOR */
  .scroll-indicator {
    bottom: 1.5rem;
  }

  /* DEMO SECTION */
  .demo-section { 
    padding: 4rem 1.5rem; 
  }
  
  .demo-header {
    margin-bottom: 2.5rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .section-tag {
    font-size: 0.65rem;
  }
  
  /* CAROUSEL */
  .carousel-3d-container { 
    padding: 2rem 0.5rem 1rem;
    margin: 0 auto 2rem;
    gap: 1rem;
  }
  
  .carousel-arrow {
    width: 44px;
    height: 44px;
    position: relative;
    margin: 0 0.5rem;
  }
  
  .carousel-3d-wrapper {
    height: 380px;
    padding: 0 1rem;
  }
  
  .carousel-3d-item {
    width: 200px !important;
    height: 280px !important;
  }
  
  .carousel-3d-item.active {
    width: 240px !important;
    height: 320px !important;
  }
  
  .card-info {
    padding: 12px;
  }
  
  .card-title {
    font-size: 0.95rem;
  }
  
  .card-subtitle {
    font-size: 0.75rem;
  }
  
  /* VIEW MORE BUTTON */
  .btn-view-more {
    font-size: 0.75rem;
    padding: 0.9rem 2.5rem;
  }

  /* GALLERY */
  .gallery-section { 
    padding: 4rem 1.5rem; 
  }
  
  .gallery-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .video-grid { 
    grid-template-columns: 1fr 1fr; 
    gap: 1rem; 
  }
  
  /* FOOTER */
  .footer {
    padding: 3rem 1.5rem 1.5rem;
  }
  
  .footer-inner { 
    grid-template-columns: 1fr; 
    gap: 2rem; 
  }
  
  .footer-brand {
    text-align: center;
  }

  .footer-logo-img{
    margin: auto;
  }
  
  .footer-links {
    text-align: center;
  }
  
  .footer-newsletter {
    text-align: center;
  }
  
  /* MODAL */
  .modal-content {
    width: 95%;
    max-height: 90vh;
  }
  
  #modalVideo {
    max-height: 60vh;
  }
}

/* MOBILE LANDSCAPE - 640px */
@media (max-width: 640px) {
  /* HOME */
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-tag {
    font-size: 0.75rem;
  }
  
  :root { --cube-size: 200px; }
  
  /* CAROUSEL */
  .carousel-3d-wrapper {
    height: 340px;
  }
  
  .carousel-3d-item {
    width: 180px !important;
    height: 250px !important;
  }
  
  .carousel-3d-item.active {
    width: 220px !important;
    height: 290px !important;
  }
  
  /* SECTION SPACING */
  .demo-section,
  .gallery-section,
  .creative-views-section {
    padding: 3rem 1rem;
  }
}

/* MOBILE PORTRAIT - 480px */
@media (max-width: 480px) {
  /* NAVBAR */
  .navbar {
    padding: 0.8rem 1rem;
    justify-content: space-between;
  }
  
  .nav-logo {
    font-size: 1rem;
    display: flex !important;
    align-items: center;
    gap: 0.4rem;
    order: 1;
    z-index: 1002;
  }
  
  .logo-icon {
    font-size: 1.3rem;
    display: inline-block !important;
  }
  
  .logo-text {
    display: inline-block !important;
  }
  
  .hamburger {
    order: 2;
  }

  /* HOME */
  .home-section {
    padding: 4rem 1rem 2rem;
  }
  
  .home-content {
    padding: 1.5rem 1rem;
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-sub {
    font-size: 0.9rem;
  }
  
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-primary, .btn-outline {
    width: 100%;
    justify-content: center;
  }
  
  :root { --cube-size: 180px; }
  
  .cube-hint {
    font-size: 0.75rem;
  }
  
  /* CAMERA CAPTURE */
  .camera-shutter {
    width: 200px;
    height: 200px;
  }
  
  .camera-focus-ring {
    width: 250px;
    height: 250px;
  }

  /* DEMO SECTION */
  .demo-section {
    padding: 3rem 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .section-tag {
    font-size: 0.6rem;
    letter-spacing: 2px;
  }
  
  /* CAROUSEL */
  .carousel-3d-container {
    padding: 1.5rem 0 1rem;
    margin: 0 0 1.5rem;
  }
  
  .carousel-arrow {
    width: 40px;
    height: 40px;
  }
  
  .carousel-arrow svg {
    width: 20px;
    height: 20px;
  }
  
  .carousel-3d-wrapper {
    height: 300px;
  }
  
  .carousel-3d-item {
    width: 150px !important;
    height: 210px !important;
  }
  
  .carousel-3d-item.active {
    width: 190px !important;
    height: 260px !important;
  }
  
  /* ENABLE TAP/TOUCH EFFECT ON MOBILE */
  .carousel-3d-item.active:active {
    width: 210px !important;
    height: 280px !important;
    box-shadow: 0 0 30px rgba(124, 58, 237, 0.6);
    transition: all 0.2s ease;
  }
  
  .card-info {
    padding: 10px;
  }
  
  .card-title {
    font-size: 0.85rem;
  }
  
  .card-subtitle {
    font-size: 0.7rem;
  }
  
  .card-badge {
    font-size: 0.55rem;
    padding: 3px 8px;
  }
  
  /* VIEW MORE BUTTON */
  .view-more-container {
    margin: 1rem 0 1.5rem;
  }
  
  .btn-view-more {
    font-size: 0.7rem;
    padding: 0.8rem 2rem;
    letter-spacing: 1.5px;
  }
  
  .btn-view-more svg {
    width: 16px;
    height: 16px;
  }

  /* GALLERY */
  .video-grid { 
    grid-template-columns: 1fr; 
  }
  
  .video-card {
    max-width: 100%;
  }
  
  /* FOOTER */
  .footer {
    padding: 2.5rem 1rem 1rem;
  }
  
  .footer-brand {
    font-size: 0.9rem;
  }
  
  .footer-links h4 {
    font-size: 0.9rem;
  }
  
  .footer-links ul li a {
    font-size: 0.85rem;
  }
  
  .footer-newsletter h4 {
    font-size: 0.9rem;
  }
  
  .newsletter-form input {
    font-size: 0.85rem;
  }
  
  .footer-bottom {
    font-size: 0.75rem;
  }
  
  /* MODAL */
  .modal-content {
    width: 98%;
    max-height: 92vh;
  }
  
  .modal-close {
    width: 36px;
    height: 36px;
  }
  
  .modal-close svg {
    width: 18px;
    height: 18px;
  }
  
  #modalVideo {
    max-height: 50vh;
  }
  
  .modal-info {
    padding: 1rem;
  }
  
  .modal-info h3 {
    font-size: 1rem;
  }
  
  .modal-info p {
    font-size: 0.8rem;
  }
}

/* EXTRA SMALL MOBILE - 360px */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.5rem;
  }
  
  :root { --cube-size: 160px; }
  
  .carousel-3d-wrapper {
    height: 280px;
  }
  
  .carousel-3d-item {
    width: 130px !important;
    height: 190px !important;
  }
  
  .carousel-3d-item.active {
    width: 170px !important;
    height: 240px !important;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
}

