/* ============ PivotLab — styles ============ */
:root {
  --bg: #0B0F1A;
  --bg-soft: #101626;
  --bg-card: #141B2E;
  --line: rgba(255, 255, 255, .08);
  --text: #E7ECF4;
  --text-dim: #93A0B5;
  --accent: #10B981;
  --accent-soft: rgba(16, 185, 129, .12);
  --accent-2: #38BDF8;
  --radius: 18px;
  --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.02em; }
h1 { font-size: clamp(2.9rem, 8vw, 5.4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }

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

.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

section { position: relative; }

.section-head {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}
.section-sub { color: var(--text-dim); margin-top: 1.1rem; font-size: 1.05rem; }

/* ---- reveals ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1);
}
.reveal.visible { opacity: 1; transform: none; }
.d-1 { transition-delay: .1s; }
.d-2 { transition-delay: .2s; }
.d-3 { transition-delay: .3s; }
.d-4 { transition-delay: .4s; }

/* ---- progress bar ---- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 200;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background .35s, border-color .35s, backdrop-filter .35s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 15, 26, .78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -.02em;
}
.brand em { font-style: normal; color: var(--accent); }
.brand-mark { width: 30px; height: 30px; }
.nav-links {
  display: flex;
  gap: 26px;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  transition: color .25s;
}
.nav-links a:hover { color: var(--text); }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s, border-color .25s;
}
.btn-primary {
  background: var(--accent);
  color: #06251B;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(16, 185, 129, .35);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, .03);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, .25); transform: translateY(-2px); }
.btn-sm { padding: 9px 20px; font-size: .88rem; }
.btn-full { width: 100%; }

/* ============ HERO ============ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
}
.hero-glow {
  position: absolute;
  top: -20%; left: 50%;
  width: 900px; height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(16,185,129,.14) 0%, rgba(56,189,248,.06) 45%, transparent 70%);
  filter: blur(10px);
}

.hero-content { position: relative; z-index: 2; max-width: 820px; }
.hero-sub {
  color: var(--text-dim);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 620px;
  margin: 1.6rem auto 0;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.4rem;
}
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 3rem;
  color: var(--text-dim);
  font-size: .88rem;
}
.hero-meta strong { color: var(--text); font-weight: 600; }
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }

/* floating cards */
.hero-float { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.float-card {
  position: absolute;
  background: rgba(20, 27, 46, .72);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .75rem;
  color: var(--text-dim);
  animation: floaty 7s ease-in-out infinite;
}
.float-card svg { width: 120px; height: auto; }
.fc-1 { top: 22%; left: 6%; animation-delay: 0s; }
.fc-2 { top: 18%; right: 9%; animation-delay: 1.6s; }
.fc-3 { bottom: 24%; right: 6%; animation-delay: .8s; }
.fc-4 { bottom: 20%; left: 8%; animation-delay: 2.4s; }
.fc-4 code { font-size: .78rem; color: var(--accent-2); font-family: Consolas, monospace; }
.kpi-label { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.kpi-value { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--accent); }

@keyframes floaty {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -14px; }
}

.scroll-hint {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 14px;
  z-index: 2;
}
.scroll-hint span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--accent);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============ SCROLLY ============ */
.scrolly { padding: 140px 0 60px; background: var(--bg-soft); }
.scrolly-head { max-width: 760px; margin: 0 auto 40px; padding: 0 24px; text-align: center; }

.scrolly-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.scrolly-visual {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}
.visual-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.stage-state {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(.94);
  transition: opacity .7s ease, transform .7s ease;
}
.stage-state.active { opacity: 1; transform: scale(1); }

.stage-caption {
  fill: var(--text-dim);
  font-family: var(--font-body);
  font-size: 13px;
}
.s-0 .chaos rect { fill: rgba(147, 160, 181, .28); stroke: rgba(147,160,181,.35); }
.s-1 .panel { fill: rgba(255,255,255,.03); stroke: var(--line); }
.s-1 .bar-track { fill: rgba(255,255,255,.08); }
.s-1 .bars rect { fill: var(--accent); opacity: .9; }
.s-1 .bars rect:nth-child(3) { fill: var(--accent-2); }
.s-1 .mini-kpis rect { fill: rgba(255,255,255,.05); stroke: var(--line); }
.s-2 .trend {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}
.s-2.active .trend { animation: draw 1.6s ease forwards .2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.s-2 .trend-dot { fill: var(--accent); }
.s-2 .decision-badge rect { fill: var(--accent-soft); stroke: rgba(16,185,129,.4); }
.s-2 .badge-label { fill: var(--text-dim); font-family: var(--font-body); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.s-2 .badge-value { fill: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 18px; }

.scrolly-steps { padding: 12vh 0; }
.step {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: .28;
  transition: opacity .5s ease;
}
.step.active { opacity: 1; }
.step-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-size: .95rem;
  letter-spacing: .12em;
  margin-bottom: .8rem;
}
.step h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 1rem; }
.step p { color: var(--text-dim); max-width: 440px; }

/* ============ CURSOS ============ */
.cursos { padding: 140px 0; }
.cursos-grid {
  max-width: 1180px;
  margin: 60px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.curso-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.curso-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, .35);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.curso-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.curso-icon svg { width: 26px; height: 26px; fill: var(--accent); stroke: var(--accent); }
.curso-card h3 { margin-bottom: .6rem; }
.curso-card > p { color: var(--text-dim); font-size: .95rem; margin-bottom: 1.1rem; }
.curso-card ul { list-style: none; margin-bottom: 1.4rem; }
.curso-card li {
  font-size: .88rem;
  color: var(--text-dim);
  padding: 5px 0 5px 22px;
  position: relative;
}
.curso-card li::before {
  content: "";
  position: absolute;
  left: 0; top: 12px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) scale(.8);
}
.curso-tag {
  margin-top: auto;
  align-self: flex-start;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ============ METODOLOGÍA ============ */
.metodo { padding: 140px 0; background: var(--bg-soft); }
.timeline {
  max-width: 680px;
  margin: 70px auto 0;
  padding: 0 24px;
  position: relative;
}
.timeline-line {
  position: absolute;
  left: 47px; top: 10px; bottom: 10px;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.timeline-fill {
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  transition: height .2s linear;
}
.t-step {
  display: flex;
  gap: 28px;
  padding: 26px 0;
  align-items: flex-start;
}
.t-dot {
  flex: 0 0 48px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  position: relative;
  z-index: 1;
}
.t-body h3 { margin-bottom: .4rem; }
.t-body p { color: var(--text-dim); font-size: .97rem; }

/* ============ EMPRESAS ============ */
.empresas { padding: 140px 0; }
.empresas-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 70px;
  align-items: center;
}
.empresas-copy h2 { margin-bottom: 1.2rem; }
.empresas-copy > p { color: var(--text-dim); margin-bottom: 1.6rem; }
.check-list { list-style: none; }
.check-list li {
  padding: 8px 0 8px 32px;
  position: relative;
  color: var(--text);
  font-size: .98rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 15px;
  width: 14px; height: 8px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.02em;
}
.stat-label { color: var(--text-dim); font-size: .9rem; }

/* ============ TESTIMONIOS ============ */
.testimonios { padding: 40px 0 140px; }
.testi-grid {
  max-width: 1180px;
  margin: 60px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.testi-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.testi-card blockquote {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}
.testi-card figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.testi-card figcaption strong { font-size: .95rem; }
.testi-card figcaption span { color: var(--text-dim); font-size: .85rem; }

/* ============ CTA ============ */
.cta {
  padding: 140px 0;
  background:
    radial-gradient(ellipse 70% 80% at 20% 20%, rgba(16,185,129,.1), transparent 60%),
    radial-gradient(ellipse 60% 70% at 85% 80%, rgba(56,189,248,.08), transparent 60%),
    var(--bg-soft);
}
.cta-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.cta-copy p { color: var(--text-dim); margin-top: 1.3rem; max-width: 420px; }

.cta-form {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cta-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-dim);
}
.cta-form input,
.cta-form textarea {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color .25s, box-shadow .25s;
  resize: vertical;
}
.cta-form input:focus,
.cta-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16,185,129,.15);
}
.form-ok { color: var(--accent); font-size: .92rem; text-align: center; }

/* ============ FOOTER ============ */
.footer { border-top: 1px solid var(--line); padding: 60px 0 40px; }
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer p { color: var(--text-dim); font-size: .92rem; }
.footer nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: .88rem;
  transition: color .25s;
}
.footer nav a:hover { color: var(--text); }
.footer-copy { font-size: .8rem; opacity: .7; margin-top: 10px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .cursos-grid, .testi-grid { grid-template-columns: 1fr 1fr; }
  .float-card svg { width: 90px; }
  .fc-1 { left: 2%; }
  .fc-3 { right: 2%; }
}

@media (max-width: 820px) {
  .nav-links { display: none; }
  .scrolly-inner { grid-template-columns: 1fr; gap: 0; }
  .scrolly-visual {
    position: sticky;
    top: 62px;
    height: auto;
    z-index: 5;
    background: var(--bg-soft);
    padding: 10px 0 16px;
  }
  .visual-stage { max-width: 480px; margin: 0 auto; }
  .scrolly-steps { padding: 6vh 0; }
  .step { min-height: 55vh; text-align: center; align-items: center; }
  .empresas-inner, .cta-inner { grid-template-columns: 1fr; gap: 50px; }
  .fc-2, .fc-4 { display: none; }
  .fc-1 { top: 12%; }
  .fc-3 { bottom: 12%; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .cursos-grid, .testi-grid, .stats-grid, .form-row { grid-template-columns: 1fr; }
  .cursos, .metodo, .empresas, .cta { padding: 100px 0; }
  .float-card { display: none; }
  .hero-meta { flex-direction: column; gap: 8px; }
  .hero-meta .dot { display: none; }
  .timeline-line { left: 43px; }
  .t-dot { flex-basis: 40px; width: 40px; height: 40px; font-size: .9rem; }
  .t-step { gap: 20px; }
  .cta-form { padding: 26px 20px; }
}

/* respeta usuarios con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-card { animation: none; }
  .scroll-hint span { animation: none; }
  .stage-state { transition: none; }
  .s-2.active .trend { animation: none; stroke-dashoffset: 0; }
}
