/* 
 * M-It LevelUp Digital Agency - Cinematic Light Theme
 * Custom Stylesheet
 */

:root {
  --bg-primary: #FAFAFA;
  --bg-secondary: #F0F0F5;
  --bg-card: rgba(255, 255, 255, 0.7);
  --text-primary: #1A1A2E;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --accent-primary: #4F46E5;
  --accent-secondary: #7C3AED;
  --accent-tertiary: #06B6D4;
  --gradient-primary: linear-gradient(135deg, #4F46E5, #7C3AED);
  --gradient-secondary: linear-gradient(135deg, #7C3AED, #06B6D4);
  --gradient-text: linear-gradient(135deg, #4F46E5, #7C3AED, #06B6D4);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-cinematic: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--accent-primary);
  color: #ffffff;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--text-light);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* 2. Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  z-index: 9999;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.1s linear;
}

/* 3. Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
}

.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  color: transparent;
}

.section__label {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
}

.section__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.section__subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* 4. Layout */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
  position: relative;
  overflow: hidden;
}

.section--alt {
  background: var(--bg-secondary);
}

/* 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: none;
}

.btn--primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.btn--outline {
  background: transparent;
  border: 2px solid rgba(79, 70, 229, 0.3);
  color: var(--accent-primary);
}

.btn--outline:hover {
  background: rgba(79, 70, 229, 0.05);
  border-color: var(--accent-primary);
}

.btn--lg {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

/* 6. Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all var(--transition-normal);
}

.navbar--scrolled {
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.08);
  padding: 0.75rem 0;
}

.navbar__container {
  max-width: 1200px;
  margin: auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar__logo-img {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  object-fit: cover;
}

.navbar__logo span {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  color: transparent;
}

.navbar__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.navbar__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-fast);
}

.navbar__link:hover {
  color: var(--text-primary);
}

.navbar__link:hover::after {
  width: 100%;
}

.navbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: none;
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.navbar__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.5);
}

.navbar__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
}

.navbar__burger span {
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
}

.navbar__burger span:first-child {
  top: 0;
}

.navbar__burger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.navbar__burger span:last-child {
  bottom: 0;
}

body.nav-open .navbar__burger span:first-child {
  transform: translateY(11px) rotate(45deg);
}

body.nav-open .navbar__burger span:nth-child(2) {
  opacity: 0;
}

body.nav-open .navbar__burger span:last-child {
  transform: translateY(-11px) rotate(-45deg);
}

/* 7. Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(79, 70, 229, 0.07) 0%, rgba(124, 58, 237, 0.03) 40%, var(--bg-primary) 80%);
  perspective: 1200px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform-style: preserve-3d;
}

#heroGridCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero__shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float infinite ease-in-out;
  will-change: transform;
}

.hero__shape--1 {
  width: 500px;
  height: 500px;
  background: rgba(79, 70, 229, 0.15);
  top: -10%;
  right: -5%;
  animation: float3d-1 8s ease-in-out infinite;
}

.hero__shape--2 {
  width: 400px;
  height: 400px;
  background: rgba(124, 58, 237, 0.12);
  bottom: -10%;
  left: -5%;
  animation: float3d-2 10s ease-in-out infinite;
  animation-delay: -2s;
}

.hero__shape--3 {
  width: 300px;
  height: 300px;
  background: rgba(6, 182, 212, 0.12);
  top: 40%;
  left: 30%;
  animation: float3d-3 12s ease-in-out infinite;
  animation-delay: -4s;
}

.hero__shape--4 {
  width: 250px;
  height: 250px;
  background: rgba(79, 70, 229, 0.1);
  top: 20%;
  right: 30%;
  animation: float3d-1 9s ease-in-out infinite reverse;
  animation-delay: -1s;
}

.hero__shape--5 {
  width: 200px;
  height: 200px;
  background: rgba(6, 182, 212, 0.08);
  bottom: 20%;
  right: 10%;
  animation: float3d-2 11s ease-in-out infinite reverse;
  animation-delay: -3s;
}

/* 3D Geometric Shapes */
.hero__geo {
  position: absolute;
  transform-style: preserve-3d;
  opacity: 0.12;
  will-change: transform;
}

.hero__geo--cube {
  width: 80px;
  height: 80px;
  top: 15%;
  left: 12%;
  animation: rotateCube 20s linear infinite;
}
.hero__geo--cube .face {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid var(--accent-primary);
  border-radius: 4px;
}
.hero__geo--cube .face:nth-child(1) { transform: rotateY(0deg)   translateZ(40px); }
.hero__geo--cube .face:nth-child(2) { transform: rotateY(90deg)  translateZ(40px); }
.hero__geo--cube .face:nth-child(3) { transform: rotateY(180deg) translateZ(40px); }
.hero__geo--cube .face:nth-child(4) { transform: rotateY(270deg) translateZ(40px); }
.hero__geo--cube .face:nth-child(5) { transform: rotateX(90deg)  translateZ(40px); }
.hero__geo--cube .face:nth-child(6) { transform: rotateX(-90deg) translateZ(40px); }

.hero__geo--pyramid {
  width: 60px;
  height: 60px;
  bottom: 25%;
  right: 15%;
  animation: rotatePyramid 25s linear infinite;
}
.hero__geo--pyramid .face {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 30px solid transparent;
  border-bottom: 52px solid transparent;
  border-bottom-color: rgba(124, 58, 237, 0.15);
  transform-origin: center bottom;
}
.hero__geo--pyramid .face:nth-child(1) { transform: rotateY(0deg)   translateZ(17px) rotateX(30deg); }
.hero__geo--pyramid .face:nth-child(2) { transform: rotateY(120deg) translateZ(17px) rotateX(30deg); }
.hero__geo--pyramid .face:nth-child(3) { transform: rotateY(240deg) translateZ(17px) rotateX(30deg); }

.hero__geo--ring {
  width: 120px;
  height: 120px;
  top: 60%;
  left: 75%;
  animation: rotateRing 15s linear infinite;
}
.hero__geo--ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid rgba(6, 182, 212, 0.2);
  border-radius: 50%;
}

.hero__geo--diamond {
  width: 50px;
  height: 50px;
  top: 30%;
  right: 25%;
  animation: rotateDiamond 18s linear infinite;
}
.hero__geo--diamond::before {
  content: '';
  position: absolute;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(124,58,237,0.12));
  transform: rotate(45deg);
  border-radius: 4px;
  border: 2px solid rgba(79,70,229,0.15);
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 2rem;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
}

.hero__badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 2rem;
  letter-spacing: 1px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  will-change: transform, opacity;
}

.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  will-change: transform, opacity;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: var(--text-light);
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::before {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--accent-primary);
  animation: scrollLine 2s infinite;
}

/* 8. About Section */
.about {
  text-align: center;
}

.about__text {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto 4rem;
  font-weight: 400;
  color: var(--text-primary);
}

.about__text .word {
  display: inline-block;
  opacity: 0.15;
  transition: opacity 0.3s ease;
  margin-right: 0.3em;
}

.about__text .word.is-visible {
  opacity: 1;
}

.about__values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  text-align: left;
}

.value-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all var(--transition-normal);
  transform-style: preserve-3d;
  perspective: 800px;
}

.value-card:hover {
  transform: translateY(-8px) rotateX(5deg);
  box-shadow: 0 30px 60px rgba(79, 70, 229, 0.12);
}

.value-card__icon {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.value-card:hover .value-card__icon {
  transform: translateZ(30px) rotateY(15deg) scale(1.1);
}

.value-card__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-card__icon svg {
  width: 28px;
  height: 28px;
  color: white;
  stroke: white;
}

.value-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.value-card__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 9. Services Section */
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.5s cubic-bezier(0.03, 0.98, 0.52, 0.99);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

/* Light reflection overlay */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.3) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

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

.service-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(79,70,229,0.2), rgba(124,58,237,0.1), transparent, rgba(6,182,212,0.1));
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.service-card:hover::after {
  opacity: 1;
}

.service-card:hover {
  box-shadow: 0 25px 50px rgba(79, 70, 229, 0.15), 0 0 30px rgba(124, 58, 237, 0.05);
  border-color: rgba(79, 70, 229, 0.3);
}

.service-card__icon {
  width: 50px;
  height: 50px;
  background: rgba(79, 70, 229, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.service-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-primary);
}

.service-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 10. Method Section */
.method__timeline {
  position: relative;
  padding: 3rem 0;
}

.method__line {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(79, 70, 229, 0.1);
  transform: translateY(-50%);
}

.method__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: var(--gradient-primary);
  transition: width 0.1s linear;
  border-radius: 3px;
}

.method__steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.method__step {
  text-align: center;
  flex: 1;
  padding: 0 0.5rem;
}

.method__step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  border: 3px solid rgba(79, 70, 229, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent-primary);
  margin: 0 auto 1rem;
  transition: all var(--transition-normal);
  position: relative;
  z-index: 2;
}

.method__step.is-active .method__step-number {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.method__step-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.method__step-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* 11. Projects Section */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
  transform: rotateY(-5deg) rotateX(3deg) scale(1.02);
  box-shadow: 20px 20px 60px rgba(0,0,0,0.15);
}

.project-card:hover .project-card__image {
  transform: scale(1.15) translateZ(20px);
}

.project-card:nth-child(1) .project-card__image { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.project-card:nth-child(2) .project-card__image { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.project-card:nth-child(3) .project-card__image { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.project-card:nth-child(4) .project-card__image { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.project-card:nth-child(5) .project-card__image { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.project-card:nth-child(6) .project-card__image { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 26, 46, 0.9) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  transition: all var(--transition-normal);
}

.project-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.project-card__desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-card__tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-card__tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: white;
  backdrop-filter: blur(4px);
}

/* 12. Tech Section */
.tech__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  min-width: 100px;
  transition: all var(--transition-normal);
  animation: float3d-tech 6s ease-in-out infinite;
  transform-style: preserve-3d;
  perspective: 600px;
}

.tech-item:nth-child(1) { animation-delay: 0s; }
.tech-item:nth-child(2) { animation-delay: 0.2s; }
.tech-item:nth-child(3) { animation-delay: 0.4s; }
.tech-item:nth-child(4) { animation-delay: 0.6s; }
.tech-item:nth-child(5) { animation-delay: 0.8s; }
.tech-item:nth-child(6) { animation-delay: 1s; }
.tech-item:nth-child(7) { animation-delay: 1.2s; }
.tech-item:nth-child(8) { animation-delay: 1.4s; }

.tech-item:hover {
  transform: translateY(-10px) rotateX(10deg) rotateY(-5deg) scale(1.08);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.12);
  border-color: rgba(79, 70, 229, 0.2);
}

.tech-item__icon {
  font-size: 2rem;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.tech-item__icon svg {
  width: 100%;
  height: 100%;
}

.tech-item__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* 13. Testimonials Section (Seamless Infinite Loop) */
.testimonials {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-bottom: 2rem;
}

/* Edge Gradient Fades so cards fade in/out seamlessly */
.testimonials::before,
.testimonials::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 5;
  pointer-events: none;
}

.testimonials::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-secondary) 0%, transparent 100%);
}

.testimonials::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-secondary) 0%, transparent 100%);
}

.testimonial-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  padding: 1.5rem 0;
  animation: testimonialScroll 45s linear infinite;
  will-change: transform;
  user-select: none;
}

.testimonial-track:hover {
  animation-play-state: paused;
}

.testimonial-card {
  width: 380px;
  min-width: 380px;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  padding: 2rem;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.2);
}

.testimonial-card__text {
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-style: italic;
  position: relative;
}

.testimonial-card__text::before {
  content: open-quote;
  font-size: 4rem;
  color: rgba(79, 70, 229, 0.15);
  font-family: serif;
  position: absolute;
  top: -10px;
  left: -5px;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-card__avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
}

.testimonial-card__name {
  font-weight: 700;
  font-size: 0.95rem;
}

.testimonial-card__role {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 14. Contact Section */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.contact-info-card:hover {
  transform: translateX(5px);
  border-color: rgba(79, 70, 229, 0.2);
}

.contact-info-card__icon {
  width: 45px;
  height: 45px;
  background: rgba(79, 70, 229, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-card__icon svg {
  width: 20px;
  stroke: var(--accent-primary);
}

.contact-info-card__title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.contact-info-card__value {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.contact-info-card__value a {
  color: var(--accent-primary);
  text-decoration: none;
}

.contact__form {
  background: white;
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: all var(--transition-fast);
  background: transparent;
  color: var(--text-primary);
  outline: none;
}

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

.form-label {
  position: absolute;
  left: 1.25rem;
  top: 1rem;
  color: var(--text-light);
  font-size: 1rem;
  pointer-events: none;
  transition: all var(--transition-fast);
  background: white;
  padding: 0 0.25rem;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label,
.form-textarea:focus ~ .form-label,
.form-textarea:not(:placeholder-shown) ~ .form-label {
  top: -0.5rem;
  font-size: 0.8rem;
  color: var(--accent-primary);
}

/* 15. Footer */
.footer {
  background: var(--text-primary);
  color: white;
  padding: 4rem 0 2rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
  margin-bottom: 1rem;
  display: block;
}

.footer__logo span {
  color: var(--accent-tertiary);
}

.footer__desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.footer__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
}

.footer__link {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: white;
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

/* 16. Reveal Animation System */
[data-reveal] {
  opacity: 0;
  transition: all var(--transition-cinematic);
  will-change: transform, opacity;
}

[data-reveal].is-revealed {
  opacity: 1;
}

[data-reveal="up"] {
  transform: translateY(60px) perspective(800px) rotateX(8deg);
}

[data-reveal="up"].is-revealed {
  transform: translateY(0) perspective(800px) rotateX(0deg);
}

[data-reveal="down"] {
  transform: translateY(-60px) perspective(800px) rotateX(-8deg);
}

[data-reveal="down"].is-revealed {
  transform: translateY(0) perspective(800px) rotateX(0deg);
}

[data-reveal="left"] {
  transform: translateX(-80px) perspective(800px) rotateY(15deg);
}

[data-reveal="left"].is-revealed {
  transform: translateX(0) perspective(800px) rotateY(0deg);
}

[data-reveal="right"] {
  transform: translateX(80px) perspective(800px) rotateY(-15deg);
}

[data-reveal="right"].is-revealed {
  transform: translateX(0) perspective(800px) rotateY(0deg);
}

[data-reveal="scale"] {
  transform: scale(0.7) perspective(800px) rotateX(15deg);
}

[data-reveal="scale"].is-revealed {
  transform: scale(1) perspective(800px) rotateX(0deg);
}

[data-reveal="3d-flip"] {
  transform: perspective(1000px) rotateY(90deg);
  transform-origin: left center;
}

[data-reveal="3d-flip"].is-revealed {
  transform: perspective(1000px) rotateY(0deg);
}

[data-reveal="3d-rotate"] {
  transform: perspective(1000px) rotateX(45deg) rotateY(-15deg) translateZ(-50px);
}

[data-reveal="3d-rotate"].is-revealed {
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translateZ(0px);
}

[data-reveal="fade"].is-revealed {
  opacity: 1;
}

[data-delay="50"]  { transition-delay: 0.05s; }
[data-delay="100"] { transition-delay: 0.1s; }
[data-delay="150"] { transition-delay: 0.15s; }
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="250"] { transition-delay: 0.25s; }
[data-delay="300"] { transition-delay: 0.3s; }
[data-delay="350"] { transition-delay: 0.35s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="450"] { transition-delay: 0.45s; }
[data-delay="500"] { transition-delay: 0.5s; }
[data-delay="550"] { transition-delay: 0.55s; }
[data-delay="600"] { transition-delay: 0.6s; }
[data-delay="700"] { transition-delay: 0.7s; }
[data-delay="800"] { transition-delay: 0.8s; }

/* 17. Keyframe Animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes float3d-1 {
  0%, 100% { transform: translateY(0px) translateZ(0px) rotateX(0deg); }
  25% { transform: translateY(-15px) translateZ(20px) rotateX(3deg); }
  50% { transform: translateY(-25px) translateZ(40px) rotateX(0deg); }
  75% { transform: translateY(-10px) translateZ(15px) rotateX(-3deg); }
}

@keyframes float3d-2 {
  0%, 100% { transform: translateY(0px) translateX(0px) rotateY(0deg); }
  33% { transform: translateY(-20px) translateX(15px) rotateY(5deg); }
  66% { transform: translateY(-10px) translateX(-10px) rotateY(-5deg); }
}

@keyframes float3d-3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  25% { transform: translate(10px, -15px) rotate(3deg) scale(1.05); }
  50% { transform: translate(-5px, -25px) rotate(-2deg) scale(0.95); }
  75% { transform: translate(-10px, -10px) rotate(2deg) scale(1.02); }
}

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

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

@keyframes rotatePyramid {
  0% { transform: rotateY(0deg) rotateX(15deg); }
  100% { transform: rotateY(360deg) rotateX(15deg); }
}

@keyframes rotateRing {
  0% { transform: rotateX(70deg) rotateZ(0deg); }
  100% { transform: rotateX(70deg) rotateZ(360deg); }
}

@keyframes rotateDiamond {
  0% { transform: rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateY(360deg) rotateZ(180deg); }
}

@keyframes scrollLine {
  0% { top: -100%; }
  100% { top: 100%; }
}

@keyframes testimonialScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-50% - 1rem)); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* 18. Responsive Design (Mobile Perfection) */
@media (max-width: 1024px) {
  .container {
    padding: 0 1.5rem;
  }

  .section {
    padding: 5rem 0;
  }

  .navbar__links, .navbar__cta {
    display: none;
  }
  
  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .navbar__links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.25rem;
    display: flex;
    z-index: 999;
  }
  
  body.nav-open .navbar__link {
    font-size: 1.35rem;
    font-weight: 700;
  }

  body.nav-open .navbar__cta {
    display: inline-flex;
    margin-top: 1rem;
  }
  
  .navbar__burger {
    display: block;
    z-index: 1001;
  }
  
  .about__values {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .method__steps {
    flex-wrap: wrap;
    gap: 2rem;
  }
  
  .method__line {
    display: none;
  }
  
  .contact__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 100vh;
    padding: 7rem 0 4rem;
  }

  .hero__title {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
  }

  .hero__subtitle {
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }

  .hero__geo {
    display: none; /* Hide heavy 3D shapes on small screens for performance */
  }

  .globe-container {
    height: 300px;
  }

  .globe-hud-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    max-width: 440px;
  }

  .hud-stat {
    padding: 1rem 0.875rem;
  }

  .hud-stat__number {
    font-size: 1.5rem;
  }

  .hud-stat__label {
    font-size: 0.75rem;
  }

  .contact__form {
    padding: 1.75rem 1.25rem;
  }

  .testimonial-card {
    min-width: 290px;
    padding: 1.5rem;
  }

  .whatsapp-float {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 52px;
    height: 52px;
  }

  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }

  .whatsapp-tooltip {
    display: none; /* Hide tooltip on mobile touch */
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1.25rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero__actions .btn {
    justify-content: center;
    width: 100%;
  }

  .about__text {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
  }

  .about__values {
    grid-template-columns: 1fr;
  }
  
  .services__grid {
    grid-template-columns: 1fr;
  }
  
  .projects__grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    aspect-ratio: 16/10;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .globe-hud-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
  }

  .hud-stat {
    padding: 0.875rem 0.5rem;
  }

  .hud-stat__number {
    font-size: 1.35rem;
  }

  .hud-stat__label {
    font-size: 0.72rem;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .method__steps {
    flex-direction: column;
    align-items: center;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* 3b. Global Reach 3D Section */
.global-reach {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(79, 70, 229, 0.04) 0%, transparent 70%);
}

.globe-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
}

.globe-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 440px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#globeCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* 3D HUD Stats Grid Below Globe */
.globe-hud-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.hud-stat {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(79, 70, 229, 0.15);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius-md);
  text-align: center;
  transform-style: preserve-3d;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hud-stat:hover {
  transform: translateY(-4px) translateZ(10px);
  box-shadow: 0 25px 50px rgba(79, 70, 229, 0.15);
}

.hud-stat__number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.hud-stat__label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Video Trigger Badge */
.globe-video-trigger {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 50px;
  box-shadow: 0 15px 35px rgba(79, 70, 229, 0.2);
  cursor: pointer;
  z-index: 20;
  transition: all var(--transition-fast);
}

.globe-video-trigger:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.05);
  box-shadow: 0 20px 45px rgba(79, 70, 229, 0.3);
  border-color: var(--accent-primary);
}

.globe-video-trigger .play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  animation: pulse 2s infinite;
}

.globe-video-trigger span {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Video Modal */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

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

.video-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(12px);
}

.video-modal__content {
  position: relative;
  width: 90%;
  max-width: 960px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  z-index: 2;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal.is-open .video-modal__content {
  transform: scale(1);
}

.video-modal__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.video-modal__close:hover {
  background: rgba(255, 255, 255, 0.4);
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .globe-container {
    height: 400px;
  }

  .globe-hud {
    position: static;
    transform: none;
    flex-direction: row;
    justify-content: center;
    margin-top: 1.5rem;
  }

  .globe-video-trigger {
    bottom: 1rem;
  }
}

/* Bulle WhatsApp Flottante */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
  background: #20ba5a;
}

.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  background: var(--text-primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateX(10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Disable animations for 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;
  }
}
