/* ── Port Hero ──────────────────────────────────────────────────────────────── */
.port-hero {
  height: 100vh;
  height: 100dvh;
  background: var(--red-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  position: relative;
}

.port-hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.5rem, 10vw, 8rem);
  color: var(--white);
  letter-spacing: -0.06em;
  line-height: 1;
}

/* .scroll-hint / .scroll-mouse / .scroll-dot / .scroll-label: definidos una
   sola vez en styles.css (misma sección, mismo fondo --red-dark que .hero
   de index.html) — no se redefinen aquí para evitar que se desincronicen. */

/* ── Clients Strip ──────────────────────────────────────────────────────────── */
.port-clients {
  overflow: hidden;
  padding: 2.5rem 0;
  background: var(--gray-light);
}

.port-clients-track {
  display: flex;
  width: max-content;
  animation: marquee 50s linear infinite;
}

.port-clients-track:hover {
  animation-play-state: paused;
}

.port-clients-logos {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  list-style: none;
  margin: 0;
}

.port-clients-logos li {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 4.5rem;
  height: 52px;
}

.port-client-logo {
  height: 30px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.4;
  transition: opacity 0.3s var(--ease-out), filter 0.3s var(--ease-out);
  display: block;
}

/* Logos muy anchos: se reducen para que su ancho visual sea ~80px */
.port-clients-logos li:nth-child(3)  .port-client-logo { height: 15px; } /* Air Europa  5.1:1 */
.port-clients-logos li:nth-child(7)  .port-client-logo { height: 22px; } /* Abanca      3.8:1 */
.port-clients-logos li:nth-child(8)  .port-client-logo { height: 12px; } /* AFAR 4      7.0:1 */
.port-clients-logos li:nth-child(9)  .port-client-logo { height: 13px; } /* Hitachi     6.3:1 */
.port-clients-logos li:nth-child(10) .port-client-logo { height: 18px; } /* Santagloria 4.7:1 */
.port-clients-logos li:nth-child(11) .port-client-logo { height: 10px; } /* Brewster    9.3:1 */


.port-clients-track:hover .port-client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .port-clients-track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 2rem;
    padding: 0 2rem;
  }
}

/* ── Section wrapper ────────────────────────────────────────────────────────── */
/* ── Sección de proyectos: intro ─────────────────────────────────────────────── */
.port-stack-section {
  background: var(--cream);
  padding: 10rem 0 2rem;
}

.port-stack-intro {
  max-width: 640px;
  margin: 0 auto 3rem;
  padding: 0 2rem;
  text-align: center;
}

.port-section-num {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.port-stack-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--dark);
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin-bottom: 0.75rem;
}

/* Dos grupos independientes (Product Design / Creative Campaigns), mismo
   estilo visual, cada uno con su propio stack pineado */
.port-stack-group + .port-stack-group {
  margin-top: 2rem;
}

/* ── Stack de cards con scroll (position: sticky, sin GSAP) ──────────────────── */
.port-stack-wrapper {
  position: relative;
}

.port-stack-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.port-stack-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(880px, calc(100vw - 18rem));
  height: min(480px, calc(100vh - 18rem));
  display: flex;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
  will-change: transform;
}

.port-stack-media {
  flex: 1;
  position: relative;
  min-width: 0;
}

.port-stack-media img,
.port-stack-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.port-stack-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.85rem;
  padding: 3rem;
  min-width: 0;
}

.port-stack-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.port-stack-num {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(42, 0, 14, 0.15);
  border-radius: 2rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--dark);
}

.port-stack-cat {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 2rem;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.port-stack-cat--design {
  background: rgba(228, 28, 55, 0.1);
  color: var(--red-dark);
}

.port-stack-cat--campaign {
  background: var(--red);
  color: var(--white);
}

/* Estado del proyecto (ej. "En curso") — pill neutro, no compite con la categoría */
.port-stack-status {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 2rem;
  border: 1px solid rgba(42, 0, 14, 0.15);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(42, 0, 14, 0.55);
}

.port-stack-cardtitle {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  color: var(--dark);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.port-stack-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  padding: 0.7rem 1.3rem;
  border: 1px solid rgba(42, 0, 14, 0.2);
  border-radius: 2rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.port-stack-cta svg {
  transition: transform 0.3s var(--ease-out);
}

.port-stack-cta:hover,
.port-stack-card:hover .port-stack-cta {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--white);
  transform: translateY(-2px);
}

.port-stack-cta:hover svg,
.port-stack-card:hover .port-stack-cta svg {
  transform: translateX(3px);
}

@keyframes scrollDot {
  0%   { transform: translateY(0);    opacity: 1; }
  55%  { transform: translateY(13px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 1; }
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .port-hero {
    padding: 7rem 1.5rem 5rem;
  }

  .port-hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .port-stack-section {
    padding: 5rem 0 2rem;
  }

  .port-stack-title {
    font-size: clamp(1.8rem, 8vw, 2.75rem);
  }

  /* Sin sticky/scroll-jacking en mobile: lista simple, estática */
  .port-stack-wrapper {
    height: auto !important;
  }

  .port-stack-stage {
    position: static;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1.5rem 3rem;
    overflow: visible;
  }

  .port-stack-card {
    position: static;
    flex-direction: column;
    width: 100%;
    height: auto;
    transform: none !important;
    opacity: 1 !important;
  }

  .port-stack-media {
    height: 220px;
    flex: none;
  }

  .port-stack-content {
    padding: 1.5rem;
  }

  .port-stack-group + .port-stack-group {
    margin-top: 1rem;
  }
}
