
:root {
  --navy: #031F41;
  --muted: #4A5F7A;
  --line: #E3E7ED;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: Montserrat, sans-serif;
  color: var(--navy);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--navy); }
img { display: block; }
section[id], div[id] { scroll-margin-top: 0; }

/* ---------- Cabecera: aparece al salir de la portada ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  padding: 28px max(40px, calc((100vw - 1240px) / 2 + 40px));
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-100%); pointer-events: none;
  transition: opacity .5s ease, transform .6s var(--ease);
}
.header.show { opacity: 1; transform: none; pointer-events: auto; }
.brand { display: flex; align-items: baseline; gap: .3em; font-size: 18px; line-height: 1; text-decoration: none; }

/* Logo en texto: VENCOR en negrita, CAPITAL en regular */
.w-v { font-weight: 700; letter-spacing: .01em; }
.w-c { font-weight: 400; letter-spacing: .02em; }
.nav { display: flex; gap: 40px; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }

/* enlaces de texto con subrayado animado (cabecera y portada) */
.nav a, .links a { text-decoration: none; position: relative; padding: 6px 0; }
.nav a::after, .links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--navy); transition: right .4s ease;
}
.nav a:hover::after, .links a:hover::after,
.nav a:focus-visible::after, .links a:focus-visible::after { right: 0; }

/* ---------- Portada ---------- */
.home {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 64px; padding: 24px; overflow: hidden;
}
.logo { margin: 0; display: flex; align-items: baseline; justify-content: center; gap: .3em;
  font-size: min(8.4vw, 94px); line-height: 1; white-space: nowrap; }
.logo span { display: inline-block; }
.logo .v { animation: desdeArriba 1.6s var(--ease) both; }
.logo .c { animation: desdeAbajo 1.6s var(--ease) both; }

.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 56px;
  font-size: 12px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; }
.links a { opacity: 0; animation: aparecer .9s ease both; }
.links a:nth-child(1) { animation-delay: 1.5s; }
.links a:nth-child(2) { animation-delay: 1.65s; }
.links a:nth-child(3) { animation-delay: 1.8s; }

/* ---------- Bloques de texto ---------- */
.panel {
  min-height: 100vh; min-height: 100svh;
  max-width: 1240px; margin: 0 auto; padding: 140px 40px 120px;
  display: flex; flex-direction: column; justify-content: center; gap: 32px;
}
.panel.short { min-height: 80vh; }
.lead { margin: 0; max-width: 980px; font-size: clamp(28px, 4vw, 48px); line-height: 1.25; font-weight: 300; letter-spacing: -.01em; }
.lead strong { font-weight: 700; }
.small { margin: 0; max-width: 620px; font-size: 17px; line-height: 1.7; color: var(--muted); }
.big { margin: 0; font-size: clamp(48px, 8vw, 96px); font-weight: 300; line-height: 1.05; }
.mail { font-size: 18px; text-decoration: none; border-bottom: 1px solid var(--line); align-self: flex-start; padding-bottom: 4px; transition: border-color .3s ease; }
.mail:hover { border-color: var(--navy); }

/* aparición al llegar con el scroll */
.fx { opacity: 0; transform: translateY(24px); transition: opacity 1s ease, transform 1s var(--ease); }
.fx.d2 { transition-delay: .2s; }
.fx.in { opacity: 1; transform: none; }

/* ---------- Cómo trabajamos: letras a distinta velocidad ---------- */
.step {
  min-height: 100vh; max-width: 1240px; margin: 0 auto; padding: 0 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
}
.step .num { font-size: 14px; font-weight: 500; letter-spacing: .2em; color: #8193AA; }
.word {
  margin: 0; font-size: clamp(24px, 6.3vw, 112px); font-weight: 500; line-height: .95;
  letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap;
}
.word .l { display: inline-block; will-change: transform; }
.step p { margin: 0; max-width: 640px; font-size: 18px; line-height: 1.7; color: var(--muted);
  opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s var(--ease); }
.step.visible p { opacity: 1; transform: none; }

.footer {
  max-width: 1240px; margin: 0 auto; padding: 32px 40px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}

@keyframes desdeArriba { from { transform: translateY(-110vh); } to { transform: none; } }
@keyframes desdeAbajo  { from { transform: translateY(110vh); }  to { transform: none; } }
@keyframes aparecer    { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .header { padding: 18px 24px; }
  .nav { gap: 18px; font-size: 10px; }
  .links { flex-direction: column; align-items: center; gap: 20px; }
  .panel, .step { padding-left: 24px; padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .links a, .fx, .step p { opacity: 1; transform: none; }
}
