/* ============================================================
   Mercial AI Safety Initiative
   ------------------------------------------------------------
   CUSTOMISE HERE: colours, fonts and spacing all live in the
   variables below. Change a value once and it applies site-wide.
   ============================================================ */

:root {
  /* Colours (Warwick aubergine + gold) */
  --ink: #241c2e;          /* body text */
  --paper: #fbfaf7;        /* page background */
  --aubergine: #3c1053;    /* primary brand colour */
  --aubergine-deep: #2a0b3b;
  --gold: #b99a45;         /* accent */
  --lilac: #efe9f4;        /* tinted surface */
  --line: #ddd5e4;         /* hairlines */

  /* Type
     --font-logo must stay identical to the font-family in logo.svg, so the
     wordmark and the W in the logo tile resolve to the same face on every
     device. If you change one, change the other. */
  --font-logo: Georgia, "Times New Roman", serif;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-body: "Public Sans", system-ui, -apple-system, sans-serif;

  /* Layout */
  --measure: 68ch;         /* max width of running text */
  --page-max: 1080px;      /* max width of the page */
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--aubergine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--aubergine-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Header & navigation ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header .inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 1rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.015em;   /* serif capitals need a little air */
  color: var(--aubergine);
  text-decoration: none;
}
.wordmark .dot { color: var(--gold); }
.wordmark-light { color: #f0e6f8; }

.site-nav { display: flex; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--gold);
  color: var(--aubergine);
  font-weight: 600;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--aubergine);
  color: #f4eefa;
  overflow: hidden;
}
.hero .inner {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 6rem) var(--pad);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
  max-width: 18ch;
}
.hero p {
  max-width: 52ch;
  font-size: 1.15rem;
  margin: 0 0 2rem;
  color: #e4d9ee;
}
.hero .field {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  pointer-events: none;
}

.button {
  display: inline-block;
  background: var(--gold);
  color: var(--aubergine-deep);
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
}
.button:hover { background: #cbae5c; color: var(--aubergine-deep); }
.button.quiet {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  margin-left: 0.75rem;
}

/* ---------- Page body ---------- */

main { max-width: var(--page-max); margin: 0 auto; padding: 2.5rem var(--pad) 4rem; }

h1.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 1rem 0 0.5rem;
}
.page-lede { max-width: var(--measure); font-size: 1.15rem; color: #4a3f57; margin-top: 0; }

h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0;
  margin: 2.5rem 0 0.75rem;
}
h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--gold);
  margin-top: 0.5rem;
}

p, ul, ol { max-width: var(--measure); }

/* ---------- Activity list (home) ---------- */

.activities { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; margin-top: 1.5rem; }
.activity { border-top: 3px solid var(--aubergine); padding-top: 1rem; }
.activity h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 0.4rem; }
.activity p { margin: 0; font-size: 0.98rem; }

/* ---------- People ---------- */

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2rem; margin-top: 2rem; }
.person img, .person .placeholder {
  width: 100%;
  aspect-ratio: 1.5;
  object-fit: cover;
  border-radius: 6px;
  background: var(--lilac);
  display: grid;
  place-items: center;
  color: var(--aubergine);
  font-family: var(--font-display);
  font-size: 2.5rem;
}
.person h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0.75rem 0 0.1rem; }
.person .role { color: var(--aubergine); font-weight: 600; font-size: 0.95rem; margin: 0 0 0.35rem; }
.person p { font-size: 0.95rem; margin: 0; }

/* ---------- Events ---------- */

.events-figure { margin: 2rem 0 0; }
.events-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.events-figure figcaption { font-size: 0.9rem; color: #4a3f57; margin-top: 0.6rem; }

/* ---------- Apply steps ---------- */

.steps { list-style: none; counter-reset: step; padding: 0; margin: 1.5rem 0 0; max-width: var(--measure); }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 1.75rem 3.5rem;
  border-left: 1px solid var(--line);
  margin-left: 1.1rem;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -1.15rem;
  top: -0.2rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--aubergine);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.steps h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 0.25rem; }
.steps p { margin: 0; }

.notice {
  background: var(--lilac);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  max-width: var(--measure);
  border-radius: 0 6px 6px 0;
}

/* ---------- Contact ---------- */

.contact-list { list-style: none; padding: 0; max-width: var(--measure); }
.contact-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 1rem; flex-wrap: wrap; }
.contact-list .label { font-weight: 700; min-width: 8rem; }

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

.site-footer { background: var(--aubergine-deep); color: #d9cbe6; margin-top: 3rem; }
.site-footer .inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 2.5rem var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(17rem, 21rem);
  gap: 2rem 3rem;
  align-items: start;
}
/* Footer links read as a column here, which keeps all three blocks on one row */
.site-footer .site-nav { flex-direction: column; gap: 0.5rem; }
.site-footer a { color: #f0e6f8; }
.site-footer .fine { font-size: 0.9rem; max-width: 44ch; margin-bottom: 0; }

.newsletter h2 { margin-top: 0; font-size: 1.35rem; }
.newsletter p { font-size: 0.95rem; }
.newsletter iframe {
  width: 100%;
  height: 170px;
  border: 0;
  border-radius: 6px;
  display: block;
  background: var(--paper);
}

/* Stack into one column once the three footer blocks stop fitting side by side */
@media (max-width: 820px) {
  .site-footer .inner { grid-template-columns: minmax(0, 1fr); }
  .site-footer .site-nav { flex-direction: row; gap: 0.75rem 1.5rem; }
}

/* ---------- Expandable sections (details/summary) ---------- */

.drop { max-width: var(--measure); border-top: 1px solid var(--line); }
.drop:last-of-type { border-bottom: 1px solid var(--line); }

.drop > summary {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;          /* hide the default triangle */
}
.drop > summary::-webkit-details-marker { display: none; }

.drop .drop-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}
.drop .teaser {
  display: block;
  font-size: 0.95rem;
  color: #4a3f57;
  margin-top: 0.15rem;
}
.drop > summary:hover .drop-title { color: var(--aubergine); }

/* The +/- indicator, pushed to the right-hand edge */
.drop > summary::after {
  content: "+";
  margin-left: auto;
  flex: none;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--aubergine);
}
.drop[open] > summary::after { content: "\2212"; }   /* minus sign */

.drop-body { padding-bottom: 1.25rem; }
.drop-body > :first-child { margin-top: 0; }
.drop-body > :last-child { margin-bottom: 0; }

/* ---------- Events timeline ---------- */

.timeline { list-style: none; padding: 0; margin: 2rem 0 0; max-width: var(--measure); }
.timeline li {
  position: relative;
  padding: 0 0 1.75rem 2rem;
  border-left: 2px solid var(--line);
  margin-left: 0.4rem;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 0.45rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--aubergine);
  border: 2px solid var(--paper);
}
.timeline .when {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--aubergine);
  margin: 0;
}
.timeline h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 0.1rem 0 0.25rem; }
.timeline p:last-child { margin: 0; font-size: 0.98rem; }

/* Dates not yet fixed */
.timeline li.tbc h3::after {
  content: "to be confirmed";
  display: inline-block;
  margin-left: 0.6rem;
  vertical-align: middle;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--aubergine-deep);
  background: var(--lilac);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
/* Breaks and other non-events sit back a little */
.timeline li.quiet::before { background: var(--line); }
.timeline li.quiet .when { color: #6c6079; }
.timeline li.quiet h3 { font-weight: 400; color: #4a3f57; }

/* ---------- Outline button (for use on the pale page background) ---------- */

.button.outline {
  background: transparent;
  color: var(--aubergine);
  border: 1px solid var(--aubergine);
  margin-left: 0.75rem;
}
.button.outline:hover { background: var(--lilac); color: var(--aubergine-deep); }

/* Buttons wrap rather than overflow on narrow screens */
@media (max-width: 480px) {
  .button { display: block; text-align: center; }
  .button.quiet, .button.outline { margin-left: 0; margin-top: 0.75rem; }
}

/* ---------- Criteria list (mentor page) ---------- */

.criteria { max-width: var(--measure); margin: 1.5rem 0 0; }
.criteria dt {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--aubergine);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.criteria dd { margin: 0.35rem 0 1rem; }
.criteria dd:last-child { margin-bottom: 0; }

/* ---------- Breadcrumb (subpages reached from Get Involved) ---------- */

.crumb { font-size: 0.9rem; color: #4a3f57; margin: 1.5rem 0 -0.25rem; }
.crumb a { color: inherit; }
.crumb span { margin: 0 0.35rem; }

/* ---------- Fellowship streams (fellowship.html) ---------- */

.stream {
  max-width: var(--measure);
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--aubergine);
  border-radius: 6px;
}
.stream-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.stream-who { display: flex; align-items: center; gap: 1rem; }
.stream-photo {
  flex: none;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--lilac);
}
.stream-mentor { font-family: var(--font-display); font-size: 1.4rem; margin: 0; }
.stream-affil { margin: 0.25rem 0 0; font-size: 0.95rem; color: #4a3f57; }
.stream-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; max-width: 16rem; }
.chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--aubergine-deep);
  background: var(--lilac);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  white-space: nowrap;
}
.capacity { flex-basis: 100%; font-size: 0.9rem; color: #4a3f57; }
.stream .drop { max-width: none; }
.stream .drop:last-of-type { border-bottom: 1px solid var(--line); }
.fact-line { font-size: 0.95rem; color: #4a3f57; }
.stream-apply { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }
.apply-note { font-size: 0.9rem; color: #4a3f57; }
@media (max-width: 480px) {
  .stream-apply .button { width: 100%; }
}
