/* ============================================
   ETHAN TECH — Premium B2B Technology Website
   3D Animated · Smooth Scrolling · Cinematic
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --bg: #f5f6f7;
  --bg-alt: #edeef0;
  --primary: #2f2f33;
  --primary-light: #4a4a52;
  --primary-gradient: linear-gradient(135deg, #2f2f33, #4a4a52);
  --accent: #5a5af0;
  --accent-soft: rgba(90, 90, 240, 0.08);
  --text: #1a1a1e;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --white: #ffffff;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.05);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 0.5s;
  --duration-fast: 0.25s;
  --duration-slow: 1s;
  --max-width: 1240px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body.loading {
  overflow: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; outline: none; }
ul, ol { list-style: none; }

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}

.preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.preloader-logo-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1rem;
  font-family: var(--font);
  animation: preloaderPulse 1.5s ease infinite;
}

.preloader-logo span {
  color: white;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  font-family: var(--font);
}

.preloader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin: 0 auto;
}

.preloader-bar-fill {
  height: 100%;
  width: 0%;
  background: white;
  border-radius: 3px;
  transition: width 0.3s var(--ease);
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.7; }
}

/* ============================================
   CURSOR GLOW
   ============================================ */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90,90,240,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  transition: transform 0.08s linear;
  will-change: transform;
  opacity: 0;
}

body.loaded .cursor-glow {
  opacity: 1;
  transition: opacity 0.8s ease, transform 0.08s linear;
}

/* ============================================
   3D GEOMETRIC SHAPES (Background)
   ============================================ */
.geo-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.geo {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  will-change: transform;
}

body.loaded .geo {
  opacity: 1;
  transition: opacity 1.5s ease;
}

.geo-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(90,90,240,0.04), transparent 70%);
  top: -10%; right: -8%;
  animation: geoFloat1 20s ease-in-out infinite;
}
.geo-2 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(47,47,51,0.03), transparent 70%);
  bottom: 10%; left: -5%;
  animation: geoFloat2 25s ease-in-out infinite;
}
.geo-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(90,90,240,0.05), transparent 70%);
  top: 40%; left: 60%;
  animation: geoFloat3 18s ease-in-out infinite;
}
.geo-4 {
  width: 120px; height: 120px;
  border: 1px solid rgba(90,90,240,0.06);
  top: 20%; left: 10%;
  animation: geoFloat4 22s ease-in-out infinite;
}
.geo-5 {
  width: 80px; height: 80px;
  border: 1px solid rgba(47,47,51,0.05);
  bottom: 30%; right: 15%;
  animation: geoFloat5 16s ease-in-out infinite;
}

@keyframes geoFloat1 {
  0%,100% { transform: translate(0,0) rotate(0deg) scale(1); }
  33% { transform: translate(-30px, 40px) rotate(60deg) scale(1.05); }
  66% { transform: translate(20px, -30px) rotate(120deg) scale(0.95); }
}
@keyframes geoFloat2 {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  50% { transform: translate(40px, -50px) rotate(180deg); }
}
@keyframes geoFloat3 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-60px, 30px) scale(1.2); }
}
@keyframes geoFloat4 {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  25% { transform: translate(20px, -20px) rotate(90deg); }
  50% { transform: translate(-10px, -40px) rotate(180deg); }
  75% { transform: translate(15px, -10px) rotate(270deg); }
}
@keyframes geoFloat5 {
  0%,100% { transform: translate(0,0) rotate(0deg); }
  50% { transform: translate(-30px, 20px) rotate(180deg); }
}

/* ============================================
   BACKGROUND PARTICLES CANVAS
   ============================================ */
#bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease;
}

body.loaded #bg-particles {
  opacity: 1;
}

/* ============================================
   UTILITY
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  position: relative;
  z-index: 2;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding: 6px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
}

.section-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: labelPulse 2s ease infinite;
}

@keyframes labelPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(60px) scale(0.97);
  transition: opacity 0.9s var(--ease),
              transform 0.9s var(--ease);
  will-change: transform, opacity;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 3D Card Reveal — enters from below with perspective tilt */
.reveal-3d {
  opacity: 0;
  transform: perspective(1200px) rotateX(8deg) translateY(80px) scale(0.95);
  transition: opacity 0.8s var(--ease),
              transform 0.8s var(--ease);
  will-change: transform, opacity;
}

.reveal-3d.visible {
  opacity: 1;
  transform: perspective(1200px) rotateX(0deg) translateY(0) scale(1);
}

/* Stagger children */
.reveal-3d:nth-child(1) { transition-delay: 0s; }
.reveal-3d:nth-child(2) { transition-delay: 0.08s; }
.reveal-3d:nth-child(3) { transition-delay: 0.16s; }
.reveal-3d:nth-child(4) { transition-delay: 0.24s; }
.reveal-3d:nth-child(5) { transition-delay: 0.32s; }
.reveal-3d:nth-child(6) { transition-delay: 0.40s; }

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all 0.5s var(--ease);
}

.nav.scrolled {
  background: rgba(245,246,247,0.8);
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: transform 0.3s var(--ease);
}

.nav-logo:hover { transform: scale(1.03); }

.nav-logo-icon {
  width: 36px; height: 36px;
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width 0.4s var(--ease);
}

.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }

.nav-cta {
  padding: 10px 24px;
  background: var(--primary-gradient);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}

.nav-cta:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(47,47,51,0.3);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1100;
}

.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s var(--ease);
  transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Animated grid background */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridShift 30s linear infinite;
  opacity: 0.5;
}

@keyframes gridShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* Hero Slides */
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide.leaving {
  opacity: 0;
  transform: scale(1.05);
}

.hero-slide-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  will-change: transform;
  transition: transform 1.8s var(--ease);
}

.hero-slide.active .hero-slide-bg img {
  transform: scale(1);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26,26,30,0.85) 0%,
    rgba(47,47,51,0.6) 50%,
    rgba(26,26,30,0.78) 100%
  );
  z-index: 1;
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 850px;
  padding: 0 var(--space-xl);
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xl);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(30px) scale(0.9);
  transition: opacity 0.8s var(--ease) 0.1s,
              transform 0.8s var(--ease) 0.1s;
}

.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: dotPulse 2s ease infinite;
}

@keyframes dotPulse {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(74,222,128,0); }
}

.hero-slide.active .hero-badge {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Hero Heading — per-line animation */
.hero-heading {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.06;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-lg);
}

.hero-heading-line {
  display: block;
  opacity: 0;
  transform: translateY(50px) rotateX(15deg);
  transition: opacity 0.8s var(--ease),
              transform 0.8s var(--ease);
  transform-origin: bottom center;
}

.hero-heading-line:nth-child(1) { transition-delay: 0.2s; }
.hero-heading-line:nth-child(2) { transition-delay: 0.35s; }

.hero-slide.active .hero-heading-line {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

/* Hero Description */
.hero-desc {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease) 0.4s,
              transform 0.7s var(--ease) 0.4s;
}

.hero-slide.active .hero-desc {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Actions */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease) 0.55s,
              transform 0.7s var(--ease) 0.55s;
}

.hero-slide.active .hero-actions {
  opacity: 1;
  transform: translateY(0);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 34px;
  background: var(--white);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(90,90,240,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover::before { opacity: 1; }

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

.btn-primary svg {
  width: 16px; height: 16px;
  transition: transform 0.3s var(--ease);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 34px;
  background: transparent;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.05);
  transform: translateX(-100%);
  transition: transform 0.5s var(--ease);
}

.btn-outline:hover::before { transform: translateX(0); }

.btn-outline:hover {
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-2px);
}

/* Hero Progress */
.hero-progress {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 44px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.hero-dot:hover { background: rgba(255,255,255,0.3); }
.hero-dot.active { background: rgba(255,255,255,0.15); }

.hero-dot-fill {
  height: 100%;
  width: 0;
  background: var(--white);
  border-radius: 2px;
  transition: width 0.4s var(--ease);
}

.hero-dot.active .hero-dot-fill { width: 100%; }

/* Scroll Indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: scrollBounce 2.5s ease infinite;
}

.hero-scroll-indicator span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.hero-scroll-mouse {
  width: 22px; height: 36px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  position: relative;
}

.hero-scroll-wheel {
  width: 3px; height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 3px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s ease infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

@keyframes scrollBounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Floating Orbs */
.hero-float {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

.hero-float-1 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(90,90,240,0.08), transparent 70%);
  top: 5%; right: -5%;
  animation: heroFloat 12s ease-in-out infinite;
}

.hero-float-2 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,0.04), transparent 70%);
  bottom: 10%; left: 3%;
  animation: heroFloat 16s ease-in-out infinite reverse;
}

.hero-float-3 {
  width: 150px; height: 150px;
  border: 1px solid rgba(255,255,255,0.06);
  top: 25%; left: 12%;
  animation: heroFloat 10s ease-in-out infinite 3s;
}

.hero-float-4 {
  width: 100px; height: 100px;
  border: 1px solid rgba(90,90,240,0.1);
  bottom: 25%; right: 10%;
  animation: heroFloat 14s ease-in-out infinite 5s;
}

@keyframes heroFloat {
  0%,100% { transform: translate(0,0) rotate(0deg) scale(1); }
  25% { transform: translate(20px,-25px) rotate(8deg) scale(1.05); }
  50% { transform: translate(-15px,-45px) rotate(-5deg) scale(0.95); }
  75% { transform: translate(25px,-15px) rotate(6deg) scale(1.03); }
}

/* ============================================
   CATEGORIES
   ============================================ */
.categories {
  padding: var(--space-2xl) 0 var(--space-5xl);
  position: relative;
}

.categories-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
  perspective: 1200px;
}

/* 3D Flip Card System */
.flip-card {
  perspective: 1000px;
  cursor: pointer;
  height: 260px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease);
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
}

.flip-card-front {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.flip-card-back {
  background: var(--primary-gradient);
  transform: rotateY(180deg);
  color: var(--white);
  gap: var(--space-sm);
}

.category-icon {
  width: 80px; height: 80px;
  margin: 0 auto var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.category-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  transition: transform 0.6s var(--ease);
}

.category-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.category-count {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Flip Card Back Styles */
.flip-back-icon {
  font-size: 2.2rem;
  margin-bottom: var(--space-xs);
}

.flip-back-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

.flip-back-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  max-width: 180px;
}

.flip-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-sm);
  padding: 10px 22px;
  background: var(--white);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}

.flip-back-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.flip-back-btn svg {
  width: 14px; height: 14px;
  transition: transform 0.3s var(--ease);
}

.flip-back-btn:hover svg {
  transform: translateX(3px);
}

/* ============================================
   WHY CHOOSE US
   ============================================ */
.why-us {
  padding: var(--space-5xl) 0;
  background: var(--white);
  position: relative;
}

.why-us-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-4xl);
  align-items: center;
}

.why-us-header { margin-bottom: var(--space-2xl); }

.why-us-features {
  display: grid;
  gap: var(--space-sm);
}

.feature-item {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  transition: all 0.4s var(--ease);
  border: 1px solid transparent;
}

.feature-item:hover {
  background: var(--bg);
  border-color: var(--border);
  transform: translateX(8px);
}

.feature-icon-wrap {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease-spring);
}

.feature-item:hover .feature-icon-wrap {
  transform: scale(1.1) rotate(-5deg);
}

.feature-icon-wrap svg {
  width: 24px; height: 24px;
  color: var(--accent);
}

.feature-text h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.feature-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Stats Grid */
.why-us-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  perspective: 1200px;
}

.stat-card {
  perspective: 800px;
}

.stat-card .card-3d-inner {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  border: 1px solid var(--border);
}

.stat-card:hover .card-3d-inner {
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card.accent .card-3d-inner {
  background: var(--primary-gradient);
  border: none;
}

.stat-card.accent .stat-number,
.stat-card.accent .stat-label {
  color: var(--white);
}

/* ============================================
   TRUST / CLIENTS
   ============================================ */
.trust {
  padding: var(--space-5xl) 0;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.trust-header { margin-bottom: var(--space-4xl); }


/* Achievements Grid */
.achievements {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-4xl);
}

.achievement-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.achievement-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.achievement-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.achievement-card:hover::before {
  opacity: 1;
}

.achievement-icon {
  font-size: 1.8rem;
  margin-bottom: var(--space-sm);
  position: relative;
  z-index: 1;
  transition: transform 0.4s var(--ease);
}

.achievement-card:hover .achievement-icon {
  transform: scale(1.2);
}

.achievement-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  transition: color 0.4s ease;
}

.achievement-card:hover .achievement-number {
  color: var(--white);
}

.achievement-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  transition: color 0.4s ease;
}

.achievement-card:hover .achievement-label {
  color: rgba(255,255,255,0.7);
}


/* ============================================
   FEATURED PRODUCTS
   ============================================ */
.products {
  padding: var(--space-5xl) 0;
  background: var(--white);
  position: relative;
}

.products-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-3xl);
}

.products-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.products-filter-btn {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  transition: all 0.35s var(--ease);
}

.products-filter-btn.active,
.products-filter-btn:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  perspective: 1400px;
}

.product-card {
  perspective: 900px;
}

.product-card .card-3d-inner {
  background: var(--bg);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid transparent;
  padding: 0;
}

.product-card:hover .card-3d-inner {
  box-shadow: var(--shadow-xl);
  border-color: rgba(90,90,240,0.1);
}

.product-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-alt);
}

.product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.product-card:hover .product-img img {
  transform: scale(1.08);
}

.product-badge {
  position: absolute;
  top: var(--space-md); left: var(--space-md);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.product-badge.new {
  background: var(--accent);
  color: var(--white);
}

.product-info {
  padding: var(--space-xl);
}

.product-category {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.product-specs {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}

.product-price span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-tertiary);
}

.product-action {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s var(--ease-spring);
}

.product-action:hover {
  transform: scale(1.15) rotate(5deg);
  background: var(--accent);
}

.product-action svg {
  width: 18px; height: 18px;
  color: var(--white);
}

/* ============================================
   CTA
   ============================================ */
.cta {
  padding: var(--space-5xl) 0;
  position: relative;
}

.cta-card {
  background: var(--primary-gradient);
  border-radius: var(--radius-2xl);
  padding: var(--space-5xl) var(--space-4xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.cta-particle {
  position: absolute;
  width: 4px; height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  animation: particleFloat var(--dur) ease-in-out infinite;
}

@keyframes particleFloat {
  0%,100% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  50% { transform: translateY(-80px) scale(0.5); }
}

.cta-content {
  position: relative;
  z-index: 2;
}

.cta-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.9);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xl);
}

.cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.cta-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.6);
  max-width: 480px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.btn-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 38px;
  background: var(--white);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn-cta-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 38px;
  background: transparent;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.35s var(--ease);
}

.btn-cta-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: var(--space-5xl) 0 var(--space-2xl);
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-4xl);
  margin-bottom: var(--space-4xl);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-top: var(--space-lg);
  max-width: 300px;
  color: rgba(255,255,255,0.45);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--white);
}

.footer-logo-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 0.75rem;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xl);
}

.footer-col ul li { margin-bottom: var(--space-sm); }

.footer-col ul li a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  transition: all 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--white);
  transform: translateX(4px);
  display: inline-block;
}

.footer-bottom {
  padding-top: var(--space-2xl);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.3);
}

.footer-socials {
  display: flex;
  gap: var(--space-sm);
}

.footer-social-link {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s var(--ease-spring);
}

.footer-social-link:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-3px) scale(1.1);
}

.footer-social-link svg {
  width: 16px; height: 16px;
  color: rgba(255,255,255,0.5);
}

/* ============================================
   PRODUCT DETAILS MODAL
   ============================================ */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

body.modal-active {
  overflow: hidden; /* Prevent scrolling behind modal */
}

body.modal-active .product-modal-overlay {
  opacity: 1;
  pointer-events: auto;
}

.product-modal-container {
  background: var(--card);
  width: 100%;
  max-width: 900px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0,0,0,0.12);
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s var(--ease-spring);
  border: 1px solid var(--border);
}

body.modal-active .product-modal-container {
  transform: translateY(0) scale(1);
}

.product-modal-close {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.product-modal-close:hover {
  background: var(--bg);
  transform: rotate(90deg);
}

.product-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.product-modal-img-wrap {
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl);
}

.product-modal-img-wrap img {
  max-width: 100%;
  height: auto;
  transform: scale(1.05);
}

.product-modal-info {
  padding: var(--space-3xl);
  display: flex;
  flex-direction: column;
}

.product-modal-info .product-category {
  margin-bottom: var(--space-xs);
}

.product-modal-title {
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
  color: var(--text);
}

.product-modal-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-xl);
}

.product-modal-specs-box {
  background: var(--bg);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2xl);
  border: 1px solid var(--border);
}

.product-modal-specs-box h4 {
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  color: var(--text);
}

/* Modal Variants dropdowns */
.product-modal-variants {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.variant-select-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.variant-select-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.variant-select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background-color: var(--bg);
  outline: none;
  transition: border-color 0.2s;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%232f2f33%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 12px top 50%;
  background-size: 10px auto;
}

.variant-select:focus {
  border-color: var(--accent);
}

#modal-specs-list {
  list-style: none;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

#modal-specs-list li {
  position: relative;
  padding-left: var(--space-lg);
}

#modal-specs-list li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--accent);
}

.modal-order-btn {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-xl);
  border-radius: var(--radius-lg);
  font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .why-us-inner { grid-template-columns: 1fr; gap: var(--space-3xl); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .container { padding: 0 var(--space-lg); }

  .geo-shapes { display: none !important; }
  .cursor-glow { display: none; }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 80%; max-width: 320px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: calc(var(--nav-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
    gap: var(--space-lg);
    box-shadow: -8px 0 40px rgba(0,0,0,0.1);
    transition: right 0.5s var(--ease);
    z-index: 1050;
  }

  .nav-links.open { right: 0; }
  .nav-hamburger { display: flex; }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1040;
    backdrop-filter: blur(4px);
  }

  .nav-overlay.open { display: block; }

  .hero-heading { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-actions { flex-direction: column; }
  .hero-scroll-indicator { display: none; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .achievements { grid-template-columns: repeat(3, 1fr); }

  .products-header { flex-direction: column; align-items: flex-start; gap: var(--space-lg); }
  .products-grid { grid-template-columns: 1fr; }

  .cta-card { padding: var(--space-3xl) var(--space-xl); }
  .cta-actions { flex-direction: column; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .footer-bottom { flex-direction: column; gap: var(--space-lg); text-align: center; }

  /* Modal Responsive */
  .product-modal-grid { grid-template-columns: 1fr; }
  .product-modal-img-wrap { padding: var(--space-xl); display: none; /* hide img on mobile to save space */ }
  .product-modal-container { max-height: 90vh; overflow-y: auto; }
}

@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr; }
  .why-us-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
