/* =====================================================================
   05 · SECCIONES — un bloque por sección, en el orden del HTML.
   Aquí va la maqueta "estática" (sin animación). Los ajustes que solo
   existen cuando el scroll está animado viven en 06-motion.css.
   ===================================================================== */

/* ---------------------------------------------------------------------
   01 HERO
   --------------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--c-white);
}

.hero__stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
}

.hero__frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* JS anima --inset y --radius para convertir el video en tarjeta */
  -webkit-clip-path: inset(var(--inset-t, 0vh) var(--inset-x, 0vw) var(--inset-b, 0vh) var(--inset-x, 0vw) round var(--radius-frame, 0px));
  clip-path: inset(var(--inset-t, 0vh) var(--inset-x, 0vw) var(--inset-b, 0vh) var(--inset-x, 0vw) round var(--radius-frame, 0px));
}

.hero__frame {
  background-color: #2b8fdf;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
}

.hero__claim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7vh;
  z-index: 2;
  color: #3023AE;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0; /* aparece solo con el scroll animado */
  white-space: nowrap; /* siempre 2 líneas: el <br> define el corte */
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------------
   02 NUESTROS SERVICIOS (INTRO SECCIÓN INDEPENDIENTE)
   --------------------------------------------------------------------- */
.services-intro {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-block: clamp(48px, 6vw, 84px);
  text-align: center;
}

.services-intro__container {
  max-width: 860px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.services-intro .eyebrow {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a499ff;
  margin-bottom: 16px;
}

/* Títulos principales unificados: tamaño grande idéntico a Nuestros servicios */
.main-title,
.services-intro__title,
.service-copy__title,
.about__main-title {
  font-size: clamp(2.4rem, 1.4rem + 3.8vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 900;
  text-wrap: balance;
}

.services-intro__title {
  margin-bottom: 20px;
  text-align: center;
}

.services-intro__lead {
  max-width: 56ch;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.35rem);
  line-height: 1.5;
  text-align: center;
}

.services-intro__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: clamp(18px, 2.5vh, 28px);
}

.services-intro__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.stack-panel {
  position: relative;
  display: flex;
  align-items: center;
  padding-block: clamp(36px, 5vw, 64px);
}

.stack-panel__inner {
  transform-origin: 50% 0;
  width: 100%;
}

.services-influencer {
  position: relative;
}

.services-influencer__panel {
  padding-block: clamp(48px, 6vw, 84px);
}

.service-copy__title {
  margin-bottom: 20px;
}

.service-copy .lead {
  max-width: 36ch;
  opacity: 0.95;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
}

.service-visual {
  position: relative;
  width: 100%;
  max-width: clamp(280px, 32vw, 420px);
  margin-left: auto;
}

.service-visual img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 36px rgba(10, 6, 60, 0.22));
}

.service-visual__num {
  position: absolute;
  right: 4%;
  bottom: 4%;
  color: var(--c-primary);
  font-size: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  line-height: 1;
}

/* Formatos de alto impacto / Galería de piezas ---------------------- */
.gallery-section {
  position: relative;
  color: var(--c-primary);
  padding-top: clamp(84px, 9vw, 130px);
  padding-bottom: clamp(64px, 8vw, 110px);
  scroll-margin-top: calc(var(--header-h, 72px) + 30px);
}

.gallery__header {
  text-align: center;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.gallery__header .eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-accent);
  margin-bottom: 12px;
}

.gallery__title {
  font-size: clamp(2.2rem, 1.5rem + 3vw, 4rem);
  line-height: 1.05;
  margin-bottom: 16px;
  text-align: center;
}

.gallery__subtitle {
  max-width: 52ch;
  margin-inline: auto;
  color: var(--c-slate);
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.25rem);
  text-align: center;
}

.gallery__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.gallery__filter {
  appearance: none;
  border: 1px solid #dcdbe5;
  background: #f4f3f9;
  color: var(--c-primary, #1c1544);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.gallery__filter:hover {
  background: #ebeaf3;
  border-color: var(--c-primary);
  transform: translateY(-1px);
}

.gallery__filter.active {
  background: var(--c-primary);
  color: #ffffff;
  border-color: var(--c-primary);
  box-shadow: 0 4px 16px rgba(28, 21, 68, 0.25);
}

.gallery__filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding-inline: 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.76rem;
  font-weight: 700;
}

.gallery__filter.active .gallery__filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Rejilla alineada en filas: tarjetas una al lado de la otra */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 20px;
  width: 100%;
  margin-top: 36px;
}

@media (min-width: 1440px) {
  .gallery__grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 26px 22px;
  }
}

@media (max-width: 1100px) {
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 16px;
  }
}

@media (max-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 14px;
  }
}

@media (max-width: 480px) {
  .gallery__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.gallery-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.gallery-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(18, 12, 48, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.07);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.gallery-card__link:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(48, 35, 174, 0.2), 0 0 0 1px rgba(48, 35, 174, 0.25);
}

.gallery-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: #0d0e14;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  flex-shrink: 0;
}

.gallery-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-card__link:hover .gallery-card__img {
  transform: scale(1.035);
}

.gallery-card__badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--c-primary, #1c1544);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
  white-space: nowrap;
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 13, 18, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-card__link:hover .gallery-card__overlay,
.gallery-card__link:focus-visible .gallery-card__overlay {
  opacity: 1;
}

.gallery-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffffff;
  color: var(--c-primary);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transform: translateY(6px);
  transition: transform 0.25s ease;
}

.gallery-card__link:hover .gallery-card__cta {
  transform: translateY(0);
}

@media (hover: none) {
  .gallery-card__overlay {
    opacity: 1;
    background: transparent;
  }
  .gallery-card__cta {
    transform: translateY(0);
  }
}

.gallery-card__content {
  padding: 12px 14px 14px;
  background: #ffffff;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gallery-card__brand {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
  text-align: center;
}

.gallery-card__name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.25;
  margin: 0;
  text-align: center;
  white-space: normal;
}

/* ---------------------------------------------------------------------
   03 CASOS DE ÉXITO
   --------------------------------------------------------------------- */
.cases__title {
  margin-bottom: clamp(28px, 3vw, 44px);
  white-space: nowrap;
}

.cases__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 4vw, 56px) clamp(16px, 1.8vw, 24px);
}

.case-card--wide {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .cases__grid {
    grid-template-columns: 1fr;
  }

  .case-card--wide .case-card__media {
    aspect-ratio: 1.25;
  }
}

/* ---------------------------------------------------------------------
   04 NOSOTROS
   --------------------------------------------------------------------- */
.about__main-title {
  margin-bottom: 16px;
  color: var(--c-primary);
}

.about__subtitle {
  font-size: clamp(1.25rem, 1.1rem + 1vw, 2.1rem);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 24px;
}

.about .lead {
  max-width: 40ch;
}

.about__photo {
  overflow: hidden;
  border-radius: var(--radius-sm);
  aspect-ratio: 1431 / 1047; /* foto horizontal del equipo */
}

.about__photo picture {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 640px) {
  .about__photo {
    aspect-ratio: 2 / 3; /* foto vertical del equipo */
    max-width: 520px;
    margin-inline: auto;
  }
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------------------------------------------------------------------
   05 PERSONAS
   --------------------------------------------------------------------- */
.people {
  position: relative;
  padding-bottom: var(--section-py);
}

.people__stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(36px, 5vw, 64px);
  overflow: hidden;
}

.people__title {
  padding-inline: var(--gutter);
  text-align: center;
}

.people__viewport {
  overflow-x: auto;
  scrollbar-width: none;
}

.people__track {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  width: max-content;
  padding-inline: var(--gutter);
}

.member {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: clamp(140px, 13vw, 190px);
  text-align: center;
}

.member img {
  width: 82%;
  aspect-ratio: 1;
  margin-bottom: 16px;
  border-radius: 50%;
  object-fit: cover;
  background: #eceaf6;
}

.member strong {
  color: var(--c-primary);
  font-size: 16px;
  line-height: 1.2;
}

.member span {
  margin-top: 4px;
  font-size: 13px;
}

.member img {
  border: 2px solid var(--c-line); /* Cambia el grosor y el color a tu gusto */
  border-radius: 50%;        /* Opcional: para redondear las esquinas del borde */
}


/* ---------------------------------------------------------------------
   06 CIFRAS
   --------------------------------------------------------------------- */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(48px, 6vw, 80px) auto 0;
  max-width: 1080px;
}

.stat {
  position: relative;
  display: flex;
  flex-direction: column-reverse; /* número arriba, etiqueta abajo */
  align-items: center;
  padding: 12px 20px;
  text-align: center;
}

.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--c-line-light);
  transform-origin: top;
  transform: scaleY(var(--line, 1));
}

.stat__num {
  margin: 0;
  font-family: var(--font-black);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  font-size: var(--fs-stat);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  margin-top: 6px;
  font-size: clamp(17px, 1.8vw, 26px);
  font-weight: 700;
  line-height: 1;
}

@media (max-width: 640px) {
  .stats__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .stat + .stat::before {
    left: 30%;
    right: 30%;
    top: -16px;
    bottom: auto;
    width: auto;
    height: 1px;
  }
}

/* ---------------------------------------------------------------------
   07 PARTNERS
   --------------------------------------------------------------------- */
.partners__sub {
  margin-top: 12px;
  color: var(--c-slate);
  text-align: center;
}

.partners__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 72px);
  margin-top: clamp(40px, 5vw, 64px);
}

.partners__row--b {
  margin-top: clamp(28px, 3.5vw, 48px);
}

.partners__row img {
  width: auto;
  height: clamp(36px, 4.6vw, 66px);
  object-fit: contain;
}

.partners__row--b li:nth-child(2) img,
.partners__row--b li:nth-child(3) img {
  height: clamp(54px, 7vw, 100px);
}

/* ---------------------------------------------------------------------
   08 SEDES
   --------------------------------------------------------------------- */
.locations__grid {
  align-items: start;
}

.locations__copy {
  padding-top: 40px;
}

.locations__title {
  margin-bottom: 16px;
}

.locations__list li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.locations__list li::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--c-line);
}

.locations__list span {
  color: var(--c-accent);
}

/* ---------------------------------------------------------------------
   09 MÉTODO (proceso)
   --------------------------------------------------------------------- */
.process {
  position: relative;
  isolation: isolate; /* las tarjetas del abanico nunca pasan por encima del menú */
  background-size: 160% 100%;
}

.process__stage {
  padding-block: var(--section-py);
}

.process__subtitle {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2.2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.process__cards {
  display: flex;
  gap: 20px;
  margin-top: 48px;
  overflow-x: auto;
  scrollbar-width: none;
}

.step {
  flex: 0 0 auto;
  width: clamp(200px, 22vw, 300px);
  text-align: center;
}

.step__media {
  overflow: hidden;
  aspect-ratio: 0.84;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
}

.step__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step__label {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.step__text {
  margin-top: 12px;
}

.step__text p {
  margin-top: 6px;
  font-size: 15px;
}

.process__detail,
.process__controls {
  display: none; /* visibles solo con scroll animado */
  margin-top:  15px;
}

/* ---------------------------------------------------------------------
   10 CONTACTO
   --------------------------------------------------------------------- */
.contact__eyebrow {
  margin-bottom: 26px;
  text-transform: uppercase;
}

.contact__title {
  margin-bottom: 26px;
}

.contact .form-card {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
}

/* ---------------------------------------------------------------------
   05 PERSONAS — arrastrar para desplazar (js/sections/team-strip.js)
   --------------------------------------------------------------------- */
.about {
  padding-bottom: clamp(36px, 4vw, 56px);
}

.people {
  padding-top: clamp(24px, 3vw, 40px);
}

.people__stage {
  gap: clamp(28px, 3vw, 44px);
}

.people__viewport {
  cursor: grab;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.people__viewport::-webkit-scrollbar {
  display: none;
}

.people__viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.people__viewport.is-dragging a {
  pointer-events: none;
}

.people__track {
  padding-bottom: 8px;
}

.member img {
  -webkit-user-drag: none;
  pointer-events: none;
}

.member__in {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-top: 10px;
  border-radius: 8px;
  color: var(--c-primary);
  transition: color 0.3s, background-color 0.3s, transform 0.3s var(--ease-out);
}

.member__in:hover,
.member__in:focus-visible {
  background: var(--c-primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------------------------------------------------------------------
   FOOTER — enlaces legales
   --------------------------------------------------------------------- */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer__legal a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 640px) {
  .hero__claim {
    font-size: 6.2vw;
  }
}

/* Móvil: el titular de Casos puede pasar a 2 líneas (no se corta) */
@media (max-width: 640px) {
  .cases__title {
    white-space: normal;
  }
}

/* ---------------------------------------------------------------------
   HERO en pantallas verticales: video vertical 1080 × 1920 (9:16) a
   pantalla completa (object-fit: cover). Los textos del video deben ir
   dentro de la zona segura central (≈ 860 × 1500 px).
   --------------------------------------------------------------------- */
