/*
  Institutional direction contract
  THESIS: Institutional development is the campus and digital infrastructure behind
  CUHK’s next chapter; the page keeps the physical environment and its commitments visible.
  OWN-WORLD: white editorial hero, F2F2F7 strategy canvas, white strategy cards,
  purple/cyan accents, and one campus closing image.
  STORY: visitors meet the institutional direction, scan its six commitments in a
  two-column grid, then land on the closing image before the footer.
  FIRST VIEWPORT: the title and campus composition establish the direction before
  the numbered strategy cards begin.
  FORM: desktop two-part hero; tablet and mobile return to normal document flow.
*/

.institutional-prototype {
  --strategy-theme: var(--i);
  --institutional-ink: var(--neutral-black);
  --institutional-paper: var(--purple-milky);
  --institutional-gold: var(--gold-light-royal);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--institutional-paper);
  color: var(--institutional-ink);
}

.institutional-prototype .nav-link.active {
  color: var(--cuhk-purple);
}

.institutional-content-kicker {
  color: var(--i);
}

.institutional-prototype main {
  flex: 1 0 auto;
}

.institutional-prototype > .site-footer {
  margin-top: auto;
}

.institutional-page {
  overflow: clip;
}

.institutional-story {
  display: block;
  background: var(--institutional-paper);
}

.institutional-hero {
  position: relative;
  min-height: 0;
  background: #fff;
  color: var(--institutional-ink);
  isolation: isolate;
}

.institutional-hero::before,
.institutional-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.institutional-hero::before {
  display: none;
}

.institutional-hero::after {
  display: none;
}

.institutional-hero-inner {
  --institutional-hero-media-pad: clamp(36px, 6vw, 80px);
  position: relative;
  width: min(100%, var(--max));
  margin: 0 auto;
  min-height: clamp(500px, 50vw, 642px);
  display: grid;
  grid-template-columns: minmax(0, 49%) minmax(0, 51%);
  align-items: stretch;
  padding: 0 var(--content-inset);
  overflow: hidden;
}

.institutional-hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 590px;
}

.institutional-kicker,
.institutional-content-kicker {
  margin: 0 0 20px;
  color: var(--institutional-gold);
  font-size: 13px;
  font-weight: var(--fw-medium);
  letter-spacing: .15em;
  line-height: 1.25;
  text-transform: uppercase;
}

.institutional-hero h1 {
  max-width: 590px;
  margin: 0;
  color: var(--i);
  font-size: clamp(54px, 5.3vw, 88px);
  font-weight: var(--fw-medium);
  letter-spacing: -.055em;
  line-height: .99;
  text-wrap: balance;
}

.institutional-hero h1 span {
  display: block;
}

.institutional-rule {
  width: 86px;
  height: 4px;
  margin: clamp(28px, 3.2vw, 48px) 0 clamp(22px, 2.5vw, 36px);
  border-radius: 999px;
  background: var(--i);
}

.institutional-hero-message {
  max-width: 35ch;
  margin: 48px 0 0;
  color: var(--institutional-ink);
  font-size: 18px;
  font-weight: var(--fw-light);
  line-height: 24px;
}

.institutional-hero-visual {
  --institutional-hero-art-right-gap: clamp(16px, 3vw, 40px);
  position: relative;
  min-height: 0;
  margin: 0 calc(-1 * var(--content-inset)) 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--institutional-hero-media-pad) var(--institutional-hero-art-right-gap) var(--institutional-hero-media-pad) 0;
  pointer-events: none;
  overflow: hidden;
}

.institutional-hero-art {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 2;
  width: min(100%, 522px);
  height: auto;
  margin-left: auto;
  max-width: none;
  object-fit: contain;
}

.institutional-hero-prev,
.institutional-hero-next {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 50px;
  height: 50px;
  text-decoration: none;
  transform: translateY(-50%);
}

.institutional-hero-prev {
  left: clamp(24px, 3.4vw, 44px);
}

.institutional-hero-next {
  right: clamp(24px, 3.4vw, 44px);
}

.institutional-hero-arrow-icon {
  display: block;
  width: 50px;
  height: 50px;
}

.institutional-hero-prev .institutional-hero-arrow-icon {
  transform: rotate(180deg);
}

.institutional-hero-prev:hover .institutional-hero-arrow-icon path,
.institutional-hero-next:hover .institutional-hero-arrow-icon path,
.institutional-hero-prev:focus-visible .institutional-hero-arrow-icon path,
.institutional-hero-next:focus-visible .institutional-hero-arrow-icon path {
  fill: var(--i);
}

.institutional-content {
  padding: var(--section-padding);
  min-width: 0;
  background: var(--institutional-paper);
}

.institutional-content-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0;
}

.strategy-grid {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 300px;
  gap: 28px 24px;
}

.strategy-card {
  height: 100%;
  min-height: 0;
  padding: 28px;
  border: 2px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(150deg, var(--i) 35%, var(--institutional-gold) 100%) border-box;
}

.strategy-card h3 {
  margin: 0;
  color: var(--i);
  font-size: 24px;
  font-weight: var(--fw-medium);
  letter-spacing: -.025em;
  line-height: 1.08;
  vertical-align: middle;
}

.strategy-card p {
  margin: 22px 0 0;
  color: var(--institutional-ink);
  font-size: 18px;
  font-weight: var(--fw-light);
  line-height: 24px;
}

.institutional-closing {
  background: #100a16;
}

.institutional-closing-image {
  position: relative;
  aspect-ratio: 1280 / 451;
  overflow: hidden;
  isolation: isolate;
}

.institutional-closing-image > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  filter: saturate(.92);
}

@media (max-width: 1023px) {
  .institutional-hero-inner {
    position: relative;
    top: auto;
    min-height: 0;
    grid-template-columns: minmax(0, 52%) minmax(0, 48%);
  }

  .institutional-hero-visual {
    min-height: 100%;
    margin-right: calc(-1 * var(--content-inset));
  }

  .institutional-hero-art {
    right: auto;
    width: min(112%, 522px);
  }

}

@media (max-width: 767px) {
  .institutional-hero-inner {
    --institutional-hero-media-height: clamp(220px, 52vw, 300px);
    min-height: 0;
    display: block;
    padding: 0;
  }

  .institutional-hero-copy {
    --institutional-hero-arrow-clearance: clamp(56px, 14vw, 88px);
    position: relative;
    top: auto;
    left: auto;
    z-index: 3;
    width: calc(100% - var(--content-pad) - var(--institutional-hero-arrow-clearance));
    max-width: none;
    padding: clamp(32px, 7vw, 52px) 0 clamp(20px, 4vw, 32px) var(--content-pad);
  }

  .institutional-hero h1 {
    max-width: none;
    font-size: clamp(32px, 9vw, 46px);
    letter-spacing: -.045em;
    line-height: 1.05;
  }

  .institutional-hero-message {
    max-width: 32ch;
    margin-top: 24px;
    font-size: clamp(16px, 3.8vw, 18px);
    line-height: 1.55;
  }

  .institutional-hero-visual {
    position: relative;
    --institutional-hero-art-right-gap: clamp(12px, 4vw, 24px);
    inset: auto;
    z-index: 1;
    width: auto;
    height: var(--institutional-hero-media-height);
    min-height: 0;
    margin: 0;
    padding: var(--institutional-hero-media-pad) var(--institutional-hero-art-right-gap);
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .institutional-hero-visual::before {
    display: none;
  }

  .institutional-hero-art {
    left: auto;
    right: auto;
    bottom: auto;
    width: min(78%, 360px);
    max-height: 100%;
    margin: 0;
    z-index: 1;
  }

  .institutional-hero-prev,
  .institutional-hero-next {
    top: auto;
    bottom: calc(var(--institutional-hero-media-height) / 2);
    z-index: 4;
  }

  .institutional-hero-prev {
    left: 4px;
  }

  .institutional-hero-next {
    right: 4px;
  }

  .institutional-content-inner {
    width: min(100%, var(--max));
    padding: 0;
  }

  .strategy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 280px;
    gap: 24px 16px;
  }

  .strategy-card {
    min-height: 0;
    padding: 22px 20px;
    border-radius: 18px;
  }

  .strategy-card h3 {
    font-size: clamp(16px, 4.2vw, 21px);
    letter-spacing: -.02em;
  }

  .strategy-card p {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.45;
  }

  .institutional-closing-image {
    min-height: 0;
    aspect-ratio: 1280 / 451;
  }

}

@media (max-width: 399px) {
  .institutional-hero-inner {
    min-height: 0;
  }

  .institutional-hero-copy {
    --institutional-hero-arrow-clearance: 54px;
    padding-top: 32px;
  }

  .institutional-hero h1 {
    max-width: none;
    font-size: clamp(32px, 11vw, 40px);
  }

  .institutional-hero-message {
    max-width: none;
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.45;
  }

  .institutional-hero-visual {
    width: auto;
    min-height: 0;
    margin: 0;
  }

  .institutional-hero-art {
    left: auto;
    bottom: auto;
    width: 88%;
  }

  .institutional-hero-prev,
  .institutional-hero-next {
    bottom: calc(var(--institutional-hero-media-height) / 2);
  }

  .institutional-hero-prev {
    left: 0;
  }

  .institutional-hero-next {
    right: 0;
  }

  .institutional-content-inner {
    padding: 0;
  }

  .strategy-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 300px;
    gap: 18px;
  }

  .strategy-card {
    padding: 22px;
  }

  .strategy-card h3 {
    font-size: 18px;
  }

  .strategy-card p {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .institutional-hero-art,
  .strategy-card,
  .institutional-prototype a {
    transition: none !important;
  }
}

.institutional-strategy-grid {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 24px;
}

@media (max-width: 767px) {
  .institutional-strategy-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
