/* ============================================
   NEXUS DIGITAL - 3D Marketing Agency Website
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg-deep: #06060f;
  --bg-surface: #0d0d1f;
  --bg-card: #111128;
  --bg-card-hover: #181840;
  --primary: #00e5ff;
  --primary-rgb: 0, 229, 255;
  --secondary: #ff2d6b;
  --secondary-rgb: 255, 45, 107;
  --accent: #7c3aed;
  --accent-rgb: 124, 58, 237;
  --gold: #f5a623;
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --text-dim: #555577;
  --border: rgba(255,255,255,0.06);
  --glow-primary: 0 0 30px rgba(0,229,255,0.3);
  --glow-secondary: 0 0 30px rgba(255,45,107,0.3);
  --glow-accent: 0 0 30px rgba(124,58,237,0.3);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-lg: 24px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
  --font-heading: 'Syne', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --perspective: 1200px;
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }

::selection {
  background: rgba(var(--primary-rgb), 0.3);
  color: #fff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 4px;
}

/* --- 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.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }

p { color: var(--text-muted); font-size: 1.05rem; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
  display: inline-block;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header p {
  max-width: 600px;
  margin: 16px auto 0;
}

/* --- Background Effects --- */
.bg-grid {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-image:
    linear-gradient(rgba(var(--primary-rgb),0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--primary-rgb),0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 600px; height: 600px;
  background: rgba(var(--primary-rgb), 0.08);
  top: -200px; right: -200px;
}

.orb-2 {
  width: 500px; height: 500px;
  background: rgba(var(--secondary-rgb), 0.06);
  bottom: -100px; left: -200px;
}

.orb-3 {
  width: 400px; height: 400px;
  background: rgba(var(--accent-rgb), 0.07);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: var(--transition);
  backdrop-filter: blur(0px);
}

.navbar.scrolled {
  background: rgba(6,6,15,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1001;
}

.nav-logo span { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  padding: 10px 24px !important;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50px;
  color: var(--bg-deep) !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  transition: var(--transition) !important;
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.3);
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(var(--primary-rgb), 0.5);
}

/* Services Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown > a::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.3s ease;
  position: static;
  background: none;
}

.nav-dropdown:hover > a::after {
  transform: rotate(180deg);
  width: 0;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 260px;
  background: rgba(13, 13, 31, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  z-index: 1002;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-menu a::after {
  display: none;
}

.dropdown-menu a:hover {
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  transform: translateX(4px);
}

.dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--accent-rgb), 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-icon svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .nav-dropdown {
    width: 100%;
  }
  
  .dropdown-menu {
    position: static;
    transform: none;
    min-width: 100%;
    background: rgba(17, 17, 40, 0.5);
    border: none;
    border-left: 2px solid rgba(var(--primary-rgb), 0.3);
    border-radius: 0;
    padding: 8px 0 8px 16px;
    margin-top: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: max-height 0.3s ease;
    box-shadow: none;
  }
  
  .nav-dropdown.open .dropdown-menu {
    max-height: 500px;
  }
  
  .nav-dropdown:hover .dropdown-menu {
    transform: none;
  }
  
  .dropdown-menu a {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .dropdown-menu a:hover {
    transform: none;
  }
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 1001;
  padding: 4px;
}

.nav-toggle span {
  width: 28px; height: 2px;
  background: var(--text);
  transition: var(--transition);
  border-radius: 2px;
}

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--bg-deep);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(var(--primary-rgb), 0.5);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), 0.05);
  transform: translateY(-3px);
}

.btn-glow {
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 20px rgba(var(--secondary-rgb), 0.3);
}

.btn-glow:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 40px rgba(var(--secondary-rgb), 0.5);
}

/* --- 3D Card Base --- */
.card-3d {
  perspective: var(--perspective);
  transform-style: preserve-3d;
}

.card-3d-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: var(--transition);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}

.card-3d-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg,
    rgba(var(--primary-rgb), 0.05),
    transparent 50%,
    rgba(var(--accent-rgb), 0.05));
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.card-3d-inner:hover::before { opacity: 1; }

.card-3d-inner:hover {
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: var(--glow-primary);
}

/* --- 3D Floating Elements --- */
.float-3d {
  animation: float3d 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

@keyframes float3d {
  0%, 100% { transform: translateY(0) rotateX(0) rotateY(0); }
  25% { transform: translateY(-15px) rotateX(5deg) rotateY(5deg); }
  50% { transform: translateY(-8px) rotateX(0) rotateY(-5deg); }
  75% { transform: translateY(-20px) rotateX(-5deg) rotateY(3deg); }
}

/* --- 3D Rotating Shape --- */
.rotate-3d {
  transform-style: preserve-3d;
  animation: rotate3d 20s linear infinite;
}

@keyframes rotate3d {
  from { transform: rotateX(0) rotateY(0) rotateZ(0); }
  to { transform: rotateX(360deg) rotateY(360deg) rotateZ(0); }
}

/* --- 3D Cube --- */
.cube-wrapper {
  perspective: var(--perspective);
  width: 200px; height: 200px;
}

.cube {
  width: 100%; height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: cubeRotate 15s ease-in-out infinite;
}

.cube-face {
  position: absolute;
  width: 200px; height: 200px;
  border: 1px solid rgba(var(--primary-rgb), 0.3);
  background: rgba(var(--primary-rgb), 0.03);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--primary);
}

.cube-face.front  { transform: translateZ(100px); }
.cube-face.back   { transform: rotateY(180deg) translateZ(100px); }
.cube-face.right  { transform: rotateY(90deg) translateZ(100px); }
.cube-face.left   { transform: rotateY(-90deg) translateZ(100px); }
.cube-face.top    { transform: rotateX(90deg) translateZ(100px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes cubeRotate {
  0% { transform: rotateX(-20deg) rotateY(0); }
  25% { transform: rotateX(10deg) rotateY(90deg); }
  50% { transform: rotateX(-10deg) rotateY(180deg); }
  75% { transform: rotateX(15deg) rotateY(270deg); }
  100% { transform: rotateX(-20deg) rotateY(360deg); }
}

/* --- 3D Flip Card --- */
.flip-card {
  perspective: var(--perspective);
  height: 380px;
  cursor: pointer;
}

.flip-card-inner {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius);
  overflow: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- 3D Tilt on Mouse --- */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.tilt-card .tilt-content {
  transform: translateZ(40px);
}

/* --- Service Icon 3D --- */
.icon-3d {
  width: 72px; height: 72px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
  position: relative;
  transform-style: preserve-3d;
  transition: var(--transition);
}

.icon-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--accent-rgb), 0.15));
  border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.icon-3d:hover {
  transform: translateZ(10px) rotateY(10deg);
}

/* --- Glassmorphism --- */
.glass {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
}

/* --- Forms --- */
.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* --- Footer --- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 80px 0 30px;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p {
  margin-top: 16px;
  max-width: 300px;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 20px;
  color: var(--text);
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
  padding: 6px 0;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
  font-size: 1.1rem;
}

.footer-social a:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--glow-primary);
}

/* --- Page Hero --- */
.page-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.page-hero-content h1 {
  margin-bottom: 20px;
}

.page-hero-content p {
  font-size: 1.15rem;
  margin-bottom: 32px;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.breadcrumb a:hover { color: var(--primary); }

.breadcrumb span { color: var(--primary); }

/* --- Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }
.stagger-7 { transition-delay: 0.7s; }
.stagger-8 { transition-delay: 0.8s; }

/* --- Parallax Layer --- */
.parallax-layer {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* --- Stats Counter --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
  padding: 32px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* --- Testimonials --- */
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-family: var(--font-heading);
  font-size: 5rem;
  color: rgba(var(--primary-rgb), 0.15);
  position: absolute;
  top: 10px; left: 24px;
  line-height: 1;
}

.testimonial-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--bg-deep);
  font-size: 1.1rem;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* --- Blog Card --- */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(var(--primary-rgb), 0.2);
  box-shadow: var(--glow-primary);
}

.blog-card-image {
  height: 220px;
  background: linear-gradient(135deg, var(--bg-card-hover), var(--bg-card));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image .blog-icon {
  font-size: 3rem;
  opacity: 0.5;
}

.blog-card-body {
  padding: 28px;
}

.blog-card-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.blog-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  transition: var(--transition-fast);
}

.blog-card:hover .blog-card-body h3 {
  color: var(--primary);
}

.blog-card-body p {
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* --- Service Page Hero Visual --- */
.hero-visual {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  max-width: 550px;
  aspect-ratio: 1;
  pointer-events: none;
}

/* --- 3D Scene Container --- */
.scene-3d {
  perspective: var(--perspective);
  transform-style: preserve-3d;
  position: relative;
}

/* --- Pricing / Feature List --- */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: rgba(var(--primary-rgb), 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: var(--transition);
}

.feature-item:hover {
  border-color: rgba(var(--primary-rgb), 0.15);
  background: rgba(var(--primary-rgb), 0.06);
}

.feature-icon {
  width: 40px; height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--accent-rgb), 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
}

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

.feature-text p {
  font-size: 0.88rem;
}

/* --- Process Steps --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}

.process-grid::before {
  content: '';
  position: absolute;
  top: 50px;
  left: 12.5%;
  width: 75%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary), var(--primary));
  opacity: 0.3;
}

.process-step {
  text-align: center;
  position: relative;
}

.process-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--bg-deep);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 2;
}

.process-step h4 { margin-bottom: 8px; }
.process-step p { font-size: 0.9rem; }

/* --- Marquee / Ticker --- */
.marquee-wrapper {
  overflow: hidden;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.marquee-track {
  display: flex;
  gap: 48px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.marquee-item {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dim);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 16px;
}

.marquee-item .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* --- Particle Canvas --- */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid::before { display: none; }

  .hero-visual {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 70px;
  }

  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  section { padding: 70px 0; }

  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    background: rgba(6,6,15,0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    padding: 80px 40px 40px;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links.open { right: 0; }

  .nav-links a {
    font-size: 1.1rem;
    width: 100%;
    padding: 8px 0;
  }

  .nav-toggle { display: flex; }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown > a {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static !important;
    transform: none !important;
    min-width: 100% !important;
    background: rgba(17, 17, 40, 0.5) !important;
    border: none !important;
    border-left: 2px solid rgba(var(--primary-rgb), 0.3) !important;
    border-radius: 0 !important;
    padding: 8px 0 8px 20px !important;
    margin-top: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
    transition: max-height 0.3s ease !important;
    box-shadow: none !important;
  }

  .nav-dropdown.open .dropdown-menu {
    max-height: 600px;
  }

  .dropdown-menu a {
    padding: 10px 12px !important;
    font-size: 0.95rem !important;
    white-space: normal !important;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .page-hero {
    min-height: 50vh;
  }

  .cube-wrapper {
    width: 140px; height: 140px;
  }

  .cube-face {
    width: 140px; height: 140px;
  }

  .cube-face.front  { transform: translateZ(70px); }
  .cube-face.back   { transform: rotateY(180deg) translateZ(70px); }
  .cube-face.right  { transform: rotateY(90deg) translateZ(70px); }
  .cube-face.left   { transform: rotateY(-90deg) translateZ(70px); }
  .cube-face.top    { transform: rotateX(90deg) translateZ(70px); }
  .cube-face.bottom { transform: rotateX(-90deg) translateZ(70px); }

  h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
  h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
  h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

  p { font-size: 0.95rem; }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
    width: 100%;
    justify-content: center;
  }

  .card-3d-inner {
    padding: 24px;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .flip-card {
    height: auto;
    min-height: 300px;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }

  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .btn { padding: 12px 24px; font-size: 0.88rem; }
}

/* --- Retina / High DPI --- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .card-3d-inner,
  .blog-card,
  .testimonial-card {
    border-width: 0.5px;
  }
}

/* --- Print --- */
@media print {
  .navbar, .footer, .bg-grid, .bg-gradient-orb, #particles-canvas { display: none; }
  body { background: #fff; color: #000; }
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 48px; }
.relative { position: relative; }
.z-1 { z-index: 1; }
.z-2 { z-index: 2; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* --- SVG Illustration Styles --- */
.svg-illustration {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.svg-illustration svg {
  width: 100%;
  height: auto;
}

/* --- Service Page Specific --- */
.service-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .service-features-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 3D Perspective Gallery --- */
.perspective-gallery {
  perspective: 1000px;
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 40px 0;
}

.perspective-gallery .gallery-item {
  width: 200px; height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
}

.perspective-gallery .gallery-item:nth-child(1) { transform: rotateY(25deg) translateZ(-50px); }
.perspective-gallery .gallery-item:nth-child(2) { transform: rotateY(10deg) translateZ(0); }
.perspective-gallery .gallery-item:nth-child(3) { transform: rotateY(-10deg) translateZ(0); }
.perspective-gallery .gallery-item:nth-child(4) { transform: rotateY(-25deg) translateZ(-50px); }

.perspective-gallery .gallery-item:hover {
  transform: rotateY(0) translateZ(30px) scale(1.05);
  box-shadow: var(--glow-primary);
}

@media (max-width: 768px) {
  .perspective-gallery {
    flex-direction: column;
    align-items: center;
  }
  .perspective-gallery .gallery-item {
    width: 80%; max-width: 300px; height: 200px;
    transform: none !important;
  }
  .perspective-gallery .gallery-item:hover {
    transform: scale(1.02) !important;
  }
}

/* --- 3D Carousel --- */
.carousel-3d {
  perspective: 1200px;
  height: 400px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track {
  transform-style: preserve-3d;
  animation: carouselSpin 30s linear infinite;
}

@keyframes carouselSpin {
  from { transform: rotateY(0); }
  to { transform: rotateY(360deg); }
}

.carousel-item {
  position: absolute;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backface-visibility: hidden;
}

/* --- Isometric Grid --- */
.iso-grid {
  transform: rotateX(60deg) rotateZ(-45deg);
  transform-style: preserve-3d;
}

.iso-grid .iso-item {
  transition: var(--transition);
}

.iso-grid .iso-item:hover {
  transform: translateZ(20px);
}

/* --- Loading Screen --- */
.loader {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-cube {
  width: 60px; height: 60px;
  transform-style: preserve-3d;
  animation: loaderSpin 2s ease-in-out infinite;
}

.loader-face {
  position: absolute;
  width: 60px; height: 60px;
  border: 2px solid var(--primary);
  opacity: 0.6;
}

.loader-face:nth-child(1) { transform: translateZ(30px); }
.loader-face:nth-child(2) { transform: rotateY(180deg) translateZ(30px); }
.loader-face:nth-child(3) { transform: rotateY(90deg) translateZ(30px); }
.loader-face:nth-child(4) { transform: rotateY(-90deg) translateZ(30px); }

@keyframes loaderSpin {
  0% { transform: rotateX(0) rotateY(0); }
  50% { transform: rotateX(180deg) rotateY(180deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}
