/* ==========================================================================
   METI TOITURE — Home V2 (Lando Norris / Dark Tech Style)
   ========================================================================== */

:root {
  --accent: #ce1117;
  --accent-glow: rgba(206, 17, 23, 0.4);
  --dark-glass: rgba(15, 15, 15, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  
  --bg-deep: #0a0a0a;
  --bg-surface: #121212;
}

body.dark-tech-theme {
  background-color: var(--bg-deep);
  color: #fff;
  overflow-x: hidden;
}

/* Typography */
.font-clash {
  font-family: 'Clash Display', sans-serif;
  text-transform: uppercase;
}
.text-accent {
  color: var(--accent);
}
.text-giant {
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
}

/* Base Adjustments */
.dark-tech-theme .navbar {
  border-bottom: 1px solid transparent;
}
.dark-tech-theme .navbar.scrolled,
body.xray-mode .navbar {
  background: var(--dark-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.dark-tech-theme .btn-accent {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}
.dark-tech-theme .btn-accent-glow {
  background: var(--accent);
  color: #000;
  font-weight: 700;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: all 0.3s ease;
}
.dark-tech-theme .btn-accent-glow:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(206, 17, 23, 0.6);
}
.dark-tech-theme .btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: #fff;
  transition: all 0.3s ease;
}
.dark-tech-theme .btn-outline:hover {
  border-color: var(--accent);
  background: rgba(255,255,255,0.05);
}
.flex-gap {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Glassmorphism Utility */
.glassmorphism {
  background: var(--dark-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

/* =========================================
   1. Hero Section
   ========================================= */
.gsap-hero {
  position: relative;
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  overflow-x: hidden;
  padding: 0; /* Remove horizontal padding, we'll handle it inside */
}

/* =========================================
   CINEMATIC SCROLL CONTAINER
   ========================================= */
#cinematic-scroll-container {
  position: relative;
  width: 100%;
}

.cinematic-pin {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-deep);
}

.gsap-hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0 5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 2;
}

.hero-clean-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  z-index: 10;
}

.hero-clean-layout h1 {
  font-size: clamp(3rem, 6vw, 6.5rem);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-center-arrow {
  display: flex;
  justify-content: center;
  width: 100%;
}

.scroll-indicator-clean {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(10px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
}

@keyframes modern-arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.scroll-indicator-clean svg {
  width: 60px;
  height: 60px;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: modern-arrow-bounce 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-indicator-clean:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(206, 17, 23, 0.5);
  transform: scale(1.1);
}

.scroll-indicator-clean:hover svg {
  animation: none;
  transform: translateY(10px);
}

.hero-stats-clean {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  width: 100%;
}

.stat-clean {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-val {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-lbl {
  font-size: 0.9rem;
  color: #bbb;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.2);
}

#hero-3d-container {
  position: absolute;
  top: 0;
  right: 0;
  width: 58vw;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
  overflow: hidden;
  background: transparent;
}

#hero-static-img {
  position: absolute;
  top: 50%;
  right: -5%;
  width: 130%;
  height: 130%;
  object-fit: contain;
  pointer-events: none;
  /* Subtle glow/shadow to give depth to the transparent cutout */
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.8));
}



.gsap-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: 60px 60px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
  pointer-events: none;
}

.gsap-hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(206, 17, 23, 0.1) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
  animation: pulse-bg-glow 8s ease-in-out infinite alternate;
}

@keyframes pulse-bg-glow {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

.gsap-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 30%, rgba(5,5,5,0.7) 100%);
  z-index: 1;
  pointer-events: none;
}

.gsap-hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
}

.title-mask {
  overflow: hidden;
  padding-bottom: 5px;
}

.gsap-hero-content h1 {
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.9;
  margin: 0;
  transform: translateY(100%);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  transform: translateY(100%);
}

.gsap-hero-stats-new {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 3;
}
.stat-label {
  font-size: 0.85rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.5rem;
}

/* =========================================
   2. Interactive "X-Ray View" (Merged)
   ========================================= */
.gsap-xray {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-deep);
  z-index: 1; /* Behind hero initially */
  pointer-events: none; /* Disabled until revealed */
}

.xray-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.section-header-left {
  position: absolute;
  top: 10%;
  right: 5%;
  left: auto;
  text-align: right;
  max-width: 350px;
  z-index: 20;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  pointer-events: none; /* Let clicks pass through to X-Ray wrapper */
}
.section-header-left h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0.8rem;
}
.section-header-left p {
  color: #ddd;
  font-size: 1rem;
}

.xray-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: crosshair;
  background: #111;
}

.xray-base-img, .xray-top-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.xray-mask {
  position: absolute;
  inset: 0;
  /* clip-path updated dynamically via JS */
  clip-path: circle(0px at 50% 50%);
  pointer-events: none; /* Let mouse events pass through to wrapper */
}

.hotspot {
  position: absolute;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  pointer-events: auto; /* Hotspots are clickable inside mask */
}

.hotspot-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.hotspot-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border: 1px solid var(--glass-border);
}
.hotspot:hover .hotspot-tooltip {
  opacity: 1;
}

.xray-instruction {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-glass);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #fff;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(4px);
  pointer-events: none;
  opacity: 0.7;
}

/* =========================================
   Jarvis-Inspired HUD Lens
   ========================================= */
#xray-glass-lens {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px; /* 130px radius * 2 */
  height: 260px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  
  /* HUD Base Styles */
  border: 1px solid rgba(206, 17, 23, 0.4);
  background: radial-gradient(circle, rgba(206, 17, 23, 0.02) 0%, rgba(206, 17, 23, 0.1) 80%, rgba(206, 17, 23, 0.25) 100%);
  box-shadow: 0 0 15px rgba(206, 17, 23, 0.2), inset 0 0 20px rgba(206, 17, 23, 0.3);
  
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

/* Inner dashed rotating ring */
#xray-glass-lens::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1.5px dashed rgba(206, 17, 23, 0.6);
  animation: hud-spin 15s linear infinite;
}

/* Inner thin rotating ring with gaps */
#xray-glass-lens::after {
  content: '';
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top: 2px solid rgba(206, 17, 23, 0.8);
  border-bottom: 2px solid rgba(206, 17, 23, 0.8);
  border-left: 1px solid rgba(206, 17, 23, 0.2);
  border-right: 1px solid rgba(206, 17, 23, 0.2);
  animation: hud-spin-reverse 8s linear infinite;
}

/* Crosshairs */
.hud-crosshair {
  position: absolute;
  background: rgba(206, 17, 23, 0.4);
}
.hud-crosshair.v {
  top: 10px; bottom: 10px; left: 50%; width: 1px; transform: translateX(-50%);
}
.hud-crosshair.h {
  left: 10px; right: 10px; top: 50%; height: 1px; transform: translateY(-50%);
}
.hud-center-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: rgba(206, 17, 23, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 5px rgba(206, 17, 23, 1);
}

@keyframes hud-spin {
  100% { transform: rotate(360deg); }
}
@keyframes hud-spin-reverse {
  100% { transform: rotate(-360deg); }
}

/* =========================================
   3. Process & Counters
   ========================================= */
.gsap-process {
  padding: 8rem 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
}

.process-timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  margin-bottom: 6rem;
}

.process-step {
  position: relative;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.process-step::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.step-number {
  font-size: 2rem;
  color: rgba(255,255,255,0.2);
  margin-bottom: 1rem;
}

.process-step h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.process-step p {
  color: #aaa;
  font-size: 0.95rem;
}

.stats-counter-block {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 3rem;
  text-align: center;
}

.counter-val {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.counter-label {
  font-size: 0.9rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =========================================
   4. Services Grid
   ========================================= */
.gsap-services {
  padding: 10rem 0;
  background: var(--bg-deep);
}

.services-grid-new {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 6rem;
}

.service-card-new {
  padding: 3rem 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  opacity: 0; /* for GSAP stagger */
  transform: translateY(50px);
}

.service-card-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(206,17,23,0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.service-card-new:hover {
  transform: translateY(-5px);
  border-color: rgba(206,17,23,0.3);
}
.service-card-new:hover::before {
  opacity: 1;
}

.srv-icon-wrapper {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 2rem;
}
.srv-icon-wrapper svg {
  width: 100%;
  height: 100%;
}

.service-card-new h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.service-card-new p {
  color: #aaa;
  font-size: 0.9rem;
}

/* Testimonial Carousel */
.testimonial-carousel {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.quote-mark {
  font-size: 8rem;
  line-height: 0;
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.1;
  font-family: serif;
}

.testimonial-track-container {
  overflow: hidden;
  position: relative;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-slide {
  flex: 0 0 100%;
  min-width: 100%;
  opacity: 0.3;
  transform: scale(0.9);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 1rem;
}

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

.testimonial-slide h3 {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.testimonial-slide .author {
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}

.nav-arrow {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent);
  transform: scale(1.5);
}

/* =========================================
   5. CTA Crossfade
   ========================================= */
.gsap-cta {
  position: relative;
  padding: 12rem 0;
  text-align: center;
  overflow: hidden;
}

.cta-bg-1, .cta-bg-2 {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}
.cta-bg-1 {
  background-color: var(--bg-surface);
  z-index: 1;
}
.cta-bg-2 {
  background-image: url('../images/hero.jpg');
  opacity: 0;
  z-index: 2;
}

.gsap-cta:hover .cta-bg-2 {
  opacity: 0.4; /* Crossfade on hover */
}
.gsap-cta:hover .cta-bg-1 {
  opacity: 0;
}

.gsap-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-deep), transparent);
  z-index: 3;
}

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

.cta-subtitle {
  font-size: 1.2rem;
  color: #ccc;
  margin-top: 1rem;
}

.large-btn {
  padding: 1.2rem 3rem !important;
  font-size: 1.1rem !important;
}

/* Responsive */
@media (max-width: 992px) {
  .process-timeline {
    grid-template-columns: 1fr;
  }
  .stats-counter-block {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  .services-grid-new {
    grid-template-columns: repeat(2, 1fr);
  }
  .gsap-hero-stats {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4rem;
  }
  .stat-card {
    min-width: auto;
    flex: 1;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .services-grid-new {
    grid-template-columns: 1fr;
  }
  .stats-counter-block {
    grid-template-columns: 1fr;
  }
}
