/*
 * ═══════════════════════════════════════════════════════
 * OminiLogic — Enterprise Design System v3.0
 * Glass UI · Gradient Identity · Bento Grid · Noise Overlay
 * WCAG AA · Dark-first · Mobile-first · 2026 Ready
 * ═══════════════════════════════════════════════════════
 */

/* ── VARIABLES ─────────────────────────────────────── */
:root {
  /* Dark Mode (default) */
  --bg-primary: hsl(0, 0%, 3%);       /* #080808 */
  --bg-secondary: hsl(0, 0%, 5%);     /* #0d0d0d */
  --bg-tertiary: hsl(0, 0%, 8%);      /* #151515 */
  --bg-elevated: hsl(0, 0%, 11%);     /* #1c1c1c */
  --text-primary: hsl(0, 0%, 100%);   /* #fff */
  --text-secondary: hsl(0, 0%, 72%);  /* #b8b8b8 — más brillo para footer */
  --text-muted: hsl(0, 0%, 48%);      /* #7a7a7a */
  --border-subtle: hsl(0, 0%, 14%);

  /* Gradiente de Identidad OminiLogic */
  --accent: hsl(43, 87%, 38%);             /* #B8860B */
  --accent-bright: hsl(43, 87%, 48%);      /* #D4A017 */
  --accent-glow: hsla(43, 87%, 38%, 0.4);
  --accent-soft: hsla(43, 87%, 38%, 0.1);
  --gradient-brand: linear-gradient(135deg, #FFD700 0%, #B8860B 50%, #8B6914 100%);
  --gradient-brand-subtle: linear-gradient(135deg, hsla(51, 100%, 50%, 0.3) 0%, hsla(43, 87%, 38%, 0.15) 100%);
  --gradient-text: linear-gradient(90deg, #fff 0%, #a0a0a0 100%);

  /* Glass UI */
  --glass-bg: hsla(0, 0%, 8%, 0.6);
  --glass-border: hsla(0, 0%, 100%, 0.07);
  --glass-blur: blur(16px) saturate(160%);
  --glass-shadow: 0 8px 32px hsla(0, 0%, 0%, 0.3);

  /* Tipografía */
  --font-display: 'Sora', 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Geometría */
  --container-max: 1200px;
  --section-gap: clamp(4rem, 10vw, 8rem);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Movimiento */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 200ms;
  --duration-base: 400ms;
  --duration-slow: 600ms;

  /* Capas */
  --z-canvas: -3;
  --z-nav: 1000;
  --z-overlay: 500;
  --z-toast: 2000;
  --z-noise: 9999;
}

/* ── LIGHT MODE ───────────────────────────────────── */
html.light-mode,
body.light-mode {
  --bg-primary: hsl(0, 0%, 98%);
  --bg-secondary: hsl(0, 0%, 95%);
  --bg-tertiary: hsl(0, 0%, 90%);
  --bg-elevated: hsl(0, 0%, 93%);
  --text-primary: hsl(0, 0%, 5%);
  --text-secondary: hsl(0, 0%, 26%);
  --text-muted: hsl(0, 0%, 45%);
  --border-subtle: hsl(0, 0%, 84%);
  --glass-bg: hsla(0, 0%, 100%, 0.75);
  --glass-border: hsla(0, 0%, 0%, 0.08);
  --glass-shadow: 0 8px 32px hsla(0, 0%, 0%, 0.06);
  --gradient-text: linear-gradient(90deg, #0a0a0a 0%, #4a4a4a 100%);
}

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

/* ── RESET ────────────────────────────────────────── */
*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--duration-slow) var(--ease-out-expo),
              color var(--duration-slow) var(--ease-out-expo);
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input, textarea { font: inherit; }

/* ── NOISE OVERLAY ────────────────────────────────── */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: var(--z-noise);
  pointer-events: none;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  opacity: 0.012;
}

/* ── CANVAS BACKGROUND ────────────────────────────── */
#bg-canvas {
  position: fixed; inset: 0; z-index: var(--z-canvas);
  pointer-events: none;
}

/* ── SKIP LINK ────────────────────────────────────── */
.skip-link {
  position: fixed; top: -100%; left: 1rem; z-index: var(--z-toast);
  padding: 0.75rem 1.25rem; background: var(--gradient-brand); color: #000;
  border-radius: var(--radius-sm); font-weight: 700;
}
.skip-link:focus { top: 1rem; }

/* ── UTILIDADES ──────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ── SCROLL REVEAL ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-premium),
              transform 0.7s var(--ease-premium);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── TIPOGRAFÍA ──────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; }

.section-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--accent-bright); margin-bottom: 0.75rem;
  font-family: var(--font-display);
  background: var(--accent-soft);
  padding: 0.25rem 0.85rem; border-radius: var(--radius-full);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  background: var(--gradient-text);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 3.5rem;
}

.section-header { text-align: center; margin-bottom: 4rem; }
.section-header .section-subtitle { margin-inline: auto; }

/* ── GLASS NAVBAR ────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: var(--z-nav);
  padding-block: 1.25rem;
  transition: padding var(--duration-base) var(--ease-out-expo),
              background var(--duration-base) var(--ease-out-expo);
  background: hsla(0, 0%, 3%, 0.65);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.05);
}
html.light-mode .navbar,
body.light-mode .navbar { background: hsla(0, 0%, 98%, 0.7); }

.nav-container {
  display: flex; align-items: center; justify-content: space-between;
}

.logo {
  display: flex; align-items: center; gap: 8px; text-decoration: none;
  transition: opacity var(--duration-fast);
}
.logo:hover { opacity: 0.85; }
.logo-img { display: block; height: auto; width: 32px; flex-shrink: 0; }
.logo-text {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
  letter-spacing: -0.03em; color: var(--text-primary);
}
.logo-accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  color: var(--text-secondary); font-size: 0.88rem; font-weight: 600; letter-spacing: 0.01em;
  transition: color var(--duration-fast);
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px;
  background: var(--gradient-brand); transition: width var(--duration-base) var(--ease-premium);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.btn-nav {
  border: 1px solid var(--accent) !important;
  padding: 0.45rem 1.25rem; border-radius: var(--radius-full);
  color: var(--accent) !important; font-weight: 600 !important;
  transition: background var(--duration-fast), color var(--duration-fast),
              box-shadow var(--duration-fast) !important;
}
.btn-nav::after { display: none !important; }
.btn-nav:hover, .btn-nav:focus-visible {
  background: var(--gradient-brand); color: #000 !important;
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* Theme Toggle */
.theme-toggle {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; color: var(--text-primary);
  transition: background var(--duration-fast);
}
.theme-toggle:hover { background: var(--bg-tertiary); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
html.light-mode .theme-toggle .icon-sun,
body.light-mode .theme-toggle .icon-sun { display: none; }
html.light-mode .theme-toggle .icon-moon,
body.light-mode .theme-toggle .icon-moon { display: block; }

.hamburger { display: none; }

/* ── HERO ────────────────────────────────────────── */
.hero-section {
  position: relative; height: 100vh; min-height: 600px;
  display: grid; place-items: center; overflow: hidden;
  isolation: isolate;
}
/* Fix A2: Los videos fixed no deben interceptar interacción */
.hero-section .video-container,
.training-section .video-container {
  pointer-events: none;
}
.hero-section .video-container {
  position: fixed; inset: 0; z-index: -1;
}
.video-overlay { pointer-events: none; }
#hero-video, #training-video, .bg-video { pointer-events: none; }
.service-video-wrapper { pointer-events: auto; }

.video-container {
  position: absolute; inset: 0; z-index: -1;
}
.bg-video {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.45;
}
.video-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 25%, var(--bg-primary) 90%);
}
.video-overlay-dark {
  background: radial-gradient(ellipse at 25% center, hsla(0, 0%, 3%, 0.5) 0%, hsla(0, 0%, 3%, 0.85) 65%, hsl(0, 0%, 3%) 100%);
}

.hero-content {
  text-align: center; z-index: 2; max-width: 900px;
  padding-inline: 1rem;
}

.hero-tag {
  display: inline-block; font-family: var(--font-display);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-bright);
  border: 1px solid hsla(43, 87%, 38%, 0.3);
  padding: 0.35rem 1rem; border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  opacity: 0; transform: translateY(20px);
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5.5rem); margin-bottom: 1.25rem;
}
.hero-title .line {
  display: block; opacity: 0; transform: translateY(40px);
}
.hero-title .line-accent {
  background: var(--gradient-brand);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-secondary);
  margin-bottom: 2.5rem; opacity: 0; line-height: 1.7;
}
.hero-highlight { color: var(--accent-bright); font-weight: 600; }

.hero-cta {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  opacity: 0; transform: translateY(20px);
}

.hero-kpis {
  display: flex; gap: 2rem; justify-content: center; margin-top: 3rem;
  opacity: 0; transform: translateY(20px);
}
.hero-kpi {
  text-align: center;
}
.hero-kpi-value {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  background: var(--gradient-brand); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-kpi-label {
  font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Botones */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 2rem; border-radius: var(--radius-full);
  font-weight: 600; font-size: 0.95rem;
  transition: transform var(--duration-fast) var(--ease-out-expo),
              box-shadow var(--duration-fast) var(--ease-out-expo),
              background var(--duration-fast);
}
.btn-primary {
  background: var(--gradient-brand); color: #000;
  border: none; box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.btn-secondary {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--text-muted);
}
.btn-secondary:hover, .btn-secondary:focus-visible {
  border-color: var(--text-primary);
  background: hsl(0 0% 100% / 0.06);
}
.btn-primary:focus-visible, .btn-secondary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

.scroll-indicator {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  color: var(--text-muted); font-size: 0.75rem; letter-spacing: 0.1em;
  text-transform: uppercase; opacity: 0.8;
}
.scroll-line {
  width: 1px; height: 50px; background: var(--text-muted);
  position: relative; overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 40%;
  background: var(--accent);
  animation: scrollPulse 2s infinite;
}
@keyframes scrollPulse {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(250%); }
}

/* D1: Pulso dorado para números de programa */
@keyframes glowPulse {
  0%, 100% { filter: drop-shadow(0 0 6px var(--accent-glow)); }
  50%      { filter: drop-shadow(0 0 18px var(--accent-glow)); }
}

/* ── SECCIONES ───────────────────────────────────── */
section { padding-block: var(--section-gap); position: relative; }
.manifesto-section {
  /* Translúcido: deja ver el hero video fixed detrás */
  background: hsla(0, 0%, 5%, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
html.light-mode .manifesto-section,
body.light-mode .manifesto-section {
  background: hsla(0, 0%, 95%, 0.75);
}
.contact-section { background: var(--bg-secondary); }

/* C1 & C5: Resultados y Planes — reutilizan .values-grid */
.results-section {
  background: hsla(0, 0%, 5%, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
html.light-mode .results-section,
body.light-mode .results-section {
  background: hsla(0, 0%, 95%, 0.7);
}
.results-section strong {
  color: var(--accent-bright); font-weight: 600;
}
.pricing-section .value-card {
  display: flex; flex-direction: column;
}
.pricing-section .btn-primary,
.pricing-section .btn-secondary {
  margin-top: auto;
}

/* ── GLASS CARDS ─────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

/* ── MANIFIESTO ──────────────────────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.value-card {
  position: relative; overflow: hidden;
  padding: 2rem;
  transition: transform var(--duration-base) var(--ease-out-expo),
              border-color var(--duration-base),
              box-shadow var(--duration-base);
}
.value-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(600px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent-soft), transparent 70%);
  opacity: 0; transition: opacity var(--duration-base);
}
.value-card:hover::before { opacity: 1; }
.value-card:hover {
  transform: translateY(-6px);
  border-color: hsl(43 87% 38% / 0.3);
  box-shadow: 0 16px 48px hsla(0, 0%, 0%, 0.4), 0 0 0 1px var(--accent-glow);
}
.value-icon {
  width: 44px; height: 44px; margin-bottom: 1.25rem;
  color: var(--accent); position: relative; z-index: 1;
}
.value-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; position: relative; z-index: 1; }
.value-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; position: relative; z-index: 1; }

/* ── SERVICIOS (BENTO GRID) ──────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}

.service-card {
  position: relative; overflow: hidden; min-height: 360px;
  display: flex; flex-direction: column;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-out-expo),
              box-shadow var(--duration-base);
}
/* Glow cursor-aware en services */
.service-card::before {
  content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit;
  background: radial-gradient(500px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    var(--accent-soft), transparent 60%);
  opacity: 0; transition: opacity var(--duration-base);
  pointer-events: none;
}
.service-card:hover::before { opacity: 1; }
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px hsla(0, 0%, 0%, 0.35), 0 0 0 1px var(--accent-glow);
}
.service-card--main {
  grid-row: 1 / 3;
  min-height: 100%;
  border-color: hsla(43, 87%, 38%, 0.3);
  box-shadow: var(--glass-shadow), 0 0 0 1px var(--accent-glow);
}
.service-card--main::after {
  content: '';
  position: absolute; inset: -1px; z-index: 4; border-radius: inherit;
  background: var(--gradient-brand);
  opacity: 0.15;
  pointer-events: none;
  transition: opacity var(--duration-base);
}
.service-card--main:hover::after { opacity: 0.3; }

/* D4: Badge Flagship */
.flagship-badge {
  position: absolute; top: 1rem; right: 1rem; z-index: 5;
  background: var(--gradient-brand); color: #000;
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem; border-radius: var(--radius-full);
  box-shadow: 0 4px 12px var(--accent-glow);
  font-family: var(--font-display);
}

/* Fix 4: Contenido expandible en service cards */
.service-expand {
  position: relative; z-index: 3;
  max-height: 0; overflow: hidden; opacity: 0;
  padding: 0 2rem;
  transition: max-height 0.55s var(--ease-premium),
              opacity 0.35s var(--ease-premium),
              padding 0.55s var(--ease-premium);
}
.service-expand p {
  color: hsl(0, 0%, 80%); font-size: 0.85rem; line-height: 1.7;
}
.service-card.expanded .service-expand {
  max-height: 250px; opacity: 1;
  padding: 0 2rem 1.5rem 2rem;
}
.service-card.expanded .service-overlay {
  opacity: 0.15;
}
.service-card .service-content::after {
  content: '··· Saber más';
  display: block; font-size: 0.7rem; color: var(--accent-bright);
  margin-top: 0.75rem; letter-spacing: 0.05em; font-weight: 600;
  transition: opacity var(--duration-fast);
}
.service-card.expanded .service-content::after {
  content: '··· Contraer';
}

.service-video-wrapper {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background: var(--bg-tertiary);
}
.service-video {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.28; transition: opacity 0.6s ease, transform 0.6s ease;
}
.service-card:hover .service-video { opacity: 0.55; transform: scale(1.04); }

.service-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, var(--bg-elevated) 0%, transparent 50%);
}

.service-content {
  position: relative; z-index: 3; margin-top: auto;
  padding: 2rem;
}
.service-content h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.service-content p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1rem; line-height: 1.6; }

.tech-list {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.tech-list li {
  font-size: 0.72rem; background: hsl(0 0% 100% / 0.08);
  padding: 0.2rem 0.6rem; border-radius: var(--radius-full);
  color: var(--text-secondary); letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.service-poster-placeholder {
  position: absolute; inset: 0; z-index: -1;
  display: grid; place-items: center;
  background: var(--bg-elevated);
}
.service-poster-placeholder svg {
  width: 56px; height: 56px; color: var(--text-muted); opacity: 0.35;
}

/* ── STACK TECNOLÓGICO ───────────────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  padding: 2.5rem;
}
.tech-category h4 {
  color: var(--accent-bright); margin-bottom: 1rem; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.12em; font-family: var(--font-display);
}
.tech-items { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tech-badge {
  background: var(--bg-secondary); padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm); font-size: 0.83rem;
  border: 1px solid var(--border-subtle);
  transition: border-color var(--duration-fast), color var(--duration-fast),
              transform var(--duration-fast), box-shadow var(--duration-fast);
}
.tech-badge:hover {
  border-color: var(--accent); color: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--accent-soft);
}

/* ── CAPACITACIÓN ────────────────────────────────── */
.training-section {
  position: relative; min-height: 100vh;
  display: grid; place-items: center;
  /* A4: isolation + overflow movidos a .video-container */
}
.training-section .video-container {
  z-index: -2;
  position: fixed; inset: 0;
  isolation: isolate;
  overflow: hidden;
  pointer-events: none;
  opacity: 0; /* Fix 1: oculto al inicio, se muestra en Consultoría */
}
.training-section .bg-video {
  opacity: 0.55; /* A1: más visible que el hero (0.45) */
}
.training-section .video-overlay {
  background: radial-gradient(ellipse at 25% center, hsla(0, 0%, 3%, 0.4) 0%, hsla(0, 0%, 3%, 0.55) 55%, hsl(0, 0%, 3%) 100%);
}

/* D3: Light mode — overlay más claro pero mantiene la atmósfera */
html.light-mode .training-section .video-overlay,
body.light-mode .training-section .video-overlay {
  background: radial-gradient(ellipse at 25% center, hsla(0, 0%, 95%, 0.5) 0%, hsla(0, 0%, 95%, 0.7) 55%, hsl(0, 0%, 93%) 100%);
}

.training-content { position: relative; z-index: 1; width: 100%; }
.training-inner {
  max-width: 700px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.4);
}
/* Light mode: sin sombra, texto oscuro */
html.light-mode .training-inner,
body.light-mode .training-inner {
  text-shadow: none;
}
html.light-mode .training-inner .section-title,
body.light-mode .training-inner .section-title {
  color: hsl(0, 0%, 5%); -webkit-text-fill-color: hsl(0, 0%, 5%);
}
html.light-mode .training-inner .section-subtitle,
body.light-mode .training-inner .section-subtitle { color: hsl(0, 0%, 28%); }
html.light-mode .training-inner .program-item h4,
body.light-mode .training-inner .program-item h4 { color: hsl(0, 0%, 5%); }
html.light-mode .training-inner .program-item p,
body.light-mode .training-inner .program-item p { color: hsl(0, 0%, 32%); }
/* A2: colores migrados a variables de tema con fallback para overlay oscuro */
.training-inner .section-title {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
  background: none;
}
.training-inner .section-tag { color: var(--accent-bright); }
.training-inner .section-subtitle { color: var(--text-secondary); }
.training-inner .program-item h4 { color: var(--text-primary); }
.training-inner .program-item p { color: var(--text-secondary); }
.training-inner .btn-primary {
  color: #000; /* botón dorado siempre texto negro */
}
.training-inner .program-num {
  background: var(--gradient-brand); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  text-shadow: 0 0 24px var(--accent-glow);
  animation: glowPulse 2.8s ease-in-out infinite;
}

.programs-list { margin-block: 2.5rem; }
.program-item {
  display: flex; gap: 1.5rem; padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.program-num {
  font-family: var(--font-display); font-size: 1.75rem;
  font-weight: 700; min-width: 50px; line-height: 1;
}
.program-item h4 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.program-item p { font-size: 0.9rem; }

/* ── CONTACTO ────────────────────────────────────── */
.contact-wrapper {
  padding: 3.5rem 3rem;
  max-width: 650px;
  margin-inline: auto;
}
.detail-item { margin-bottom: 1.5rem; }
.detail-item .label {
  display: block; color: var(--text-muted); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem;
}
.detail-item a, .detail-item span { font-size: 1.05rem; color: var(--text-primary); }

.contact-form { display: flex; flex-direction: column; gap: 0.7rem; position: relative; z-index: 1; }

/* Sentinel-style glass pill inputs */
.form-glass-row {
  position: relative;
}
.form-glass-row input,
.form-glass-row textarea {
  width: 100%; padding: 0.9rem 1.2rem;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem; font-family: var(--font-body);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
}
.form-glass-row textarea {
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 80px;
}
.form-glass-row input::placeholder,
.form-glass-row textarea::placeholder {
  color: var(--text-muted);
}
.form-glass-row input:focus,
.form-glass-row textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-glass-row input:user-invalid,
.form-glass-row textarea:user-invalid {
  border-color: hsl(0 70% 50%);
}
.form-error {
  color: hsl(0 70% 55%); font-size: 0.75rem; margin-top: 0.15rem;
  display: block; padding-left: 0.5rem;
}

/* Botón submit estilo Sentinel */
.btn-glass-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.85rem 1.6rem; border-radius: var(--radius-full);
  background: var(--gradient-brand); color: #000;
  border: none; font-weight: 700; font-size: 0.92rem;
  font-family: var(--font-display);
  cursor: pointer;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
  box-shadow: 0 6px 24px var(--accent-glow);
  margin-top: 0.5rem;
}
.btn-glass-submit:hover, .btn-glass-submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px var(--accent-glow);
}
.btn-glass-submit:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Hint debajo del form (estilo Sentinel) */
.form-hint {
  color: var(--text-muted); text-align: right;
  font-size: 0.7rem; letter-spacing: 0.02em;
  margin-top: 0.3rem;
}

/* ── FOOTER ──────────────────────────────────────── */
.footer {
  background: var(--bg-primary); padding-block: 4rem 2rem;
  border-top: 1px solid var(--border-subtle);
  position: relative; z-index: 1;
}
/* Capa sutil detrás del texto para reforzar contraste */
.footer::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, hsla(0,0%,100%,0.015) 0%, hsla(0,0%,100%,0.03) 100%);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem; margin-bottom: 2.5rem; position: relative; z-index: 1;
}

.footer-brand p {
  color: hsl(0, 0%, 78%); margin-top: 0.75rem;
  font-size: 0.9rem; font-weight: 500; max-width: 300px; line-height: 1.7;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.footer-brand .logo { 
  font-size: 1.25rem; color: hsl(0, 0%, 92%);
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.footer-links h4, .footer-social h4 {
  margin-bottom: 1rem; font-size: 0.8rem; font-weight: 700;
  color: hsl(0, 0%, 88%); letter-spacing: 0.05em;
  font-family: var(--font-display); text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.footer-links a {
  display: block; color: hsl(0, 0%, 76%); font-size: 0.9rem; font-weight: 600;
  margin-bottom: 0.6rem; line-height: 1.8; transition: color var(--duration-fast);
  text-shadow: 0 1px 1px rgba(0,0,0,0.35);
}
.footer-links a:hover, .footer-links a:focus-visible { color: var(--accent-bright); }

.social-icons { display: flex; gap: 0.75rem; }
.social-icons a {
  width: 40px; height: 40px; border-radius: 50%;
  background: hsla(0,0%,100%,0.06); display: grid; place-items: center;
  color: hsl(0, 0%, 76%); font-weight: 700; font-size: 0.78rem;
  transition: background var(--duration-fast), color var(--duration-fast), box-shadow var(--duration-fast);
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}
.social-icons a:hover, .social-icons a:focus-visible {
  background: var(--gradient-brand); color: #000; text-shadow: none;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.footer-bottom {
  text-align: center; padding-top: 1.5rem; position: relative; z-index: 1;
  border-top: 1px solid var(--border-subtle);
  color: hsl(0, 0%, 62%); font-size: 0.8rem; font-weight: 500;
}

/* Light mode */
html.light-mode .footer::before,
body.light-mode .footer::before { background: linear-gradient(180deg, hsla(0,0%,0%,0.02) 0%, hsla(0,0%,0%,0.04) 100%); }
html.light-mode .footer-brand p,
body.light-mode .footer-brand p { color: hsl(0, 0%, 18%); text-shadow: none; }
html.light-mode .footer-brand .logo,
body.light-mode .footer-brand .logo { color: hsl(0, 0%, 4%); text-shadow: none; }
html.light-mode .footer-links h4,
html.light-mode .footer-social h4,
body.light-mode .footer-links h4,
body.light-mode .footer-social h4 { color: hsl(0, 0%, 10%); text-shadow: none; }
html.light-mode .footer-links a,
body.light-mode .footer-links a { color: hsl(0, 0%, 22%); text-shadow: none; }
html.light-mode .social-icons a,
body.light-mode .social-icons a { background: hsla(0,0%,0%,0.04); color: hsl(0, 0%, 22%); text-shadow: none; }
html.light-mode .footer-bottom,
body.light-mode .footer-bottom { color: hsl(0, 0%, 32%); }

/* ── AI CHAT v2 — NEURAL ORB ──────────────────────── */
/* Edge Glow */
@supports (background: conic-gradient(from 0deg, red, blue)) {
.ai-edge-glow {
  position: fixed; inset: -4px; z-index: 2498; pointer-events: none;
  border-radius: 6px; opacity: 0; transition: opacity 0.4s ease;
}
.ai-edge-glow::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 4px;
  background: conic-gradient(from var(--angle, 0deg),
    hsl(43, 87%, 38%), hsl(51, 100%, 55%), hsl(43, 87%, 38%),
    hsl(51, 100%, 55%), hsl(43, 87%, 38%));
  -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;
  filter: blur(14px); opacity: 0.6;
}
.ai-edge-glow::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 3px;
  background: conic-gradient(from var(--angle, 0deg),
    hsl(43, 87%, 38%), hsl(51, 100%, 55%), hsl(43, 87%, 38%),
    hsl(51, 100%, 55%), hsl(43, 87%, 38%));
  -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;
  filter: blur(0); opacity: 0.8;
}
.ai-edge-glow.active { opacity: 1; }
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes aiGlowSpin { to { --angle: 360deg; } }
.ai-edge-glow.active::before,
.ai-edge-glow.active::after { animation: aiGlowSpin 3s linear infinite; }
}

/* ═══════════════ QUANTUM AURORA ORB ═══════════════ */
.ai-orb-wrap {
  position: fixed; bottom: 28px; right: 28px;
  width: 72px; height: 72px; border-radius: 50%; border: none; padding: 0;
  cursor: pointer; z-index: 9999; overflow: hidden;
  background: radial-gradient(circle at 30% 30%, #1a1405, #0a0805);
  box-shadow: 0 0 0 1px rgba(218,165,32,0.2), 0 8px 32px rgba(184,134,11,0.3), 0 0 60px rgba(218,165,32,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s ease;
  animation: orbFloat 3s ease-in-out infinite;
  isolation: isolate;
}
@keyframes orbFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }
.ai-orb-wrap::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255,215,0,0.4) 60deg, transparent 120deg, rgba(218,165,32,0.3) 200deg, transparent 280deg, rgba(255,215,0,0.4) 340deg, transparent 360deg);
  animation: orbRotate 8s linear infinite; z-index: -1; filter: blur(8px); opacity: 0.7;
}
@keyframes orbRotate { to { transform: rotate(360deg); } }
.ai-orb-wrap:hover { transform: scale(1.08); box-shadow: 0 0 0 1px rgba(218,165,32,0.4), 0 12px 40px rgba(184,134,11,0.5), 0 0 80px rgba(218,165,32,0.3), inset 0 1px 0 rgba(255,255,255,0.2); }
.ai-orb-wrap:hover::before { opacity: 1; animation-duration: 3s; }
.ai-orb-wrap:active { transform: scale(0.95); }
#ai-orb-canvas { width: 100%; height: 100%; display: block; border-radius: 50%; }

.orb-state-ring { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; pointer-events: none; transition: all 0.4s ease; }
.ai-orb-wrap[data-state="listening"] .orb-state-ring { border-color: rgba(74,222,128,0.6); box-shadow: 0 0 20px rgba(74,222,128,0.4); animation: statePulse 1.5s ease-in-out infinite; }
.ai-orb-wrap[data-state="speaking"] .orb-state-ring { border-color: rgba(255,215,0,0.8); box-shadow: 0 0 25px rgba(255,215,0,0.5); animation: statePulse 0.8s ease-in-out infinite; }
.ai-orb-wrap[data-state="thinking"] .orb-state-ring { border-color: rgba(245,158,11,0.7); box-shadow: 0 0 20px rgba(245,158,11,0.4); animation: statePulse 1.2s ease-in-out infinite; }
@keyframes statePulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.15);opacity:0.6} }
@media (max-width:768px){ .ai-orb-wrap{width:60px;height:60px;bottom:20px;right:20px;} }

/* Panel */
.ai-chat-panel {
  position: fixed; bottom: 5.4rem; right: 1.5rem; z-index: 2501;
  width: 380px; max-height: 520px;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px hsla(0,0%,0%,0.5), 0 0 0 1px var(--accent-glow);
  display: flex; flex-direction: column; overflow: hidden;
  transform: scale(0.2) translateY(40px); opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
  pointer-events: none;
}
.ai-chat-panel::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: linear-gradient(135deg, hsla(43,87%,38%,0.5), hsla(51,100%,55%,0.3), hsla(43,87%,38%,0.5));
  -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; animation: borderShift 4s linear infinite;
}
@keyframes borderShift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(15deg); }
}
.ai-chat-panel.open {
  transform: scale(1) translateY(0); opacity: 1; pointer-events: auto;
}
.ai-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 600;
  color: var(--text-primary); flex-shrink: 0;
  background: linear-gradient(180deg, hsla(0,0%,100%,0.03), transparent);
}
.ai-chat-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.3rem; cursor: pointer; line-height: 1;
  transition: color var(--duration-fast);
}
.ai-chat-close:hover { color: var(--text-primary); }
.ai-chat-body {
  flex: 1; overflow-y: auto; padding: 1rem 1.2rem;
  display: flex; flex-direction: column; gap: 0.8rem;
}
.ai-chat-msg {
  max-width: 85%; padding: 0.65rem 0.9rem; font-size: 0.83rem;
  line-height: 1.5; border-radius: 16px 16px 16px 4px;
  align-self: flex-start;
  background: var(--bg-tertiary); color: var(--text-primary);
  animation: msgIn 0.35s var(--ease-premium);
}
.ai-chat-msg.user {
  align-self: flex-end; border-radius: 16px 16px 4px 16px;
  background: var(--accent-soft); color: var(--text-primary);
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.stream-cursor {
  display: inline-block; width: 2px; height: 1em;
  background: var(--accent-bright); margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursorBlink 0.8s ease-in-out infinite;
}
@keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
/* Links en mensajes */
.ai-chat-msg a { color: var(--accent-bright); text-decoration: none; font-weight: 500; border-bottom: 1px solid currentColor; }
.ai-chat-msg a:hover { opacity: 0.7; }
.ai-chat-msg strong, .ai-chat-msg b { color: var(--text-primary); font-weight: 600; }
.ai-chat-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ai-chat-chips button {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: var(--text-secondary); font-size: 0.76rem; font-weight: 500;
  padding: 0.35rem 0.8rem; border-radius: var(--radius-full);
  cursor: pointer; transition: all var(--duration-fast);
}
.ai-chat-chips button:hover {
  border-color: var(--accent); color: var(--accent-bright);
  background: var(--accent-soft); transform: translateY(-1px);
}
.ai-typing { display: flex; gap: 4px; padding: 0.4rem 0; }
.ai-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright);
  animation: typingBounce 1.2s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}
.ai-chat-input-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem; border-top: 1px solid var(--border-subtle); flex-shrink: 0;
}
.ai-chat-input-row input {
  flex: 1; padding: 0.55rem 0.9rem; border-radius: var(--radius-full);
  background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
  color: var(--text-primary); font-size: 0.83rem; outline: none;
  transition: border-color var(--duration-fast);
}
.ai-chat-input-row input:focus { border-color: var(--accent); }
.ai-chat-input-row button {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gradient-brand); border: none; color: #000;
  display: grid; place-items: center; cursor: pointer;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}
.ai-chat-input-row button:hover { transform: scale(1.1); box-shadow: 0 4px 12px var(--accent-glow); }
@media (max-width: 768px) {
  .ai-chat-panel { inset: 0; width: auto; max-height: none; border-radius: 0; bottom: 0; right: 0; }
  .ai-orb-wrap { bottom: 0.8rem; right: 0.8rem; }
}

/* ── TOAST ───────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: var(--z-toast);
  display: flex; flex-direction: column; gap: 0.75rem; pointer-events: none;
}
.toast {
  background: var(--glass-bg); color: var(--text-primary);
  padding: 0.9rem 1.25rem; border-radius: var(--radius-sm);
  border-left: 4px solid var(--accent);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 12px 32px hsl(0 0% 0% / 0.5);
  display: flex; align-items: center; gap: 0.6rem;
  min-width: 280px; font-size: 0.9rem;
  animation: toastIn var(--duration-base) var(--ease-out-expo) forwards;
  pointer-events: auto;
}
.toast.toast-error { border-left-color: hsl(0 70% 50%); }
.toast.toast-exit {
  opacity: 0; transform: translateX(100%);
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ── LIVE DOT ────────────────────────────────────── */
.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: hsl(140, 60%, 45%); margin-right: 0.4rem;
  animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card--main { grid-row: auto; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: grid; place-items: center; }

  .hero-title { font-size: clamp(2rem, 8vw, 3rem); }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-kpis { gap: 0.75rem; flex-wrap: wrap; }
  .hero-kpi-value { font-size: 1.2rem; }

  .contact-wrapper, .footer-grid { grid-template-columns: 1fr; }
  .contact-wrapper { padding: 1.5rem; }
  .contact-details { flex-direction: column; gap: 1rem; text-align: center; }

  .tech-grid { grid-template-columns: 1fr; padding: 1.5rem; gap: 1.5rem; }

  .values-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 300px; }
  .service-card--main { grid-row: auto; }

  section { padding-block: 3rem; }
  .scroll-indicator { display: none; }

  .training-inner { padding: 0 1rem; }
  .program-item { gap: 1rem; }
  .program-num { font-size: 1.4rem; min-width: 40px; }

  .footer-grid { gap: 1.5rem; }
  .footer-brand p { max-width: 100%; }
  .social-icons { justify-content: flex-start; }

  .ai-chat-panel { inset: 0; width: auto; max-height: none; border-radius: 0; bottom: 0; right: 0; }
}

/* ── MODAL FLOTANTE (C4) ──────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: hsla(0, 0%, 3%, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center;
  padding: 1.5rem;
  animation: modalFadeIn 0.3s var(--ease-out-expo);
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px hsla(0, 0%, 0%, 0.5), 0 0 0 1px var(--accent-glow);
  padding: 2.5rem;
  max-width: 500px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: modalSlideUp 0.4s var(--ease-premium);
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute; top: 1rem; right: 1.2rem;
  font-size: 1.6rem; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  line-height: 1; transition: color var(--duration-fast);
  z-index: 2;
}
.modal-close:hover { color: var(--text-primary); }
.modal-glass .contact-form { gap: 0.6rem; }
.modal-glass .btn-glass-submit { margin-top: 0.3rem; }

/* Prevenir scroll del body con modal abierto */
body.modal-open { overflow: hidden; }

/* ── FOCUS VISIBLE (WCAG) ────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }
