/* ============================================================
   HEADER (pill nav, adaptado de c4capital.io — código del autor)
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  padding: 20px var(--container-pad);
  transition: padding 0.4s var(--ease-in-out);
}
.site-header__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 12px 14px 12px 24px;
  border-radius: var(--r-pill);
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.4s var(--ease-in-out),
              border-color 0.4s var(--ease-in-out),
              max-width 0.4s var(--ease-in-out),
              box-shadow 0.4s var(--ease-in-out);
}
.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.01em;
  line-height: 1;
}
.site-header__logo svg { flex: none; }
.site-header__logo small {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.site-header__nav {
  display: flex;
  gap: 30px;
  font-size: 15px;
  font-weight: 500;
}
.site-header__nav a {
  color: var(--ink);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}
.site-header__nav a:hover { opacity: 1; }
.site-header__cta { padding: 12px 24px; font-size: 14px; }
.site-header__toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.site-header__toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}
.site-header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-header.is-scrolled { padding: 10px var(--container-pad); }
.site-header.is-scrolled .site-header__inner {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--line);
  box-shadow: 0 4px 24px rgba(16, 21, 30, 0.06);
  max-width: 920px;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-drawer);
  background: var(--bg);
  padding: 110px var(--container-pad) 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-drawer.is-open { opacity: 1; visibility: visible; }
.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
  max-width: 400px;
  margin-inline: auto;
}
.mobile-drawer__nav .btn { font-size: 16px; margin-top: 18px; }

/* ============================================================
   HERO — video que se reproduce una vez y congela el último frame
   ============================================================ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #EDEFF2; /* mismo color que el borde del video: la unión del contain es invisible */
  overflow: hidden;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(238, 240, 243, 0.94) 0%, rgba(238, 240, 243, 0.72) 36%, rgba(238, 240, 243, 0.28) 52%, rgba(238, 240, 243, 0) 66%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  width: 100%;
  padding-top: clamp(112px, 14vh, 152px);
}
.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--sp-4) var(--sp-5);
  align-items: start;
}
.hero__title { color: var(--ink); }
.hero__aside { padding-top: 10px; max-width: 420px; justify-self: end; }
.hero__subtitle {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--ink);
  opacity: 0.78;
}
.hero__actions {
  margin-top: var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
/* Sobre el video, el botón fantasma necesita su propio fondo para pasar AA */
.hero .btn--ghost {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(16, 21, 30, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ============================================================
   QUIÉNES SOMOS — statement editorial + foto + valores
   ============================================================ */
.about { padding: var(--sp-7) 0 var(--sp-6); }
.about__statement {
  font-size: var(--fs-statement);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.22;
  max-width: 22ch;
}
.about__statement .word { color: var(--tint); transition: color 0.3s ease; }
.about__statement .word.is-on { color: var(--ink); }
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--sp-5);
  /* stretch: la imagen ocupa exactamente la altura del texto */
}
.about__text { margin-top: var(--sp-4); }
.about__text p + p { margin-top: var(--sp-3); }
.about__media {
  border-radius: var(--r-card);
  overflow: hidden;
}
.about__media img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.values {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4) var(--sp-4);
  border-top: 1px solid var(--line);
  padding-top: var(--sp-5);
}
.value h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.value p {
  margin-top: 10px;
  font-size: var(--fs-small);
  color: var(--muted);
}
.value__num {
  display: block;
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--brand);
  margin-bottom: 14px;
  line-height: 1;
}

/* ============================================================
   SERVICIOS — acordeón con imagen sincronizada
   ============================================================ */
.services { padding: var(--sp-6) 0 var(--sp-7); }
.services__head { max-width: 720px; }
.services__head .lead { margin-top: var(--sp-3); }
.services__layout {
  margin-top: var(--sp-5);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--sp-5);
  align-items: start;
}
.services__list { border-top: 1px solid var(--line); }
.service { border-bottom: 1px solid var(--line); }
.service__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 4px;
  text-align: left;
  transition: padding 0.3s var(--ease-out);
}
.service__name {
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  transition: color 0.2s ease;
}
.service__icon {
  flex: none;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease-out), background-color 0.25s ease, border-color 0.25s ease;
}
.service__icon svg { width: 14px; height: 14px; transition: stroke 0.25s ease; }
.service__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-in-out);
}
.service__panel-inner { overflow: hidden; }
.service__panel p {
  color: var(--muted);
  max-width: 56ch;
  padding-bottom: 8px;
}
.service__panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 28px;
}
.service__panel li {
  font-size: 0.85rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--tint);
  color: var(--brand);
}
.service.is-open .service__panel { grid-template-rows: 1fr; }
.service.is-open .service__icon {
  background: var(--brand);
  border-color: var(--brand);
  transform: rotate(45deg);
}
.service.is-open .service__icon svg { stroke: #fff; }
.service__media-mobile { display: none; }

.services__media {
  position: sticky;
  top: 110px;
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--tint);
}
.services__media img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.services__media img.is-active { opacity: 1; }

/* ============================================================
   PROCESO — timeline vertical con línea scrubbed
   ============================================================ */
.process {
  background: var(--surface);
  border-block: 1px solid var(--line);
  padding: var(--sp-7) 0;
}
.process__head { max-width: 720px; }
.process__head .lead { margin-top: var(--sp-3); }
.process__track {
  position: relative;
  margin-top: var(--sp-6);
  padding-left: clamp(40px, 6vw, 80px);
}
.process__rail {
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--tint);
}
.process__rail-fill {
  position: absolute;
  inset: 0;
  background: var(--brand);
  transform-origin: top;
  transform: scaleY(0);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: var(--sp-3) var(--sp-5);
  padding: var(--sp-4) 0;
}
/* Cada paso despierta cuando la línea lo alcanza (clase js-dim puesta por JS) */
.process.js-dim .step {
  opacity: 0.28;
  transition: opacity 0.5s ease;
}
.process.js-dim .step.is-passed { opacity: 1; }
.step + .step { border-top: 1px solid var(--line); }
.step::before {
  content: "";
  position: absolute;
  left: calc(clamp(40px, 6vw, 80px) * -1 + 6px);
  top: calc(var(--sp-4) + 14px);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--brand);
}
.step__num {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: 0.02em;
  display: block;
  margin-bottom: 8px;
}
.step h3 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.step p { color: var(--muted); align-self: center; }

/* ============================================================
   FUNDADOR — única sección drenched en navy profundo
   ============================================================ */
.founder {
  background: var(--brand-deep);
  color: var(--on-dark);
  padding: var(--sp-7) 0;
}
.founder__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
}
.founder__kicker {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: var(--sp-3);
}
.founder__title { color: #fff; }
.founder__title em {
  font-style: italic;
  line-height: 1.1;
}
.founder__bio { margin-top: var(--sp-4); color: var(--on-dark-muted); max-width: 54ch; }
.founder__bio strong { color: #fff; font-weight: 700; }
.founder__bio p + p { margin-top: var(--sp-3); }
.founder__stat {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line-dark);
  margin-bottom: var(--sp-4);
}
.founder__stat strong {
  font-size: clamp(4rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}
.founder__stat span { color: var(--on-dark-muted); max-width: 22ch; line-height: 1.4; }
.founder__areas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-4); }
.founder__areas li {
  padding: 14px 2px;
  border-bottom: 1px solid var(--line-dark);
  font-weight: 500;
  font-size: var(--fs-small);
  color: var(--on-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}
.founder__areas li svg { flex: none; opacity: 0.55; }

/* ============================================================
   SECTORES — único marquee de la página
   ============================================================ */
.sectors { padding: var(--sp-7) 0; overflow: hidden; }
.sectors__head {
  max-width: 720px;
  margin-bottom: var(--sp-5);
}
.sectors__head .lead { margin-top: var(--sp-3); }
.marquee {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee-scroll 36s linear infinite;
}
.marquee:hover { animation-play-state: paused; }
.marquee li {
  flex: none;
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  padding: 18px 34px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink);
  background: var(--surface);
  transition: transform 0.35s var(--ease-out), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
@media (hover: hover) and (pointer: fine) {
  .marquee li:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    transform: translateY(-5px) rotate(-1.5deg);
  }
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; flex-wrap: wrap; width: auto; }
}

/* ============================================================
   CTA FINAL — contacto
   ============================================================ */
.contact {
  position: relative;
  padding: var(--sp-7) 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--sp-6);
  align-items: center;
}
.contact__title { max-width: 16ch; }
.contact__lead { margin-top: var(--sp-3); }
.contact__actions {
  margin-top: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.contact__channels { display: grid; gap: 2px; }
.contact__channels a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  transition: padding-left 0.25s var(--ease-out);
}
.contact__channels a:first-child { border-top: 1px solid var(--line); }
.contact__channels a:hover { padding-left: 10px; }
.contact__channels span { color: var(--muted); font-size: var(--fs-small); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--brand-deep);
  color: var(--on-dark-muted);
  padding: var(--sp-5) 0 var(--sp-4);
}
.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line-dark);
}
.site-footer__brand { color: #fff; font-weight: 900; font-size: 19px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.site-footer__tagline { margin-top: 10px; font-size: var(--fs-small); max-width: 30ch; }
.site-footer__nav { display: flex; gap: 28px; font-size: var(--fs-small); font-weight: 500; }
.site-footer__nav a { color: var(--on-dark-muted); transition: color 0.2s ease; }
.site-footer__nav a:hover { color: #fff; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: var(--sp-3);
  font-size: 0.8125rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  .site-header__nav, .site-header__cta { display: none; }
  .site-header__toggle { display: flex; }
}

@media (max-width: 767px) {
  .hero__inner { padding-top: 116px; }
  .hero__content { grid-template-columns: 1fr; }
  .hero__aside { justify-self: start; padding-top: 0; }
  .hero__scrim {
    background: linear-gradient(180deg, rgba(238, 240, 243, 0.95) 0%, rgba(238, 240, 243, 0.8) 48%, rgba(238, 240, 243, 0.3) 66%, rgba(238, 240, 243, 0) 80%);
  }
  .about { padding-top: var(--sp-6); }
  .about__grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .about__media img { min-height: 0; aspect-ratio: 4 / 3; }
  .values { grid-template-columns: 1fr 1fr; gap: var(--sp-4) var(--sp-3); }
  .services__layout { grid-template-columns: 1fr; }
  .services__media { display: none; }
  .service__media-mobile {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 24px;
  }
  .step { grid-template-columns: 1fr; gap: 10px; padding: var(--sp-3) 0; }
  .step::before { top: calc(var(--sp-3) + 14px); }
  .founder__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .contact__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .site-footer__nav { flex-direction: column; gap: 14px; }
}

@media (max-width: 479px) {
  .values { grid-template-columns: 1fr; }
  .founder__areas { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .contact__actions .btn { width: 100%; }
}
