/*!
 * NetClad Corp — estilos propios
 * Complementa a Tailwind. Los colores replican los tokens de assets/js/tw-config.js.
 *
 * Idea rectora: la base es neutra y oscura como la de Grupo NetBlu, pero cada
 * producto aporta su propio color a través de la variable --acento. Así el
 * ecosistema se ve como un ecosistema y no como un catálogo uniforme.
 */

:root {
  --nc-bg: #05070A;
  --nc-bg2: #080C14;
  --nc-surface: #0B111C;
  --nc-surface2: #101823;
  --nc-border: #18222E;
  --nc-border2: #233040;
  --nc-text: #E9EFF5;
  --nc-muted: #95A1B0;
  --nc-dim: #78859A;
  --nc-cyan: #00C1DE;
  --nc-cyan-soft: #4FDDF2;
  --nc-navy: #001689;
  --nc-green: #95D600;
  --nc-gray: #77777A;

  /* Color de producto. Cada tarjeta o página lo sobrescribe. */
  --acento: #00C1DE;

  --nc-header-h: 74px;
  color-scheme: dark;
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nc-header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

html, body { background-color: var(--nc-bg); }

body {
  color: var(--nc-text);
  font-family: Lato, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: Lato, system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

::selection { background: rgba(0, 193, 222, 0.3); color: #fff; }

/* -------------------------------------------------------------------------
   Accesibilidad
   ------------------------------------------------------------------------- */

:focus-visible {
  outline: 3px solid var(--nc-cyan);
  outline-offset: 3px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

.nc-skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--nc-cyan);
  color: #00131A;
  font-weight: 700;
  transition: top 0.18s ease-out;
}
.nc-skip:focus { top: 16px; }

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

/* -------------------------------------------------------------------------
   Tipografía de apoyo
   ------------------------------------------------------------------------- */

.nc-eyebrow {
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acento);
}

.nc-label {
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* -------------------------------------------------------------------------
   Superficies
   ------------------------------------------------------------------------- */

.nc-grid-bg {
  background-image:
    linear-gradient(rgba(149, 161, 176, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(149, 161, 176, 0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 76% 68% at 50% 20%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 76% 68% at 50% 20%, #000 30%, transparent 78%);
}

.nc-card {
  position: relative;
  background: var(--nc-surface);
  border: 1px solid var(--nc-border);
  border-radius: 16px;
  transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}
.nc-card:hover {
  border-color: color-mix(in srgb, var(--acento) 45%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 26px 52px -28px color-mix(in srgb, var(--acento) 60%, transparent);
}

/* Enlace que cubre toda la tarjeta.
   El pseudo-elemento va en el ENLACE: puesto en la tarjeta taparia al propio
   enlace y se tragaria los clics. La tarjeta debe tener un solo <a>. */
.nc-card-link { position: relative; }
.nc-card-link a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

/* Franja superior de color en las tarjetas de producto. */
.nc-card-producto::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, var(--acento), transparent 85%);
  opacity: 0.85;
}

.nc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--acento) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--acento) 28%, transparent);
  color: var(--acento);
  font-size: 1.1rem;
  flex: none;
}

.nc-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--acento) 30%, transparent);
  background: color-mix(in srgb, var(--acento) 8%, transparent);
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--nc-text);
}

.nc-dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--acento);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--acento) 18%, transparent);
  flex: none;
}

/* -------------------------------------------------------------------------
   Botones
   ------------------------------------------------------------------------- */

.nc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.75rem 1.5rem;
  border-radius: 11px;
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.nc-btn:active { transform: translateY(1px); }

.nc-btn-primary {
  background: var(--acento);
  color: #00131A;
  border: 1px solid var(--acento);
}
.nc-btn-primary:hover { filter: brightness(1.12); }

.nc-btn-ghost {
  background: transparent;
  color: var(--nc-text);
  border: 1px solid var(--nc-border2);
}
.nc-btn-ghost:hover { border-color: var(--acento); color: var(--acento); }

.nc-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: Montserrat, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--acento);
}
.nc-link-arrow i { transition: transform 0.18s ease; }
.nc-link-arrow:hover i,
.nc-card:hover .nc-link-arrow i { transform: translateX(4px); }

/* -------------------------------------------------------------------------
   Navegación
   ------------------------------------------------------------------------- */

.nc-header {
  background: rgba(5, 7, 10, 0.72);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.nc-header[data-scrolled="true"] {
  background: rgba(5, 7, 10, 0.95);
  border-bottom-color: var(--nc-border);
}

.nc-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.15rem;
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  color: #C3CDD9;
  transition: color 0.18s ease;
}
.nc-nav-link:hover { color: var(--nc-text); }
.nc-nav-link[aria-current="page"] { color: var(--nc-cyan); }
.nc-nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px; border-radius: 2px;
  background: var(--nc-cyan);
}

.nc-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: min(560px, 88vw);
  padding: 0.6rem;
  border-radius: 16px;
  background: #070C14;
  border: 1px solid var(--nc-border);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}
.nc-dropdown[data-open="true"] {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nc-dropdown a {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  transition: background-color 0.16s ease;
}
.nc-dropdown a:hover { background: rgba(0, 193, 222, 0.08); }

.nc-drawer {
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.nc-drawer[data-open="true"] { transform: translateX(0); }

/* -------------------------------------------------------------------------
   Formulario
   ------------------------------------------------------------------------- */

.nc-field {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #070C14;
  border: 1px solid var(--nc-border2);
  color: var(--nc-text);
  font-size: 0.9375rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.nc-field::placeholder { color: #5C6A7C; }
.nc-field:hover { border-color: #2E3E52; }
.nc-field:focus {
  border-color: var(--nc-cyan);
  box-shadow: 0 0 0 3px rgba(0, 193, 222, 0.18);
  outline: none;
}
.nc-field[aria-invalid="true"] {
  border-color: #F87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14);
}
select.nc-field {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2395A1B0'%3E%3Cpath d='M5.5 7.5 10 12l4.5-4.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 20px;
  padding-right: 2.5rem;
}
select.nc-field option { background: #070C14; color: var(--nc-text); }

.nc-error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: #FCA5A5;
}
.nc-error[data-visible="true"] { display: block; }

.nc-alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 0.9375rem;
}
.nc-alert-ok    { background: rgba(149, 214, 0, 0.10);  border: 1px solid rgba(149, 214, 0, 0.34);  color: #D6F58C; }
.nc-alert-error { background: rgba(248, 113, 113, 0.09); border: 1px solid rgba(248, 113, 113, 0.32); color: #FECACA; }

/* -------------------------------------------------------------------------
   Texto largo
   ------------------------------------------------------------------------- */

.nc-prose p { margin-bottom: 1.15rem; color: var(--nc-muted); }
.nc-prose p:last-child { margin-bottom: 0; }
.nc-prose strong { color: var(--nc-text); font-weight: 700; }
.nc-prose a { color: var(--acento); text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------------------------
   Barra de desplazamiento
   ------------------------------------------------------------------------- */

@supports selector(::-webkit-scrollbar) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-track { background: var(--nc-bg); }
  ::-webkit-scrollbar-thumb {
    background: #1C2836;
    border: 3px solid var(--nc-bg);
    border-radius: 999px;
  }
  ::-webkit-scrollbar-thumb:hover { background: #2A3A4D; }
}

/* -------------------------------------------------------------------------
   Movimiento reducido
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-aos] { opacity: 1 !important; transform: none !important; }
  .nc-card:hover { transform: none; }
}

@media print {
  .nc-header, .nc-drawer, .nc-skip { display: none !important; }
  body { background: #fff; color: #000; }
}
