/* ============================================================
   NueveLabs — Design System & Styles
   Modern, elegant, lightweight. Light/Dark themes.
   ============================================================ */

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
h1, h2, h3, h4, h5, h6 { line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---- TOKENS: LIGHT THEME (default) ---- */
:root {
  /* Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fc;
  --bg-tertiary: #f0f2f8;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f6fa;
  --bg-inverse: #0a0a14;
  --bg-code: #f3f4f8;

  /* Text */
  --text-primary: #0a0a1a;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a0;
  --text-inverse: #f0f0f5;
  --text-on-accent: #ffffff;

  /* Accent */
  --accent-primary: #2563eb;
  --accent-primary-hover: #1d4ed8;
  --accent-secondary: #7c3aed;
  --accent-glow: rgba(37, 99, 235, 0.15);
  --accent-success: #16a34a;
  --accent-warning: #d97706;
  --accent-danger: #dc2626;

  /* Product Colors */
  --color-puntoal: #2563eb;
  --color-orbitra: #ea580c;
  --color-ablogy: #7c3aed;

  /* Borders & Shadows */
  --border-color: #e5e7ee;
  --border-hover: #2563eb;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);

  /* Nav */
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-border: rgba(229, 231, 238, 0.8);
  --nav-pill-bg: rgba(243, 244, 246, 0.95);
  --nav-pill-border: rgba(229, 231, 238, 0.6);

  /* Gradient */
  --gradient-text: linear-gradient(135deg, #2563eb, #7c3aed);
  --gradient-hero: radial-gradient(ellipse at 20% 50%, rgba(37, 99, 235, 0.08), transparent 50%),
                   radial-gradient(ellipse at 80% 20%, rgba(124, 58, 237, 0.06), transparent 50%);
  --gradient-cta: linear-gradient(135deg, #2563eb, #7c3aed);
  --gradient-card-border: linear-gradient(135deg, var(--border-color), transparent);

  /* Grid dots */
  --dot-color: rgba(0, 0, 0, 0.06);

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Clash Display', 'Inter', system-ui, sans-serif;
  --font-mono: 'Google Sans Code', 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: clamp(1.75rem, 3vw, 2rem);
  --text-4xl: clamp(2rem, 4vw, 2.75rem);
  --text-5xl: clamp(2.5rem, 5vw, 3.5rem);
  --text-6xl: clamp(3rem, 6vw, 4.5rem);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-theme: 350ms ease;
}

/* ---- TOKENS: DARK THEME ---- */
[data-theme="dark"] {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #16161f;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-inverse: #f0f0f5;
  --bg-code: #1c1c28;

  --text-primary: #f0f0f5;
  --text-secondary: #a0a0b8;
  --text-muted: #5a5a72;
  --text-inverse: #0a0a1a;

  --accent-primary: #3b82f6;
  --accent-primary-hover: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.2);

  --border-color: #222233;
  --border-hover: #3b82f6;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.5);

  --nav-bg: rgba(10, 10, 15, 0.85);
  --nav-border: rgba(34, 34, 51, 0.8);
  --nav-pill-bg: rgba(25, 25, 40, 0.95);
  --nav-pill-border: rgba(50, 50, 70, 0.5);

  --gradient-hero: radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.12), transparent 50%),
                   radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.08), transparent 50%);

  --dot-color: rgba(255, 255, 255, 0.04);
}

/* ---- BASE ---- */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-theme), color var(--transition-theme);
}

::selection {
  background: var(--accent-primary);
  color: var(--text-on-accent);
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 600;
}

h1 { font-size: var(--text-6xl); letter-spacing: -0.03em; }
h2 { font-size: var(--text-5xl); letter-spacing: -0.025em; }
h3 { font-size: var(--text-3xl); letter-spacing: -0.02em; }
h4 { font-size: var(--text-2xl); letter-spacing: -0.015em; }

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

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-balance { text-wrap: balance; }

.lead {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
}

/* ---- LAYOUT ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-narrow {
  max-width: 800px;
}

.container-wide {
  max-width: 1400px;
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.section-sm { padding: var(--space-4xl) 0; }
.section-alt { background-color: var(--bg-secondary); }

.section-header {
  text-align: center;
  margin-bottom: var(--space-4xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.section-header .overline {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-top: var(--space-md);
  line-height: 1.7;
}

.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ---- NAVIGATION ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: all var(--transition-base);
}

.nav.scrolled {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  padding: var(--space-sm) 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.nav-logo svg,
.nav-logo img {
  height: 44px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--nav-pill-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--nav-pill-border);
  border-radius: var(--radius-full);
  padding: var(--space-xs) var(--space-sm);
}

.nav-links > a,
.nav-dropdown-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-links > a:hover,
.nav-dropdown:hover .nav-dropdown-toggle {
  background: var(--bg-card-hover);
}

.nav-links > a.active,
.nav-dropdown.active .nav-dropdown-toggle {
  background: #0dffbf;
  box-shadow: var(--shadow-sm);
  color: #1a1a1a;
  font-weight: 600;
}

.nav-links > a.active .nav-link-icon,
.nav-dropdown.active .nav-link-icon {
  color: #fff;
}

.nav-links > a.active .nav-link-label,
.nav-dropdown.active .nav-link-label {
  color: #fff;
}

.nav-links a {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

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

.nav-link-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nav-links > a:hover .nav-link-icon,
.nav-dropdown:hover .nav-link-icon {
  color: var(--accent-primary);
}

.nav-link-label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Nav Dropdown (Servicios submenu) */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  cursor: pointer;
}

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

.nav-dropdown-toggle .chevron-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
  color: var(--text-muted);
}

.nav-dropdown:hover .nav-dropdown-toggle .chevron-icon {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--nav-pill-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--nav-pill-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 100;
  overflow: hidden;
  padding: var(--space-xs) var(--space-sm);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-xs);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary) !important;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border-radius: var(--radius-full);
}

.nav-dropdown-menu a:hover {
  background: var(--bg-card);
  box-shadow: var(--shadow-xs);
  color: var(--text-primary) !important;
}

.nav-dropdown-menu a:hover .nav-link-icon {
  color: var(--accent-primary);
}

/* Language Dropdown */
.lang-dropdown {
  position: relative;
}

.lang-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.lang-dropdown-toggle:hover {
  border-color: var(--border-hover);
}

.lang-dropdown-toggle .globe-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--accent-primary);
}

.lang-dropdown-toggle .chevron-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.lang-dropdown.open .chevron-icon {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--nav-pill-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--nav-pill-border);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
  z-index: 100;
  overflow: hidden;
  padding: var(--space-xs) var(--space-sm);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-xs);
}

.lang-dropdown.open .lang-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.lang-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.lang-option:hover {
  background: var(--bg-card);
  box-shadow: var(--shadow-xs);
  color: var(--text-primary);
}

.lang-option .nav-link-icon {
  color: var(--text-muted);
}

.lang-option:hover .nav-link-icon {
  color: var(--accent-primary);
}

.lang-option.active {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.lang-option.active .nav-link-icon {
  color: var(--accent-primary);
}

.lang-flag {
  font-size: 1.1em;
  line-height: 1;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* Theme toggle icon visibility */
[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

.nav-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-primary);
}

.nav-mobile-toggle svg { width: 24px; height: 24px; }

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg-primary);
  padding: 5rem var(--space-xl) var(--space-xl);
  flex-direction: column;
  gap: var(--space-lg);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.mobile-menu.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu a {
  font-size: var(--text-xl);
  font-weight: 500;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

/* Mobile Submenu */
.mobile-submenu {
  border-bottom: 1px solid var(--border-color);
}

.mobile-submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-sm) 0;
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.mobile-submenu-toggle .chevron-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.mobile-submenu.open .mobile-submenu-toggle .chevron-icon {
  transform: rotate(180deg);
}

.mobile-submenu-items {
  display: none;
  flex-direction: column;
  padding-left: var(--space-lg);
  padding-bottom: var(--space-sm);
}

.mobile-submenu.open .mobile-submenu-items {
  display: flex;
}

.mobile-submenu-items a {
  font-size: var(--text-lg) !important;
  color: var(--text-secondary);
  border-bottom: none !important;
  padding: var(--space-xs) 0 !important;
}

.mobile-submenu-items a:hover {
  color: var(--text-primary);
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.75rem;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: #05ce90;
  color: #1a1a1a;
  box-shadow: 0 2px 12px rgba(5, 206, 144, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(5, 206, 144, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-xs);
  border-radius: var(--radius-full);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ---- BADGES ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.2rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.badge-active {
  background: rgba(22, 163, 74, 0.1);
  color: var(--accent-success);
}

.badge-dev {
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent-warning);
}

.badge-blue {
  background: var(--accent-glow);
  color: var(--accent-primary);
}

/* ---- HERO SECTION ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 0 var(--space-5xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--dot-color) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 0;
}

#matrix-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 850px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: var(--space-xl);
}

.hero .lead {
  margin: 0 auto var(--space-2xl);
  max-width: 600px;
  font-size: var(--text-xl);
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-success);
  animation: pulse-dot 2s ease infinite;
}

/* Force light text on dark Matrix background in both themes */
.hero h1 {
  color: #fff;
}
.hero .lead {
  color: rgba(255, 255, 255, 0.7);
}
.hero .hero-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}
.hero .btn-secondary {
  background: transparent;
  color: #05ce90;
  border: 1px solid #05ce90;
}
.hero .btn-secondary:hover {
  background: rgba(5, 206, 144, 0.15);
  border-color: #05ce90;
}

/* ---- TYPEWRITER EFFECT ---- */
.typewriter {
  display: block;
  font-family: 'Google Sans Code', var(--font-mono);
  font-size: 0.85em;
  min-height: 1.2em;
  white-space: nowrap;
  color: #0dffbf;
  -webkit-text-fill-color: #0dffbf;
}

.typewriter::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.9em;
  background: #0dffbf;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---- WHAT WE DO SECTION ---- */
.what-we-do-card {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.what-we-do-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.what-we-do-card .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--accent-glow);
  color: var(--accent-primary);
}

.what-we-do-card .icon svg {
  width: 28px;
  height: 28px;
}

.what-we-do-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}

.what-we-do-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* ---- PRODUCT CARDS ---- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.product-card {
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--product-color, var(--accent-primary));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.product-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

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

.product-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: var(--product-color, var(--accent-primary));
  background: color-mix(in srgb, var(--product-color, var(--accent-primary)) 12%, transparent);
}

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

.product-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-xs);
}

.product-card .tagline {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.product-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
  flex: 1;
}

.product-card .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
}

.product-card .card-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: gap var(--transition-fast);
}

.product-card .card-link:hover {
  gap: var(--space-sm);
}

.product-card .card-link svg {
  width: 16px;
  height: 16px;
}

/* ---- SERVICES SECTION ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.service-card {
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.service-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.service-card .service-number {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--accent-glow);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.service-card h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
}

.service-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.service-card ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.service-card li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding-left: var(--space-lg);
  position: relative;
}

.service-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
}

/* Featured service card (CTO) */
.service-card.featured {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-primary) 5%, var(--bg-card)), var(--bg-card));
  position: relative;
}

.service-card.featured::after {
  content: 'Destacado';
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
  color: var(--text-on-accent);
}

[lang="en"] .service-card.featured::after {
  content: 'Featured';
}

/* ---- CTO HIGHLIGHT SECTION ---- */
.cto-section {
  background: #0a0a14 !important;
  color: #f0f0f5;
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .cto-section {
  background: #0a0a14 !important;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cto-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(59, 130, 246, 0.15), transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(124, 58, 237, 0.1), transparent 50%);
}

.cto-content {
  position: relative;
  z-index: 1;
}

.cto-section h2 {
  color: #f0f0f5;
}

[data-theme="dark"] .cto-section h2 {
  color: #f0f0f5;
}

.cto-section .lead {
  color: rgba(240, 240, 245, 0.85);
  max-width: 700px;
}

[data-theme="dark"] .cto-section .lead {
  color: rgba(240, 240, 245, 0.85);
}

.cto-section .section-header p {
  color: rgba(240, 240, 245, 0.85);
}

[data-theme="dark"] .cto-section .section-header p {
  color: rgba(240, 240, 245, 0.85);
}

.cto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: start;
  margin-top: var(--space-3xl);
}

.cto-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  max-width: 900px;
  margin: 0 auto;
}

.cto-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.cto-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-primary);
}

.cto-section .cto-feature {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.cto-section .cto-feature:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .cto-feature {
  border-color: var(--border-color);
  background: var(--bg-card);
}

[data-theme="dark"] .cto-feature:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-primary);
}

[data-theme="dark"] .cto-section .cto-feature {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .cto-section .cto-feature:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.5);
}

.cto-feature .check {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent-success);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cto-feature .check svg {
  width: 18px;
  height: 18px;
}

.cto-feature span:not(.check) {
  font-size: var(--text-base);
  line-height: 1.5;
  font-weight: 500;
  color: var(--text-primary);
}

.cto-section .cto-feature span:not(.check) {
  color: rgba(240, 240, 245, 0.95);
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.cto-section .comparison-table {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .comparison-table {
  border-color: var(--border-color);
  background: var(--bg-card);
}

.cto-section[data-theme="dark"] .comparison-table,
[data-theme="dark"] .cto-section .comparison-table {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border-color);
}

.cto-section .comparison-table th,
.cto-section .comparison-table td {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .comparison-table th,
[data-theme="dark"] .comparison-table td {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .cto-section .comparison-table th,
[data-theme="dark"] .cto-section .comparison-table td {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.comparison-table thead th {
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding-bottom: var(--space-md);
}

.cto-section .comparison-table thead th {
  color: rgba(240, 240, 245, 0.8);
}

[data-theme="dark"] .comparison-table thead th {
  color: var(--text-muted);
}

[data-theme="dark"] .cto-section .comparison-table thead th {
  color: rgba(240, 240, 245, 0.8);
}

.comparison-table td:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.cto-section .comparison-table td:first-child {
  color: rgba(240, 240, 245, 0.9);
}

[data-theme="dark"] .comparison-table td:first-child {
  color: var(--text-secondary);
}

[data-theme="dark"] .cto-section .comparison-table td:first-child {
  color: rgba(240, 240, 245, 0.9);
}

.comparison-table .highlight {
  color: var(--accent-primary);
  font-weight: 600;
}

.comparison-table .dim {
  color: var(--text-muted);
}

.cto-section .comparison-table .dim {
  color: rgba(240, 240, 245, 0.65);
}

[data-theme="dark"] .comparison-table .dim {
  color: var(--text-muted);
}

[data-theme="dark"] .cto-section .comparison-table .dim {
  color: rgba(240, 240, 245, 0.65);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

/* ---- CASE STUDIES ---- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.case-card {
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all var(--transition-base);
}

.case-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.case-card .case-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.case-card .case-icon svg {
  width: 20px;
  height: 20px;
}

.case-card h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-md);
}

.case-card .case-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.case-card .metric {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

.case-card .metric-value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--accent-primary);
}

.case-card .metric-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ---- FAQ ---- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.faq-item {
  position: relative;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.25s ease;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item[open] {
  background: var(--bg-secondary);
}

.faq-question {
  padding: var(--space-lg) var(--space-xl);
  font-weight: 500;
  font-size: var(--text-base);
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: color 0.25s ease, background 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

/* Arrow icon */
.faq-question::after {
  content: '';
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  background-color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(180deg);
  background-color: var(--accent-primary);
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-question:hover::after {
  background-color: var(--accent-primary);
}

/* Answer */
.faq-answer {
  padding: 0 var(--space-xl) var(--space-xl);
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: var(--text-sm);
  animation: faq-fade-in 0.25s ease;
}

@keyframes faq-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.faq-answer p {
  margin: 0;
}

.faq-answer a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.faq-answer a:hover {
  border-bottom-color: var(--accent-primary);
}

/* Category labels */
.faq-category {
  max-width: 800px;
  margin: 0 auto;
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
}

.faq-category:first-child {
  margin-top: 0;
}

.faq-category-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: 'Google Sans Code', var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faq-category-label::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 2px;
  background: var(--gradient-text);
  border-radius: 1px;
}

/* ---- TECH STACK ---- */
.tech-categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.tech-category h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tech-category h3::before {
  content: '';
  width: 3px;
  height: 1.2em;
  border-radius: var(--radius-full);
  background: var(--accent-primary);
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.tech-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: default;
}

.tech-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.tech-item svg,
.tech-item img {
  width: 20px;
  height: 20px;
}

/* ---- CONTACT SECTION ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: start;
}

.contact-info h2 {
  margin-bottom: var(--space-lg);
}

.contact-info .lead {
  margin-bottom: var(--space-2xl);
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
}

.contact-channel .channel-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-channel .channel-icon svg {
  width: 18px;
  height: 18px;
}

.contact-form {
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  background: #0a0a0a;
  border: 1px solid rgba(13, 255, 191, 0.25);
  position: relative;
  overflow: hidden;
}

.contact-form > *:not(.matrix-rain-contact) {
  position: relative;
  z-index: 1;
}

.matrix-rain-contact {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
}

.contact-form label {
  color: rgba(255, 255, 255, 0.85);
}

.contact-form .form-legal,
.contact-form .form-legal label {
  color: rgba(255, 255, 255, 0.6);
}

.contact-form .form-legal a {
  color: #0dffbf;
}

.contact-form .form-status.success {
  background: rgba(13, 255, 191, 0.15);
  color: #0dffbf;
}

.contact-form .form-status.error {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.form-group label .required {
  color: #e74c3c;
  margin-left: 2px;
  font-weight: 600;
}

.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
  color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888a0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-status {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(22, 163, 74, 0.1);
  color: var(--accent-success);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.form-status.error {
  display: block;
  background: rgba(220, 38, 38, 0.1);
  color: var(--accent-danger);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* Legal Checkbox */
.form-legal {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-legal input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg-card);
  cursor: pointer;
  margin-top: 2px;
  transition: all var(--transition-fast);
}

.form-legal input[type="checkbox"]:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.form-legal input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.form-legal label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}

.form-legal label a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-legal label a:hover {
  color: var(--accent-primary-hover);
}

/* Legal Modal */
.legal-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.legal-modal-overlay.open {
  display: flex;
}

.legal-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-color);
}

.legal-modal-header h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.legal-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.legal-modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.legal-modal-close svg {
  width: 16px;
  height: 16px;
}

.legal-modal-body {
  padding: var(--space-xl);
  overflow-y: auto;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-modal-body h4 {
  font-size: var(--text-base);
  color: var(--text-primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-modal-body h4:first-child {
  margin-top: 0;
}

.legal-modal-body p {
  margin-bottom: var(--space-sm);
}

.legal-modal-body ul {
  list-style: disc;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-modal-body li {
  margin-bottom: var(--space-xs);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.form-legal.shake {
  animation: shake 0.5s ease-in-out;
}

/* ---- FOOTER ---- */
.footer {
  padding: var(--space-4xl) 0 var(--space-xl);
  background: #0a0a0a;
  border-top: 1px solid rgba(13, 255, 191, 0.2);
  position: relative;
  overflow: hidden;
}

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

.matrix-rain-footer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

.footer,
.footer .footer-brand p,
.footer .footer-col a,
.footer .footer-col h4,
.footer .footer-bottom,
.footer .footer-legal a,
.footer .made-in {
  color: rgba(255, 255, 255, 0.6);
}

.footer .footer-col h4 {
  color: rgba(255, 255, 255, 0.4);
}

.footer .footer-col a:hover,
.footer .footer-legal a:hover {
  color: #0dffbf;
}

.footer .footer-grid {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid var(--border-color);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-top: var(--space-md);
  max-width: 280px;
  line-height: 1.7;
}

.footer-brand .made-in {
  margin-top: var(--space-lg);
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: var(--space-lg);
}

.footer-legal a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-legal a:hover {
  color: var(--text-secondary);
}

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

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }
.reveal-delay-5 { transition-delay: 500ms; }

/* Hero animations */
.hero-content > * {
  animation: fade-in-up 0.8s ease both;
}

.hero-content > :nth-child(1) { animation-delay: 0.1s; }
.hero-content > :nth-child(2) { animation-delay: 0.3s; }
.hero-content > :nth-child(3) { animation-delay: 0.5s; }
.hero-content > :nth-child(4) { animation-delay: 0.7s; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .grid-3, .products-grid, .services-grid, .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cto-grid { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root {
    --space-5xl: 5rem;
    --space-4xl: 3.5rem;
  }

  /* ---- Floating Island Navbar ---- */
  .nav {
    top: var(--space-sm);
    left: var(--space-md);
    right: var(--space-md);
    width: auto;
    border-radius: var(--radius-xl);
    padding: var(--space-xs) var(--space-sm);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
  }

  .nav.scrolled {
    padding: var(--space-xs) var(--space-sm);
    box-shadow: none;
  }

  .nav .container {
    padding: 0 var(--space-xs);
  }

  .nav-links { display: none; }
  .nav-actions .lang-dropdown,
  .nav-actions .theme-toggle,
  .nav-actions .btn { display: none; }
  .nav-mobile-toggle { display: flex; }

  /* ---- Mobile Menu Overlay ---- */
  .mobile-menu {
    padding: var(--space-xl);
    padding-top: 5rem;
  }

  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-md);
  }

  .mobile-menu-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
  }

  .mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
  }

  .mobile-menu-close:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
  }

  .mobile-menu-close svg {
    width: 20px;
    height: 20px;
  }

  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
  }

  .mobile-menu-links a {
    font-family: var(--font-display);
  }

  .mobile-menu-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
  }

  .mobile-lang-dropdown {
    position: relative;
  }

  .mobile-lang-dropdown .lang-dropdown-menu {
    top: auto;
    bottom: calc(100% + 6px);
    right: 0;
    transform: translateY(8px);
  }

  .mobile-lang-dropdown.open .lang-dropdown-menu {
    transform: translateY(0);
  }

  .mobile-lang-dropdown .chevron-icon {
    transition: transform var(--transition-fast);
  }

  .mobile-lang-dropdown.open .chevron-icon {
    transform: rotate(180deg);
  }

  .mobile-lang-dropdown .lang-option {
    border-bottom: none !important;
    font-size: var(--text-sm) !important;
    padding: var(--space-sm) var(--space-md) !important;
  }

  .mobile-theme-toggle {
    width: 40px;
    height: 40px;
  }

  .grid-2, .grid-3, .grid-4,
  .products-grid, .services-grid, .cases-grid {
    grid-template-columns: 1fr;
  }

  .hero { min-height: auto; padding: 7rem 0 var(--space-4xl); }
  .hero h1 { font-size: var(--text-4xl); }
  .hero .lead { font-size: var(--text-base); }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; }

  .section { padding: var(--space-4xl) 0; }

  .comparison-table { font-size: var(--text-xs); }
  .comparison-table th, .comparison-table td { padding: var(--space-sm) var(--space-md); }

  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer-bottom { flex-direction: column; gap: var(--space-md); text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-4xl); }
}

/* ---- PRINT ---- */
@media print {
  .nav, .theme-toggle, .lang-dropdown, .hero::before, .hero::after { display: none; }
  body { background: white; color: black; }
  .section { padding: 2rem 0; }
}

/* ---- COOKIE BANNER ---- */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg);
  max-width: 420px;
  width: calc(100% - 2rem);
  text-align: center;
  animation: cookieSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner.show { display: block; }
.cookie-banner.hiding { animation: cookieSlideDown 0.35s ease-in forwards; }

@keyframes cookieSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(30px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes cookieSlideDown {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(30px); }
}

.cookie-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  line-height: 1;
}

.cookie-banner h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.cookie-banner p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.cookie-banner p a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner p a:hover { color: var(--accent-primary-hover); }

.cookie-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

.cookie-buttons button {
  flex: 1;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.cookie-btn-accept {
  background: #05ce90;
  color: #1a1a1a;
}
.cookie-btn-accept:hover { background: #04b57e; }

.cookie-btn-reject {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color) !important;
}
.cookie-btn-reject:hover { background: var(--bg-secondary); color: var(--text-primary); }

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
