/* Històric: pase de archivo y fichas grandes. Tokens de :root. */

.hx-stage {
  position: relative;
  isolation: isolate;
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: hidden;
  scroll-margin-top: var(--header-h, 7.65rem);
}

#corporatiu,
.corp-stage:not(.hx-stage) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}

.hx-film {
  position: relative;
  height: min(78vh, 820px);
  min-height: 540px;
  overflow: hidden;
  background: #050505;
}

.hx-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease-motor, ease);
}

.hx-slide.is-on {
  opacity: 1;
  z-index: 1;
}

.hx-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: none;
  filter: none;
}

.hx-shade,
.hx-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hx-shade {
  display: none;
}

.hx-grain {
  display: none;
}

.hx-copy {
  position: absolute;
  z-index: 3;
  left: max(1.25rem, 5vw);
  right: max(1.25rem, 22vw);
  bottom: 4.8rem;
}

.hx-kicker {
  margin: 0 0 0.7rem;
  color: var(--accent);
  font-family: var(--font-body), Barlow, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.hx-stage .hx-copy h2,
.hx-stage.band-white .hx-copy h2,
.hx-stage.band-black .hx-copy h2 {
  margin: 0 !important;
  max-width: 100%;
  color: #fff !important;
  font-size: clamp(2.5rem, 5.1vw, 4.7rem) !important;
  line-height: 0.88 !important;
  text-shadow: none;
}

.hx-stage .hx-copy p:not(.hx-kicker),
.hx-stage.band-white .hx-copy p:not(.hx-kicker) {
  max-width: 34rem;
  margin-top: 1rem !important;
  color: rgb(255 255 255 / 0.82) !important;
  font-size: 1.02rem !important;
  line-height: 1.5 !important;
}

.hx-stage .hx-legacy {
  display: none !important;
}

.hx-ui {
  position: absolute;
  right: max(1rem, 4vw);
  bottom: 1.35rem;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.hx-index,
.hx-total,
.hx-slash,
.hx-cap {
  margin: 0;
  color: #fff;
  font-family: var(--font-body), Barlow, sans-serif;
}

.hx-index,
.hx-total {
  font-family: var(--font-display), Oswald, sans-serif;
  font-size: 1.35rem;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1;
}

.hx-slash {
  color: var(--accent);
  font-size: 0.85rem;
}

.hx-cap {
  margin-right: 0.4rem;
  max-width: 16rem;
  overflow: hidden;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hx-nav {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgb(0 0 0 / 0.28);
  border: 1px solid rgb(255 255 255 / 0.28);
  border-radius: 999px;
  cursor: pointer;
}

.hx-nav svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.hx-nav:hover {
  color: #fff;
  border-color: var(--accent);
}

.hx-nav:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.hx-bar {
  position: absolute;
  right: 8vw;
  bottom: 0;
  left: 8vw;
  z-index: 4;
  height: 2px;
  background: rgb(255 255 255 / 0.16);
}

.hx-bar > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
}

.hx-stage > .mx-auto {
  display: none !important;
}

.hx-stage .space-y-3 {
  display: grid;
  gap: 0.85rem;
}

.hx-stage article[class*="grid-cols"] {
  position: relative;
  grid-template-columns: minmax(380px, 48%) minmax(0, 1fr) !important;
  min-height: 340px;
  overflow: hidden;
  background: #0c0c0c !important;
  border: 1px solid rgb(255 255 255 / 0.1) !important;
  transition: border-color 0.35s var(--ease-motor, ease), transform 0.45s var(--ease-motor, ease);
}

.hx-stage article[class*="grid-cols"] > :first-child {
  grid-row: 1 / span 2;
}

.hx-stage article[class*="grid-cols"] > :nth-child(2) {
  align-self: end;
  padding-bottom: 0.15rem !important;
}

.hx-stage article[class*="grid-cols"] > :last-child {
  grid-column: 2;
  align-self: start;
  padding-top: 0 !important;
  padding-bottom: 1.35rem !important;
}

.hx-stage article::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: 2px;
  background: transparent;
  transition: background 0.35s var(--ease-motor, ease);
}

.hx-stage article:hover {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent) !important;
  transform: translateY(-3px);
}

.hx-stage article:hover::before {
  background: var(--accent);
}

.hx-stage article .relative {
  min-height: 340px !important;
  height: 100%;
  overflow: hidden;
  background: #0c0c0c;
}

.hx-stage article .relative img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hx-stage article img {
  transition: transform 0.9s var(--ease-motor, ease), filter 0.9s var(--ease-motor, ease);
  filter: saturate(1.05);
}

.hx-stage article:hover img {
  transform: scale(1.08);
  filter: saturate(1.12) contrast(1.04);
}

.hx-stage article h3,
.hx-stage.band-white article h3,
.hx-stage.band-white article h3[class*="text-white"] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: clamp(1.55rem, 2.3vw, 2.35rem) !important;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.hx-stage article p[class*="text-accent"],
.hx-stage.band-white article p[class*="text-accent"] {
  color: var(--accent) !important;
  font-family: var(--font-display), Oswald, sans-serif;
  font-size: 1.65rem !important;
  font-style: italic;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  line-height: 1;
  text-transform: none;
}

.hx-stage article [class*="text-white/60"],
.hx-stage.band-white article [class*="text-white/60"] {
  max-width: 36rem;
  margin-top: 0.45rem !important;
  color: rgb(255 255 255 / 0.68) !important;
  font-size: 0.98rem !important;
}

.hx-stage article a {
  min-height: 2.45rem;
  align-items: center;
}

@media (max-width: 800px) {
  .hx-film {
    height: 72vh;
    min-height: 460px;
  }

  .hx-copy {
    right: 1rem;
    bottom: 4.2rem;
  }

  .hx-stage .hx-copy h2 {
    font-size: clamp(2.4rem, 12vw, 3.4rem) !important;
  }

  .hx-cap {
    display: none;
  }

  .hx-stage article[class*="grid-cols"] {
    grid-template-columns: 1fr !important;
    min-height: 0;
  }

  .hx-stage article[class*="grid-cols"] > :first-child,
  .hx-stage article[class*="grid-cols"] > :last-child {
    grid-row: auto;
    grid-column: 1;
  }

  .hx-stage article[class*="grid-cols"] > :nth-child(2),
  .hx-stage article[class*="grid-cols"] > :last-child {
    align-self: stretch;
    padding-bottom: 1.15rem !important;
  }

  .hx-stage article .relative {
    min-height: 220px !important;
    aspect-ratio: 16 / 9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hx-slide,
  .hx-slide img,
  .hx-bar > span,
  .hx-stage article,
  .hx-stage article img {
    transition: none !important;
  }

  .hx-slide img,
  .hx-slide.is-on img,
  .hx-stage article:hover img {
    transform: none;
    filter: none;
  }
}
