@import url('adsense.css');

/**
 * Credidata Cloud Portal — Design system
 * Enterprise premium: dark + blue, glassmorphism, grid, glow
 *
 * FONDOS E IMÁGENES:
 * — EXCLUSIVE (solo esa vista): .hero-bg/.hero-visual (home), .que-resuelve-bg/.que-resuelve-visual (home),
 *   .experiencia-bg/.experiencia-grid/.experiencia-cloud (home), .login-bg/.login-bg-pattern/.login-grid-vertical (login),
 *   .page-about .hero-bg::after (quienes-somos), .contact-icon-large (contacto).
 * — REUTILIZABLES: .body-grid, .noise-overlay, .section-sep, .section-wave, .section-wave-2,
 *   .card-slicer-bg, .section-visual-wrap/.section-visual, .parallax-layer.
 */

:root {
  /* Spacing: 8px base unit */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-5: 2.5rem;   /* 40px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-10: 5rem;    /* 80px */
  --space-12: 6rem;    /* 96px */
  --bg-primary: #050814;
  --bg-secondary: #060B1F;
  --surface: #0B1228;
  --surface-hover: #0f1835;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.15);
  --glow-blue: rgba(37, 99, 235, 0.4);
  --glow-cyan: rgba(6, 182, 212, 0.35);
  --text-primary: #f1f5f9;
  --text-secondary: #a8b8cc;
  --text-muted: #94a3b8;
  --border-subtle: rgba(59, 130, 246, 0.2);
  --glass-bg: rgba(11, 18, 40, 0.75);
  --glass-border: rgba(255, 255, 255, 0.06);
  --grid-line: rgba(59, 130, 246, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  min-height: 100vh;
}

/* Grid overlay global (futurista) */
.body-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ——— Navbar (sticky + blur) ——— */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1520px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.navbar-inner nav {
  min-width: 0;
}

.logo {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  text-decoration: none;
  flex: 0 0 auto;
  white-space: nowrap;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.45vw, 1.6rem);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}

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

/* Dropdown Descargar (APKs) — mismo estilo que Inicio, Contacto, etc. Solo se abre al hacer clic */
.nav-item-dropdown {
  position: relative;
}
/* "Descargar" = mismo aspecto que el resto de enlaces del menú */
.nav-links .nav-dropdown-trigger {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-links .nav-dropdown-trigger:hover,
.nav-item-dropdown.is-open .nav-dropdown-trigger {
  color: var(--text-primary);
}
.nav-dropdown-trigger::after {
  content: '';
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
}
.nav-item-dropdown.is-open .nav-dropdown-trigger::after {
  transform: translateY(2px) rotate(180deg);
}
/* Panel: oculto por defecto. Solo visible al hacer clic, con animación elegante */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 0.5rem;
  min-width: 220px;
  list-style: none;
  padding: 0.5rem 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  z-index: 200;
  /* Oculto por defecto */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.22s ease-out, visibility 0.22s ease-out, transform 0.22s ease-out;
}
.nav-item-dropdown.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-dropdown a {
  display: block;
  padding: 0.65rem 1.35rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
  border-radius: 6px;
  margin: 0 0.35rem;
}
.nav-dropdown a:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}
.nav-dropdown a:first-of-type {
  margin-top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.25s, background 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  color: #fff;
  box-shadow: 0 4px 20px var(--glow-blue);
}

.btn-primary:hover {
  box-shadow: 0 6px 32px var(--glow-blue), 0 0 40px var(--cyan-soft);
  transform: translateY(-1px);
}

/* Botones primarios/CTA en la nav: texto blanco (el nav usa color secundario por defecto) */
.nav-links .btn-primary,
.nav-links .btn-cta-premium {
  color: #ffffff !important;
}

.btn-outline {
  background: transparent;
  color: var(--accent-light);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--accent-light);
  box-shadow: 0 0 24px var(--cyan-soft);
}

/* ——— NOISE OVERLAY (REUSABLE: hero, experiencia, login) ——— */
.noise-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ——— HERO HOME: 70% visual, 30% texto (EXCLUSIVE home) ——— */
.hero {
  position: relative;
  padding: 4rem 0 1rem;
  text-align: center;
  overflow: hidden;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--bg-primary);
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 90%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-primary) 70%);
}

/* ——— HERO DRUM CAROUSEL (home only): 5 panels, 8s/image, 40s loop, slide vertical ——— */
.hero-main .hero-drum {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 500%;
  min-height: 500%;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  animation: hero-drum-slide 40s ease-in-out infinite;
}

.hero-drum-panel {
  width: 100%;
  height: 20%;
  min-height: 200px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
  transform-origin: center center;
  animation: hero-drum-zoom 8s ease-in-out infinite;
}

/* Imágenes del carrusel (URLs en CSS evita problemas de escape en HTML) */
.hero-drum-panel-1 { background-image: url("https://images.unsplash.com/photo-1644088379091-d574269d422f?auto=format&fit=crop&fm=jpg&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8YWJzdHJhY3QlMjB0ZWNobm9sb2d5fGVufDB8fDB8fHww&ixlib=rb-4.1.0&q=60&w=3000"); }
.hero-drum-panel-2 { background-image: url("https://images.unsplash.com/photo-1727434032773-af3cd98375ba?auto=format&fit=crop&fm=jpg&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MjB8fGFic3RyYWN0JTIwdGVjaG5vbG9neXxlbnwwfHwwfHx8MA%3D%3D&ixlib=rb-4.1.0&q=60&w=3000"); }
.hero-drum-panel-3 { background-image: url("https://images.unsplash.com/photo-1579548122080-c35fd6820ecb?auto=format&fit=crop&fm=jpg&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTJ8fGFic3RyYWN0JTIwdGVjaG5vbG9neXxlbnwwfHwwfHx8MA%3D%3D&ixlib=rb-4.1.0&q=60&w=3000"); }
.hero-drum-panel-4 { background-image: url("https://images.unsplash.com/photo-1690627931320-16ac56eb2588?auto=format&fit=crop&fm=jpg&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8Y2xvdWQlMjBjb21wdXRpbmd8ZW58MHx8MHx8fDA%3D&ixlib=rb-4.1.0&q=60&w=3000"); }
.hero-drum-panel-5 { background-image: url("https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&fm=jpg&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8ZGF0YSUyMGRhc2hib2FyZHxlbnwwfHwwfHx8MA%3D%3D&ixlib=rb-4.1.0&q=60&w=3000"); }

/* Stagger zoom so each panel zooms when visible (every 8s) */
.hero-drum-panel:nth-child(1) { animation-delay: 0s; }
.hero-drum-panel:nth-child(2) { animation-delay: -8s; }
.hero-drum-panel:nth-child(3) { animation-delay: -16s; }
.hero-drum-panel:nth-child(4) { animation-delay: -24s; }
.hero-drum-panel:nth-child(5) { animation-delay: -32s; }

/* Desplazamiento vertical: franja tipo drum */
@keyframes hero-drum-slide {
  0% { transform: translateY(0); }
  2.5% { transform: translateY(-20%); }
  20% { transform: translateY(-20%); }
  22.5% { transform: translateY(-40%); }
  40% { transform: translateY(-40%); }
  42.5% { transform: translateY(-60%); }
  60% { transform: translateY(-60%); }
  62.5% { transform: translateY(-80%); }
  80% { transform: translateY(-80%); }
  82.5% { transform: translateY(0); }
  100% { transform: translateY(0); }
}

@keyframes hero-drum-zoom {
  0%, 100% { transform: scale(1.03); }
  50% { transform: scale(1.06); }
}

/* Dark overlay: legibilidad del texto sin ocultar las imágenes */
.hero-main .hero-drum-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.45) 45%, rgba(0,0,0,.6) 70%, var(--bg-primary) 100%);
  pointer-events: none;
}

/* Aurora / mesh gradient layer: animated radial gradients behind hero content */
.hero-aurora {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(37, 99, 235, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse 60% 80% at 80% 60%, rgba(6, 182, 212, 0.2) 0%, transparent 45%),
    radial-gradient(ellipse 50% 40% at 60% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 40%);
  background-size: 200% 200%, 180% 180%, 160% 160%;
  animation: hero-aurora-drift 18s ease-in-out infinite alternate;
}

@keyframes hero-aurora-drift {
  0% { background-position: 0% 0%, 20% 40%, 60% 20%; }
  100% { background-position: 30% 20%, 60% 20%, 20% 40%; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-aurora { animation: none; }
}

/* Light noise overlay: grain texture via CSS */
.hero-noise {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Glow orb: blurred radial accent behind headline */
.hero-glow-orb {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse 80% 100% at 50% 50%, rgba(37, 99, 235, 0.35), transparent 70%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

/* Subtle light sweep animation on hero background */
.hero-light-sweep {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, transparent 40%, rgba(255,255,255,0.02) 50%, transparent 60%, transparent 100%);
  background-size: 200% 100%;
  animation: hero-light-sweep 12s ease-in-out infinite;
}

@keyframes hero-light-sweep {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-light-sweep { animation: none; }
}

/* Reduced motion: first image only, no animation */
@media (prefers-reduced-motion: reduce) {
  .hero-main .hero-drum {
    animation: none;
    height: 100%;
    transform: translateY(0);
  }
  .hero-main .hero-drum-panel {
    height: 100%;
  }
  .hero-main .hero-drum-panel:not(:first-child) {
    display: none;
  }
  .hero-main .hero-drum-panel {
    animation: none;
    transform: scale(1);
  }
}

/* Fallback: pages with hero-bg but no drum (quienes-somos, funcionalidades, contacto) */
.hero:not(.hero-main) .hero-bg {
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(37, 99, 235, 0.25), transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 70%, rgba(6, 182, 212, 0.15), transparent 45%),
    var(--bg-primary);
}

.hero-main .hero-overlay {
  background: transparent;
}

/* Texto siempre encima de las fotos del carrusel */
.hero-main .container,
.hero-main .hero-visual-wrap {
  position: relative;
  z-index: 2;
}

.hero-main .hero-aurora,
.hero-main .hero-noise,
.hero-main .hero-light-sweep,
.hero-main .hero-grid,
.hero-main .hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-main .hero-glow-orb {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.hero-main .hero-bg {
  z-index: 0;
}

.hero .container { position: relative; z-index: 1; }

.hero-content {
  max-width: 640px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.75rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 var(--space-4);
  color: var(--text-primary);
  letter-spacing: 0;
}

.hero .subheadline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto var(--space-5);
  line-height: 1.65;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

/* Trust Bar: proof chips + logo placeholders, bento-style */
.trust-bar {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}

.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.trust-chip {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-1) var(--space-2);
  border-radius: 12px;
  background: rgba(11, 18, 40, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.trust-chip:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 4px 20px var(--cyan-soft);
}

.trust-logos {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}

.trust-logo-placeholder {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  opacity: 0.7;
}

/* CTA premium: animated gradient border + hover lift + glow */
.btn-cta-premium {
  position: relative;
  overflow: hidden;
}

.btn-cta-premium::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--cyan), var(--accent-light), var(--cyan));
  background-size: 300% 300%;
  animation: btn-border-shift 4s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes btn-border-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.btn-cta-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px var(--glow-blue), 0 0 48px var(--cyan-soft);
}

@media (prefers-reduced-motion: reduce) {
  .btn-cta-premium::before { animation: none; }
}

/* Hero visual central: Cloud Intelligence / dashboard flotante (EXCLUSIVE home) */
.hero-visual-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 0 1rem;
}

.hero-visual {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 80px var(--cyan-soft);
}

.hero-visual::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), transparent, rgba(6, 182, 212, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-visual svg,
.hero-visual .hero-visual-inner { display: block; width: 100%; }

/* Líneas de datos animadas (sutiles) */
.hero-data-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ——— SECCIÓN "QUÉ RESUELVE": fondo diagonal + panorámico (EXCLUSIVE home) ——— */
.que-resuelve-wrap {
  position: relative;
  overflow: hidden;
}

/* Section title with animated data-particles line (slow drift) */
.section-title-with-line {
  position: relative;
  padding-bottom: var(--space-3);
}

.section-title-with-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--accent-light), transparent);
  background-size: 200% 100%;
  border-radius: 1px;
  animation: section-line-drift 6s ease-in-out infinite;
}

@keyframes section-line-drift {
  0%, 100% { background-position: 0% 0; opacity: 0.8; }
  50% { background-position: 100% 0; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .section-title-with-line::after { animation: none; }
}

/* Bento grid: 2–3 card sizes (large primary + medium + small) */
.bento-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.bento-que-resuelve {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
}

.bento-que-resuelve .bento-large {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-que-resuelve .bento-medium {
  grid-column: span 2;
}

.bento-que-resuelve .bento-small {
  grid-column: span 4;
}

.bento-como-funciona {
  grid-template-columns: repeat(3, 1fr);
}

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

.bento-como-funciona .bento-medium {
  grid-column: span 1;
}

@media (max-width: 768px) {
  .bento-que-resuelve,
  .bento-como-funciona {
    grid-template-columns: 1fr;
  }
  .bento-que-resuelve .bento-large,
  .bento-que-resuelve .bento-medium,
  .bento-que-resuelve .bento-small,
  .bento-como-funciona .bento-large,
  .bento-como-funciona .bento-medium {
    grid-column: span 1;
  }
  .bento-que-resuelve .bento-large { grid-row: span 1; }
}

.bento-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: var(--space-4);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.bento-card:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 40px var(--cyan-soft);
  transform: translateY(-2px);
}

.bento-card .card-icon-pill {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(6, 182, 212, 0.2));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--cyan);
}

.bento-card .card-icon-pill svg {
  width: 24px;
  height: 24px;
  stroke: var(--cyan);
}

.bento-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
}

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

.que-resuelve-visual {
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 2.5rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.que-resuelve-visual svg {
  width: 100%;
  max-width: 720px;
  height: auto;
  opacity: 0.85;
}

#que-resuelve .container { position: relative; z-index: 1; }

/* ——— MÓDULOS DEL SISTEMA: bento grid, image backgrounds, glassmorphism, depth ——— */
.modulos-wrap {
  position: relative;
  overflow: hidden;
}

#modulos-sistema .container { position: relative; z-index: 1; }

/* Bento grid: varied card sizes */
.modulos-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto;
}

.modulo-card-large {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 280px;
}

.modulo-card-medium {
  min-height: 200px;
}

.modulo-card-wide {
  grid-column: span 4;
  min-height: 180px;
}

@media (max-width: 900px) {
  .modulos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .modulo-card-large {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 220px;
  }
  .modulo-card-wide {
    grid-column: span 2;
    min-height: 160px;
  }
}

@media (max-width: 600px) {
  .modulos-grid {
    grid-template-columns: 1fr;
  }
  .modulo-card-large,
  .modulo-card-medium,
  .modulo-card-wide {
    grid-column: span 1;
  }
}

/* Module card: base structure */
.modulo-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  /* Glassmorphism + depth */
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.25s;
}

/* Image background layer: cover, center */
.modulo-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.5s ease;
  pointer-events: none;
}

.modulo-card-bg-1 {
  background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=1200&q=70');
}
.modulo-card-bg-2 {
  background-image: url('https://images.unsplash.com/photo-1581090700227-1e37b190418e?auto=format&fit=crop&w=800&q=70');
}
.modulo-card-bg-3 {
  background-image: url('https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=800&q=70');
}
.modulo-card-bg-4 {
  background-image: url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=800&q=70');
}
.modulo-card-bg-5 {
  background-image: url('https://images.unsplash.com/photo-1563986768609-322da13575f3?auto=format&fit=crop&w=800&q=70');
}
.modulo-card-bg-6 {
  background-image: url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=1200&q=70');
}

/* Dark overlay: ensures text readability */
.modulo-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

/* Content layer above overlay */
.modulo-card-content {
  position: relative;
  z-index: 2;
  padding: var(--space-4);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Icon container (square/rounded, consistent with header) */
.modulo-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(6, 182, 212, 0.25));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  flex-shrink: 0;
}

.modulo-icon-wrap svg {
  width: 24px;
  height: 24px;
  stroke: var(--cyan);
  color: var(--cyan);
}

.modulo-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
}

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

/* Hover interaction: elevation, soft glow, background image zoom */
.modulo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 48px var(--cyan-soft);
  border-color: var(--border-subtle);
}

.modulo-card:hover .modulo-card-bg {
  transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .modulo-card:hover .modulo-card-bg {
    transform: none;
  }
}

/* ——— Section tech pattern: grid + glow dots + diagonal lines (cohesive, no stock photos) ——— */
.section-bg-tech {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

.section-bg-tech::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(37, 99, 235, 0.05) 0%, transparent 40%);
}

/* Aurora layer soft: reduced intensity for sections */
.section-aurora {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.section-aurora-soft {
  background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(6, 182, 212, 0.05) 0%, transparent 45%);
}

#como-funciona .container,
#seguridad .container { position: relative; z-index: 1; }

/* ——— Cómo funciona: hero schematic + 3-step flow ——— */
.como-funciona-wrap {
  position: relative;
  overflow: hidden;
}

/* Hero visual: floating abstract schematic (center-right, glassmorphism) */
.como-funciona-visual {
  position: absolute;
  top: 50%;
  right: -5%;
  transform: translateY(-50%);
  width: min(480px, 45vw);
  max-width: 100%;
  z-index: 0;
  pointer-events: none;
}

.como-funciona-schematic {
  background: rgba(11, 18, 40, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 20px;
  padding: var(--space-4);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.3), 0 0 80px rgba(6, 182, 212, 0.06);
}

.como-funciona-schematic svg {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.9;
}

@media (max-width: 1024px) {
  .como-funciona-visual {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: 360px;
    margin: 0 auto var(--space-6);
  }
}

/* Flow: 3 steps with connectors */
.como-funciona-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: var(--space-6);
  position: relative;
  z-index: 1;
}

.como-funciona-step {
  flex: 1;
  min-width: 260px;
  max-width: 360px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: var(--space-4);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
  position: relative;
}

.como-funciona-step:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 40px var(--cyan-soft);
  transform: translateY(-2px);
}

.como-funciona-step-num {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(59, 130, 246, 0.25);
  letter-spacing: 0;
  line-height: 0.9;
  margin-bottom: var(--space-2);
}

.como-funciona-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(6, 182, 212, 0.2));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.como-funciona-step-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--cyan);
}

.como-funciona-step-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
}

.como-funciona-step-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Connector between steps (glow line) */
.como-funciona-connector {
  width: 40px;
  min-width: 40px;
  align-self: center;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), rgba(6, 182, 212, 0.3), transparent);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .como-funciona-flow {
    flex-direction: column;
    align-items: center;
  }
  .como-funciona-connector {
    width: 2px;
    height: 24px;
    min-width: 2px;
    background: linear-gradient(180deg, transparent, rgba(59, 130, 246, 0.4), transparent);
  }
}

#experiencia-cdcloud .container,
#experiencia-cdcloud .experiencia-bg,
#experiencia-cdcloud .experiencia-grid,
#experiencia-cdcloud .experiencia-cloud { position: relative; z-index: 1; }

/* ——— Secciones (alternar fondos) ——— */
/* Scroll reveal: progressive disclosure (fade + translateY, stagger via JS) */
.reveal-section .reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.reveal-section.is-visible .reveal-item,
.reveal-section .reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-section {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-section .reveal-item {
    opacity: 1;
    transform: none;
  }
}

.section {
  position: relative;
  padding: var(--space-10) 0;
  z-index: 1;
}

.section-dark { background: var(--bg-primary); }

.section-gradient {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.section-surface { background: var(--surface); }

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
  letter-spacing: 0;
  line-height: 1.2;
}

.section-subtitle {
  color: var(--text-secondary);
  margin: 0 0 var(--space-6);
  max-width: 560px;
  font-size: 1.1rem;
  line-height: 1.5;
}

/* Separador visual (línea luminosa) */
.section-sep {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-subtle), transparent);
  margin: 0;
  border: none;
}

/* Menos espacio entre hero y primera sección para diseño compacto */
.section-sep + .section {
  padding-top: 1rem;
}

/* Separador onda sutil (REUSABLE) */
.section-wave {
  display: block;
  width: 100%;
  height: 60px;
  margin: 0;
  border: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 Q300 0 600 30 T1200 30 V60 H0 Z' fill='%23060B1F'/%3E%3C/svg%3E") no-repeat center bottom;
  background-size: 100% 60px;
}

/* Segunda onda (REUSABLE) */
.section-wave-2 {
  display: block;
  width: 100%;
  height: 80px;
  margin: 0;
  border: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0 40 Q200 0 400 40 T800 40 T1200 40 V80 H0 Z' fill='%230B1228'/%3E%3C/svg%3E") no-repeat center bottom;
  background-size: 100% 80px;
}

/* Parallax muy leve (REUSABLE) */
.parallax-layer {
  will-change: transform;
}

/* ——— Cards glass (hover glow) ——— */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.75rem;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.card-glass:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 40px var(--cyan-soft);
  transform: translateY(-2px);
}

.card-glass h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
  color: var(--text-primary);
}

.card-glass p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Slicer cards: icono + mini background interno (REUSABLE) */
.card-slicer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}

.card-slicer-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(59, 130, 246, 0.06), transparent 50%),
    linear-gradient(180deg, transparent 0%, rgba(6, 182, 212, 0.03) 100%);
  border-radius: inherit;
}

.card-slicer .card-icon {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(6, 182, 212, 0.2));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--cyan-soft);
}

.card-slicer .card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--cyan);
}

.card-slicer h3,
.card-slicer p { position: relative; z-index: 1; }

/* ——— Experiencia Credidata Cloud: fondo exclusivo + grid más marcado + cloud (EXCLUSIVE) ——— */
.experiencia-cdcloud {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}

.experiencia-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(37, 99, 235, 0.15), transparent 55%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(6, 182, 212, 0.1), transparent 50%),
    var(--bg-secondary);
}

.experiencia-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

.experiencia-cloud {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 400'%3E%3Cellipse cx='200' cy='180' rx='120' ry='60' fill='none' stroke='%2306b6d4' stroke-width='0.8' opacity='0.5'/%3E%3Cellipse cx='500' cy='220' rx='140' ry='70' fill='none' stroke='%233b82f6' stroke-width='0.6' opacity='0.4'/%3E%3Cellipse cx='600' cy='120' rx='80' ry='40' fill='none' stroke='%2306b6d4' stroke-width='0.5' opacity='0.35'/%3E%3C/svg%3E") no-repeat center;
  background-size: 90% auto;
}

.experiencia-cdcloud .container { position: relative; z-index: 1; }

.experiencia-cdcloud .section-title {
  text-align: center;
  margin-bottom: 0.75rem;
}

.experiencia-cdcloud .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.experiencia-phrases {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2rem;
  margin-top: 2.5rem;
}

.experiencia-phrase {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.experiencia-phrase span { color: var(--cyan); }

/* ——— Sección con imagen conceptual lateral/superior (REUSABLE: funcionalidades) ——— */
.section-visual-wrap {
  position: relative;
  overflow: hidden;
}

.section-visual {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 2rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
}

.section-visual svg {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.9;
}

/* ——— Quiénes somos: fondo institucional + líneas horizontales (EXCLUSIVE) ——— */
.page-about .hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.03) 2px, transparent 4px);
  background-size: 100% 24px;
  pointer-events: none;
}

/* ——— Quiénes somos: narrative block + focus cards + build principles ——— */
#about-intro .container { position: relative; z-index: 1; }
#about-focus .container,
#about-build .container { position: relative; z-index: 1; }

.about-narrative {
  max-width: 720px;
  margin: 0 auto;
}

.about-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

/* Focus blocks: 4 cards in responsive grid */
.about-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-5);
}

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

.about-focus-card {
  min-height: 0;
}

/* Cómo construimos: 3 compact blocks */
.about-build-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

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

.about-build-item {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: var(--space-4);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.about-build-item:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.about-build-item h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 var(--space-2);
  color: var(--text-primary);
}

.about-build-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ——— Funcionalidades: 6 blocks with number anchor, visual, 3 cards ——— */
.func-block .container { position: relative; z-index: 1; }

.func-block-inner {
  position: relative;
  padding-top: var(--space-2);
}

/* Large section number: visual anchor */
.func-block-number {
  display: block;
  font-size: 7rem;
  font-weight: 700;
  line-height: 0.9;
  color: rgba(59, 130, 246, 0.12);
  letter-spacing: 0;
  margin-bottom: calc(-1 * var(--space-4));
  pointer-events: none;
}

/* Block header: title + subtitle */
.func-block-header {
  margin-bottom: var(--space-5);
}

.func-block-title {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 var(--space-1);
  color: var(--text-primary);
  letter-spacing: 0;
}

.func-block-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Central visual: glass container with glow */
.func-block-visual-wrap {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(59, 130, 246, 0.06);
}

.func-block-visual-wrap:hover {
  border-color: var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 40px var(--cyan-soft);
}

.func-block-svg {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
  opacity: 0.9;
}

/* Supporting cards: 3 per block */
.func-block-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

@media (max-width: 900px) {
  .func-block-cards {
    grid-template-columns: 1fr;
  }
}

.func-card {
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.25s;
}

.func-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25), 0 0 40px var(--cyan-soft);
}

/* Alternating visual rhythm: odd blocks with more spacing */
.func-block-1 .func-block-inner { padding-top: var(--space-4); }
.func-block-3 .func-block-inner,
.func-block-5 .func-block-inner { padding-top: var(--space-6); }

/* ——— Contacto: patrón cloud suave + iconos grandes (EXCLUSIVE) ——— */
.contact-visual-wrap {
  position: relative;
}

.contact-icon-large {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.contact-icon-large svg {
  width: 32px;
  height: 32px;
  stroke: var(--cyan);
}

/* ——— Pricing section: Plan Único (disabled) + Plan Extremo (featured) ——— */
.pricing-section {
  position: relative;
}

.pricing-section .section-subtitle {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.pricing-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  max-width: 960px;
  margin: 0 auto var(--space-6);
  align-items: stretch;
}

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

.pricing-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: var(--space-5);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}

.pricing-card-featured {
  transform: scale(1.02);
  border-color: var(--border-subtle);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3), 0 0 60px var(--cyan-soft);
}

.pricing-card-featured:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.35), 0 0 80px var(--cyan-soft);
  transform: scale(1.02) translateY(-2px);
}

.pricing-card-disabled {
  opacity: 0.6;
  filter: blur(0.5px);
  pointer-events: none;
  user-select: none;
}

.pricing-card-disabled::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.pricing-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  margin-bottom: var(--space-2);
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #fff;
  box-shadow: 0 4px 16px var(--glow-blue);
}

.pricing-badge-disabled {
  background: var(--surface);
  color: var(--text-muted);
  box-shadow: none;
  border: 1px solid var(--glass-border);
}

.pricing-plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
  letter-spacing: 0;
}

.pricing-price {
  margin: var(--space-3) 0 0;
}

.pricing-currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0;
}

.pricing-period {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 var(--space-4);
}

.pricing-features {
  list-style: none;
  margin: 0 0 var(--space-5);
  padding: 0;
}

.pricing-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.pricing-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: 700;
}

.pricing-card-disabled .pricing-features li::before {
  content: '·';
  color: var(--text-muted);
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.5rem;
}

.btn-disabled {
  background: var(--surface) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--glass-border) !important;
  cursor: not-allowed;
  opacity: 0.8;
}

.pricing-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: var(--space-2) 0 0;
  text-align: center;
}

.pricing-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pricing-trust span::after {
  content: ' · ';
  color: var(--glass-border);
}

.pricing-trust span:last-child::after {
  content: '';
}

@media (prefers-reduced-motion: reduce) {
  .pricing-card-featured {
    transform: none;
  }
  .pricing-card-featured:hover {
    transform: none;
  }
}

/* ——— CTA final ——— */
.cta-block {
  text-align: center;
  padding: 5rem 0;
}

.cta-block .section-title { margin-bottom: 0.75rem; }

.cta-block .section-subtitle { margin-left: auto; margin-right: auto; margin-bottom: 2rem; }

.cta-block .btn-primary {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

/* ——— Footer (grid elegante) ——— */
.footer {
  margin-top: 0;
  padding: 4rem 0 2rem;
  background: var(--surface);
  border-top: 1px solid var(--glass-border);
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2.5rem;
}

.footer h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer a, .footer span {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

.footer a:hover { color: var(--cyan); }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer-legal { color: var(--text-secondary); opacity: 0.9; }

/* ——— Formularios ——— */
input, textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input::placeholder, textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.8;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.form-group { margin-bottom: 1.25rem; }

/* ——— Páginas legales (Privacidad, Términos) ——— */
.legal-page main { padding-bottom: 3rem; }

.legal-header {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.legal-header .hero-bg,
.legal-header .hero-grid,
.legal-header .hero-overlay { position: absolute; inset: 0; z-index: 0; }

.legal-header .container { position: relative; z-index: 1; }

.legal-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.legal-header .subheadline {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

.legal-header .legal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-header .legal-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--cyan);
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.7;
}

.legal-content h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.legal-content h2:first-of-type { margin-top: 0; }

.legal-content p { margin: 0 0 1rem; }

.legal-content ul {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.legal-content li { margin-bottom: 0.35rem; }

.legal-content a { color: var(--accent-light); }

.legal-contact { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--glass-border); }

/* ——— Login page (fondo cloud + card) ——— */
.page-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-login .hero-bg,
.page-login .hero-grid { display: none; }

/* 5) Login / Access section: clean, professional. Real bg image + strong dark overlay for form readability. */
.page-login .login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("https://images.unsplash.com/photo-1526378722484-bd91ca387e72");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-login .login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: none;
}

.login-bg-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cellipse cx='60' cy='40' rx='25' ry='15' fill='none' stroke='%233b82f6' stroke-width='0.5' opacity='0.35'/%3E%3Cellipse cx='30' cy='70' rx='20' ry='12' fill='none' stroke='%2306b6d4' stroke-width='0.5' opacity='0.3'/%3E%3Cellipse cx='90' cy='80' rx='22' ry='14' fill='none' stroke='%233b82f6' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E");
}

/* Login: grid vertical (EXCLUSIVE login) */
.login-grid-vertical {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 80px 100%;
}

.login-wrap {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
}

.login-card {
  max-width: 420px;
  width: 100%;
  padding: 2.5rem !important;
  border: 1px solid var(--glass-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.login-card .logo-wrap {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-card .logo-wrap .logo {
  font-size: 1.75rem;
}

.login-card h1 {
  font-size: 1.35rem;
  margin: 0 0 0.4rem;
  font-weight: 700;
}

.login-card .login-note {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

/* ——— Utilidades y animaciones ——— */
.text-accent { color: var(--accent-light); }
.text-cyan { color: var(--cyan); }

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .animate-fade-in { animation: none; opacity: 1; transform: none; }
  .card-glass:hover { transform: none; }
  .btn-primary:hover { transform: none; }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .section-title,
  .legal-header h1 {
    font-size: 1.85rem;
  }

  .func-block-number {
    font-size: 4rem;
  }

  .func-block-title {
    font-size: 1.5rem;
  }
}

/* Mobile menu */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  color: #f4fbff;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.025)),
    rgba(8, 16, 33, 0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 32px rgba(0,0,0,0.2);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.22s ease, top 0.22s ease, box-shadow 0.22s ease;
}

.nav-toggle::before {
  top: 15px;
  box-shadow: 0 6px 0 currentColor;
}

.nav-toggle::after {
  top: 27px;
}

.nav-toggle:hover,
.nav-toggle.is-open {
  border-color: rgba(40, 216, 196, 0.34);
  background:
    linear-gradient(135deg, rgba(79, 140, 255, 0.2), rgba(40, 216, 196, 0.14)),
    rgba(8, 16, 33, 0.9);
}

.nav-toggle.is-open::before {
  top: 21px;
  transform: rotate(45deg);
  box-shadow: none;
}

.nav-toggle.is-open::after {
  top: 21px;
  transform: rotate(-45deg);
}

/* Fila con botón cerrar: solo se muestra en móvil (véase media query siguiente) */
.nav-mobile-close-row {
  display: none !important;
}

@media (max-width: 1140px) {
  .navbar-inner {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .navbar-inner .logo {
    flex: 0 0 auto;
    order: 1;
  }

  .navbar-inner nav {
    order: 2;
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    overflow: visible;
  }

  .navbar-inner .nav-toggle {
    order: 3;
    margin-left: auto;
    position: relative;
    z-index: 230;
  }

  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 220;
    width: min(100vw - 2.5rem, 300px);
    height: 100vh;
    max-height: 100dvh;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    gap: 0.35rem;
    transform: translateX(100%);
    transition: transform 0.3s;
    border-left: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
  }
  .nav-links.is-open { transform: translateX(0); }

  .nav-mobile-close-row {
    display: flex !important;
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    width: 100%;
    flex-shrink: 0;
    justify-content: flex-end;
    align-items: center;
  }

  .nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
      rgba(8, 16, 33, 0.85);
    color: #f4fbff;
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  }

  .nav-close:hover {
    border-color: rgba(40, 216, 196, 0.35);
    color: #ffffff;
    background:
      linear-gradient(135deg, rgba(79, 140, 255, 0.18), rgba(40, 216, 196, 0.12)),
      rgba(8, 16, 33, 0.92);
  }

  .nav-close:focus-visible {
    outline: 2px solid rgba(40, 216, 196, 0.55);
    outline-offset: 2px;
  }
  .nav-item-dropdown { position: static; }
  .nav-dropdown {
    position: static;
    transform: none;
    margin-top: 0.5rem;
    margin-left: 1rem;
    min-width: auto;
    overflow: hidden;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
    /* Oculto por defecto también en móvil */
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    transition: max-height 0.28s ease-out, opacity 0.2s ease-out, visibility 0.2s ease-out;
  }
  .nav-item-dropdown.is-open .nav-dropdown {
    opacity: 1;
    visibility: visible;
    max-height: 140px;
    padding: 0.5rem 0;
  }
  .nav-dropdown a { padding: 0.5rem 0; }
  .hero { padding: 4rem 0 3rem; }
  .section { padding: 3.5rem 0; }
}

img[loading="lazy"] { opacity: 0; transition: opacity 0.3s; }
img[loading="lazy"].loaded { opacity: 1; }
