/* ==========================================================
   ENGRANAJE DIGITAL — Design System & Styles
   ========================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================
   1. CSS CUSTOM PROPERTIES
   ========================================================== */
:root {
  /* Brand Colors */
  --color-teal: #3AAFA9;
  --color-green: #7CB342;
  --color-orange: #FFB300;
  --color-deep-orange: #F57C00;
  --color-magenta: #FF1867;
  --color-magenta-dark: #D0134F;

  /* Backgrounds */
  --color-bg-primary: #06060C;
  --color-bg-secondary: #0D0D18;
  --color-bg-tertiary: #131320;
  --color-bg-card: rgba(255, 255, 255, 0.025);
  --color-bg-card-hover: rgba(255, 255, 255, 0.05);

  /* Text */
  --color-text-primary: #F0F0F5;
  --color-text-secondary: #8E8EA0;
  --color-text-tertiary: #5A5A6E;

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-hover: rgba(255, 255, 255, 0.12);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, var(--color-magenta), var(--color-deep-orange));
  --gradient-brand-reverse: linear-gradient(135deg, var(--color-deep-orange), var(--color-magenta));
  --gradient-teal: linear-gradient(135deg, var(--color-teal), var(--color-green));
  --gradient-warm: linear-gradient(135deg, var(--color-orange), var(--color-magenta));
  --gradient-glow-magenta: radial-gradient(circle, rgba(255, 24, 103, 0.15) 0%, transparent 70%);
  --gradient-glow-teal: radial-gradient(circle, rgba(58, 175, 169, 0.1) 0%, transparent 70%);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-bg-hover: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-blur: 24px;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --section-padding: 120px 0;
  --container-width: 1200px;
  --container-padding: 0 24px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: 0.2s var(--ease-out-quart);
  --transition-medium: 0.4s var(--ease-out-expo);
  --transition-slow: 0.7s var(--ease-out-expo);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow-magenta: 0 0 40px rgba(255, 24, 103, 0.2);
  --shadow-glow-teal: 0 0 40px rgba(58, 175, 169, 0.15);
}

/* ==========================================================
   2. RESET & BASE
   ========================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

::selection {
  background: rgba(255, 24, 103, 0.3);
  color: #fff;
}

/* ==========================================================
   3. TYPOGRAPHY
   ========================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
}

h4 {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
}

p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-teal {
  background: var(--gradient-teal);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ==========================================================
   4. LAYOUT UTILITIES
   ========================================================== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
  width: 100%;
}

.section {
  padding: var(--section-padding);
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 72px;
  padding-top: 56px;
  /* Restores space from deleted badge */
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-magenta);
  margin-bottom: 24px;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

.section-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-magenta);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

.section-header h2 {
  margin-bottom: 20px;
}

.section-header p {
  font-size: 1.1rem;
}

/* ==========================================================
   5. BUTTONS
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-glow-magenta);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(255, 24, 103, 0.35);
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn-primary:hover::after {
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-hover);
}

.btn-outline:hover {
  background: var(--glass-bg-hover);
  border-color: var(--color-magenta);
  color: var(--color-magenta);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 10px 24px;
  font-size: 0.85rem;
}

.btn-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
}

/* ==========================================================
   6. NAVIGATION
   ========================================================== */

/* --- Minimal Top Bar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all var(--transition-medium);
}

.navbar.scrolled {
  /* Always transparent — the 3D immersive experience needs the full visual space */
  padding: 14px 0;
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 64px;
  width: auto;
  /* Magic trick: makes black background transparent on dark sites */
  mix-blend-mode: screen;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
}

.lang-switch:hover {
  border-color: var(--color-teal);
  color: var(--color-teal);
}

.lang-switch .lang-active {
  color: var(--color-teal);
}

/* --- Side Dots Navigation --- */
.side-nav {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.side-nav-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.side-nav-dot {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
}

/* Label — hidden by default, slides in on hover */
.dot-label {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
  white-space: nowrap;
  pointer-events: none;
}

.side-nav-dot:hover .dot-label,
.side-nav-dot.active .dot-label {
  opacity: 1;
  transform: translateX(0);
}

.side-nav-dot.active .dot-label {
  color: var(--color-magenta);
}

/* The dot itself */
.dot-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border-hover);
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  position: relative;
}

/* Glow ring on active */
.dot-circle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--color-magenta);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s ease;
}

.side-nav-dot:hover .dot-circle {
  background: var(--color-text-secondary);
  transform: scale(1.3);
}

.side-nav-dot.active .dot-circle {
  background: var(--color-magenta);
  border-color: var(--color-magenta);
  transform: scale(1.4);
  box-shadow: 0 0 12px rgba(255, 24, 103, 0.6);
}

.side-nav-dot.active .dot-circle::after {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================
   7. Z-DEPTH SCROLL STRUCTURE
   ========================================================== */
#canvas-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#z-scenes-container {
  position: relative;
  width: 100%;
  height: 100vh;
  /* CRITICAL: Without this, it collapses to 0 height because children are absolute */
  overflow-x: clip;
  /* Clip horizontal only — prevents 3D transform scrollbars without clipping vertical */
  perspective: 2000px;
  /* Enable true 3D depth for children */
}

.z-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  /* Scroll internally — works now without preserve-3d */
  overflow-x: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  /* NOTE: no transform-style:preserve-3d here — that blocks overflow-y:auto.
     The parent #z-scenes-container has perspective:2000px which handles
     the 3D entry/exit transforms. Card tilts use GSAP's transformPerspective. */
  padding-top: 80px;
  padding-bottom: 60px;
  box-sizing: border-box;
  /* Hide internal scrollbar visually */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.z-scene::-webkit-scrollbar {
  display: none;
}

.z-scene.active {
  pointer-events: auto;
}

/* Force ALL descendants of inactive scenes to be non-interactive,
   even if GSAP set inline pointer-events: auto on them */
.z-scene:not(.active) * {
  pointer-events: none !important;
}

/* Base section styles override for fixed positioning */
.section {
  padding: 60px 0;
}

/* ==========================================================
   7. HERO SECTION
   ========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.hero-glow-1 {
  top: -200px;
  right: -100px;
  background: var(--color-magenta);
  opacity: 0.12;
}

.hero-glow-2 {
  bottom: -200px;
  left: -100px;
  background: var(--color-teal);
  opacity: 0.08;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-teal);
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
}

.hero-badge .badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-teal);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero h1 {
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 28px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hero p {
  font-size: 1.2rem;
  max-width: 650px;
  margin: 0 auto 48px;
  color: var(--color-text-secondary);
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 999999;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-tertiary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float-scroll 3s ease-in-out infinite;
}

.scroll-indicator .scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-magenta), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes float-scroll {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

@keyframes scroll-line {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  51% {
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ==========================================================
   8. ABOUT / STATS SECTION
   ========================================================== */
.about {
  background: var(--color-bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text {
  padding-top: 56px;
  /* Restores space from deleted badge */
}

.about-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
  /* Allow shadow/decor to overflow */
  transform-style: preserve-3d;
}

/* 3D floating frame behind the image */
.about-image::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: calc(var(--radius-lg) + 4px);
  border: 2px solid transparent;
  background: linear-gradient(135deg, rgba(255, 24, 103, 0.35), transparent 50%, rgba(58, 175, 169, 0.35)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  transform: translateZ(-20px);
  pointer-events: none;
}

.about-image img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.4),
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(255, 24, 103, 0.08);
  display: block;
  position: relative;
  z-index: 1;
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 24, 103, 0.08), rgba(58, 175, 169, 0.08));
  border-radius: var(--radius-lg);
  pointer-events: none;
  z-index: 2;
}

.about-image-badge {
  position: absolute;
  bottom: 24px;
  left: 24px;
  padding: 16px 24px;
  background: rgba(6, 6, 12, 0.85);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  z-index: 2;
}

.about-image-badge .badge-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.about-image-badge .badge-label {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.about-text h2 {
  margin-bottom: 24px;
}

.about-text p {
  margin-bottom: 16px;
}

.about-text p:last-of-type {
  margin-bottom: 40px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 80px;
}

.stat-card {
  text-align: center;
  padding: 32px 20px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  /* 3D card base */
  transform-style: preserve-3d;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.3),
    0 12px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Shimmer top border */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-magenta), transparent);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

/* Bottom glow layer */
.stat-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 40px;
  border-radius: 50%;
  filter: blur(16px);
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.stat-card:nth-child(1)::after {
  background: var(--color-magenta);
}

.stat-card:nth-child(2)::after {
  background: var(--color-teal);
}

.stat-card:nth-child(3)::after {
  background: var(--color-orange);
}

.stat-card:nth-child(4)::after {
  background: var(--color-green);
}

.stat-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-10px) translateZ(20px);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.4),
    0 24px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover::after {
  opacity: 0.6;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card:nth-child(1) .stat-number {
  color: var(--color-magenta);
}

.stat-card:nth-child(2) .stat-number {
  color: var(--color-teal);
}

.stat-card:nth-child(3) .stat-number {
  color: var(--color-orange);
}

.stat-card:nth-child(4) .stat-number {
  color: var(--color-green);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ==========================================================
   9. SERVICES SECTION
   ========================================================== */
/* --- Horizontal Carousel Wrapper --- */
.carousel-wrapper {
  overflow: hidden;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  /* Break out of container to full width */
  padding: 20px 0;
}

.services-grid {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 0 5vw;
  /* Start padding */
}

.service-card {
  width: 350px;
  /* Fixed width for carousel */
  flex-shrink: 0;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  cursor: default;
  /* Per-card 3D perspective so tilt is self-contained */
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.4s ease,
    border-color 0.3s ease,
    background 0.3s ease;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 8px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Gradient top line */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 1;
}

/* Corner accent glow (bottom-right) */
.service-card::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.service-card:nth-child(1)::after {
  background: rgba(255, 24, 103, 0.5);
}

.service-card:nth-child(2)::after {
  background: rgba(58, 175, 169, 0.5);
}

.service-card:nth-child(3)::after {
  background: rgba(255, 179, 0, 0.5);
}

.service-card:nth-child(4)::after {
  background: rgba(124, 179, 66, 0.5);
}

.service-card:nth-child(5)::after {
  background: rgba(245, 124, 0, 0.5);
}

.service-card:nth-child(6)::after {
  background: rgba(58, 175, 169, 0.5);
}

.service-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-12px) translateZ(40px) rotateX(2deg);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.4),
    0 30px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover::after {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.5rem;
  position: relative;
  /* 3D floating orb effect */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover .service-icon {
  transform: translateY(-4px) translateZ(20px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.service-card:nth-child(1) .service-icon {
  background: rgba(255, 24, 103, 0.1);
  color: var(--color-magenta);
}

.service-card:nth-child(2) .service-icon {
  background: rgba(58, 175, 169, 0.1);
  color: var(--color-teal);
}

.service-card:nth-child(3) .service-icon {
  background: rgba(255, 179, 0, 0.1);
  color: var(--color-orange);
}

.service-card:nth-child(4) .service-icon {
  background: rgba(124, 179, 66, 0.1);
  color: var(--color-green);
}

.service-card:nth-child(5) .service-icon {
  background: rgba(245, 124, 0, 0.1);
  color: var(--color-deep-orange);
}

.service-card:nth-child(6) .service-icon {
  background: rgba(58, 175, 169, 0.1);
  color: var(--color-teal);
}

.service-card h3 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-magenta);
  transition: gap var(--transition-fast);
}

.service-link:hover {
  gap: 14px;
}

.service-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.service-link:hover svg {
  transform: translateX(4px);
}

/* ==========================================================
   10. PORTFOLIO SECTION
   ========================================================== */
.portfolio {
  background: var(--color-bg-secondary);
}

.portfolio-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--color-text-primary);
  background: var(--glass-bg);
}

.filter-btn.active {
  color: var(--color-magenta);
  background: rgba(255, 24, 103, 0.08);
  border-color: rgba(255, 24, 103, 0.2);
}

.portfolio-grid {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 0 5vw;
}





.portfolio-normal-wrapper .portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Team Grid Overrides (4 cards) */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
}

.team-grid .team-item {
  width: 100% !important;
  /* Override individual inline styles or global width */
  height: 450px !important;
  pointer-events: auto;
}

.team-grid .team-item .team-overlay {
  opacity: 1;
  /* Always show name and role */
  background: linear-gradient(to top, rgba(6, 6, 12, 0.95) 0%, rgba(6, 6, 12, 0) 50%, transparent 100%);
}

.team-grid .team-item .team-overlay .team-desc {
  display: none;
  /* Hide description until clicked (opens in modal) */
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}





.portfolio-drag-proxy:active {
  cursor: grabbing;
}







.portfolio-item {
  width: 450px;
  /* Fixed width for carousel */
  flex-shrink: 0;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  /* 3D lift effect */
  transform-style: preserve-3d;
  transition:
    transform 0.4s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.4s ease;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.4),
    0 12px 32px rgba(0, 0, 0, 0.5);
}

.portfolio-item:hover {
  transform: translateY(-16px) translateZ(30px) rotateX(3deg);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.5),
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(255, 24, 103, 0.1);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 6, 12, 0.95) 0%, rgba(6, 6, 12, 0.4) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  opacity: 0;
  transition: opacity var(--transition-medium);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay .portfolio-category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-magenta);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.portfolio-overlay h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.portfolio-overlay p {
  display: none;
}

.portfolio-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portfolio-tag {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* ==========================================================
   11. TESTIMONIALS SECTION
   ========================================================== */
.testimonials-wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-slide {
  display: none;
  text-align: center;
  padding: 0 20px;
}

.testimonial-slide.active {
  display: block;
}

.testimonial-quote {
  position: relative;
  padding: 48px;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  margin-bottom: 40px;
}

.testimonial-quote::before {
  content: '"';
  position: absolute;
  top: 24px;
  left: 36px;
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 800;
  color: var(--color-magenta);
  opacity: 0.2;
  line-height: 1;
}

.testimonial-quote p {
  font-size: 1.15rem;
  color: var(--color-text-primary);
  font-style: italic;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-magenta);
}

.testimonial-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
}

.testimonial-role {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.testimonial-stars {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 8px;
}

.testimonial-stars svg {
  width: 18px;
  height: 18px;
  fill: var(--color-orange);
}

.testimonial-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.testimonial-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--color-text-secondary);
}

.testimonial-nav-btn:hover {
  border-color: var(--color-magenta);
  color: var(--color-magenta);
  background: rgba(255, 24, 103, 0.08);
}

.testimonial-dots {
  display: flex;
  gap: 8px;
}

.testimonial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border-hover);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.testimonial-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--color-magenta);
}

/* ==========================================================
   12. PROCESS SECTION
   ========================================================== */
.process {
  background: var(--color-bg-secondary);
}

.process-timeline {
  display: flex;
  gap: 0;
  position: relative;
  justify-content: space-between;
}

.process-timeline::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 36px;
  right: 36px;
  height: 2px;
  background: var(--color-border);
}

.process-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 12px;
}

.process-step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-bg-primary);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text-tertiary);
  position: relative;
  z-index: 2;
  transition: all var(--transition-medium);
}

.process-step.active .process-step-number,
.process-step:hover .process-step-number {
  border-color: var(--color-magenta);
  color: var(--color-magenta);
  box-shadow: var(--shadow-glow-magenta);
  background: var(--color-bg-secondary);
}

.process-step h4 {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.process-step p {
  font-size: 0.88rem;
  max-width: 180px;
  margin: 0 auto;
}

/* ==========================================================
   13. CONTACT SECTION
   ========================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.contact-info>p {
  margin-bottom: 40px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-detail-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-magenta);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-detail-text span {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-tertiary);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-detail-text a,
.contact-detail-text p {
  font-size: 1rem;
  color: var(--color-text-primary);
  font-weight: 500;
}

.contact-detail-text a:hover {
  color: var(--color-magenta);
}

.contact-socials {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  font-size: 1.1rem;
}

.social-link:hover {
  border-color: var(--color-magenta);
  color: var(--color-magenta);
  background: rgba(255, 24, 103, 0.08);
  transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
  margin-top: -20px;
  padding: 48px;
  border-radius: var(--radius-xl);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-magenta);
  cursor: pointer;
  padding: 0;
  appearance: auto;
}

.form-checkbox label {
  margin-bottom: 0;
  display: inline;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

.form-checkbox label a {
  color: var(--color-magenta);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.form-checkbox label a:hover {
  color: var(--color-teal);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-magenta);
  background: rgba(255, 24, 103, 0.03);
  box-shadow: 0 0 0 3px rgba(255, 24, 103, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238E8EA0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-group select option {
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-submit {
  width: 100%;
  margin-top: 8px;
}

.form-message {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(124, 179, 66, 0.1);
  border: 1px solid rgba(124, 179, 66, 0.2);
  color: var(--color-green);
}

.form-message.error {
  display: block;
  background: rgba(255, 24, 103, 0.1);
  border: 1px solid rgba(255, 24, 103, 0.2);
  color: var(--color-magenta);
}

/* ==========================================================
   14. FOOTER
   ========================================================== */
.footer {
  padding: 80px 0 0;
  border-top: 1px solid var(--color-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand img {
  height: 36px;
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 0.95rem;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: var(--color-text-primary);
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.footer-col ul li a:hover {
  color: var(--color-magenta);
}

.footer-bottom {
  padding: 24px 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
}

.footer-bottom-links a:hover {
  color: var(--color-text-primary);
}

/* ==========================================================
   15. MOBILE MENU OVERLAY
   ========================================================== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: rgba(6, 6, 12, 0.97);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  z-index: 999;
  padding: 100px 40px 40px;
  transition: right var(--transition-medium);
  border-left: 1px solid var(--color-border);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  display: block;
  padding: 16px 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition-fast);
}

.mobile-menu a:hover {
  color: var(--color-magenta);
}

/* ==========================================================
   16. REVEAL ANIMATIONS (GSAP enhanced)
   ========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
}

/* ==========================================================
   17. CUSTOM CURSOR (optional enhancement)
   ========================================================== */
.cursor-glow {
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 24, 103, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  opacity: 0;
}

body:hover .cursor-glow {
  opacity: 1;
}

/* ==========================================================
   18. PORTFOLIO DETAIL PANEL
   ========================================================== */
.portfolio-overlay-bg {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  /* Let GSAP handle interaction blocking if needed */
}

/* Base styles for the 3D detail panel.
   GSAP will handle the positioning, scale, opacity, and rotation. */

.portfolio-detail-panel {
  position: fixed;
  /* Start hidden/off-screen. GSAP will override this */
  top: 50%;
  left: 75%;
  transform: translate(-50%, -50%) scale(0.8) rotateY(-20deg);
  width: 90%;
  max-width: 1000px;
  height: 75vh;
  min-height: 500px;
  background: rgba(6, 6, 12, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1001;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 24, 103, 0.2);
  box-shadow: -20px 20px 60px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(255, 24, 103, 0.1);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  /* Transition removed, GSAP will animate */
  transform-style: preserve-3d;
}

/* Gear background animation */
.panel-gear-bg {
  position: absolute;
  top: -150px;
  right: -150px;
  width: 400px;
  height: 400px;
  color: var(--color-magenta);
  opacity: 0.03;
  z-index: 0;
  pointer-events: none;
  animation: spin-gear 60s linear infinite;
}

@keyframes spin-gear {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.portfolio-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  z-index: 2;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.portfolio-close-btn:hover {
  background: rgba(255, 24, 103, 0.1);
  border-color: var(--color-magenta);
  color: var(--color-magenta);
  transform: rotate(90deg);
}

.portfolio-detail-content {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
}

.portfolio-detail-image {
  width: 45%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
}

.portfolio-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portfolio-detail-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 50%, rgba(6, 6, 12, 0.7) 100%);
}

.portfolio-detail-info {
  width: 55%;
  padding: 48px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.portfolio-detail-info .portfolio-category {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-magenta);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 12px;
}

.portfolio-detail-info h2 {
  font-size: 2.2rem;
  margin-bottom: 16px;
  line-height: 1.2;
}

.portfolio-detail-info .portfolio-tags {
  margin-bottom: 32px;
}

.portfolio-detail-desc {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* Portfolio Navigation Arrows */
.portfolio-detail-nav {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  margin-top: auto;
}

.btn-pd-nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-pd-nav:hover {
  background: rgba(255, 24, 103, 0.1);
  border-color: var(--color-magenta);
  color: var(--color-magenta);
}

.portfolio-item {
  cursor: pointer;
}

/* ==========================================================
   19. RESPONSIVE DESIGN
   ========================================================== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px 0;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    gap: 48px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    gap: 16px;
  }

  .process-timeline {
    flex-direction: column;
    gap: 32px;
    padding-left: 48px;
  }

  .process-timeline::before {
    top: 0;
    bottom: 0;
    left: 36px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .process-step {
    text-align: left;
  }

  .process-step-number {
    position: absolute;
    left: -48px;
    top: 0;
    margin: 0;
    width: 56px;
    height: 56px;
    font-size: 1.2rem;
  }

  .process-step p {
    max-width: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding: 64px 0;
  }

  .nav-menu {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-actions .btn {
    display: none;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  h2 {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
  }

  .hero {
    min-height: 100svh;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image img {
    height: 300px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 24px 16px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-overlay {
    opacity: 1;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-form {
    padding: 32px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .testimonial-quote {
    padding: 32px 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .section-header {
    margin-bottom: 48px;
  }

  .portfolio-detail-panel {
    height: 85vh;
    overflow-y: auto;
  }

  .portfolio-detail-content {
    flex-direction: column;
    height: auto;
  }

  .portfolio-detail-image {
    width: 100%;
    height: 300px;
  }

  .portfolio-detail-image::after {
    background: linear-gradient(to top, rgba(6, 6, 12, 0.7) 0%, transparent 100%);
  }

  .portfolio-detail-info {
    width: 100%;
    padding: 24px;
    overflow-y: visible;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 8px 16px;
  }

  .section-badge {
    font-size: 0.78rem;
  }

  .service-card {
    padding: 28px 24px;
  }

  .portfolio-filters {
    gap: 4px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================
   19. LOADING SCREEN
   ========================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--color-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-gear {
  width: 60px;
  height: 60px;
  animation: spin-gear 2s linear infinite;
}

.loader-gear svg {
  width: 100%;
  height: 100%;
}

@keyframes spin-gear {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.loader-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.05em;
}

/* ==========================================================
   20. SCROLLBAR
   ========================================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-magenta);
}

/* ==========================================================
   Z-DEPTH OVERRIDES
   Since we now fade the entire scene, we must ensure inner 
   elements previously hidden by .reveal are visible.
   ========================================================== */
.z-scene .reveal,
.z-scene .reveal-left,
.z-scene .reveal-right {
  opacity: 1 !important;
  transform: none !important;
}

/* ==========================================================
   3D CARD TILT SHINE
   Moving light reflection that follows the mouse cursor
   within each tiltable card.
   ========================================================== */
.card-shine {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center,
      rgba(255, 255, 255, 0.5) 0%,
      transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 100;
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
}

/* Ensure tilt cards have their own 3D context */
.service-card,
.portfolio-item,
.stat-card,
.testimonial-quote {
  transform-style: preserve-3d;
  will-change: transform;
}

/* Ensure tilt cards have their own 3D context */
.service-card,
.portfolio-item,
.stat-card,
.testimonial-quote {
  transform-style: preserve-3d;
  will-change: transform;
}

/* Swiper handles its own 3D — don't let preserve-3d interfere */
.portfolio-swiper .portfolio-item {
  transform-style: flat;
}

/* Swiper Portfolio Overrides */
.portfolio-swiper {
  width: 100%;
  padding-bottom: 50px !important;
  /* Space for pagination */
  padding-top: 20px;
  position: relative;
  z-index: 10;
}

.portfolio-swiper .swiper-slide {
  width: 350px;
  height: 450px;
  transition: transform 0.4s ease, opacity 0.4s ease;
  cursor: pointer;
}

@media (min-width: 768px) {
  .portfolio-swiper .swiper-slide {
    width: 450px;
    height: 550px;
  }
}

.portfolio-swiper .swiper-slide-active {
  transform: scale(1.05);
}

.portfolio-swiper .swiper-slide:not(.swiper-slide-active) {
  opacity: 0.5;
}

.portfolio-swiper .swiper-pagination {
  position: relative;
  margin-top: 20px;
  z-index: 15;
}

.portfolio-swiper .swiper-pagination-bullet {
  background: var(--color-text-secondary);
  opacity: 0.5;
  width: 10px;
  height: 10px;
}

.portfolio-swiper .swiper-pagination-bullet-active {
  background: var(--color-magenta);
  opacity: 1;
}

.portfolio-swiper .swiper-button-next,
.portfolio-swiper .swiper-button-prev {
  color: var(--color-magenta);
  background: var(--glass-bg);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 15;
  transition: background 0.3s ease, transform 0.3s ease;
}

.portfolio-swiper .swiper-button-next:hover,
.portfolio-swiper .swiper-button-prev:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.portfolio-swiper .swiper-button-next:after,
.portfolio-swiper .swiper-button-prev:after {
  font-size: 20px;
}

/* ==========================================================
   WHATSAPP FLOAT BUTTON
   ========================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #25D366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  color: #fff;
}

/* ==========================================================
   21. MOBILE RESPONSIVE — ENGRANAJE DIGITAL (Comprehensive)
   ========================================================== */

/* ── Tablet ≤ 1024px ──────────────────────────────────────── */
@media (max-width: 1024px) {

  /* Side nav: only show dots, hide labels to save space */
  .dot-label {
    display: none;
  }

  .side-nav {
    right: 14px;
  }

  /* Services: carousel becomes a 2-col grid */
  .carousel-wrapper {
    overflow: visible;
    width: 100%;
    margin-left: 0;
    padding: 0;
  }

  .services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    padding: 0;
    gap: 20px;
  }

  .service-card {
    width: 100%;
  }

  /* Portfolio: carousel wraps */
  .portfolio-grid {
    flex-wrap: wrap;
    width: 100%;
    padding: 0;
  }

  .portfolio-item {
    width: calc(50% - 12px);
  }

  /* Contact grid */
  .contact-grid {
    gap: 40px;
  }
}

/* ── Mobile ≤ 768px ───────────────────────────────────────── */
@media (max-width: 768px) {

  /* ---- Side nav: hide completely ---- */
  .side-nav {
    display: none;
  }

  /* ---- Cursor glow: disable on touch ---- */
  .cursor-glow {
    display: none !important;
  }

  /* ---- Navbar ---- */
  .navbar {
    padding: 14px 0;
  }

  .nav-logo img {
    height: 48px;
  }

  /* The CTA button is already hidden in the existing @media 768px,
     show lang-switch only */
  .nav-actions {
    gap: 8px;
  }

  /* ---- z-scene container: let it scroll naturally on mobile ---- */
  #z-scenes-container {
    height: auto;
    perspective: none;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .z-scene {
    position: relative;
    height: auto;
    min-height: 100svh;
    overflow-y: visible;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
    padding-top: 70px;
    padding-bottom: 40px;
  }

  .z-scene:not(.active) {
    pointer-events: auto !important;
  }

  .z-scene:not(.active) * {
    pointer-events: auto !important;
  }

  /* ---- Hero ---- */
  .hero {
    min-height: 100svh;
    align-items: center;
    padding-top: 80px;
  }

  .hero-content {
    padding: 0 20px;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 8px 16px;
    gap: 8px;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 36px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }

  .hero-cta .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .scroll-indicator {
    display: none;
  }

  /* ---- Section spacing ---- */
  .section {
    padding: 60px 0;
  }

  .section-header {
    padding-top: 0;
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  /* ---- About ---- */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-image img {
    height: 260px;
  }

  .about-image-badge {
    padding: 12px 16px;
    bottom: 16px;
    left: 16px;
  }

  .about-image-badge .badge-number {
    font-size: 1.5rem;
  }

  .about-text {
    padding-top: 0;
  }

  .about-text p {
    font-size: 0.95rem;
  }

  /* ---- Stats ---- */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 40px;
  }

  .stat-card {
    padding: 20px 14px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.82rem;
  }

  /* ---- Services: full-width single column ---- */
  .carousel-wrapper {
    overflow: visible;
    width: 100%;
    margin-left: 0;
    padding: 0;
  }

  .services-grid {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    padding: 0;
    gap: 16px;
  }

  .service-card {
    width: 100%;
    padding: 28px 24px;
  }

  /* ---- Portfolio: single column ---- */
  .portfolio-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100% !important;
    padding: 0 !important;
    gap: 20px;
  }

  .portfolio-item {
    width: 100% !important;
    aspect-ratio: 16 / 10;
  }

  /* Always show overlay on mobile (no hover) */
  .portfolio-overlay {
    opacity: 1;
  }

  .portfolio-item:hover {
    transform: none;
  }

  /* ---- Portfolio filters ---- */
  .portfolio-filters {
    gap: 6px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .portfolio-filters::-webkit-scrollbar {
    display: none;
  }

  .filter-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  /* ---- Team grid ---- */
  .team-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .team-grid .team-item {
    height: 320px !important;
  }

  /* ---- Process timeline ---- */
  .process-timeline {
    flex-direction: column;
    gap: 28px;
    padding-left: 56px;
  }

  .process-timeline::before {
    top: 0;
    bottom: 0;
    left: 28px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .process-step {
    text-align: left;
    padding: 0 8px;
  }

  .process-step-number {
    position: absolute;
    left: -56px;
    top: 0;
    margin: 0;
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  .process-step p {
    max-width: none;
    font-size: 0.9rem;
  }

  /* ---- Testimonials ---- */
  .testimonial-quote {
    padding: 28px 20px;
  }

  .testimonial-quote p {
    font-size: 1rem;
  }

  /* ---- Contact ---- */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-form {
    padding: 28px 20px;
    margin-top: 0;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* ---- Footer ---- */
  .footer {
    padding: 56px 0 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 40px;
  }

  .footer-brand p {
    max-width: 100%;
    font-size: 0.9rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 14px;
    text-align: center;
    padding: 20px 0;
  }

  .footer-bottom-links {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* ---- Portfolio detail panel ---- */
  .portfolio-detail-panel {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 95%;
    height: 92svh;
    border-radius: var(--radius-lg);
    overflow-y: auto;
  }

  .portfolio-detail-content {
    flex-direction: column;
    height: auto;
  }

  .portfolio-detail-image {
    width: 100%;
    height: 220px;
    flex-shrink: 0;
  }

  .portfolio-detail-image::after {
    background: linear-gradient(to top, rgba(6, 6, 12, 0.7) 0%, transparent 100%);
  }

  .portfolio-detail-info {
    width: 100%;
    padding: 20px;
    overflow-y: visible;
  }

  .portfolio-detail-info h2 {
    font-size: 1.6rem;
  }

  /* ---- Mobile menu ---- */
  .mobile-menu {
    padding: 90px 28px 40px;
  }

  .mobile-menu a {
    font-size: 1.3rem;
  }

  /* ---- WhatsApp button ---- */
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }

  /* ---- Forms: prevent iOS zoom ---- */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
  }
}

/* ── Small phones ≤ 480px ─────────────────────────────────── */
@media (max-width: 480px) {

  .container {
    padding: 0 16px;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 7px 14px;
  }

  .section-badge {
    font-size: 0.78rem;
  }

  .about-image img {
    height: 220px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 1.6rem;
  }

  .service-card {
    padding: 24px 18px;
  }

  .service-icon {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-grid .team-item {
    height: 380px !important;
  }

  .testimonial-quote {
    padding: 24px 16px;
  }

  .testimonial-quote p {
    font-size: 0.95rem;
  }

  .contact-form {
    padding: 24px 16px;
  }

  .portfolio-filters {
    gap: 4px;
  }

  .filter-btn {
    padding: 7px 14px;
    font-size: 0.78rem;
  }

  .footer-grid {
    gap: 24px;
  }

  .portfolio-detail-info h2 {
    font-size: 1.4rem;
  }
}
