@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Outfit:wght@300;600;800&display=swap');

:root {
  --bg-deep: #121212;
  --bg-surface: #1a1a1a;
  --bg-elevated: #242424;
  
  --accent-orange: #333333; /* Fallbacks for the orbs, now grayscale */
  --accent-purple: #1a1a1a;
  --accent-magenta: #222222;
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.4);
  
  --rainbow-gradient: linear-gradient(to right, #833ab4, #fd1d1d, #fcb045, #fd1d1d, #833ab4);
  --card-bg: rgba(15, 15, 15, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-16: 128px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 24px;
}

body {
  overflow-x: hidden;
  position: relative;
}

/* Background Textures */
.bg-texture {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

.orbs-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.5;
  animation: float 20s infinite ease-in-out;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.orb-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background-color: var(--accent-purple);
  animation-delay: 0s;
}

.orb-2 {
  bottom: -10%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background-color: var(--accent-magenta);
  animation-delay: -5s;
}

.orb-3 {
  top: 40%;
  left: 50%;
  width: 30vw;
  height: 30vw;
  background-color: var(--accent-orange);
  transform: translate(-50%, -50%);
  opacity: 0.3;
  animation-duration: 25s;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -1px;
}

h1 {
  font-size: 48px;
  line-height: 56px;
  margin-bottom: 8px;
}

h2 {
  font-size: 32px;
  line-height: 40px;
  margin-bottom: 8px;
}

h3 {
  font-size: 24px;
  line-height: 32px;
  margin-bottom: 8px;
}

p {
  font-size: 16px;
  line-height: 24px;
  color: var(--text-secondary);
  margin-top: 0;
  margin-bottom: var(--space-3);
}

.text-rainbow {
  background: var(--rainbow-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  animation: shine 6s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* Blur Text Animation Styles (React Bits Port) */
.split-text-trigger {
}

.split-word {
  display: inline-block;
  opacity: 0;
  filter: blur(12px);
  transform: translate3d(0, 15px, 0);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter, transform;
}

.split-text-trigger.active .split-word {
  opacity: 1;
  filter: blur(0px);
  transform: translate3d(0, 0, 0);
}

.subtitle {
  font-size: 20px;
  line-height: 28px;
  color: var(--text-secondary);
  max-width: 800px;
  margin-top: 0;
  margin-bottom: var(--space-4);
}

.text-center {
  text-align: center;
}

.text-center p,
.text-center .subtitle {
  margin-left: auto;
  margin-right: auto;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.page-header,
.content-section > .text-block {
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-header p,
.page-header .subtitle,
.content-section > .text-block p,
.content-section > .text-block .subtitle {
  margin-left: auto;
  margin-right: auto;
}

section {
  padding: 160px 0;
}

/* Header */
.header {
  position: fixed;
  top: 24px;
  left: 0;
  width: 100%;
  z-index: 100;
  border: none;
  background: transparent !important;
  pointer-events: none;
  display: flex;
  justify-content: center;
  padding: 0 var(--space-3);
}

.header-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  padding: 0 var(--space-4);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 50px;
  pointer-events: auto;
  border: 1px solid var(--card-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 24px;
  line-height: 32px;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  background-color: #ffffff;
  color: #000000;
}

.btn-primary:hover {
  background-color: #d0d0d0;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: #ffffff;
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.header .btn {
  padding: 12px 24px;
  font-size: 16px;
  line-height: 24px;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
}

.hero-content {
  max-width: 900px;
}

.hero-cta {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-6);
  margin-bottom: var(--space-6);
}

.social-proof {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
  margin-top: 64px;
}

.hero-fade-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 300px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-deep) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Bento Grid Services */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-3);
}

.card {
  background-color: transparent;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 48px 32px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Glass Surface (React Bits Port) */
.glass-surface {
  /* removed position: relative to avoid overriding fixed headers */
}

.glass-surface__filter {
  width: 100%;
  height: 100%;
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: -1;
}

.glass-surface--svg {
  background: rgba(10, 10, 12, 0.25) !important;
  backdrop-filter: blur(16px) var(--filter-id, url(#glass-filter));
  -webkit-backdrop-filter: blur(16px) var(--filter-id, url(#glass-filter));
  box-shadow:
    0 0 2px 1px rgba(255, 255, 255, 0.08) inset,
    0 0 10px 4px rgba(255, 255, 255, 0.03) inset,
    0px 8px 32px rgba(0, 0, 0, 0.5);
  border: none !important;
}

.glass-surface--fallback {
  background: rgba(10, 10, 12, 0.4) !important;
  backdrop-filter: blur(16px) saturate(160%) contrast(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(160%) contrast(1.1);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x) var(--mouse-y), 
    rgba(255, 255, 255, 0.08),
    transparent 40%
  );
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

/* Add subtle noise texture inside the card for the particle feel */
.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  z-index: 0;
  pointer-events: none;
}

.card > * {
  z-index: 1;
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.3), 
    inset 0 -1px 2px rgba(0, 0, 0, 0.3), 
    0 16px 48px rgba(0, 0, 0, 0.5);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-3);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-primary);
}

.service-main {
  grid-column: span 12;
}

@media (min-width: 768px) {
  .service-main { grid-column: span 8; }
  .service-ai { grid-column: span 4; }
  .service-web { grid-column: span 6; }
  .service-mkt { grid-column: span 6; }
}

@media (min-width: 1024px) {
  .service-main { grid-column: span 6; grid-row: span 2; }
  .service-ai { grid-column: span 6; }
  .service-web { grid-column: span 3; }
  .service-mkt { grid-column: span 3; }
}

/* Methodology */
.steps-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  position: relative;
}

@media (min-width: 768px) {
  .steps-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--card-border);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  line-height: 1;
}

/* Success Cases */
.case-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 768px) {
  .case-card {
    grid-template-columns: 1fr 1fr;
  }
}

.case-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.metric-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* DNA / About */
.dna-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Footer & Bottom CTA */
.bottom-cta {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  text-align: center;
  padding: var(--space-12) var(--space-3);
}

.footer {
  margin-top: 120px;
  padding: var(--space-8) var(--space-3) var(--space-4);
  background: var(--bg-deep);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-col h4 {
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  font-size: 20px;
  line-height: 28px;
}

.footer-col p {
  font-size: 14px;
  line-height: 24px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-2);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
  padding-top: var(--space-4);
  border-top: 1px solid var(--card-border);
  max-width: 1200px;
  margin: 0 auto;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* Responsive Adjustments */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  .nav-links {
    display: none;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .header-container {
    padding: 0 var(--space-2);
  }
  
  .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Prevent text from excessive line breaks by maximizing space */
  .feature-split > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .glass-surface {
    padding: 24px !important;
  }

  /* Optimize Typography and Spacing for mobile (Fluid Scaling) */
  h1, h2, .split-text-trigger {
    font-size: clamp(22px, 6vw, 30px) !important;
    line-height: 1.25 !important;
    word-wrap: break-word;
  }

  h3, h4 {
    font-size: 16px !important;
  }

  p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  /* Automatically scale down inline large text elements (like stats 99.9%) */
  div[style*="font-size: 40px"], 
  div[style*="font-size: 42px"],
  div[style*="font-size: 48px"],
  div[style*="font-size: 36px"],
  div[style*="font-size: 32px"] {
    font-size: clamp(22px, 7vw, 30px) !important;
  }

  div[style*="font-size: 24px"],
  div[style*="font-size: 26px"],
  div[style*="font-size: 28px"] {
    font-size: clamp(18px, 5vw, 22px) !important;
  }
  
  /* Reduce inline padding on cards to give more room on mobile screens */
  div[style*="padding: 24px"],
  div[style*="padding: 28px"],
  div[style*="padding: 32px"],
  div[style*="padding: 56px"] {
    padding: 20px !important;
  }

  /* Prevent strict grid min-widths from overflowing mobile screens */
  div[style*="minmax(350px"],
  div[style*="minmax(300px"] {
    grid-template-columns: 1fr !important;
  }

  /* Fix B2B Metrics Section Overflow on Mobile */
  #problema .glass-surface {
      padding: 32px 20px !important; /* Proper padding for the main box */
  }
  
  #problema .glass-surface > div:last-child {
      gap: 12px !important; /* Tighter gap between metric cards */
  }
  
  /* Card 1 & 2 padding */
  #problema .glass-surface > div:last-child > div:nth-child(1),
  #problema .glass-surface > div:last-child > div:nth-child(2) {
      padding: 16px 12px !important; /* Extra tight horizontal padding */
  }
  
  /* Shrink labels in Card 1 & 2 to prevent aggressive wrapping */
  #problema .glass-surface > div:last-child > div:nth-child(1) > div:last-child,
  #problema .glass-surface > div:last-child > div:nth-child(2) > div:last-child {
      font-size: 11px !important;
      letter-spacing: 0 !important;
  }
  
  /* Card 3 (Escalabilidad) padding and text */
  #problema .glass-surface > div:last-child > div:nth-child(3) {
      padding: 16px !important;
  }
  
  #problema .glass-surface > div:last-child > div:nth-child(3) > div:first-child > div:first-child {
      font-size: 18px !important;
      margin-bottom: 4px !important;
  }
  #problema .glass-surface > div:last-child > div:nth-child(3) > div:first-child > div:last-child {
      font-size: 13px !important;
  }

  /* --- Mobile Ecosystem Section (App de Pasajeros & Conductores) --- */
  
  /* Reduce padding on the main ecosystem container to prevent overflow */
  div[style*="padding: 64px 48px"] {
      padding: 32px 20px !important;
      gap: 48px !important;
  }

  /* Prevent flex items from causing overflow */
  div[style*="min-width: 300px"] {
      min-width: 100% !important;
  }

  /* Hide the subtle grey glow gradients on mobile for a cleaner look */
  div[style*="radial-gradient(circle, rgba(255, 255, 255, 0.03)"] {
      display: none !important;
  }

  /* Scale down iPhone mockups further on mobile to reveal background image */
  div[style*="width: 250px"][style*="bottom: -30px"] {
      transform: scale(0.55) !important;
  }
  
  /* Push passenger mockup to bottom right corner */
  div[style*="right: -85px"][style*="width: 250px"] {
      right: -20px !important;
      bottom: -20px !important;
      transform-origin: bottom right !important;
  }
  
  /* Push driver mockup to bottom left corner */
  div[style*="left: -80px"][style*="width: 250px"] {
      left: -20px !important;
      bottom: -20px !important;
      transform-origin: bottom left !important;
  }
  
  /* Scale down the small badges and their icons */
  div[style*="letter-spacing: 1.5px"][style*="text-transform: uppercase"] {
      font-size: 10px !important;
      padding: 4px 12px !important;
  }
  div[style*="letter-spacing: 1.5px"] svg {
      width: 12px !important;
      height: 12px !important;
  }

  /* Keep floating UI elements within bounds visually */
  .glass-surface[style*="position: absolute"] {
    max-width: calc(100vw - 40px) !important;
    left: 20px !important;
    right: auto !important;
    transform: scale(0.95);
    transform-origin: left center;
  }
  
  /* Disable heavy backdrop filters on mobile to prevent scrolling lag */
  #sofia-ai div[style*="backdrop-filter"] {
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
  }

  /* Keep browser mockups (estilo de ventana) inside bounds on mobile */
  .browser-mockup[style*="position: absolute"] {
    width: 90% !important;
    left: 5% !important;
    right: auto !important;
    bottom: 5% !important;
    top: auto !important;
  }
  /* The first mockup should stay at the top */
  .browser-mockup[style*="top: 0"] {
    top: 5% !important;
    bottom: auto !important;
  }

  /* Fix Bento Grid on mobile (celdas encogidas) */
  .bento-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }
  .bento-grid > div {
    grid-column: unset !important;
    width: 100% !important;
  }
}

/* --- MOBILE HAMBURGER & LIQUID GLASS MENU --- */
.desktop-only, .desktop-only-btn { display: flex; }
.mobile-only { display: none; }

@media (max-width: 768px) {
  .desktop-only, .desktop-only-btn { display: none !important; }
  .mobile-only { display: flex !important; }
  .header { z-index: 10001 !important; } /* Stay above overlay */
}

.hamburger-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease;
  padding: 0;
  position: relative;
  z-index: 100;
}
.hamburger-btn:hover { background: rgba(255, 255, 255, 0.1); }
.hamburger-icon {
  width: 20px; height: 14px;
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hamburger-icon span {
  display: block; width: 100%; height: 2px;
  background: #fff; border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform-origin: center;
}
.hamburger-btn.active .hamburger-icon span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.hamburger-btn.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
}
.hamburger-btn.active .hamburger-icon span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100vh;
  background: rgba(5, 5, 8, 0.6);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-content {
  width: 90%;
  max-width: 400px;
  transform: translateY(40px) scale(0.9);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: 0 40px 80px rgba(0,0,0,0.4);
}
.mobile-menu-overlay.active .mobile-menu-content {
  transform: translateY(0) scale(1);
}
.mobile-nav-links {
  list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 28px;
}
.mobile-nav-links a {
  color: #fff; text-decoration: none; font-size: 1.25rem; font-weight: 600;
  opacity: 0.8; transition: opacity 0.3s ease, color 0.3s ease;
}
.mobile-nav-links a:hover, .mobile-nav-links a:active {
  opacity: 1; color: var(--accent);
}

/* Specular Button Effects */
.btn-specular {
  --sb-radius: 100px;
  --sb-tint: #ffffff;
  --sb-tint-opacity: 0.08;
  --sb-blur: 16px;
  --sb-text-color: #ffffff;

  position: relative;
  border: none;
  background: color-mix(in srgb, var(--sb-tint) calc(var(--sb-tint-opacity) * 100%), transparent) !important;
  border-radius: var(--sb-radius);
  backdrop-filter: blur(var(--sb-blur));
  -webkit-backdrop-filter: blur(var(--sb-blur));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.25);
  overflow: visible !important;
  text-decoration: none;
}

.btn-specular:active {
  transform: scale(0.97);
}

.specular-button__fx {
  position: absolute;
  inset: -20px;
  pointer-events: none;
  z-index: 1;
}

.specular-button__fx canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.specular-button__label {
  position: relative;
  z-index: 2;
}

/* Animated Check List */
.check-item .check-svg {
  stroke: var(--text-primary);
  transition: stroke 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.check-item .check-box {
  transition: border-color 0.6s ease, background 0.6s ease, box-shadow 0.6s ease;
}

.check-item.active .check-svg {
  stroke: #4ade80 !important; /* Neon Green */
  transform: scale(1.1);
}

.check-item.active .check-box {
  border-color: rgba(74, 222, 128, 0.4) !important;
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.15);
}

/* Animated Mesh Background */
.mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    /* animation: moveMesh 40s linear infinite; (Removed as requested) */
    pointer-events: none;
}

@keyframes moveMesh {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Browser Mockup Frame */
.browser-mockup {
  border-radius: 12px;
  overflow: hidden;
  background-color: #2c2c2c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -20px 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  width: 100%;
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.browser-mockup:hover {
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.browser-header {
  height: 40px;
  background-color: #1a1a1a;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 8px;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.browser-dot.close { background-color: #ff5f56; }
.browser-dot.minimize { background-color: #ffbd2e; }
.browser-dot.maximize { background-color: #27c93f; }

.browser-url-bar {
  flex-grow: 1;
  background-color: #0f0f0f;
  border-radius: 6px;
  height: 24px;
  margin-left: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #666;
  font-size: 11px;
}

.browser-url-icon {
  margin-right: 6px;
  display: flex;
  align-items: center;
}

.browser-content {
  flex-grow: 1;
  position: relative;
  background-color: #000;
}

.browser-content img {
  width: 100%;
  height: auto;
  display: block;
}

/* Faded Images */
.image-faded {
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent),
                        linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent),
                linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    mask-composite: intersect;
}

/* --- GRADUAL BLUR OVERLAY --- */
.gradual-blur-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  z-index: 9999;
  pointer-events: none;
}
.gb-layer { position: absolute; inset: 0; pointer-events: none; }
.gb-1 { backdrop-filter: blur(1px); -webkit-backdrop-filter: blur(1px); -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 40%, transparent 60%); mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 40%, transparent 60%); }
.gb-2 { backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); -webkit-mask-image: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%); mask-image: linear-gradient(to bottom, transparent 20%, black 40%, black 60%, transparent 80%); }
.gb-3 { backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); -webkit-mask-image: linear-gradient(to bottom, transparent 40%, black 60%, black 80%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 40%, black 60%, black 80%, transparent 100%); }
.gb-4 { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); -webkit-mask-image: linear-gradient(to bottom, transparent 60%, black 80%, black 100%); mask-image: linear-gradient(to bottom, transparent 60%, black 80%, black 100%); }
.gb-5 { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); -webkit-mask-image: linear-gradient(to bottom, transparent 80%, black 100%); mask-image: linear-gradient(to bottom, transparent 80%, black 100%); }

@supports not (backdrop-filter: blur(1px)) {
  .gb-layer {
    background: linear-gradient(to bottom, transparent, rgba(5,5,8,0.9));
  }
}


/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}
.lightbox.show {
    display: flex;
    opacity: 1;
}
.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.lightbox.show .lightbox-content {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    z-index: 10001;
}
.lightbox-close:hover,
.lightbox-close:focus {
    color: #ec4899;
    text-decoration: none;
    transform: scale(1.1);
}
.zoomable-image {
    transition: filter 0.3s;
}
.zoomable-image:hover {
    filter: brightness(1.1);
}
\n
/* Testimonials Carousel Animations */
@keyframes scrollTestimonials {
    0% { transform: translateY(0); }
    100% { transform: translateY(calc(-50% - 12px)); } /* Scrolls exactly half the total height (including gaps) to seamlessly loop */
}

.testimonial-carousel-inner {
    animation: scrollTestimonials 40s linear infinite;
    will-change: transform;
}

.testimonial-carousel-inner:hover {
    animation-play-state: paused;
}

.comment-card:hover {
    background: rgba(255,255,255,0.08) !important;
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Responsive adjustment for Testimonials */
@media (max-width: 900px) {
    /* Remove card styling from parent, turn into a wrapper for two separate cards */
    .glass-surface[style*="flex-direction: row; height: 500px;"] {
        flex-direction: column !important;
        height: auto !important;
        max-height: none !important; /* CRITICAL: Prevent squishing on mobile */
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
        gap: 24px !important; /* Space between video card and comments card */
    }
    
    /* Make the video its own card, 400px tall so it is clearly visible and not squished */
    .glass-surface[style*="flex-direction: row; height: 500px;"] > div:first-child {
        position: relative !important;
        width: 100% !important;
        height: 400px !important; /* Large enough to see clearly */
        border-radius: 32px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.5) !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
    }
    
    /* Hide the vertical divider */
    .glass-surface[style*="flex-direction: row; height: 500px;"] > div:nth-child(2) {
        display: none !important;
    }

    /* Make the comments box its own completely separate card below the video */
    .glass-surface[style*="flex-direction: row; height: 500px;"] > div:nth-child(3) {
        position: relative !important;
        width: 100% !important;
        height: 280px !important; /* Compact height */
        min-height: 0 !important; /* Fix flexbox min-height: auto bug */
        max-height: 280px !important;
        background: #0a0a0a !important; /* Solid dark background like PC mode */
        border-radius: 32px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 0 16px !important;
        flex: none !important; /* Prevent flex from overriding height */
        overflow: hidden !important;
    }

    /* Fix the inner scroll padding for mobile and FORCE scrolling */
    .glass-surface[style*="flex-direction: row; height: 500px;"] > div:nth-child(3) .custom-scroll {
        padding-top: 24px !important;
        padding-bottom: 24px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important; /* Smooth touch scrolling on iOS */
        height: 100% !important;
    }

    /* Feature Cards: Compact Vertical Stack on Mobile */
    .features-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 16px !important;
    }
    
    .features-grid > div {
        width: 100% !important;
        max-width: 320px !important; /* Limit width to make them look more square/compact */
        padding: 24px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }

    .features-grid > div > div:first-child {
        margin-bottom: 16px !important; 
    }

    .features-grid > div h3 {
        font-size: 18px !important;
        margin-bottom: 8px !important;
    }

    .features-grid > div p {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 0 !important;
    }

    /* Fix overlapping mockups on mobile (stack them vertically instead) */
    .stacked-mockups-container {
        aspect-ratio: auto !important;
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        perspective: none !important;
    }
    
    .stacked-mockups-container > .browser-mockup, 
    .stacked-mockups-container > img {
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        transform: none !important;
        box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5) !important;
    }

    /* specific overrides for admin fleet section */
    .admin-fleet-text {
        order: 0 !important;
    }
    
    .admin-mockups-half-overlap {
        display: block !important;
        aspect-ratio: auto !important;
        min-height: auto !important;
        margin-top: 32px !important;
        padding-bottom: 100% !important; /* INCREASED: gives enough room for the tall overlapping form mockup */
        margin-bottom: 64px !important; /* Additional spacing to keep sections separated */
    }
    
    .admin-mockups-half-overlap > div:first-child {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        transform: none !important;
    }
    
    .admin-mockups-half-overlap > div:last-child {
        position: absolute !important;
        top: 50% !important;
        bottom: auto !important;
        left: 5% !important;
        right: auto !important;
        width: 90% !important;
        transform: none !important;
        box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7) !important;
    }

    /* Driver Companion section */
    .mobile-text-top {
        order: -1 !important; /* Forces text to jump to the top above the image */
    }
    
    .driver-companion-mockups {
        margin-top: 32px !important;
    }
    
    /* Shrink the floating UI cards on mobile and move them outwards so the driver is visible */
    .driver-companion-mockups > .glass-surface {
        transform: scale(0.65) !important;
    }
    
    /* Ride request card (Nueva Reserva) - 2nd child in DOM. Keep on right, but pull left to be visible */
    .driver-companion-mockups > .glass-surface:nth-child(2) {
        top: 0% !important;
        right: 5% !important;
        left: auto !important;
        transform-origin: top right !important;
    }

    /* Stats card (Trabajo Realizado) - 3rd child in DOM. Keep on left, but pull right to be visible */
    .driver-companion-mockups > .glass-surface:nth-child(3) {
        bottom: -5% !important;
        left: 5% !important;
        right: auto !important;
        transform-origin: bottom left !important;
    }
}

/* Custom Scrollbar for Comments */
.custom-scroll::-webkit-scrollbar {
    width: 4px;
}
.custom-scroll::-webkit-scrollbar-track {
    background: transparent; 
}
.custom-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2); 
    border-radius: 10px;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.4); 
}
.custom-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

/* Global Layout Utilities */
.feature-split {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
  align-items: center;
}
.feature-split > div {
  flex: 1;
  min-width: 300px;
}

/* Hero Canvas Fix */
#heroCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
