/* ============================================================
   TikRay — base.css
   Variables de diseño, reset y estilos globales.
   ============================================================ */

:root {
  /* Colores */
  --bg:        #07070d;
  --bg-soft:   #0d0e1a;
  --surface:   rgba(255, 255, 255, 0.04);
  --border:    rgba(255, 255, 255, 0.09);
  --text:      #f2f3f8;
  --muted:     #9ba0b8;

  --cyan:      #22d3ee;
  --violet:    #a78bfa;
  --pink:      #f472b6;
  --gradient:  linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--pink));

  /* Tipografía */
  --font-display: "Space Grotesk", sans-serif;
  --font-body:    "Inter", sans-serif;

  /* Medidas */
  --container: 1160px;
  --radius:    20px;
  --nav-h:     72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

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

/* ---------- Fondo aurora (global) ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.16;
}
.aurora::before {
  background: var(--cyan);
  top: -20vw;
  left: -10vw;
  animation: aurora-a 26s ease-in-out infinite alternate;
}
.aurora::after {
  background: var(--violet);
  bottom: -25vw;
  right: -10vw;
  animation: aurora-b 32s ease-in-out infinite alternate;
}
@keyframes aurora-a {
  to { transform: translate(18vw, 14vh) scale(1.2); }
}
@keyframes aurora-b {
  to { transform: translate(-16vw, -12vh) scale(1.15); }
}

/* Textura de grano sutil sobre todo */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  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.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.display {
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 0.5em;
}

.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--cyan);
  margin-bottom: 1.2rem;
}

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

.muted { color: var(--muted); }

/* ---------- Layout ---------- */
.container {
  width: min(var(--container), 92vw);
  margin-inline: auto;
}

.section { padding: clamp(4.5rem, 9vw, 8rem) 0; }

/* ---------- Animación de aparición al hacer scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* Respeto a usuarios que prefieren menos movimiento */
@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;
  }
  .reveal { opacity: 1; transform: none; }
}
