/* How it works — static full-bleed image + expanding mask (triptych-style) */

.hiw-focus-page {
  background: #000;
}

.hiw-focus-main {
  padding-bottom: 3rem;
}

.hiw-focus-intro {
  padding-top: 1.5rem;
  padding-bottom: 1.25rem;
  text-align: center;
}

.hiw-focus-intro h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
}

.hiw-focus-intro p {
  margin: 0;
  color: var(--foreground-diminished);
  font-size: 0.98rem;
  line-height: 1.5;
}

.hiw-focus-notes {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.hiw-focus-notes h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  color: var(--selected);
}

.hiw-focus-notes ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--foreground-diminished);
  font-size: 0.92rem;
  line-height: 1.55;
}

.hiw-focus-notes li + li {
  margin-top: 0.35rem;
}

/* —— Stage ——
   Masks are absolutely positioned slits with gaps. Click expands the hot
   mask to full stage (left/width), while media left counters that move so
   the full-bleed image stays visually static. */

.hiw-focus {
  --hiw-accent: #fff;
  --hiw-title-rest: rgba(255, 255, 255, 0.72);
  --hiw-fade: 0.3s ease;
  --hiw-slide: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  --hiw-expand-duration: 0.55s;
  --hiw-expand-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hiw-collapse-duration: 0.5s;
  --hiw-collapse-ease: cubic-bezier(0.45, 0.05, 0.25, 1);
  --hiw-stage-h: min(78svh, 52rem);
  --hiw-gap: 0.75rem;
  --hiw-radius: 1.25rem;
  --hiw-col: calc((100cqw - 2 * var(--hiw-gap)) / 3);
  --hiw-left-2: calc(var(--hiw-col) + var(--hiw-gap));
  --hiw-left-3: calc(2 * (var(--hiw-col) + var(--hiw-gap)));

  container-type: size;
  position: relative;
  width: min(1120px, calc(100vw - 1.5rem));
  height: var(--hiw-stage-h);
  margin-inline: auto;
  overflow: hidden;
  border-radius: calc(var(--hiw-radius) + 0.15rem);
  background: #000;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.45);
}

.hiw-focus__lane {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: var(--hiw-col);
  overflow: hidden;
  border-radius: var(--hiw-radius);
  background: transparent;
  cursor: pointer;
  outline: none;
  transition:
    left var(--hiw-collapse-duration) var(--hiw-collapse-ease),
    width var(--hiw-collapse-duration) var(--hiw-collapse-ease),
    top var(--hiw-collapse-duration) var(--hiw-collapse-ease),
    height var(--hiw-collapse-duration) var(--hiw-collapse-ease),
    bottom var(--hiw-collapse-duration) var(--hiw-collapse-ease),
    opacity var(--hiw-fade);
}

.hiw-focus:has(.hiw-focus__lane.is-hot) .hiw-focus__lane {
  transition:
    left var(--hiw-expand-duration) var(--hiw-expand-ease),
    width var(--hiw-expand-duration) var(--hiw-expand-ease),
    top var(--hiw-expand-duration) var(--hiw-expand-ease),
    height var(--hiw-expand-duration) var(--hiw-expand-ease),
    bottom var(--hiw-expand-duration) var(--hiw-expand-ease),
    opacity var(--hiw-fade);
}

.hiw-focus__lane:nth-child(1) {
  left: 0;
}

.hiw-focus__lane:nth-child(2) {
  left: var(--hiw-left-2);
}

.hiw-focus__lane:nth-child(3) {
  left: var(--hiw-left-3);
}

.hiw-focus__lane:focus-visible {
  outline: 2px solid var(--selected);
  outline-offset: 3px;
}

/* Full-stage image; left offsets cancel lane.left so the bitmap never moves */
.hiw-focus__media {
  position: absolute;
  top: 0;
  width: 100cqw;
  height: 100cqh;
  max-width: none;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
  transition:
    left var(--hiw-collapse-duration) var(--hiw-collapse-ease),
    top var(--hiw-collapse-duration) var(--hiw-collapse-ease),
    opacity var(--hiw-fade);
}

.hiw-focus:has(.hiw-focus__lane.is-hot) .hiw-focus__media {
  transition:
    left var(--hiw-expand-duration) var(--hiw-expand-ease),
    top var(--hiw-expand-duration) var(--hiw-expand-ease),
    opacity var(--hiw-fade);
}

.hiw-focus__lane:nth-child(1) .hiw-focus__media {
  left: 0;
}

.hiw-focus__lane:nth-child(2) .hiw-focus__media {
  left: calc(-1 * var(--hiw-left-2));
}

.hiw-focus__lane:nth-child(3) .hiw-focus__media {
  left: calc(-1 * var(--hiw-left-3));
}

/* Scrim: same geometry as media */
.hiw-focus__lane::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: 0;
  width: 100cqw;
  height: 100cqh;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.78) 0%,
    rgba(0, 0, 0, 0.28) 42%,
    rgba(0, 0, 0, 0.12) 100%
  );
  pointer-events: none;
  transition:
    left var(--hiw-collapse-duration) var(--hiw-collapse-ease),
    top var(--hiw-collapse-duration) var(--hiw-collapse-ease),
    opacity var(--hiw-fade);
}

.hiw-focus:has(.hiw-focus__lane.is-hot) .hiw-focus__lane::after {
  transition:
    left var(--hiw-expand-duration) var(--hiw-expand-ease),
    top var(--hiw-expand-duration) var(--hiw-expand-ease),
    opacity var(--hiw-fade);
}

.hiw-focus__lane:nth-child(1)::after {
  left: 0;
}

.hiw-focus__lane:nth-child(2)::after {
  left: calc(-1 * var(--hiw-left-2));
}

.hiw-focus__lane:nth-child(3)::after {
  left: calc(-1 * var(--hiw-left-3));
}

.hiw-focus__foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1.25rem 1rem 1.35rem;
  text-align: center;
}

.hiw-focus__title {
  margin: 0;
  color: var(--hiw-title-rest);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.125em;
  text-transform: uppercase;
  transition: color 0.25s ease;
}

.hiw-focus__desc {
  display: grid;
  grid-template-rows: 0fr;
  margin: 0;
  width: min(100%, 22rem);
  max-width: 100%;
  opacity: 0;
  transition:
    grid-template-rows var(--hiw-slide),
    opacity 0.25s ease;
}

.hiw-focus__desc > span {
  overflow: hidden;
  min-height: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.4;
}

/* —— Expanded: mask grows to full stage; media left → 0 (image stays put) —— */

.hiw-focus__lane.is-hot {
  left: 0;
  width: 100%;
  z-index: 5;
}

/* Collapse only: stay above siblings while left/width tween back */
.hiw-focus__lane.is-elevated {
  z-index: 5;
}

.hiw-focus__lane.is-hot .hiw-focus__media,
.hiw-focus__lane.is-hot::after {
  left: 0;
  top: 0;
}

.hiw-focus__lane.is-hot .hiw-focus__title {
  color: var(--hiw-accent);
}

.hiw-focus__lane.is-hot .hiw-focus__desc {
  grid-template-rows: 1fr;
  opacity: 1;
}

/* Keep siblings behind + hidden while open or mid-collapse */
.hiw-focus:has(.hiw-focus__lane.is-hot) .hiw-focus__lane:not(.is-hot),
.hiw-focus:has(.hiw-focus__lane.is-elevated) .hiw-focus__lane:not(.is-elevated):not(.is-hot) {
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

/* —— Mobile: stacked slits full vw; expand top/height —— */

@media (max-width: 899px) {
  .hiw-focus {
    --hiw-stage-h: min(88svh, 42rem);
    --hiw-row: calc((100cqh - 2 * var(--hiw-gap)) / 3);
    --hiw-top-2: calc(var(--hiw-row) + var(--hiw-gap));
    --hiw-top-3: calc(2 * (var(--hiw-row) + var(--hiw-gap)));
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
    border-radius: 0;
  }

  .hiw-focus__lane,
  .hiw-focus__lane:nth-child(1),
  .hiw-focus__lane:nth-child(2),
  .hiw-focus__lane:nth-child(3) {
    left: 0;
    width: 100%;
    height: var(--hiw-row);
    bottom: auto;
  }

  .hiw-focus__lane:nth-child(1) {
    top: 0;
  }

  .hiw-focus__lane:nth-child(2) {
    top: var(--hiw-top-2);
  }

  .hiw-focus__lane:nth-child(3) {
    top: var(--hiw-top-3);
  }

  .hiw-focus__lane:nth-child(1) .hiw-focus__media,
  .hiw-focus__lane:nth-child(1)::after,
  .hiw-focus__lane:nth-child(2) .hiw-focus__media,
  .hiw-focus__lane:nth-child(2)::after,
  .hiw-focus__lane:nth-child(3) .hiw-focus__media,
  .hiw-focus__lane:nth-child(3)::after {
    left: 0;
    width: 100cqw;
  }

  .hiw-focus__lane:nth-child(1) .hiw-focus__media,
  .hiw-focus__lane:nth-child(1)::after {
    top: 0;
  }

  .hiw-focus__lane:nth-child(2) .hiw-focus__media,
  .hiw-focus__lane:nth-child(2)::after {
    top: calc(-1 * var(--hiw-top-2));
  }

  .hiw-focus__lane:nth-child(3) .hiw-focus__media,
  .hiw-focus__lane:nth-child(3)::after {
    top: calc(-1 * var(--hiw-top-3));
  }

  .hiw-focus__lane.is-hot {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .hiw-focus__lane.is-hot .hiw-focus__media,
  .hiw-focus__lane.is-hot::after {
    top: 0;
    left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hiw-focus__lane,
  .hiw-focus__media,
  .hiw-focus__lane::after,
  .hiw-focus__title,
  .hiw-focus__desc {
    transition: none !important;
  }

  .hiw-focus__lane.is-hot .hiw-focus__desc {
    grid-template-rows: 1fr;
    opacity: 1;
  }
}
