/* Versión A: guía landing-page-design (Elaya), con la marca de VANGUARD IA por encima. */
:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1f262e;
  --ink: #f2f4f3;
  --muted: #9ba4ab;
  --accent: #0e9f82;
  --accent-ink: #04130f;
  --accent-text: #22c79f; /* verde para texto sobre fondo oscuro: contraste 5,8:1 o más */
  --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px; --s-400: 32px;
  --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Estilos de texto */
.heading-1 { font-size: 60px; line-height: 60px; font-weight: 600; letter-spacing: -0.02em; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.02em; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.01em; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.body-lg { font-size: 18px; line-height: 28px; color: var(--muted); }

@media (max-width: 720px) {
  .heading-1 { font-size: 48px; line-height: 48px; }
  .heading-2 { font-size: 36px; line-height: 40px; }
  .heading-3 { font-size: 30px; line-height: 36px; }
  .heading-5 { font-size: 20px; line-height: 28px; }
}

.skip { position: absolute; left: -999px; top: var(--s-200); background: var(--accent); color: var(--accent-ink); padding: var(--s-75) var(--s-100); border-radius: 8px; z-index: 100; }
.skip:focus { left: var(--s-200); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-75);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 16px; line-height: 24px;
  padding: var(--s-75) var(--s-100); border-radius: 12px;
  text-decoration: none;
  transition: transform 300ms var(--ease), background-color 300ms var(--ease);
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { background: #12b896; transform: translateY(-1px); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn--lg { font-size: 18px; line-height: 28px; padding: var(--s-100) var(--s-300); }
.btn--sm { font-size: 14px; line-height: 20px; padding: var(--s-75) var(--s-100); border-radius: 8px; }
.link { color: var(--accent-text); font-weight: 600; text-decoration: none; transition: color 300ms var(--ease); }
.link:hover { color: #6fe3c6; text-decoration: underline; text-underline-offset: 4px; }
.link::after { content: " →"; }

/* Navegación flotante */
.nav {
  position: fixed; top: var(--s-200); left: 50%; transform: translateX(-50%);
  z-index: 50; display: flex; align-items: center; gap: var(--s-400);
  padding: var(--s-75) var(--s-75) var(--s-75) var(--s-300);
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  width: max-content; max-width: calc(100% - 32px);
}
.nav__brand { font-weight: 700; font-size: 16px; letter-spacing: 0.04em; text-decoration: none; }
.nav__brand span { color: var(--accent-text); margin-left: 4px; }
.nav__links { display: flex; gap: var(--s-300); }
.nav__links a { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color 300ms var(--ease); }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--ink); }
.nav__toggle { display: none; width: 40px; height: 40px; background: none; border: 0; position: relative; cursor: pointer; }
.nav__toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); transition: transform 500ms var(--ease); }
.nav__toggle span:first-child { top: 15px; }
.nav__toggle span:last-child { top: 23px; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(13, 17, 23, 0.94); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-300);
  padding: var(--s-900) var(--gutter);
}
.menu[hidden] { display: none; }
.menu a:not(.btn) { font-size: 30px; line-height: 36px; font-weight: 600; text-decoration: none; }
.menu > * { opacity: 0; transform: translateY(24px); transition: opacity 500ms var(--ease), transform 500ms var(--ease); }
.menu.is-open > * { opacity: 1; transform: none; }
.menu.is-open > *:nth-child(2) { transition-delay: 60ms; }
.menu.is-open > *:nth-child(3) { transition-delay: 120ms; }
.menu.is-open > *:nth-child(4) { transition-delay: 180ms; }
.menu.is-open > *:nth-child(5) { transition-delay: 240ms; }
.menu .btn { align-self: flex-start; }

@media (max-width: 860px) {
  .nav { left: var(--s-200); right: var(--s-200); transform: none; width: auto; justify-content: space-between; gap: var(--s-200); }
  .nav__links, .nav > .btn { display: none; }
  .nav__toggle { display: block; }
}

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background: rgba(13, 17, 23, 0.62); }
.hero__pause { position: absolute; right: var(--gutter); bottom: var(--s-400); z-index: 2; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(13, 17, 23, 0.6); cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none; }
/* No se ve: aparece sólo si alguien llega con el teclado (accesibilidad, WCAG 2.2.2). */
.hero__pause:focus-visible { opacity: 1; pointer-events: auto; }
.hero__pause span { width: 12px; height: 14px; border-left: 4px solid var(--ink); border-right: 4px solid var(--ink); }
.hero__pause.is-paused span { width: 0; height: 0; border-style: solid; border-width: 7px 0 7px 12px; border-color: transparent transparent transparent var(--ink); margin-left: 3px; }
.hero__pause:hover { background: rgba(13, 17, 23, 0.85); }
.hero__inner { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: var(--s-900) var(--gutter) var(--s-800); }
.hero__title {
  max-width: 680px;
  background: linear-gradient(90deg, #ffffff, #9b9b9b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { max-width: 680px; margin-top: var(--s-300); font-size: 18px; line-height: 28px; color: #c9d1d6; }
.hero__actions { margin-top: var(--s-400); }
.hero__proof { margin-top: var(--s-200); font-size: 14px; line-height: 20px; color: var(--muted); }

/* Secciones */
section:not(.hero) { max-width: var(--wrap); margin: 0 auto; padding: var(--s-900) var(--gutter); }


.paths__grid { margin-top: var(--s-600); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-300); }
.path { background: var(--surface); border-radius: 24px; padding: var(--s-75); display: flex; flex-direction: column; }
.path img { border-radius: 16px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.path__body { padding: var(--s-300); display: grid; gap: var(--s-100); }
.path__body p { color: var(--muted); }


.method__head, .projects__head { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-700); align-items: end; }
.steps { list-style: none; margin-top: var(--s-600); display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-300); counter-reset: paso; }
.step { position: relative; overflow: hidden; border-radius: 24px; min-height: 380px; display: flex; align-items: flex-end; background: var(--surface); isolation: isolate; }
.step img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.42; z-index: -2; transition: opacity 500ms var(--ease), transform 800ms var(--ease); }
.step::after { content: ""; position: absolute; inset: 0; background: rgba(13, 17, 23, 0.35); z-index: -1; }
.step:hover img { opacity: 0.6; transform: scale(1.04); }
.step__text { padding: var(--s-300); display: grid; gap: var(--s-75); }
.step__text::before { counter-increment: paso; content: counter(paso); width: 32px; height: 32px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 600; font-size: 14px; margin-bottom: var(--s-100); }
.step__text .title-1 { color: #ffffff; font-weight: 600; }
.step__text p { color: #e3e8e6; font-size: 14px; line-height: 20px; }

.projects__grid { margin-top: var(--s-600); display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-300); }
.project { background: var(--surface); border-radius: 24px; padding: var(--s-75); display: flex; flex-direction: column; transition: background-color 300ms var(--ease); }
.project:hover { background: var(--surface-2); }
.project img { border-radius: 16px; aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.project__body { padding: var(--s-300); display: grid; gap: var(--s-100); align-content: start; flex: 1; grid-template-rows: auto auto 1fr auto; }
.project p { color: var(--muted); }
.status { justify-self: start; font-size: 12px; line-height: 16px; font-weight: 500; color: #c4ccd1; background: rgba(255, 255, 255, 0.08); padding: var(--s-50) var(--s-100); border-radius: 999px; }
.status--live { color: var(--accent-text); background: rgba(14, 159, 130, 0.14); }

.faq__list { margin-top: var(--s-600); display: grid; gap: var(--s-100); }
.faq details { background: var(--surface); border-radius: 16px; }
.faq summary { cursor: pointer; list-style: none; padding: var(--s-300); font-size: 18px; line-height: 28px; font-weight: 500; display: flex; justify-content: space-between; gap: var(--s-200); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; transition: transform 300ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 var(--s-300) var(--s-300); color: var(--muted); }

.cta { text-align: left; display: grid; gap: var(--s-300); justify-items: start; padding-bottom: var(--s-900); }
.cta__title { background: linear-gradient(90deg, #ffffff, #9b9b9b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta .body-lg { max-width: 560px; }

.footer { max-width: var(--wrap); margin: 0 auto; padding: var(--s-400) var(--gutter) var(--s-600); display: flex; gap: var(--s-300); align-items: center; justify-content: space-between; flex-wrap: wrap; color: var(--muted); font-size: 14px; line-height: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer a { color: var(--muted); }

/* Entradas al hacer scroll */
/* Sólo se esconde si el script arrancó: sin JS el contenido se ve igual. */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  section:not(.hero) { padding: var(--s-700) var(--gutter); }
  .paths__grid, .method__head, .projects__head { grid-template-columns: 1fr; gap: var(--s-300); }
  .steps { grid-template-columns: 1fr 1fr; }
  .step { min-height: 300px; }
  .projects__grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr 1fr; gap: var(--s-100); }
  .step { min-height: 240px; border-radius: 16px; }
  .step__text { padding: var(--s-200); }
  .step__text p { font-size: 13px; line-height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .menu > * { transform: none; transition: opacity 300ms linear; }
  .btn, .btn:hover, .step img, .step:hover img { transform: none; transition: none; }
  .hero__video, .hero__pause { display: none; }
  .hero { background: url("assets/video/planta-poster.webp") center / cover; }
}
