/* ============================================
   BASE.CSS — Sistema de Diseño ARCA Landing
   Colores: Novacode Brand (brand.md)
   Fuente: Montserrat (Google Fonts)
   ============================================ */

/* ---- Google Fonts: Montserrat ---- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

/* ---- Variables CSS: Sistema de Diseño ---- */
:root {
  /* Colores del Brand */
  --color-bg:           #0E0628;   /* Algorithm Black — fondo principal */
  --color-bg-deep:      #080416;   /* Más oscuro — footer, separadores */
  --color-surface:      #160937;   /* Superficies elevadas */
  --color-surface-2:    #1E0F4A;   /* Cards hover, elementos secundarios */

  --color-primary:      #764FF9;   /* Synapse Purple — botones, CTAs */
  --color-primary-rgb:  118, 79, 249;
  --color-primary-light:#B19BFC;   /* Data Flow Lilac — highlights */
  --color-primary-dark: #5B35D4;   /* Para hover de botones */

  --color-text:         #F8F8F8;   /* Interface White — texto principal */
  --color-text-muted:   rgba(248, 248, 248, 0.55);
  --color-text-faint:   rgba(248, 248, 248, 0.3);

  --color-border:       rgba(118, 79, 249, 0.18);
  --color-border-hover: rgba(118, 79, 249, 0.55);

  /* Gradientes */
  --grad-primary:       linear-gradient(135deg, #764FF9, #B19BFC);
  --grad-hero-bg:       radial-gradient(ellipse at 30% 40%, rgba(118,79,249,0.18) 0%, transparent 60%),
                        radial-gradient(ellipse at 75% 20%, rgba(177,155,252,0.1) 0%, transparent 50%),
                        radial-gradient(ellipse at 60% 80%, rgba(118,79,249,0.08) 0%, transparent 50%);
  --grad-glow:          radial-gradient(ellipse at center, rgba(118,79,249,0.35) 0%, transparent 70%);
  --grad-gold:          linear-gradient(135deg, #E8B84B, #F5C842);

  /* Tipografía */
  --font-primary:       'Montserrat', sans-serif;

  /* Escala tipográfica fluida */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-hero:  clamp(2.8rem, 5.5vw, 5rem);
  --text-h2:    clamp(1.9rem, 3.5vw, 3rem);
  --text-h3:    clamp(1.15rem, 2vw, 1.35rem);

  /* Espaciado */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;
  --space-32:  128px;

  /* Layout */
  --max-width:    1200px;
  --section-py:   clamp(64px, 8vw, 120px);
  --section-px:   clamp(20px, 5vw, 40px);

  /* Bordes */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 100px;

  /* Sombras */
  --shadow-card:
    0 1px 3px rgba(0,0,0,0.3),
    0 8px 24px rgba(0,0,0,0.25),
    0 32px 64px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.04);

  --shadow-glow-sm:   0 0 16px rgba(118,79,249,0.3);
  --shadow-glow-md:   0 0 32px rgba(118,79,249,0.4);
  --shadow-glow-lg:   0 0 60px rgba(118,79,249,0.35);

  /* Transiciones */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.4s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  overflow-x: hidden;
}

/* Noise texture global — granulado atmosférico sutil */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028;
  pointer-events: none;
  z-index: 9998;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-primary);
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol { list-style: none; }

/* ---- Utilidades de Layout ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

.section {
  padding-block: var(--section-py);
}

/* ---- Tipografía base ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  line-height: 1.1;
  font-weight: 800;
  color: var(--color-text);
}

p {
  color: var(--color-text-muted);
  line-height: 1.75;
}

/* ---- Botones ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 15px 36px;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(118,79,249,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-md);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid rgba(118,79,249,0.5);
}
.btn-outline:hover {
  background: rgba(118,79,249,0.1);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* ---- Badge / Pill ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(118,79,249,0.12);
  border: 1px solid rgba(118,79,249,0.35);
  color: var(--color-primary-light);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pill-gold {
  background: rgba(232,184,75,0.12);
  border-color: rgba(232,184,75,0.4);
  color: #E8B84B;
}

/* ---- Label de sección ---- */
.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-primary-light);
  margin-bottom: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  animation: pulse-dot 2.2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(118,79,249,0.8);
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.3; transform: scale(0.65); }
}

/* ---- Card base ---- */
.card {
  background: rgba(22, 9, 55, 0.45);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
  position: relative;
  overflow: hidden;
  /* Glassmorphism real: difumina el canvas de fondo */
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  /* GPU prep + 3D tilt */
  will-change: transform;
  transform-style: preserve-3d;
  /* Sombra de elevación multicapa */
  box-shadow:
    0 2px 4px rgba(0,0,0,0.45),
    0 8px 20px rgba(0,0,0,0.35),
    0 24px 48px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

.card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-6px);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.55),
    0 16px 36px rgba(0,0,0,0.45),
    0 48px 96px rgba(0,0,0,0.25),
    0 0 48px rgba(118,79,249,0.14),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ---- Gradient text ---- */
.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Dot-grid background overlay ---- */
.dot-grid {
  background-image: radial-gradient(rgba(118,79,249,0.2) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ---- Scroll animation classes ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- Divider ---- */
.divider-gradient {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-primary-light), transparent);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
