/* ==========================================================================
   Nettvian — Landing page
   Sistema de diseño unificado · Manual de Identidad Visual v2.0 (cian/púrpura)
   Tokens canónicos en :root + alias de compatibilidad para los componentes.
   ========================================================================== */

:root {
  /* === Tokens canónicos (Manual de Identidad v2.0) ====================== */
  /* Superficies — capas cada vez más claras sobre el lienzo, no sombras */
  --bg:        #08090D; /* lienzo / background            */
  --bg-2:      #0E0F16; /* superficie nivel 1             */
  --panel:     #13141C; /* panel / tarjeta                */
  --panel-2:   #1A1B26; /* panel elevado                  */

  /* Líneas y bordes */
  --line:      rgba(150,158,196,0.14);
  --line-2:    rgba(150,158,196,0.24);

  /* Texto — escala de grises fríos */
  --white:     #FFFFFF; /* títulos / máxima jerarquía     */
  --sub:       #D5D7E0; /* subtítulos                     */
  --body:      #9A9CAB; /* cuerpo                         */
  --muted:     #6A6C7D; /* metadatos / captions           */

  /* Marca */
  --primary:   #0DCCF2; /* cian      */
  --secondary: #A655F6; /* púrpura   */
  --accent:    #A655F6; /* = secondary */
  --blue:      #5B8BF5; /* azul intermedio del gradiente */
  --blue-d:    #0AA6CC; /* cian profundo */
  --destructive: #EF4343;
  --destructive-soft: #F87171;

  /* Gradiente firma — cian → azul → púrpura a 120° */
  --grad:      linear-gradient(120deg, #0DCCF2 0%, #5B8BF5 50%, #A655F6 100%);
  --grad-soft: linear-gradient(135deg, rgba(13,204,242,0.16), rgba(166,85,246,0.16));

  /* Tipografía — Sora (display) · Manrope (cuerpo) · Space Mono (técnico) */
  --font-display: "Sora", "Cabinet Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    "Manrope", "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "Space Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  --maxw: 1320px;

  /* === Alias de compatibilidad (nombres usados por los componentes) =====
     Mantienen la semántica original (ink = oscuro, fog = claro) pero ahora
     resuelven a los valores canónicos del manual de identidad. */
  --ink:        #08090D;            /* color oscuro (= --bg)              */
  --ink-2:      #0E0F16;            /* (= --bg-2)                         */
  --ink-3:      #13141C;            /* (= --panel)                        */
  --ink-line:   var(--line);
  --ink-line-2: var(--line-2);

  --fog:        #FFFFFF;            /* claro / foreground (= --white)     */
  --fog-mute:   #9A9CAB;            /* cuerpo (= --body)                  */
  --fog-dim:    #6A6C7D;            /* captions (= --muted)               */

  --cyan:       #0DCCF2;
  --violet:     #A655F6;
  --blue-mid:   #5B8BF5;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 110px; /* deja respirar las anclas bajo el navbar fijo */
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Luz ambiental — focos radiales cian/púrpura que tiñen el lienzo */
body {
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(13,204,242,0.08), transparent 60%),
    radial-gradient(1000px 600px at 100% 30%, rgba(166,85,246,0.09), transparent 60%),
    var(--bg);
}

::selection { background: var(--violet); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Foco visible accesible (teclado) */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.16); }

/* Grain overlay */
#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Custom cursor */
#cursor-dot, #cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
}
#cursor-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.18s cubic-bezier(0.22,1,0.36,1);
}
#cursor-ring {
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.28s cubic-bezier(0.22,1,0.36,1),
              height 0.28s cubic-bezier(0.22,1,0.36,1),
              background 0.28s,
              border-color 0.28s;
}
body.cursor-hover #cursor-ring {
  width: 70px; height: 70px;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.9);
}
@media (max-width: 900px), (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* Type */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--white);
}
h1 { font-weight: 800; letter-spacing: -0.035em; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono--bright { color: var(--white); }
.mono--accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

/* Reusable */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
}
@media (max-width: 680px) { .wrap { padding: 0 20px; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 14px var(--cyan);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
  font-family: var(--font-body);
}
/* Botón primario: superficie clara, texto oscuro; al hover se llena con el
   gradiente y el texto permanece OSCURO (regla del manual: texto oscuro
   sobre el gradiente / sobre cian). */
.btn--primary {
  background: var(--white);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn--primary:hover::before { opacity: 1; }
.btn--primary:hover { color: var(--ink); transform: translateY(-1px); }
.btn--primary > * { position: relative; z-index: 1; }

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* Botón gradiente: gradiente de marca + texto OSCURO (manual de identidad) */
.btn--gradient {
  background: var(--grad);
  color: var(--ink);
  position: relative;
}
.btn--gradient::after {
  content: "";
  position: absolute;
  inset: -2px;
  background: var(--grad);
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.5;
  z-index: -1;
  transition: opacity 0.3s;
}
.btn--gradient:hover::after { opacity: 0.9; }
.btn--gradient:hover { transform: translateY(-1px); }

.btn .arrow {
  display: inline-flex;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
}
.btn:hover .arrow { transform: translateX(4px); }

/* Glass panel */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 24px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22,1,0.36,1), transform 0.9s cubic-bezier(0.22,1,0.36,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Utility: faint gridlines */
.gridlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(150,158,196,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(150,158,196,0.05) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 85%);
}

/* Aurora blobs */
.aurora {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  pointer-events: none;
  will-change: transform;
}
.aurora--cyan   { background: radial-gradient(circle, #0DCCF2, transparent 60%); }
.aurora--violet { background: radial-gradient(circle, #A655F6, transparent 60%); }
.aurora--blue   { background: radial-gradient(circle, #5B8BF5, transparent 60%); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #cursor-dot,
  #cursor-ring,
  #grain,
  .aurora,
  .gridlines {
    display: none !important;
  }
}

/* Section rhythm */
section { position: relative; padding: 140px 0; }
@media (max-width: 900px) { section { padding: 96px 0; } }

/* Divider shim */
.hairline {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line-2), transparent);
  margin: 0;
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
  gap: 64px;
}
.marquee--slow { animation-duration: 62s; }

/* Float anim */
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(24px, -18px); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 20px); }
}

/* Pulse dot */
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}
