@layer base {

  html,
  body {
    margin: 0;
    padding: 0;
    background-color: #080b11;
    color: #e1e2ec;
  }

  /*
   * Recorte horizontal sin crear un scroll container en body.
   * overflow-x: hidden en body fuerza overflow-y: auto y la rueda del mouse
   * deja de desplazar el documento (la barra del viewport sí funciona).
   */
  html {
    overflow-x: clip;
  }

  main> :first-child {
    margin-top: 0 !important;
  }

  main> :last-child {
    margin-bottom: 0 !important;
  }
}

/* Barra discreta: oculta del todo impedía notar el scroll */
html {
  scrollbar-width: thin;
  scrollbar-color: #1b2230 #080b11;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #080b11;
}

::-webkit-scrollbar-thumb {
  background: #1b2230;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #242c3d;
}

/* Carbon Fiber Texture Pattern */
.bg-carbon-pattern {
  background-color: #07090e;
  background-image:
    radial-gradient(#101926 15%, transparent 16%),
    radial-gradient(#141e2e 15%, transparent 16%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}

/* Fondos tipo tarjeta (placas diagonales + neón) — mismos tokens que servicios */
.panel-stage {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.panel-stage > * {
  position: relative;
  z-index: 1;
}

.panel-stage::before,
.panel-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.panel-stage::before {
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 8% -10%, rgba(0, 102, 255, 0.28), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 110%, rgba(0, 210, 255, 0.16), transparent 50%),
    linear-gradient(165deg, #05070b 0%, #0a0e16 45%, #06080e 100%);
}

.panel-stage::after {
  inset: -20% -10%;
  background:
    linear-gradient(148deg, transparent 42%, rgba(0, 210, 255, 0.55) 42.2%, rgba(0, 210, 255, 0.08) 42.6%, transparent 43.2%),
    linear-gradient(148deg, transparent 58%, rgba(0, 80, 180, 0.35) 58.15%, transparent 59%),
    linear-gradient(152deg, rgba(12, 18, 28, 0.95) 0%, rgba(12, 18, 28, 0.95) 36%, transparent 36.2%),
    linear-gradient(-28deg, transparent 55%, rgba(8, 12, 20, 0.9) 55.2%, rgba(8, 12, 20, 0.55) 72%, transparent 72.2%);
  opacity: 0.85;
  transform: rotate(-2deg);
}

.panel-card::before {
  background:
    radial-gradient(ellipse 75% 50% at 12% -5%, rgba(0, 102, 255, 0.35), transparent 52%),
    radial-gradient(ellipse 50% 35% at 88% 105%, rgba(0, 210, 255, 0.2), transparent 48%),
    radial-gradient(circle at 18% 88%, rgba(16, 25, 38, 0.9) 0%, transparent 35%),
    linear-gradient(160deg, #04060a 0%, #0b101a 50%, #05070c 100%);
}

.panel-card::after {
  opacity: 1;
  background-image:
    radial-gradient(#101926 14%, transparent 16%),
    radial-gradient(#141e2e 14%, transparent 16%),
    linear-gradient(148deg, transparent 40%, rgba(0, 210, 255, 0.65) 40.15%, rgba(0, 210, 255, 0.1) 40.7%, transparent 41.3%),
    linear-gradient(148deg, transparent 62%, rgba(0, 90, 200, 0.4) 62.1%, transparent 63%),
    linear-gradient(155deg, rgba(10, 14, 22, 0.92) 0%, rgba(10, 14, 22, 0.92) 33%, transparent 33.15%);
  background-size: 14px 14px, 14px 14px, auto, auto, auto;
  background-position: 0 0, 7px 7px, 0 0, 0 0, 0 0;
}

.panel-void::before {
  background:
    radial-gradient(ellipse 50% 40% at 90% 10%, rgba(0, 210, 255, 0.1), transparent 55%),
    linear-gradient(180deg, #05070c 0%, #080b11 100%);
}

.panel-void::after {
  opacity: 0.45;
  transform: rotate(3deg);
}

.panel-plate::before {
  background:
    radial-gradient(ellipse 60% 35% at 50% 0%, rgba(0, 102, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #0b101a 0%, #070a12 55%, #05070c 100%);
}

.panel-plate::after {
  opacity: 0.7;
  transform: rotate(1.5deg) scaleX(-1);
}

/* Contraste de lectura sobre paneles oscuros / tintados */
.panel-stage .text-on-surface-variant {
  color: #c5d0d8;
}

/* Diagonal Cyber Slash Glow Lines */
.cyber-slash {
  background: linear-gradient(135deg,
      rgba(0, 210, 255, 0.8) 0%,
      rgba(0, 110, 255, 0.4) 40%,
      transparent 80%);
}

/* Metallic Text Sheen */
.text-metallic-silver {
  background: linear-gradient(180deg, #ffffff 10%, #dbe2ea 45%, #8c9ba5 85%, #b4c2ce 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-metallic-cyan {
  background: linear-gradient(180deg, #dcf8ff 0%, #00d2ff 50%, #0088cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 3D Poly-faceted crystal aesthetic emulation */
.facet-drop-shadow {
  filter: drop-shadow(0 0 16px rgba(0, 210, 255, 0.65)) drop-shadow(0 0 35px rgba(0, 102, 255, 0.4));
}

.faq-icon {
  transition: transform 0.2s ease;
}

.faq-icon.is-open {
  transform: rotate(180deg);
}

.nav-link {
  color: #9db0bc;
  font-weight: 500;
  text-decoration: none;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link.is-active {
  color: #00d2ff;
  font-weight: 600;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid rgba(0, 210, 255, 0.15);
  background: rgba(7, 10, 16, 0.98);
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0.85rem;
  border-radius: 0.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #9db0bc;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.mobile-nav a:hover,
.mobile-nav a:focus-visible {
  color: #ffffff;
  background-color: rgba(16, 25, 38, 0.9);
  outline: none;
}

.mobile-nav a.nav-link.is-active {
  color: #00d2ff;
  font-weight: 600;
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}