/* ==========================================================================
   Partners & Sponsors — Gate 3 prototypes · shared base
   Token palette mirrors tailwind.config.js / docs/DESIGN.md (no new colours):
   teal #00C2B2 / teal-deep #009b8e / teal-bright #0DDBC7 / blue #1A73E8
   dark #1C2321 / dark-accent #313B3A / ink #2C3E50 / muted #7F8C8D
   ground #F4F5F6 / surface #E4E8EC / surface-tint #EEF4F8 / flow #f0f5fa
   ========================================================================== */

:root {
  --ps-teal: #00c2b2;
  --ps-teal-deep: #009b8e;
  --ps-teal-bright: #0ddbc7;
  --ps-blue: #1a73e8;
  --ps-dark: #1c2321;
  --ps-dark-accent: #313b3a;
  --ps-ink: #2c3e50;
  --ps-muted: #7f8c8d;
  --ps-muted-ui: #a1a1aa;
  --ps-ground: #f4f5f6;
  --ps-surface: #e4e8ec;
  --ps-tint: #eef4f8;
  --ps-flow: #f0f5fa;
  --ps-display: "Futura", "Jost", sans-serif;
  --ps-body: "Noto Sans", sans-serif;
  --ps-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.ps-kicker--dark { color: var(--ps-teal-bright); }

/* Smooth anchor scrolling for the margin index (instant when reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* --------------------------------------------------------------------------
   Unified quieter subpage hero family
   Shorter + more functional than the cinematic cornerstone/programme heroes:
   capped height, eyebrow + subpage display headline + one lede, shallow curve,
   single crafted entrance (media settle + masked rises). Reduced-motion safe.
   -------------------------------------------------------------------------- */

.ps-hero {
  position: relative;
  min-height: clamp(24rem, 52vh, 32rem);
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  overflow: hidden;
  background: var(--ps-dark);
  color: #fff;
}

.ps-hero__media,
.ps-hero__img,
.ps-hero__scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ps-hero__img {
  object-fit: cover;
  object-position: center 42%;
  opacity: 0.55;
  z-index: -2;
}

.ps-hero__scrim {
  z-index: -1;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--ps-dark) 92%, transparent) 0%,
    color-mix(in srgb, var(--ps-dark) 45%, transparent) 45%,
    color-mix(in srgb, var(--ps-dark) 55%, transparent) 100%
  );
}

.ps-hero__content {
  position: relative;
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding: clamp(6rem, 12vh, 9rem) 1.5rem clamp(4.5rem, 9vh, 6.5rem);
}

.ps-hero__kicker {
  color: var(--ps-teal-bright);
  margin-bottom: 0.5rem;
}

.ps-hero__title {
  font-family: var(--ps-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 18ch;
}

.ps-hero__lede {
  margin-top: 1.1rem;
  max-width: 44rem;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: color-mix(in srgb, #fff 78%, transparent);
  text-wrap: pretty;
}

.ps-hero__curve {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: clamp(2.5rem, 5vw, 4.5rem);
  z-index: 2;
}

/* Entrance — runs only when motion is allowed; base.js adds .ps-loaded */
.ps-hero__img,
.ps-hero__kicker,
.ps-hero__title,
.ps-hero__lede {
  transition:
    opacity 1.1s var(--ps-ease-out),
    transform 1.1s var(--ps-ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  .ps-js .ps-hero:not(.ps-loaded) .ps-hero__img {
    opacity: 0;
    transform: scale(1.05);
  }
  .ps-js .ps-hero:not(.ps-loaded) .ps-hero__kicker,
  .ps-js .ps-hero:not(.ps-loaded) .ps-hero__title,
  .ps-js .ps-hero:not(.ps-loaded) .ps-hero__lede {
    opacity: 0;
    transform: translateY(1.75rem);
  }
  .ps-hero .ps-hero__kicker { transition-delay: 0.15s; }
  .ps-hero .ps-hero__title { transition-delay: 0.3s; }
  .ps-hero .ps-hero__lede { transition-delay: 0.45s; }
}

/* --------------------------------------------------------------------------
   Logo mats — production HKICF fit contract (white mat + contain fit),
   shared by all three directions so logo rendering stays truthful.
   -------------------------------------------------------------------------- */

.ps-mat {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.35rem;
  height: 6.5rem;
}

.ps-mat img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.ps-mat--wide img { max-height: 68%; }
.ps-mat--dense img { max-width: 92%; max-height: 86%; }

/* Per-logo visual-weight calibration — same system as the HKICF sponsor wall
   (hkicf-redesign.css, hand-tuned 2026-07-29): each logo carries a --logo-scale
   so every mark converges on the same perceived ink weight inside the uniform
   8rem grand mats. 1 = fill the mat, smaller = quieter. */
.c-plate .ps-mat img { transform: scale(var(--logo-scale, 1)); }

.c-plate:has(img[src*="partners/hkadc."]) { --logo-scale: 1.25; }
.c-plate:has(img[src*="partners/acdfs."]) { --logo-scale: 0.7; }
.c-plate:has(img[src*="partners/hang-lung."]) { --logo-scale: 1.10; }
.c-plate:has(img[src*="partners/ppg."]) { --logo-scale: 0.9; }
.c-plate:has(img[src*="partners/cbi."]) { --logo-scale: 0.63; }
.c-plate:has(img[src*="partners/abrsm."]) { --logo-scale: 0.79; }
.c-plate:has(img[src*="partners/oup."]) { --logo-scale: 0.93; }
.c-plate:has(img[src*="partners/tomlee."]) { --logo-scale: 0.82; }
.c-plate:has(img[src*="partners/principal-sponsor."]) { --logo-scale: 0.82; }
.c-plate:has(img[src*="partners/shaw-foundation."]) { --logo-scale: 1; }
.c-plate:has(img[src*="partners/tung-foundation."]) { --logo-scale: 0.91; }
.c-plate:has(img[src*="partners/lee-hysan."]) { --logo-scale: 0.76; }
.c-plate:has(img[src*="partners/hkbank-foundation."]) { --logo-scale: 1.21; }

.ps-name {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--ps-ink);
}

/* Generic reveal helper (base.js, IntersectionObserver; instant when reduced) */
@media (prefers-reduced-motion: no-preference) {
  .ps-js [data-reveal] {
    opacity: 0;
    transform: translateY(1.5rem);
    transition:
      opacity 0.9s var(--ps-ease-out),
      transform 0.9s var(--ps-ease-out);
  }
  .ps-js [data-reveal].is-in {
    opacity: 1;
    transform: none;
  }
}

/* Focus language — token teal ring everywhere in prototypes */
.ps-a a:focus-visible,
.ps-b a:focus-visible,
.ps-c a:focus-visible,
.ps-a button:focus-visible,
.ps-b button:focus-visible,
.ps-c button:focus-visible,
.ps-a input:focus-visible,
.ps-a select:focus-visible,
.ps-a textarea:focus-visible {
  outline: 2px solid var(--ps-teal);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Lists reset inside prototype regions */
main ul, main ol { padding: 0; margin: 0; list-style: none; }
/* ==========================================================================
   Direction C — "The House Programme"
   The printed acknowledgements page. Paper surface, hairline rules, folio
   numerals, logo plates and a margin index. Motion is typographic: rules
   draw in, plates lift. No dark stage until the colophon card.
   ========================================================================== */

.ps-c { background: #fbfbf9; }

/* ---- hero: same family, paper variant (photo mounted as a plate) -------- */
.c-hero {
  padding: clamp(4.5rem, 9vh, 6.5rem) 1.5rem 0;
  background: #fbfbf9;
}

.c-hero__grid {
  max-width: 80rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  padding-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.c-hero__masthead .ps-hero__kicker { color: var(--ps-teal); }

.c-hero__masthead .ps-hero__title {
  color: var(--ps-ink);
  max-width: 12ch;
  font-size: clamp(2.25rem, 4.6vw, 3.9rem);
}

.c-hero__masthead .ps-hero__lede { color: var(--ps-muted); }

.c-hero__folio-line {
  margin-top: 2.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ps-muted);
}

.c-hero__plate {
  margin: 0;
  background: #fff;
  padding: clamp(0.75rem, 1.5vw, 1.25rem);
  border: 1px solid color-mix(in srgb, var(--ps-ink) 10%, transparent);
  box-shadow: 0 1.5rem 3.5rem rgba(28, 35, 33, 0.10);
}

.c-hero__plate img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 40%;
}

/* hairline rules draw in */
.c-rule {
  display: block;
  height: 1px;
  background: color-mix(in srgb, var(--ps-ink) 14%, transparent);
  max-width: 80rem;
  margin: 0 auto;
  transform-origin: left center;
}

@media (prefers-reduced-motion: no-preference) {
  .ps-js .c-rule { transform: scaleX(0); transition: transform 1.1s var(--ps-ease-out); }
  .ps-js .c-rule.is-in { transform: scaleX(1); }
  .ps-js [data-plate] {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 1s var(--ps-ease-out) 0.2s, transform 1s var(--ps-ease-out) 0.2s;
  }
  .ps-js [data-plate].is-in { opacity: 1; transform: none; }
}

/* ---- body: margin index + ledger ----------------------------------------- */
.c-body {
  max-width: 80rem;
  margin-inline: auto;
  padding: clamp(3rem, 7vh, 5rem) 1.5rem clamp(3.5rem, 8vh, 5.5rem);
  display: grid;
  grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.c-index { align-self: stretch; }

.c-index__sticky {
  position: sticky;
  top: 6rem;
}

.c-index__title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ps-muted);
  margin-bottom: 1rem;
}

.c-index ol { list-style: none; }

.c-index a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.34rem 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ps-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.c-index a:hover { color: var(--ps-ink); }

.c-index a.is-active { color: var(--ps-ink); font-weight: 600; }
.c-index a.is-active .c-index__num { color: var(--ps-teal); }

.c-index__num {
  font-family: var(--ps-display);
  font-size: 0.66rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--ps-muted) 70%, transparent);
  min-width: 1.4rem;
}

/* ---- ledger entries ------------------------------------------------------- */
.c-preface { margin-bottom: clamp(3rem, 7vh, 5rem); }

.c-preface h2 {
  font-family: var(--ps-display);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-wrap: balance;
  max-width: 24ch;
  color: var(--ps-ink);
}

.c-preface > p {
  margin-top: 1.25rem;
  max-width: 40rem;
  line-height: 1.75;
  color: var(--ps-muted);
  text-wrap: pretty;
}

.c-stats {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--ps-ink) 24%, transparent);
  padding-top: 1.5rem;
}

.c-stats dd {
  font-family: var(--ps-display);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ps-teal);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.c-stats dt {
  margin-top: 0.5rem;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ps-muted);
}

.c-entry {
  padding: clamp(2rem, 5vh, 3.5rem) 0;
  border-top: 1px solid color-mix(in srgb, var(--ps-ink) 14%, transparent);
  scroll-margin-top: 7rem;
}

.c-entry__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.c-entry__folio {
  font-family: var(--ps-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ps-teal);
  min-width: 2rem;
}

.c-entry__head h2 {
  font-family: var(--ps-display);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ps-ink);
  flex: 1;
}

.c-entry__count {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ps-muted);
  white-space: nowrap;
}

.c-entry__plates {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.c-entry__disclaimer {
  margin-top: 1.5rem;
  max-width: 40rem;
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--ps-muted);
}

/* folio (tier 1): a full plate page */
.c-entry--folio { text-align: center; }
.c-entry--folio .c-entry__head {
  justify-content: center;
  gap: 1.25rem;
}
.c-entry--folio .c-entry__head h2 { flex: none; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.c-entry--folio .c-entry__plates {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 24rem));
  justify-content: center;
  margin-top: 2rem;
}
.c-entry--folio .ps-mat {
  height: clamp(9rem, 16vw, 12rem);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid color-mix(in srgb, var(--ps-ink) 10%, transparent);
  border-radius: 0.25rem;
  box-shadow: 0 1.25rem 3rem rgba(28, 35, 33, 0.08);
}
.c-entry--folio .ps-name { text-align: center; font-size: 0.8rem; }

/* grand (tiers 2–3) */
.c-entry--grand .c-entry__plates { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.c-entry--grand .ps-mat {
  height: 8rem;
  border: 1px solid color-mix(in srgb, var(--ps-ink) 10%, transparent);
  border-radius: 0.25rem;
}

/* index (tier 4): dense, quiet */
.c-entry--index .c-entry__plates { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.c-entry--index .ps-mat {
  height: 5.5rem;
  padding: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--ps-ink) 8%, transparent);
  border-radius: 0.25rem;
}
.c-entry--index .ps-name { font-size: 0.64rem; color: var(--ps-muted); }

/* ---- pull quote ------------------------------------------------------------ */
.c-pull {
  margin: clamp(3rem, 8vh, 6rem) 0;
  text-align: center;
}
.c-pull .c-rule { margin-inline: auto; }
.c-pull p {
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(2rem, 5vh, 3.5rem) 1rem;
  font-family: var(--ps-display);
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ps-ink);
  text-wrap: pretty;
}
.c-pull strong { color: var(--ps-teal); font-weight: 600; }

/* ---- finale (dark stage + enquiry form, selected from direction A) ---------- */
@media (min-width: 1024px) {
  .c-finale__copy { position: sticky; top: 6rem; }
}

.c-finale {
  position: relative;
  background: var(--ps-dark-accent);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(4.5rem, 10vh, 8rem) 1.5rem;
}

.c-finale__texture {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.c-finale__texture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.05;
}

.c-finale__inner {
  max-width: 72rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.c-finale__copy h2 {
  font-family: var(--ps-display);
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0.5rem 0 1rem;
  text-wrap: balance;
}

.c-finale__copy > p:not(.section-kicker) {
  color: color-mix(in srgb, #fff 72%, transparent);
  line-height: 1.7;
}

.c-finale__points { margin-top: 1.75rem; }
.c-finale__points li {
  padding: 0.9rem 0;
  border-top: 1px solid color-mix(in srgb, #fff 14%, transparent);
  font-size: 0.92rem;
  line-height: 1.6;
  color: color-mix(in srgb, #fff 66%, transparent);
}
.c-finale__points strong { color: #fff; font-weight: 600; }

.c-form {
  background: #fff;
  color: var(--ps-ink);
  border-radius: 1.75rem;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.28);
}

.c-form fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.c-form legend {
  font-family: var(--ps-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.c-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.c-form__row { margin-bottom: 1rem; }
.c-form__grid .c-form__row { margin-bottom: 0; }
.c-form__grid { margin-bottom: 1rem; }

.c-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
  color: var(--ps-ink);
}

.c-form input,
.c-form select,
.c-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--ps-surface);
  border-radius: 0.75rem;
  background: var(--ps-ground);
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--ps-ink);
}

.c-form__submit {
  width: 100%;
  margin-top: 0.5rem;
  border: 0;
  border-radius: 9999px;
  background: var(--ps-teal);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.c-form__submit:hover { background: var(--ps-teal-deep); }

.c-form__note {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--ps-muted);
}

/* ---- responsive ------------------------------------------------------------- */
@media (max-width: 1023px) {
  .c-hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .c-body { grid-template-columns: minmax(0, 1fr); }
  .c-index { display: none; }
  .c-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-entry__plates,
  .c-entry--index .c-entry__plates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .c-finale__inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .c-entry__plates,
  .c-entry--index .c-entry__plates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-form__grid { grid-template-columns: minmax(0, 1fr); }
  .c-form__grid .c-form__row { margin-bottom: 1rem; }
}
