/* ==========================================================================
   OPERTIA — Design system
   ========================================================================== */
:root {
  --navy: #0B1F3A;
  --navy-2: #10213A;
  --navy-deep: #050D1C;
  --blue: #126BFF;
  --cyan: #2BC4F3;
  --purple: #7861FF;
  --gray: #6E7884;
  --gray-light: #F3F5F7;
  --white: #FFFFFF;
  --ink: #101828;
  --border: #E4E8EE;

  --gradient-brand: linear-gradient(115deg, #0B1F3A 0%, #126BFF 55%, #2BC4F3 100%);
  --gradient-vivid: linear-gradient(115deg, #126BFF 0%, #7861FF 50%, #2BC4F3 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(11,31,58,0.04) 0%, rgba(43,196,243,0.08) 100%);

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max: 1180px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,0.06), 0 1px 3px rgba(16,24,40,0.08);
  --shadow-md: 0 4px 12px rgba(16,24,40,0.06), 0 8px 24px rgba(16,24,40,0.08);
  --shadow-lg: 0 12px 32px rgba(11,31,58,0.14), 0 4px 12px rgba(11,31,58,0.08);
  --shadow-xl: 0 32px 64px rgba(11,31,58,0.18), 0 12px 24px rgba(11,31,58,0.10);
  --glow-blue: 0 0 0 1px rgba(18,107,255,0.18), 0 18px 48px rgba(18,107,255,0.22);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 100px; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 0.5em 0;
  color: var(--navy);
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); font-weight: 800; letter-spacing: -0.04em; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.015em; }

p { margin: 0 0 1em 0; color: var(--gray); }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-decoration: none; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
section { padding: 112px 0; }
@media (max-width: 780px) { section { padding: 68px 0; } }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22,1,0.36,1), box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }

.btn-gradient {
  background: var(--gradient-vivid);
  background-size: 200% 200%;
  color: var(--white);
  box-shadow: 0 10px 28px rgba(18,107,255,0.32);
  animation: gradShift 7s ease infinite;
}
.btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(18,107,255,0.44); text-decoration: none; }
@keyframes gradShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--navy); text-decoration: none; transform: translateY(-2px); }

.btn-outline-light {
  background: rgba(255,255,255,0.04);
  color: var(--white);
  border-color: rgba(255,255,255,0.28);
  backdrop-filter: blur(8px);
}
.btn-outline-light:hover { border-color: var(--white); background: rgba(255,255,255,0.12); text-decoration: none; transform: translateY(-2px); }

.btn-sm { padding: 10px 20px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
/* El desenfoque va en un pseudoelemento: aplicarlo a la cabecera la convertiría en
   bloque contenedor del menú móvil, que es position:fixed. */
.site-header::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand img { height: 34px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--gradient-vivid);
  border-radius: 2px;
  transition: width 0.25s cubic-bezier(0.22,1,0.36,1);
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--blue); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .main-nav {
    position: fixed; inset: 84px 0 0 0;
    background: var(--white);
    flex-direction: column; justify-content: flex-start; align-items: flex-start;
    padding: 32px 24px; gap: 24px;
    transform: translateX(100%);
    /* visibility oculta el menú cerrado del foco de teclado y evita que ensanche el documento */
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), visibility 0s linear 0.3s;
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; transition-delay: 0s; }
  .main-nav a { font-size: 1.2rem; }
  .nav-toggle { display: flex; }
  .header-actions .btn { display: none; }
}

/* ---------- Hero (cinematic dark) ---------- */
.hero {
  position: relative;
  background: var(--navy-deep);
  color: rgba(255,255,255,0.78);
  padding: 132px 0 120px;
  overflow: hidden;
  isolation: isolate;
}
/* Orden de capas del hero, de atrás a delante:
   aurora (-6) · haces (-5) · retícula (-4) · constelación (-3) · degradado inferior (-2) · grano (-1) */
.hero-aurora {
  position: absolute; inset: -35% -15%;
  z-index: -6;
  background:
    radial-gradient(34% 42% at 16% 26%, rgba(18,107,255,0.72) 0%, transparent 62%),
    radial-gradient(30% 38% at 80% 18%, rgba(43,196,243,0.55) 0%, transparent 60%),
    radial-gradient(38% 42% at 64% 78%, rgba(120,97,255,0.62) 0%, transparent 62%);
  filter: blur(30px);
  animation: auroraFloat 22s ease-in-out infinite alternate;
}
/* Segunda capa de manchas, moviéndose a otro ritmo, para que el fondo nunca se repita igual */
.hero-aurora::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(26% 32% at 42% 12%, rgba(43,196,243,0.42) 0%, transparent 64%),
    radial-gradient(30% 34% at 88% 62%, rgba(18,107,255,0.5) 0%, transparent 64%),
    radial-gradient(24% 30% at 8% 72%, rgba(120,97,255,0.45) 0%, transparent 64%);
  filter: blur(38px);
  animation: auroraFloat2 31s ease-in-out infinite alternate;
}
@keyframes auroraFloat {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-4%, 3%, 0) scale(1.12); }
  100% { transform: translate3d(4%, -3%, 0) scale(1.06); }
}
@keyframes auroraFloat2 {
  0%   { transform: translate3d(2%, -2%, 0) scale(1.08) rotate(0deg); }
  100% { transform: translate3d(-3%, 3%, 0) scale(1) rotate(8deg); }
}

/* Haces de luz que barren el hero en diagonal */
.hero-beams {
  position: absolute; inset: -20% -30%;
  z-index: -5;
  overflow: hidden;
  pointer-events: none;
}
.hero-beams i {
  position: absolute;
  top: -30%; bottom: -30%;
  width: 26vw;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.055), transparent);
  transform: rotate(18deg);
  animation: beamSweep 17s ease-in-out infinite;
}
.hero-beams i:nth-child(1) { left: -20%; animation-delay: 0s; }
.hero-beams i:nth-child(2) { left: 20%; animation-delay: -6s; width: 15vw; }
.hero-beams i:nth-child(3) { left: 58%; animation-delay: -11s; width: 20vw; }
@keyframes beamSweep {
  0%, 100% { opacity: 0; transform: rotate(18deg) translateX(-16vw); }
  45%      { opacity: 1; }
  100%     { transform: rotate(18deg) translateX(26vw); }
}

/* Constelación dibujada en canvas */
.hero-canvas {
  position: absolute; inset: 0;
  z-index: -3;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Grano fino: quita el aspecto plano de los degradados */
.hero-noise {
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}
.hero-grid {
  position: absolute; inset: 0;
  z-index: -4;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 82% 68% at 50% 42%, #000 30%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 82% 68% at 50% 42%, #000 30%, transparent 76%);
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, transparent 55%, var(--navy-deep) 100%);
  pointer-events: none;
}
.hero h1 { color: var(--white); max-width: 15ch; }
.hero .lead { color: rgba(255,255,255,0.72); font-size: 1.22rem; max-width: 600px; margin-bottom: 36px; }
.hero .eyebrow { color: var(--cyan); }
.hero .eyebrow::before { background: var(--cyan); }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-micro { color: rgba(255,255,255,0.5); font-size: 0.88rem; }

.hero-layout { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 1020px) { .hero-layout { grid-template-columns: 1fr; gap: 56px; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.82);
  font-size: 0.82rem; font-weight: 600;
  margin-bottom: 26px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #35E0A1;
  box-shadow: 0 0 0 4px rgba(53,224,161,0.18);
  margin-left: 6px;
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(53,224,161,0.18); }
  50% { box-shadow: 0 0 0 7px rgba(53,224,161,0.06); }
}

/* Hero stats */
.hero-stats { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 44px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.12); }
.hero-stats .num { font-size: 1.9rem; font-weight: 800; color: var(--white); letter-spacing: -0.03em; line-height: 1; }
.hero-stats .lbl { font-size: 0.82rem; color: rgba(255,255,255,0.55); margin-top: 6px; }

/* ---------- Device mockups (showcase craft) ---------- */
.showcase { position: relative; perspective: 1400px; }
.mock-browser {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  overflow: hidden;
  backdrop-filter: blur(14px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  transform: rotateY(-11deg) rotateX(5deg) translateZ(0);
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.showcase:hover .mock-browser { transform: rotateY(-5deg) rotateX(2deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.1); }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.24); }
.mock-bar .url { margin-left: 12px; flex: 1; height: 20px; border-radius: 999px; background: rgba(255,255,255,0.08); display: flex; align-items: center; padding: 0 12px; font-size: 0.62rem; color: rgba(255,255,255,0.42); font-style: normal; }
.mock-body { padding: 20px; display: grid; gap: 12px; }
.mock-hero-line { height: 11px; border-radius: 6px; background: var(--gradient-vivid); width: 62%; }
.mock-line { height: 8px; border-radius: 6px; background: rgba(255,255,255,0.14); }
.mock-line.w80 { width: 80%; } .mock-line.w60 { width: 60%; } .mock-line.w45 { width: 45%; }
.mock-tiles { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 6px; }
.mock-tile { height: 54px; border-radius: 9px; background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.09); position: relative; overflow: hidden; }
.mock-tile::after { content:""; position:absolute; left:10px; top:10px; width:20px; height:20px; border-radius:6px; background: var(--gradient-vivid); opacity:0.85; }
.mock-chart { height: 76px; border-radius: 10px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09); display: flex; align-items: flex-end; gap: 7px; padding: 12px; }
.mock-chart b { flex: 1; border-radius: 4px 4px 0 0; background: var(--gradient-vivid); opacity: 0.75; animation: barGrow 3.2s ease-in-out infinite alternate; }
.mock-chart b:nth-child(1){ height: 40%; animation-delay: 0s; }
.mock-chart b:nth-child(2){ height: 66%; animation-delay: .2s; }
.mock-chart b:nth-child(3){ height: 34%; animation-delay: .4s; }
.mock-chart b:nth-child(4){ height: 85%; animation-delay: .6s; }
.mock-chart b:nth-child(5){ height: 55%; animation-delay: .8s; }
.mock-chart b:nth-child(6){ height: 72%; animation-delay: 1s; }
@keyframes barGrow { from { transform: scaleY(0.72); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }

.mock-phone {
  position: absolute; right: -18px; bottom: -52px;
  width: 148px;
  background: #0A1526;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 22px;
  padding: 9px 7px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.55);
  transform: rotateY(-11deg) rotateX(5deg);
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.showcase:hover .mock-phone { transform: rotateY(-5deg) rotateX(2deg) translateY(-8px); }
.mock-notch { width: 40px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.2); margin: 0 auto 9px; }
.mock-screen { border-radius: 15px; background: rgba(255,255,255,0.05); padding: 12px 10px; display: grid; gap: 9px; }
.mock-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--gradient-vivid); }
.mock-pill { height: 22px; border-radius: 999px; background: var(--gradient-vivid); opacity: 0.9; }
@media (max-width: 560px) { .mock-phone { width: 112px; right: -6px; bottom: -36px; } }

/* ---------- Marquee / logos ---------- */
.trust-bar {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.55);
  padding: 22px 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  overflow: hidden;
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.trust-bar strong { color: var(--white); }
.marquee { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee-track { display: flex; align-items: center; gap: 44px; padding-right: 44px; white-space: nowrap; }
.marquee-track span { display: inline-flex; align-items: center; gap: 12px; color: rgba(255,255,255,0.62); }
.marquee-track span::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); opacity: 0.6; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
  isolation: isolate;
}
.card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(18,107,255,0.07), transparent 42%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.card:hover::before { opacity: 1; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: rgba(18,107,255,0.22); }

.card-icon {
  width: 54px; height: 54px;
  border-radius: 16px;
  background: var(--gradient-vivid);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(18,107,255,0.26);
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.card:hover .card-icon { transform: translateY(-3px) rotate(-5deg) scale(1.06); }
.card-icon svg { width: 25px; height: 25px; }

/* Imagen a sangre en la parte superior de una tarjeta */
.card-media {
  margin: -34px -34px 24px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: relative;
  background: var(--gray-light);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.22,1,0.36,1); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(11,31,58,0.42) 0%, rgba(18,107,255,0.18) 45%, transparent 75%);
}
.card-media .tag {
  position: absolute; left: 18px; bottom: 16px; z-index: 1;
  margin: 0;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  margin-top: 18px;
}
.card-link .arrow { transition: transform 0.22s cubic-bezier(0.22,1,0.36,1); }
.card:hover .card-link .arrow { transform: translateX(5px); }

.section-head { max-width: 660px; margin-bottom: 60px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Bento grid ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.bento .card { padding: 32px; }
.bento .b-lg { grid-column: span 3; }
.bento .b-md { grid-column: span 2; }
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento .b-lg, .bento .b-md { grid-column: span 1; }
}
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } }

/* Featured card (AI) */
.card-featured {
  background: linear-gradient(150deg, #0B1F3A 0%, #16295C 55%, #1D3A7A 100%);
  border-color: transparent;
  color: rgba(255,255,255,0.78);
  position: relative;
}
.card-featured::after {
  content: "";
  position: absolute; top: -40%; right: -20%;
  width: 320px; height: 320px; z-index: -1;
  background: radial-gradient(circle, rgba(120,97,255,0.45) 0%, transparent 68%);
}
.card-featured h3, .card-featured h4 { color: var(--white); }
.card-featured p { color: rgba(255,255,255,0.7); }
.card-featured .card-link { color: var(--cyan); }
.card-featured:hover { border-color: rgba(43,196,243,0.4); }
.card-featured .card-icon { background: rgba(255,255,255,0.14); backdrop-filter: blur(8px); box-shadow: none; }

.badge-new {
  position: absolute; top: 22px; right: 22px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: var(--gradient-vivid); color: var(--white);
}

/* ---------- Section variants ---------- */
.section-dark {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.85);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.section-dark::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 74%);
}
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.66); }
.section-dark .card { background: rgba(255,255,255,0.045); border-color: rgba(255,255,255,0.1); backdrop-filter: blur(10px); }
.section-dark .card:hover { border-color: rgba(43,196,243,0.35); box-shadow: 0 24px 56px rgba(0,0,0,0.4); }
.section-dark .card h3, .section-dark .card h4 { color: var(--white); }
.section-dark .card p { color: rgba(255,255,255,0.62); }
.section-dark .check-list li { color: rgba(255,255,255,0.8); }

.section-soft { background: var(--gray-light); }

/* ---------- Numbered / methodology ---------- */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; counter-reset: step; position: relative; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 8px; }
.step-num {
  font-family: var(--font);
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--white);
  background: var(--gradient-vivid);
  width: 36px; height: 36px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(18,107,255,0.3);
}
.step h4 { margin-bottom: 6px; font-size: 1rem; }
.step p { font-size: 0.92rem; }

/* ---------- Team ---------- */
.team-card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.team-card img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.team-card .role { color: var(--blue); font-weight: 700; font-size: 0.88rem; margin-bottom: 10px; }

/* ---------- Banda visual a sangre ---------- */
.media-band {
  position: relative;
  padding: 132px 0;
  overflow: hidden;
  isolation: isolate;
  color: rgba(255,255,255,0.82);
  background: var(--navy-deep);
}
.media-band img {
  position: absolute; inset: 0; z-index: -3;
  width: 100%; height: 100%;
  object-fit: cover;
}
.media-band::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(115deg, rgba(11,31,58,0.94) 0%, rgba(18,107,255,0.76) 55%, rgba(43,196,243,0.6) 100%);
}
.media-band::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 20%, transparent 76%);
}
.media-band h2 { color: var(--white); max-width: 17ch; }
.media-band p { color: rgba(255,255,255,0.86); max-width: 560px; font-size: 1.05rem; }
.media-band .eyebrow { color: var(--white); }
.media-band .eyebrow::before { background: var(--white); }
@media (max-width: 780px) { .media-band { padding: 76px 0; } }

/* Bloque de texto junto a una imagen */
.media-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 860px) { .media-split { grid-template-columns: 1fr; gap: 32px; } }
.media-figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4 / 3;
}
.media-figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.media-figure:hover img { transform: scale(1.04); }
.media-figure::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(150deg, rgba(18,107,255,0.16), transparent 55%);
  pointer-events: none;
}

/* ---------- Equipo ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 900px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }

.person {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.person:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); border-color: rgba(18,107,255,0.22); }
.person-photo { position: relative; aspect-ratio: 1; overflow: hidden; background: #D6D7DB; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.22,1,0.36,1); }
.person:hover .person-photo img { transform: scale(1.05); }
.person-photo::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to top, rgba(11,31,58,0.28), transparent);
  opacity: 0; transition: opacity 0.35s ease;
}
.person:hover .person-photo::after { opacity: 1; }
.person-body { padding: 22px 24px 26px; }
.person-body h4 { margin-bottom: 3px; font-size: 1.08rem; }
.person .role { color: var(--blue); font-weight: 700; font-size: 0.84rem; margin-bottom: 10px; }
.person-body p { font-size: 0.9rem; margin: 0; }

/* Perfil sin persona identificada: icono sobre el degradado de marca */
.person-photo.iconic {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #0B1F3A 0%, #16295C 55%, #126BFF 100%);
  position: relative; overflow: hidden;
}
.person-photo.iconic::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 74%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 74%);
}
.person-photo.iconic svg { width: 64px; height: 64px; color: rgba(255,255,255,0.9); position: relative; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  background: linear-gradient(125deg, #0B1F3A 0%, #143A8C 45%, #126BFF 78%, #2BC4F3 100%);
  background-size: 180% 180%;
  animation: gradShift 14s ease infinite;
  border-radius: var(--radius-xl);
  padding: 72px 56px;
  color: var(--white);
  text-align: center;
  margin: 0 24px;
  overflow: hidden;
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 0%, #000, transparent 72%);
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.86); max-width: 540px; margin-left: auto; margin-right: auto; }
.cta-band .hero-ctas { justify-content: center; margin-top: 30px; margin-bottom: 0; }
@media (max-width: 640px) { .cta-band { padding: 48px 26px; margin: 0; border-radius: var(--radius-lg); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.6); padding: 80px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 56px; }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand img { height: 30px; margin-bottom: 16px; }
.site-footer h4 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.site-footer a { color: rgba(255,255,255,0.6); font-size: 0.92rem; transition: color 0.2s ease; }
.site-footer a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; }
.social-row { display: flex; gap: 12px; }
.social-row a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, border-color 0.2s ease; }
.social-row a:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }
.social-row svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.85); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  background: var(--navy-deep);
  color: rgba(255,255,255,0.75);
  padding: 116px 0 96px;
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute; inset: -40% -10% auto -10%; height: 150%;
  z-index: -2;
  background:
    radial-gradient(34% 44% at 22% 34%, rgba(18,107,255,0.5) 0%, transparent 62%),
    radial-gradient(30% 38% at 76% 26%, rgba(120,97,255,0.4) 0%, transparent 60%);
  filter: blur(26px);
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 25%, transparent 76%);
}
.page-hero h1 { color: var(--white); max-width: 18ch; }
.page-hero .lead { color: rgba(255,255,255,0.7); font-size: 1.12rem; max-width: 640px; }
.page-hero .eyebrow { color: var(--cyan); }
.page-hero .eyebrow::before { background: var(--cyan); }
.breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.5); margin-bottom: 20px; }
.breadcrumb a { color: rgba(255,255,255,0.8); }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0 !important; }
.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(18,107,255,0.08);
  color: var(--blue);
  margin-bottom: 12px;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.check-list li::before {
  content: "";
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--gradient-vivid);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/60% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/60% no-repeat;
}

/* Stat row */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
@media (max-width: 780px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat .num { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; background: var(--gradient-vivid); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { font-size: 0.88rem; color: var(--gray); margin-top: 10px; }
.section-dark .stat .lbl { color: rgba(255,255,255,0.6); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; color: var(--navy); }
input, textarea, select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(18,107,255,0.12);
  outline: none;
}
textarea { resize: vertical; min-height: 130px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.hp-field { position: absolute; left: -9999px; top: -9999px; }
.form-note { font-size: 0.85rem; color: var(--gray); margin-top: 14px; }
.form-success, .form-error {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-weight: 600;
}
.form-success { background: #E4F5F2; color: #0E6E63; }
.form-error { background: #FBE9E7; color: #9A2E1F; }

.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .info-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--gradient-vivid); color: white;
  display: flex; align-items: center; justify-content: center;
}
.info-list .info-icon svg { width: 18px; height: 18px; }
.info-list strong { display: block; color: var(--navy); font-size: 0.95rem; }
.info-list span, .info-list a { color: var(--gray); font-size: 0.92rem; }

/* ---------- Cursor personalizado ---------- */
.cursor-on, .cursor-on a, .cursor-on button, .cursor-on .card, .cursor-on label { cursor: none; }
.cursor-on input, .cursor-on textarea, .cursor-on select { cursor: auto; }

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 9999;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cursor-on .cursor-dot, .cursor-on .cursor-ring { opacity: 1; }

.cursor-dot {
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(43,196,243,0.9);
}
.cursor-ring {
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border: 1.5px solid rgba(18,107,255,0.55);
  background: radial-gradient(circle, rgba(120,97,255,0.14) 0%, transparent 62%);
  backdrop-filter: invert(4%);
  transition: width 0.28s cubic-bezier(0.22,1,0.36,1), height 0.28s cubic-bezier(0.22,1,0.36,1),
              margin 0.28s cubic-bezier(0.22,1,0.36,1), border-color 0.28s ease,
              background 0.28s ease, opacity 0.25s ease;
}
.cursor-ring.hot {
  width: 66px; height: 66px;
  margin: -33px 0 0 -33px;
  border-color: rgba(43,196,243,0.85);
  background: radial-gradient(circle, rgba(43,196,243,0.2) 0%, transparent 66%);
}
.cursor-ring.click { width: 26px; height: 26px; margin: -13px 0 0 -13px; }

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none; }
  .cursor-on, .cursor-on a, .cursor-on button, .cursor-on .card, .cursor-on label { cursor: auto; }
}

/* ---------- Aviso de web en pruebas ---------- */
#aviso-obra[hidden] { display: none; }
#aviso-obra {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(5,13,28,0.62);
  backdrop-filter: blur(6px);
  animation: avisoFade 0.3s ease;
}
@keyframes avisoFade { from { opacity: 0; } to { opacity: 1; } }

.aviso-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 480px; width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: avisoUp 0.42s cubic-bezier(0.22,1,0.36,1);
}
@keyframes avisoUp { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

.aviso-top {
  position: relative;
  background: linear-gradient(125deg, #0B1F3A 0%, #143A8C 50%, #126BFF 100%);
  padding: 30px 32px 26px;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.aviso-top::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000, transparent 75%);
}
.aviso-top .eyebrow { color: var(--cyan); margin-bottom: 10px; }
.aviso-top .eyebrow::before { background: var(--cyan); }
.aviso-top h3 { color: var(--white); font-size: 1.4rem; margin: 0; }

.aviso-body { padding: 26px 32px 30px; }
.aviso-body p { font-size: 0.95rem; }
.aviso-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.aviso-cerrar {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 1.1rem; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.aviso-cerrar:hover { background: rgba(255,255,255,0.22); border-color: var(--white); }

@media (max-width: 480px) {
  .aviso-top { padding: 26px 22px 22px; }
  .aviso-body { padding: 22px 22px 26px; }
  .aviso-actions .btn { width: 100%; justify-content: center; }
}

/* ---------- Cookie consent ---------- */
#cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(16,24,40,0.08);
  padding: 20px;
}
.cookie-banner-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner-inner p { color: var(--gray); font-size: 0.88rem; max-width: 640px; margin: 0; }
.cookie-banner-actions { display: flex; gap: 10px; flex-wrap: wrap; }
#cookie-prefs[hidden] { display: none; }
#cookie-prefs {
  position: fixed; inset: 0; z-index: 1001;
  background: rgba(11,31,58,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.cookie-prefs-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  width: 100%;
}
.cookie-prefs-card h3 { margin-bottom: 20px; }
.cookie-pref-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--border); }
.cookie-pref-row:first-of-type { border-top: none; }
.cookie-pref-row p { font-size: 0.85rem; margin: 4px 0 0; }
.cookie-pref-row input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; margin-top: 4px; }
