/* ==========================================================================
   MYCLOUD.UNO — STYLESHEET PRINCIPAL
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES DE DISEÑO & CONFIGURACIÓN
   -------------------------------------------------------------------------- */
:root {
  /* Paleta de Colores */
  --bg: #ffffff;
  --bg-alt: #f8f9fc;
  --ink: #111827;
  --ink-secondary: #374151;
  --muted: #4b5563;
  --muted-light: #9ca3af;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  
  /* Acentos de Marca */
  --accent: #4f46e5;          /* Indigo primario */
  --accent-hover: #4338ca;    /* Indigo oscuro */
  --accent-soft: #eef2ff;     /* Fondo suave indigo */
  --accent-ink: #ffffff;
  --gines-accent: #0d9488;    /* Verde Teal para Telecom */
  --gines-soft: rgba(13, 148, 136, 0.08);

  /* Estructura & Bordes */
  --radius: 16px;
  --radius-sm: 8px;
  --radius-full: 9999px;
  --container-width: 1120px;
  --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Enfoque accesible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   3. LAYOUT & CONTENEDORES
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

section {
  padding: 96px 0;
  scroll-margin-top: 80px;
}

.bg-alt {
  background-color: var(--bg-alt);
}

/* --------------------------------------------------------------------------
   4. NAVEGACIÓN (NAVBAR)
   -------------------------------------------------------------------------- */
#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: padding var(--transition), box-shadow var(--transition);
}

#nav.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

#nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  transition: padding var(--transition);
}

#nav.scrolled .wrap {
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.logo span {
  color: var(--accent);
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

.navlinks a {
  position: relative;
  padding: 4px 0;
}

.navlinks a:hover,
.navlinks a.active {
  color: #ffffff;
}

.navlinks a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   5. HERO SECTION & SEÑAL SVG
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: 110px;
  padding-bottom: 80px;
  background-color: var(--bg);
  background-image: 
    linear-gradient(rgba(79, 70, 229, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 25%, transparent 20%, var(--bg) 85%);
  z-index: 1;
}

.hero > .wrap {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.hero h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  max-width: 860px;
  color: var(--ink);
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero .lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 620px;
  margin-top: 24px;
  line-height: 1.65;
}

/* Animación Canal de Señal SVG */
.signal {
  margin-top: 64px;
  position: relative;
}

.signal svg {
  width: 100%;
  height: auto;
  display: block;
}

.signal-path {
  stroke-dasharray: 6 8;
  stroke: var(--line);
}

.signal-pulse {
  stroke-dasharray: 20 400;
  stroke: var(--accent);
  animation: pulse 3.2s linear infinite;
}

@keyframes pulse {
  to {
    stroke-dashoffset: -420;
  }
}

.node-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  fill: var(--muted);
}

.node-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 600;
  fill: var(--ink);
}

/* --------------------------------------------------------------------------
   6. TITULARES & ESTILOS DE SECCIÓN
   -------------------------------------------------------------------------- */
.kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.sec-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.sec-title span {
  color: var(--accent);
}

.sec-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 540px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   7. ANIMACIONES AL SCROLL (REVEAL)
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--delay, 0) * 60ms);
  will-change: transform, opacity;
}

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

/* --------------------------------------------------------------------------
   8. FOOTER
   -------------------------------------------------------------------------- */
footer {
  background: #111827;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.5);
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  section {
    padding: 64px 0;
  }
  .wrap {
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero {
    padding-top: 80px;
    padding-bottom: 50px;
  }
  .signal {
    margin-top: 40px;
  }
}
