/* =================================================================
   KOPERIA — Main stylesheet
   Replica la paleta, tipografía y componentes del prototipo React
   ================================================================= */

/* ---------- Tokens ---------- */
:root {
  --color-bg: #0A0E1A;
  --color-surface: #0E1016;
  --color-accent: #00F0FF;
  --color-accent-glow: rgba(0, 240, 255, 0.15);
  --color-text-pri: #F8F9FA;
  --color-text-sec: #94A3B8;
  --color-border-sutil: rgba(255, 255, 255, 0.08);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --container-max: 1280px;
  --container-pad: 1.5rem;
}

/* ---------- Inter (self-hosted) ----------
   Las fuentes .woff2 se cargan desde assets/fonts/
   Incluiremos los pesos 400, 500, 600, 700, 800, 900
*/
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/Inter-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Inter-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/Inter-ExtraBold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/Inter-Black.woff2") format("woff2");
}

/* ---------- Base ---------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  position: relative;
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-text-pri);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::selection,
::selection {
  background-color: rgba(0, 240, 255, 0.3);
  color: var(--color-accent);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  color: inherit;
}

/* ---------- Utilidades ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.glow-cyan {
  box-shadow: 0 0 15px var(--color-accent-glow);
}

.card-immersive {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border-sutil);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.card-immersive:hover {
  border-color: var(--color-accent);
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--color-accent);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 100;
  box-shadow: 0 0 15px var(--color-accent-glow);
  will-change: transform;
}

/* ---------- Navbar ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color 0.3s ease, padding 0.3s ease,
              border-color 0.3s ease, box-shadow 0.3s ease;
  padding: 1.5rem 0;
  background-color: transparent;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  padding: 1rem 0;
  background-color: var(--color-bg);
  border-bottom-color: var(--color-border-sutil);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo__dot {
  width: 12px;
  height: 12px;
  background-color: var(--color-accent);
  box-shadow: 0 0 15px var(--color-accent-glow);
}

.site-logo__text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text-pri);
}

.site-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-sec);
}

.site-nav a {
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--color-accent);
}

.site-nav .cta {
  padding: 0.625rem 1.5rem;
  background-color: var(--color-accent);
  color: var(--color-bg);
  font-weight: 700;
  box-shadow: 0 0 15px var(--color-accent-glow);
  transition: filter 0.2s ease;
}

.site-nav .cta:hover {
  filter: brightness(1.1);
  color: var(--color-bg);
}

/* Mobile toggle (hamburguesa) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text-pri);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  overflow: hidden;
}

.hero__bg-blur-1,
.hero__bg-blur-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.hero__bg-blur-1 {
  top: 0;
  right: 0;
  width: 800px;
  height: 800px;
  background-color: rgba(37, 99, 235, 0.1);
  transform: translate(50%, -50%);
}

.hero__bg-blur-2 {
  bottom: 0;
  left: 0;
  width: 600px;
  height: 600px;
  background-color: rgba(30, 58, 138, 0.1);
  transform: translate(-50%, 50%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
  }
}

.hero__eyebrow {
  color: var(--color-accent);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: block;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--color-text-pri);
  margin: 0 0 2rem 0;
}

.hero__title-sub {
  color: var(--color-text-sec);
}

.hero__title-accent {
  color: var(--color-accent);
  text-shadow: 0 0 28px rgba(0, 240, 255, 0.28);
}

.hero__description {
  font-size: 1.125rem;
  color: var(--color-text-sec);
  max-width: 32rem;
  margin: 0 0 2.5rem 0;
  line-height: 1.7;
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero__ctas {
    flex-direction: row;
  }
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: filter 0.2s ease, background-color 0.2s ease,
              border-color 0.2s ease, transform 0.2s ease;
  border: 1px solid transparent;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-bg);
  box-shadow: 0 0 15px var(--color-accent-glow);
}

.btn--primary:hover {
  filter: brightness(1.1);
  color: var(--color-bg);
}

.btn--ghost {
  background-color: transparent;
  border-color: var(--color-border-sutil);
  color: var(--color-text-pri);
}

.btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-text-pri);
}

.btn__icon {
  width: 1rem;
  height: 1rem;
}

/* Visualización lateral del hero */
.hero__visual {
  display: none;
  position: relative;
}

@media (min-width: 768px) {
  .hero__visual {
    display: block;
  }
}

.hero__visual-box {
  aspect-ratio: 1 / 1;
  background-color: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
}

.hero__visual-grid {
  position: absolute;
  inset: 8%;
  opacity: 0.18;
  background-image: radial-gradient(var(--color-accent) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, #000 0%, #000 42%, rgba(0, 0, 0, 0.55) 62%, transparent 82%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0%, #000 42%, rgba(0, 0, 0, 0.55) 62%, transparent 82%);
}

.hero__visual-glow {
  display: none;
}

.hero__visual-ring {
  width: 18rem;
  height: 18rem;
  border: 2px solid rgba(0, 240, 255, 0.32);
  border-radius: 999px;
  box-shadow:
    0 0 0 18px rgba(0, 240, 255, 0.035),
    0 0 62px rgba(0, 240, 255, 0.34),
    0 0 132px rgba(0, 240, 255, 0.16),
    0 0 190px rgba(0, 240, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: rotate 30s linear infinite;
}

.hero__visual-ring-inner {
  width: 12rem;
  height: 12rem;
  border: 2px solid rgba(0, 240, 255, 0.14);
  border-radius: 999px;
}

.hero__visual-dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: var(--color-accent);
  box-shadow: 0 0 15px var(--color-accent-glow);
}

.hero__visual-center {
  position: absolute;
  text-align: center;
  width: min(22rem, 68%);
  padding: clamp(1.2rem, 2vw, 1.8rem);
  border: 1px solid rgba(0, 240, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(10, 14, 26, 0.94), rgba(10, 19, 34, 0.82));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36), 0 0 54px rgba(0, 240, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero__koper-avatar {
  display: block;
  width: clamp(7rem, 12vw, 10rem);
  height: clamp(7rem, 12vw, 10rem);
  object-fit: contain;
  margin: -0.2rem auto 1rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, 0.36);
  background:
    radial-gradient(circle at 50% 45%, rgba(20, 75, 106, 0.86), rgba(8, 23, 38, 0.96) 66%, rgba(3, 9, 18, 0.98) 100%);
  box-shadow:
    0 0 0 7px rgba(0, 240, 255, 0.06),
    0 0 34px rgba(0, 240, 255, 0.42),
    0 18px 38px rgba(0, 0, 0, 0.34);
}

.hero__visual-label {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.hero__visual-word {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-text-pri);
  margin-bottom: 0.9rem;
  letter-spacing: 0;
}

.hero__visual-eq {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  height: 2rem;
  align-items: center;
}

.hero__visual-eq span {
  display: block;
  width: 2px;
  background-color: var(--color-accent);
  box-shadow: 0 0 15px var(--color-accent-glow);
  animation: eq 1s ease-in-out infinite;
}

.hero__visual-eq span:nth-child(1) { animation-delay: 0s; }
.hero__visual-eq span:nth-child(2) { animation-delay: 0.1s; }
.hero__visual-eq span:nth-child(3) { animation-delay: 0.2s; }
.hero__visual-eq span:nth-child(4) { animation-delay: 0.3s; }
.hero__visual-eq span:nth-child(5) { animation-delay: 0.4s; }
.hero__visual-eq span:nth-child(6) { animation-delay: 0.5s; }

.hero__visual-card {
  position: absolute;
  z-index: 2;
  width: min(16rem, 36%);
  padding: 1rem;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(9, 15, 28, 0.86);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
}

.hero__visual-card span {
  display: inline-flex;
  margin-bottom: 0.65rem;
  color: var(--color-accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero__visual-card strong {
  display: block;
  color: var(--color-text-pri);
  font-size: clamp(0.86rem, 1.05vw, 1rem);
  line-height: 1.15;
}

.hero__visual-card small {
  display: block;
  margin-top: 0.45rem;
  color: var(--color-text-sec);
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  line-height: 1.35;
}

.hero__visual-card--top {
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
}

.hero__visual-card--left {
  left: 7%;
  bottom: 16%;
}

.hero__visual-card--right {
  right: 7%;
  bottom: 16%;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes eq {
  0%, 100% { height: 4px; }
  50% { height: 24px; }
}

/* Respeto por prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero__visual-ring { animation: none; }
  .hero__visual-eq span { animation: none; height: 12px; }
  html { scroll-behavior: auto; }
}

/* ---------- Blurs de fondo fijos al viewport ---------- */
body::before,
body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(140px);
  will-change: transform;
}

/* Blur azul arriba-derecha (coherente con el Hero) */
body::before {
  top: -200px;
  right: -200px;
  width: 1100px;
  height: 1100px;
  background-color: rgba(37, 99, 235, 0.10);
  border-radius: 50%;
}

/* Blur cian abajo-izquierda (acento Koperia) */
body::after {
  bottom: -200px;
  left: -250px;
  width: 900px;
  height: 900px;
  background-color: rgba(0, 240, 255, 0.07);
  border-radius: 50%;
}

/* Contenido principal: z-index sobre los blurs, posición sin cambios */
main,
.site-footer,
.section {
  position: relative;
  z-index: 1;
}

/* Elementos fijos: solo z-index, SIN tocar position (conserva fixed) */
.site-header {
  z-index: 50;
}

.scroll-progress {
  z-index: 100;
}

/* ---------- Hero full width / asesoría IA ---------- */
.hero {
  min-height: 100vh;
  padding: 7rem 0 4rem;
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.98) 0%, rgba(10, 14, 26, 0.92) 44%, rgba(10, 14, 26, 0.68) 100%),
    radial-gradient(circle at 78% 42%, rgba(0, 240, 255, 0.16) 0%, rgba(0, 240, 255, 0.04) 28%, transparent 56%),
    linear-gradient(135deg, #0A0E1A 0%, #111827 52%, #07111F 100%);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 86%, transparent 100%);
  opacity: 0.32;
}

.hero .container {
  max-width: min(1760px, calc(100vw - 4rem));
}

.hero__inner {
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(3rem, 6vw, 7rem);
}

.hero__content {
  max-width: 760px;
}

.hero__eyebrow {
  width: fit-content;
  padding: 0.5rem 0.85rem;
  margin-bottom: 1.75rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.24);
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.12);
}

.hero__title {
  font-size: clamp(2.85rem, 5.6vw, 5.8rem);
  font-weight: 900;
  line-height: 1;
  max-width: 920px;
}

.hero__title-sub {
  display: inline-block;
  font-size: 0.72em;
  line-height: 1.05;
}

.hero__description {
  max-width: 42rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.35rem);
}

.hero__visual-box {
  min-height: min(66vh, 660px);
  aspect-ratio: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero__visual-box.card-immersive:hover {
  border-color: transparent;
  transform: none;
}

.hero__visual-ring {
  width: min(34vw, 34rem);
  height: min(34vw, 34rem);
}

.hero__visual-ring-inner {
  width: min(23vw, 23rem);
  height: min(23vw, 23rem);
}

.hero__visual-word {
  font-size: clamp(1.7rem, 2.3vw, 2.55rem);
}

.hero__visual-center::before {
  content: "Roadmap" "\A" "Consultas" "\A" "Automatización" "\A" "Informe mensual";
  white-space: pre-line;
  display: block;
  margin: 0 auto 2rem;
  width: min(22rem, 70vw);
  padding: 1.25rem;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background: rgba(10, 14, 26, 0.72);
  color: var(--color-text-sec);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.9;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.hero__visual-center::before {
  content: none;
  display: none;
}

@media (max-width: 1180px) {
  .hero__visual-card {
    width: 40%;
  }

  .hero__visual-card--left {
    left: 5%;
  }

  .hero__visual-card--right {
    right: 5%;
  }
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding: 7rem 0 4rem;
  }

  .hero .container {
    max-width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__title {
    font-size: clamp(2.35rem, 11vw, 4rem);
  }

  .hero__title-sub {
    font-size: 0.78em;
  }
}

/* ---------- Mega menu ---------- */
.site-header,
.site-header__inner {
  overflow: visible;
}

.mega-nav {
  position: static;
}

.mega-nav__item {
  position: static;
}

.mega-nav__trigger {
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.mega-nav__trigger:hover,
.mega-nav__item:hover .mega-nav__trigger,
.mega-nav__item.is-hover-open .mega-nav__trigger,
.mega-nav__item.is-open .mega-nav__trigger {
  color: var(--color-accent);
}

.mega-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  width: min(1180px, calc(100vw - 3rem));
  transform: translateX(-50%) translateY(10px);
  display: grid;
  grid-template-columns: 0.82fr 2fr 0.78fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.18);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.48), 0 0 70px rgba(0, 240, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.mega-nav__item:hover .mega-menu,
.mega-nav__item.is-hover-open .mega-menu,
.mega-nav__item.is-open .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-menu::before {
  content: '';
  position: absolute;
  inset: -0.75rem 0 auto 0;
  height: 0.75rem;
}

.mega-menu__intro,
.mega-menu__columns,
.mega-menu__koper {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.016)),
    rgba(10, 14, 26, 0.96);
}

.mega-menu__intro {
  padding: 1.5rem;
}

.mega-menu__intro span,
.mega-menu__koper span {
  display: inline-flex;
  margin-bottom: 0.85rem;
  color: var(--color-accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mega-menu__intro h2 {
  margin: 0 0 1rem;
  color: var(--color-text-pri);
  font-size: 1.45rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.mega-menu__intro p,
.mega-menu__koper p {
  margin: 0;
  color: var(--color-text-sec);
  font-size: 0.92rem;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.mega-menu__columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background-color: rgba(255, 255, 255, 0.07);
}

.mega-menu__col {
  padding: 1.35rem;
  background: rgba(10, 14, 26, 0.94);
}

.mega-menu__col h3 {
  margin: 0 0 0.9rem;
  color: var(--color-text-pri);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.mega-menu__col a {
  display: grid;
  gap: 0.3rem;
  padding: 0.9rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.mega-menu__col a:hover {
  color: inherit;
}

.mega-menu__col strong {
  color: var(--color-text-pri);
  font-size: 0.94rem;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}

.mega-menu__col span {
  color: var(--color-text-sec);
  font-size: 0.82rem;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.mega-menu__col a:hover strong {
  color: var(--color-accent);
}

.mega-menu__koper {
  position: relative;
  padding: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(0, 240, 255, 0.12), transparent 46%),
    linear-gradient(180deg, rgba(14, 25, 43, 0.99), rgba(7, 12, 23, 0.99));
}

.mega-menu__koper::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(0, 240, 255, 0.2), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 44%);
  pointer-events: none;
}

.mega-menu__koper img {
  position: relative;
  display: block;
  width: 152px;
  height: 152px;
  object-fit: contain;
  object-position: center;
  border-radius: 999px;
  margin: 0 auto 1.05rem;
  border: 1px solid rgba(0, 240, 255, 0.42);
  background:
    radial-gradient(circle at 50% 46%, rgba(29, 74, 105, 0.86), rgba(10, 28, 45, 0.95) 62%, rgba(3, 12, 21, 0.98) 100%),
    #0A1F30;
  box-shadow:
    0 0 0 7px rgba(0, 240, 255, 0.08),
    0 0 30px rgba(0, 240, 255, 0.52),
    0 0 78px rgba(0, 240, 255, 0.2),
    0 18px 38px rgba(0, 0, 0, 0.35);
}

.mega-menu__koper div {
  position: relative;
}

@media (max-width: 980px) {
  .site-header {
    overflow: visible;
  }

  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: auto;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    transform: translateX(-50%);
    padding: 0.75rem 1rem 1rem;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border-sutil);
    gap: 0.55rem;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    overflow-x: hidden;
  }

  .site-nav.is-open .mega-nav__item {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .site-nav.is-open .mega-nav__trigger,
  .site-nav.is-open > a {
    width: 100%;
    text-align: left;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mega-menu {
    position: static !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
    transform: none !important;
    grid-template-columns: 1fr !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: none;
    margin-top: 0.35rem;
    border: 1px solid rgba(0, 240, 255, 0.16);
    box-shadow: none;
  }

  .site-nav.is-open .mega-nav__item.is-open .mega-menu {
    display: block;
  }

  .mega-menu__intro,
  .mega-menu__koper {
    display: none;
  }

  .mega-menu__columns {
    display: block;
    grid-template-columns: 1fr !important;
    gap: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .mega-menu__col {
    padding: 0.85rem;
  }

  .mega-menu__col h3 {
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
  }

  .mega-menu__col a {
    padding: 0.65rem 0;
    gap: 0.18rem;
  }

  .mega-menu__col strong {
    font-size: 0.88rem;
  }

  .mega-menu__col span {
    font-size: 0.78rem;
    line-height: 1.32;
  }
}

/* Consentimiento de analítica: generado siempre en cliente. */
.koperia-cookie-banner {
  position: fixed;
  z-index: 2147483646;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1rem max(1rem, env(safe-area-inset-right, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
  border: 1px solid rgba(0, 240, 255, 0.42);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 16px 16px 0 0;
  background: #0b0e13;
  color: #f8f9fa;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
  isolation: isolate;
  pointer-events: auto;
}

.koperia-cookie-banner[hidden] { display: none; }

.koperia-cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100%, 920px);
  margin: 0 auto;
}

.koperia-cookie-banner p { margin: 0; }
.koperia-cookie-banner a { color: #00f0ff; }

.koperia-cookie-banner__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(116px, 1fr));
  gap: 0.65rem;
  flex: 0 0 auto;
}

.koperia-cookie-banner button,
.footer-cookie-settings {
  font: inherit;
}

.koperia-cookie-banner button {
  min-width: 116px;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 2px solid #00f0ff;
  border-radius: 10px;
  background: #111820;
  color: #f8f9fa;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

body.koperia-consent-open .koperia-chat-root {
  visibility: hidden !important;
  pointer-events: none !important;
}

.koperia-cookie-banner button:hover,
.koperia-cookie-banner button:focus-visible {
  background: #00f0ff;
  color: #050608;
  outline: 3px solid rgba(0, 240, 255, 0.35);
  outline-offset: 2px;
}

.footer-cookie-settings {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 640px) {
  .koperia-cookie-banner__inner { align-items: stretch; flex-direction: column; }
  .koperia-cookie-banner__actions { width: 100%; }
}
