/* ------------------------------------------------------------------
   Layout and type — universities-chapter.co.uk
   Values come from tokens.css; load that first.
   ------------------------------------------------------------------ */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background-color: var(--ground);
  background-image: var(--wash);
  background-repeat: no-repeat;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--serif);
}

/* The page is one centred column. On a tall enough viewport it sits in
   the middle of the screen; on a short one it starts at the top and
   scrolls (see the media query at the foot of this file). */
main {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(2rem, 4vw, 3rem);
  width: min(100%, var(--measure-page));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 1.5rem;
  text-align: center;
}

/* ---- Masthead ---- */

.content {
  width: 100%;
}

img {
  display: block;
  width: min(48vw, 15rem);
  height: auto;
  margin: 0 auto;
}

h1 {
  margin: 1.2rem 0 0.4rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p {
  margin: 0.35rem 0;
  font-size: clamp(1rem, 2.6vw, 1.3rem);
  line-height: 1.45;
}

.number {
  font-size: clamp(1.35rem, 3.5vw, 1.8rem);
  font-weight: 400;
}

/* Third tier under the title: smaller than the number, and set a little
   further from it, so it reads as its own line rather than a twin. */
.scheme {
  margin: 0.8rem 0 0;
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  letter-spacing: 0.02em;
}

/* Held to the narrow measure: two sentences set across the full page
   width would break into a thin, straggling paragraph. */
.meetings {
  width: min(100%, var(--measure-note));
  margin: 1.35rem auto 0;
  font-size: clamp(0.9rem, 2.1vw, 1.05rem);
  line-height: 1.55;
}

/* ---- Entry block ---- */

.entry {
  width: min(100%, var(--measure-entry));
  padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-block: 1px solid var(--ink);
  text-align: center;
}

.entry h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.contact-copy {
  margin: 1.25rem 0 0;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* The address sits tighter to its own lead-in line than the pair sits
   to the question above, so the two read as one unit. */
.contact-copy + .contact-copy {
  margin-top: 0.4rem;
}

.alt-route {
  margin: 1.5rem 0 0;
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  line-height: 1.5;
}

/* ---- Links ----
   Links are the same white as the body text, so the underline is the
   only thing marking them. Do not remove it. */

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2rem;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---- Footer ---- */

footer {
  font-size: clamp(0.75rem, 1.8vw, 0.9rem);
  line-height: 1.5;
}

footer p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

/* Browsers italicise <address> by default. */
address {
  font-style: normal;
}

footer p + address {
  margin-top: 0.5rem;
}

.copyright {
  margin-top: 1.5rem;
}

@media (min-height: 48rem) {
  main {
    justify-content: center;
  }
}
