:root {
  --bg: #0b0b14;
  --surface: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f3f1fb;
  --muted: #a9a6c2;
  --a: #8b5cf6;
  --b: #22d3ee;
  --c: #f472b6;
  --radius: 20px;
  --pad: clamp(16px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

/* Fondo luminoso */
.glow {
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 90vh;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 25% 30%, rgba(139, 92, 246, 0.45), transparent 70%),
    radial-gradient(35% 45% at 75% 20%, rgba(34, 211, 238, 0.30), transparent 70%),
    radial-gradient(30% 40% at 55% 70%, rgba(244, 114, 182, 0.25), transparent 70%);
  filter: blur(40px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  to { transform: translate3d(3%, 4%, 0) scale(1.08); }
}

/* Navegación */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--pad);
  max-width: 1200px;
  margin: 0 auto;
}
.logo { font-weight: 700; letter-spacing: 0.02em; }
.nav nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 0.95rem; color: var(--muted); }
.nav nav a { padding: 8px 0; transition: color 0.2s; }
.nav nav a:hover { color: var(--text); }

/* Portada */
.hero {
  min-height: 78vh;
  min-height: 78svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 22px;
  padding: 48px var(--pad) 72px;
  max-width: 900px;
  margin: 0 auto;
}
.tag {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--surface);
}
h1 {
  font-size: clamp(3rem, 15vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 800;
}
h1 span {
  background: linear-gradient(100deg, var(--a), var(--b) 55%, var(--c));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { color: var(--muted); font-size: clamp(1rem, 2.4vw, 1.25rem); max-width: 56ch; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  background: linear-gradient(100deg, var(--a), var(--b));
  color: #0b0b14;
  border-color: transparent;
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.7);
}
.btn.ghost { background: var(--surface); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Secciones */
.section { max-width: 1200px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) var(--pad); }
h2 { font-size: clamp(1.6rem, 5vw, 2.6rem); letter-spacing: -0.02em; line-height: 1.15; margin-bottom: clamp(20px, 4vw, 40px); }
h3 { font-size: 1.2rem; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s, border-color 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, 0.28); }
.card p { color: var(--muted); }

/* Espacios para imágenes */
.ph {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(34, 211, 238, 0.12)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0 12px, transparent 12px 24px);
}

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery .wide { grid-column: 1 / -1; aspect-ratio: 21 / 9; }

.cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 0 var(--pad) clamp(40px, 8vw, 96px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.08));
}
.cta h2 { margin-bottom: 0; }
.cta p { color: var(--muted); max-width: 48ch; }
@media (min-width: 1296px) { .cta { margin-inline: auto; } }

.footer { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 28px var(--pad) 40px; border-top: 1px solid var(--line); }

/* Aparición suave (solo si el script está activo) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Móvil */
@media (max-width: 640px) {
  .nav nav a:not(:last-child) { display: none; }
  .hero { min-height: 70svh; padding-top: 24px; }
  .actions { width: 100%; flex-direction: column; }
  .btn { width: 100%; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .wide { aspect-ratio: 16 / 9; }
  .gallery .ph:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glow { animation: none; }
}
