/* ==========================================================================
   Union High (uh) - unionhigh.uk

   Established 1987. Navy and gold. The seal carries a torch, an open book and
   a quill alongside a hammer and saw: classical learning plus the trades.
   So the visual language is old-institution - symmetric, engraved, ruled
   lines, small caps, a serif that looks like it was set in metal.
   ========================================================================== */

:root {
  /* Brand - kept in sync with packages/ui/src/tokens.ts TENANT_THEME.uh */
  --brand: #1b2a4a;
  --brand-dark: #111c33;
  --on-brand: #f5f7fb;
  --on-brand-muted: #c7cee0;
  --surface: #eef1f7;
  --accent: #c9a24b;
  --accent-strong: #b08c37;
  --on-accent: #14203a;

  --page: #fbfaf7;
  --card: #ffffff;
  --text: #1d2433;
  --text-muted: #5a6379;
  --heading: #14203a;
  --border: #e0e2ea;
  --rule: color-mix(in srgb, var(--accent) 45%, transparent);

  --figure-bg: linear-gradient(150deg, #22345c, #111c33);
  --plate-bg: linear-gradient(160deg, #1b2a4a, #0d1524);
  --plate-frame: color-mix(in srgb, var(--accent) 55%, transparent);

  /* Photo-slot fallbacks: what each slot shows before its file exists. */
  --hero-fallback: linear-gradient(170deg, #16243f 0%, #0c1526 100%);
  --section-fallback: linear-gradient(150deg, #1b2a4a, #0d1524);
  --cta-fallback: linear-gradient(115deg, #1b2a4a 0%, #26395f 100%);

  /* Scrims: heavy enough that type stays legible over any photograph. */
  /* Tuned against the real photograph: heavy enough at top and bottom to hold
     the header and the lede, open through the middle so the building reads. */
  --hero-scrim: linear-gradient(180deg,
                  rgb(12 21 38 / 0.68) 0%,
                  rgb(12 21 38 / 0.30) 38%,
                  rgb(12 21 38 / 0.72) 78%,
                  rgb(12 21 38 / 0.90) 100%);
  --section-scrim: linear-gradient(180deg, rgb(12 21 38 / 0.86), rgb(12 21 38 / 0.78));
  --cta-scrim: linear-gradient(100deg, rgb(12 21 38 / 0.88) 0%, rgb(12 21 38 / 0.62) 100%);

  /* Type - an engraved-serif voice */
  --font-display: "Iowan Old Style", "Hoefler Text", Palatino, "Palatino Linotype", Georgia, serif;
  --font-body: "Charter", "Bitstream Charter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display-weight: 600;
  --display-tracking: -0.015em;
  --lockup-tracking: 0.04em;

  /* Scale */
  --step--1: 0.855rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.15rem, 0.4vw + 1.05rem, 1.32rem);
  --step-2: clamp(1.4rem, 0.7vw + 1.22rem, 1.7rem);
  --step-3: clamp(1.7rem, 1.3vw + 1.4rem, 2.25rem);
  --step-4: clamp(2.05rem, 2.1vw + 1.6rem, 3rem);
  --step-5: clamp(2.5rem, 3.2vw + 1.8rem, 3.9rem);
  --step-6: clamp(3rem, 5.4vw + 1.6rem, 5.6rem);

  --space-2: 0.5rem;
  --space-3: 0.9rem;
  --space-4: 1.5rem;
  --space-5: 2.4rem;
  --space-6: 3.4rem;

  --gutter: 1.5rem;
  --measure: 1180px;
  --radius-card: 4px;
  --radius-btn: 2px;
}

/* Union High does not round its corners and does not shout. Everything is
   ruled, centred and a little bit ceremonial. */

.hero { text-align: center; }
.hero .wrap > * { margin-inline: auto; }
.hero__rule { margin-inline: auto; }
.hero__actions { justify-content: center; }
.hero p { margin-inline: auto; }

.hero__seal {
  width: clamp(96px, 12vw, 148px);
  margin: 0 auto var(--space-5);
  filter: drop-shadow(0 10px 30px rgb(0 0 0 / 0.55));
}

.hero h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hero h1 .hero__est {
  display: block;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

/* A hairline gold frame inside the hero - the engraved-certificate move. */
.hero::after {
  content: "";
  position: absolute;
  inset: clamp(18px, 3vw, 40px);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  pointer-events: none;
}

/* Small-caps section headings with a centred gold rule under them. */
.section-head--center h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: var(--space-4) auto 0;
}

.card__figure {
  /* Crosshatch, echoing the engraved shield on the seal. */
  background-image:
    repeating-linear-gradient(45deg, rgb(201 162 75 / 0.10) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgb(201 162 75 / 0.10) 0 2px, transparent 2px 7px),
    var(--figure-bg);
}

.card__figure-mark {
  width: 46%;
  opacity: 0.9;
}

/* Programme cards get a numbered index in the corner, like a prospectus. */
.card--indexed .card__body { position: relative; }
.card--indexed .card__index {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: color-mix(in srgb, var(--brand) 18%, transparent);
  line-height: 1;
}

/* Faculty / news rows as a ruled list rather than more cards. */
.ruled-list { list-style: none; margin: 0; padding: 0; }
.ruled-list li { border-top: 1px solid var(--border); }
.ruled-list li:last-child { border-bottom: 1px solid var(--border); }

.ruled-list a {
  display: grid;
  gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-4) 0;
  text-decoration: none;
  color: inherit;
  transition: padding-inline 0.25s ease, background-color 0.25s ease;
}

@media (min-width: 760px) {
  .ruled-list a { grid-template-columns: 130px 1fr auto; }
}

.ruled-list a:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  padding-inline: var(--space-3);
}

.ruled-list__date {
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ruled-list__title { font-family: var(--font-display); font-size: var(--step-1); }
.ruled-list__more { font-size: var(--step--1); color: var(--brand); font-weight: 600; }

/* The stat band sits on the navy section under the hero. */
.stat-band { text-align: center; }

/* Motto plate - the Latin does a lot of heavy lifting here. */
.motto-plate {
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.motto-plate__latin {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--step-3);
  color: var(--on-brand);
  margin-bottom: var(--space-3);
}

.motto-plate__en {
  font-size: var(--step--1);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
