/* =========================================================================
   UI-UX PRO MAX: MANDALO LANDING (SaaS Premium Dark Mode)
   Variables & Resets
========================================================================= */
:root {
  --nav-height: 72px;
  --bg-dark: #0A0A0A;
  --bg-darker: #050505;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --brand-primary: #FF4D1C;
  --brand-secondary: #FF8C42;
  --brand-green: #00e676; /* Vibrant online green */
  --brand-gradient: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  --brand-glow: 0 0 40px -10px rgba(255, 77, 28, 0.5);
  
  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA; /* Zinc 400 */
  --text-tertiary: #71717A; /* Zinc 500 */
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .outfit {
  font-family: 'Outfit', sans-serif;
}

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

ul {
  list-style: none;
}

/* =========================================================================
   Base Layout & Utilities
========================================================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* Glow effects behind layers */
.blob-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,77,28,0.15) 0%, rgba(255,77,28,0) 70%);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.blob-top { top: -200px; left: -150px; }
.blob-right { top: 30vh; right: -200px; background: radial-gradient(circle, rgba(255,140,66,0.12) 0%, rgba(0,0,0,0) 70%); }

/* =========================================================================
   Navbar (Floating Glassmorphism)
========================================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  z-index: 100;
  transition: all 0.3s ease;
  padding: 0 24px;
}

/* Scroll status added via JS */
.navbar.scrolled {
  background: rgba(10, 10, 10, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(255,77,28,0.3);
}

.nav-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

/* =========================================================================
   Buttons
========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: var(--brand-glow);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 50px -5px rgba(255, 77, 28, 0.6);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: scale(0.96);
  transition: var(--transition-fast);
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.15rem;
}

/* =========================================================================
   Hero Section 
========================================================================= */
.hero {
  position: relative;
  padding: 140px 0 60px; /* Reducido para no ser tan grande */
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 77, 28, 0.1);
  border: 1px solid rgba(255, 77, 28, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-secondary);
  margin-bottom: 24px;
}

.hero-pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-primary);
  box-shadow: 0 0 10px var(--brand-primary);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  max-width: 800px;
  margin: 0 auto 24px;
}

.hero h1 span.dark-highlight {
  color: var(--text-secondary);
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================================================
   Bento Grid Section (Features) & 3D Elements
========================================================================= */

/* Floating abstract elements for dynamic 3D feel */
.floating-3d-badge {
    position: absolute;
    background: rgba(20,20,20,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: float 6s ease-in-out infinite;
    z-index: 10;
    font-weight: 700;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Trust Badges under CTA (Hidden on desktop if using floating badges, or just kept below for structure if needed. Decidimos usar flotantes). */
.hero-trust-badges {
    display: none; /* Las reemplazamos por flotantes */
}

.trust-badge-3d {
    background: rgba(20,20,20,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    transform-style: preserve-3d;
}

.trust-badge-3d:hover {
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 0 15px 25px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

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

.section-head {
  text-align: center;
  margin-bottom: 64px;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(280px, auto);
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.bento-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.bento-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-8px) scale(1.02) rotateX(2deg) rotateY(-2deg);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), -10px 10px 20px rgba(255,77,28,0.1);
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255,255,255,0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1;
}

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

.bento-card > * {
  transform: translateZ(20px);
}

.bento-card.large {
  grid-column: span 2;
}

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--brand-secondary);
}

.bento-icon svg {
  width: 24px;
  height: 24px;
}

.bento-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.bento-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.bento-graphic {
  flex: 1;
  margin-top: 24px;
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* =========================================================================
   Live Demo Section (Inline iPhone frame) 
========================================================================= */
.demo-section {
  background: var(--bg-darker);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  padding: 100px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Mobile Frame Envelope */
.phone-frame {
  position: relative;
  width: 100%;
  max-width: 380px;
  height: 760px;
  background: #000;
  border-radius: 44px;
  border: 10px solid #202022;
  box-shadow: 
    0 0 0 1px #333,
    0 30px 80px rgba(0,0,0,0.8),
    0 0 100px rgba(255,77,28,0.15);
  margin: 0 auto;
  overflow: hidden;
  transform: perspective(1000px) rotateY(0deg);
  transition: transform 0.5s ease;
}

.phone-frame:hover {
  transform: perspective(1000px) rotateY(0deg) translateY(-10px);
}

/* Notch */
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 28px;
  background: #202022;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  z-index: 10;
}

.phone-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff; /* Fills empty space if iframe fails */
}

/* Demo Info Next to Frame */
.demo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

@media (max-width: 900px) {
  .demo-split {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.demo-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.demo-list-icon {
  width: 32px;
  height: 32px;
  background: rgba(255, 77, 28, 0.1);
  color: var(--brand-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.demo-list h4 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.demo-list p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* =========================================================================
   Testimonials / Final CTA
========================================================================= */
.cta-banner {
  background: linear-gradient(135deg, rgba(255,77,28,0.1), transparent), var(--bg-dark);
  border: 1px solid rgba(255,77,28,0.2);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
  text-align: center;
  margin: 60px auto;
  max-width: 900px;
  position: relative;
  overflow: hidden;
}

.cta-banner h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.cta-banner p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
}

/* =========================================================================
   Modal Form (Lead Funnel)
========================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #111;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 90vh; /* Prevents overflow on small mobile screens */
  overflow-y: auto; /* Allow scrolling inside the modal if needed */
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-spring);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--glass-border);
  text-align: center;
  background: rgba(255,255,255,0.02);
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10; 
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: rgba(255, 77, 28, 0.05);
  box-shadow: 0 0 0 4px rgba(255, 77, 28, 0.1);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.form-error {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}

/* =========================================================================
   Responsive Adjustments
========================================================================= */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-card.large {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .hero {
      padding: 120px 0 40px;
  }
  .floating-3d-badge {
      display: none; /* Ocultar badges flotantes en celulares para evitar amontonamiento */
  }
  .hero-trust-badges {
      display: flex; /* Mostrar las versión en fila para mobile */
      margin-top: 32px;
      flex-direction: column;
      align-items: center;
  }
  
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-card.large {
    grid-column: span 1;
  }
  .nav-links {
    display: none; /* Hide standard links on mobile */
  }
}

/* =========================================================================
   Icons Utilities
========================================================================= */
svg.lucide {
  color: currentColor;
}