/* Campaign site: Ben Ralph and Ruth Beresford, UCU NEC 2027
   Palette: placard yellow, union ink, ballot-pen red, paper.
   Type: Archivo (variable width and weight), self-hosted, SIL OFL. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-standard-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-standard-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --yellow: #FFD23F;   /* placard */
  --ink: #1C2B5A;      /* union ink */
  --red: #D62839;      /* ballot pen */
  --paper: #FFFFFF;
  --cool: #EEF1F7;     /* ballot-guide ground */
  --muted: #4A5573;
  --rule: #C9CFDD;

  --sans: 'Archivo', 'Arial Narrow', Arial, sans-serif;
  --wrap: 72rem;
  --measure: 40rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.6;
  font-stretch: 100%;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { margin: 0; color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: var(--measure); }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.5rem 0.875rem;
}
.skip:focus { top: 1rem; }

/* Draft-only: placeholders and banner */
.ph {
  background: #FFF1A8;
  color: var(--ink);
  outline: 1.5px dashed var(--red);
  outline-offset: 1px;
  padding: 0 0.25em;
  font-size: 0.95em;
}
.draft {
  background: var(--red);
  color: var(--paper);
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 0.5rem var(--gutter);
  text-align: center;
}

/* Shared headings */
h2 {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 850;
  font-stretch: 72%;
  line-height: 0.95;
  letter-spacing: -0.005em;
  margin-bottom: 1.5rem;
  max-width: 18ch;
}
.prose h3 {
  font-size: 1.375rem;
  font-weight: 750;
  font-stretch: 85%;
  line-height: 1.2;
  margin: 2rem 0 0.5rem;
}
.prose h3:first-child { margin-top: 0; }

/* ---------- Hero: the placard ---------- */
.hero {
  background: var(--yellow);
  padding: 1.25rem 0 clamp(3rem, 7vw, 5.5rem);
}
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--ink);
}
.names {
  margin: 0;
  font-weight: 800;
  font-stretch: 80%;
  font-size: 1.125rem;
}
.masthead ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
}
.masthead a { text-decoration: none; }
.masthead a:hover { text-decoration: underline; }

.hero h1 {
  font-size: clamp(3.4rem, 16.5vw, 10.5rem);
  font-weight: 900;
  font-stretch: 64%;
  line-height: 0.86;
  letter-spacing: -0.01em;
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  max-width: 11ch;
  text-wrap: balance;
}
.lede { max-width: 38rem; }
.lede p:first-child { font-size: clamp(1.1875rem, 2vw, 1.375rem); line-height: 1.5; }
.when { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  padding: 0.85rem 1.25rem;
  text-decoration: none;
  border: 3px solid var(--ink);
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--paper); color: var(--ink); text-decoration: none; }
.btn-line { color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

/* ---------- Sections ---------- */
main > section { padding: var(--section) 0; }

.why .prose { font-size: 1.1875rem; }

/* Pledges */
.pledges { background: var(--ink); color: var(--paper); }
.pledges h2 { color: var(--yellow); }
.pledges .intro { font-size: 1.1875rem; max-width: var(--measure); margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.pledge-list { list-style: none; margin: 0; padding: 0; }
.pledge {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem 3rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  border-top: 2px solid rgba(255, 210, 63, 0.45);
}
.pledge:last-child { border-bottom: 2px solid rgba(255, 210, 63, 0.45); }
.pledge h3 { max-width: 26rem; }
.pledge .slogan {
  display: block;
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 850;
  font-stretch: 70%;
  line-height: 0.98;
  color: var(--yellow);
}
.pledge .sub {
  display: block;
  margin-top: 0.6rem;
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  font-weight: 600;
  font-stretch: 92%;
  line-height: 1.3;
  color: var(--paper);
}
/* The subtitle keeps its lower-case source text after the colon; capitalise it on its own line */
.pledge .sub::first-letter { text-transform: uppercase; }
.pnum { margin-right: 0.05em; }
.pledge p { max-width: var(--measure); margin: 0; }
.pledge p + p { margin-top: 0.75rem; }
@media (min-width: 56rem) {
  .pledge { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .pledge h3 { grid-row: span 2; }
}

/* Candidates */
.people {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3.5rem;
}
@media (min-width: 52rem) {
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4rem; }
}
.photo {
  width: 100%;
  max-width: 17rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border-bottom: 6px solid var(--yellow);
}
.photo-missing {
  background: var(--cool);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
}
.person h3 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 850;
  font-stretch: 72%;
  line-height: 1;
  margin-bottom: 1rem;
}
.facts { margin: 0 0 1.5rem; border-top: 2px solid var(--ink); }
.facts div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 1rem;
  line-height: 1.45;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

/* Supporters */
.candidates { padding-bottom: 0; }
.supporters .wrap::before {
  content: '';
  display: block;
  border-top: 3px solid var(--ink);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.supporters h2 { font-size: clamp(1.875rem, 4vw, 2.75rem); }
.supporter-list { list-style: none; margin: 1.5rem 0 0; padding: 0; columns: 18rem; column-gap: 3rem; }
.supporter-list:empty { display: none; }
.supporter-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); break-inside: avoid; }
.empty {
  max-width: var(--measure);
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
  border: 2px dashed var(--muted);
  color: var(--ink);
}

/* How to vote: the ballot guide */
.vote { background: var(--cool); }
.vote-explain {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 4rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
@media (min-width: 56rem) {
  .vote-explain { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}
.vote .big { font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.4; font-weight: 600; }

.slips {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 60rem) {
  .slips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.slip {
  background: var(--paper);
  border: 2px solid var(--ink);
}
.slip header {
  padding: 0.9rem 1.25rem 0.8rem;
  border-bottom: 2px solid var(--ink);
}
.slip h3 {
  font-size: 1.5rem;
  font-weight: 850;
  font-stretch: 75%;
  line-height: 1.1;
}
.slip header p { margin: 0.15rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.slip ul { list-style: none; margin: 0; padding: 0 1.25rem; }
.slip li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.slip li.more { display: block; font-size: 0.9375rem; color: var(--muted); }
.who { font-weight: 700; line-height: 1.25; }
.who small { display: block; font-weight: 400; font-size: 0.875rem; color: var(--muted); }
.box {
  flex: none;
  width: 3rem;
  height: 3rem;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
}
.mark { width: 2.1rem; height: 2.5rem; overflow: visible; }
.mark path {
  fill: none;
  stroke: var(--red);
  stroke-width: 4.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.slip .note { margin: 0; padding: 0.85rem 1.25rem 1rem; font-size: 0.9375rem; }

/* The one orchestrated moment: preferences are written in as the ballot guide scrolls into view. */
@keyframes write { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .mark path {
      animation: write linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 45%;
    }
  }
}

/* Contact */
.contact { background: var(--yellow); }
.emails { list-style: none; margin: 2rem 0 0; padding: 0; }
.emails li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0;
  border-top: 2px solid var(--ink);
}
.emails li:last-child { border-bottom: 2px solid var(--ink); }
.emails li > span:first-child { width: 4rem; font-weight: 600; }
.emails a {
  font-size: clamp(1.375rem, 4vw, 2.25rem);
  font-weight: 800;
  font-stretch: 80%;
  overflow-wrap: anywhere;
}

/* Footer */
.foot {
  background: var(--ink);
  color: var(--paper);
  padding: 2.25rem 0 2.75rem;
  font-size: 0.9375rem;
  line-height: 1.55;
}
.foot p { max-width: 46rem; }

@media print {
  .draft, .masthead nav, .actions, .skip { display: none; }
  .hero, .pledges, .vote, .contact, .foot { background: none; color: #000; }
  .pledges h2, .pledge h3 { color: #000; }
}
