/* Rayette Chaisson for School Board — all site styles. No dependencies. */

/* ============================================================
   FONTS
   ============================================================ */

@font-face {
  font-family: 'Anton';
  src: url('fonts/anton-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Yellowtail';
  src: url('fonts/yellowtail-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat-800.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

/* ============================================================
   TOKENS — sampled from logos/red-white-blue.svg
   ============================================================ */

:root {
  --blue:       #004AAD;
  --blue-deep:  #003A87;   /* shading only, never for text on white */
  /* The exported brand red (#FF3131) carries white text at only 3.66:1 and
     fails WCAG AA, so the whole system — site and logo alike — uses this
     deepened red instead. 4.80:1 behind white text. */
  --red:        #E11B1B;
  --red-hi:     #C41616;   /* hover */
  --white:      #FFFFFF;
  --paper:      #F4F6FA;   /* off-white section base */
  --ink:        #14161C;   /* body prose */
  --ink-soft:   #4A5265;
  --focus-dark: #0A1A33;   /* outer focus ring — reads on every light surface */

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-script:  'Yellowtail', cursive;
  --font-body:    'Montserrat', system-ui, -apple-system, sans-serif;

  --measure: 66ch;
  --pad-x: 1.25rem;
  --section-y: 4rem;
  --radius: 4px;
  --shadow: 0 2px 4px rgba(0, 26, 66, .06), 0 12px 32px rgba(0, 26, 66, .10);
}

@media (min-width: 768px) {
  :root { --pad-x: 2rem; --section-y: 6.5rem; }
}

/* ============================================================
   BASE
   ============================================================ */

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.container {
  width: min(72rem, 100%);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.container--narrow { width: min(52rem, 100%); }

.section { padding-block: var(--section-y); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Focus styling lives at the END of this file — see "FOCUS VISIBILITY".
   It must come after every component, because components that set their
   own box-shadow (.btn--primary) would otherwise override the ring. */

/* ============================================================
   TYPE SCALE
   ============================================================ */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: .95;
  text-transform: uppercase;
  margin: 0;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  line-height: 1.15;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 .85rem;
}

/* ============================================================
   RIBBON — the logo's actual banner, reused as a section header.
   ============================================================ */

/* The banner is the real artwork, split into three parts the way the source
   file draws it: a plain centre panel plus two notched tails that hang below
   it and tuck behind its ends. The panel is a background colour so it
   stretches to any label; the tails are fixed-aspect SVGs cut straight out
   of the logo by tools/build-logo.py.
   Every ratio below is printed by that script on each run — keep them in
   step. Measured from the source (user units):
     panel  288.37,794.56  1153.25 x 236.13
     left   18.23,847.08    311.05 x 236.14
     right  1398.74,846.32  311.05 x 236.13 */
.ribbon {
  --tail-aspect: 311.05 / 236.14;
  --tail-drop: 22.2%;        /* tails sit this far below the panel top */
  position: relative;
  width: fit-content;
  margin: 0 auto 1.75rem;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(.82rem, 2.2vw, .95rem);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .6rem 1rem;
}

@media (min-width: 480px) {
  .ribbon { letter-spacing: .16em; padding: .65rem 1.5rem; }
}

/* The tails are absolutely positioned outside the panel, so on a narrow
   phone they can push document width past the viewport. Clip on the x axis
   only — `clip` (unlike `hidden`) creates no scroll container, and leaving
   the y axis visible keeps the sticky header and the mobile nav dropdown
   behaving normally. Below ~360px the tail tips bleed off the edge, which
   is a normal way for a banner to sit. */
.has-ribbon { overflow-x: clip; }

.ribbon::before,
.ribbon::after {
  content: '';
  position: absolute;
  top: var(--tail-drop);
  height: 100%;
  aspect-ratio: var(--tail-aspect);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* translateX percentages resolve against the pseudo-element's OWN width,
   which is what lets the overlap track the tail rather than the label. */
.ribbon::before {
  right: 100%;
  transform: translateX(13.15%);
  background-image: url('images/ribbon-tail-left.svg');
}
.ribbon::after {
  left: 100%;
  transform: translateX(-13.79%);
  background-image: url('images/ribbon-tail-right.svg');
}

/* Blue variant: recolour the tails with a mask instead of shipping a second
   pair of SVGs — the tail art is a flat silhouette, so its alpha is all the
   shape information needed. */
.ribbon--blue { background: var(--blue); }
.ribbon--blue::before,
.ribbon--blue::after {
  background-image: none;
  background-color: var(--blue);
  -webkit-mask: var(--tail) no-repeat center / 100% 100%;
  mask: var(--tail) no-repeat center / 100% 100%;
}
.ribbon--blue::before { --tail: url('images/ribbon-tail-left.svg'); }
.ribbon--blue::after  { --tail: url('images/ribbon-tail-right.svg'); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 1rem 2.25rem;
  text-decoration: none;
  border: 3px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: var(--red-hi); border-color: var(--red-hi); }

.btn--outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn--outline:hover { background: var(--blue); color: var(--white); }

.btn--on-blue {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}
.btn--on-blue:hover { background: var(--red); border-color: var(--red); color: var(--white); }

/* ============================================================
   HEADER
   ============================================================ */

html { scroll-behavior: smooth; scroll-padding-top: 6rem; }

.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 100;
  background: var(--blue); color: var(--white);
  padding: .7rem 1.15rem; font-weight: 700;
  transition: top .15s ease;
}
.skip-link:focus { top: .5rem; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 4px solid var(--blue);
  box-shadow: 0 2px 12px rgba(0, 26, 66, .07);
}
.site-header__inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.75rem;
}
.site-header__brand { display: block; flex: 0 0 auto; }
/* The nav mark is much wider than it is tall, so size it by HEIGHT — width
   sizing would either overflow the bar or shrink the wordmark to nothing. */
.site-header__brand img { height: 40px; width: auto; }

.nav-toggle {
  width: 2.9rem; height: 2.9rem;
  display: grid; place-items: center;
  background: none; border: 3px solid var(--blue);
  border-radius: var(--radius); cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block; width: 1.35rem; height: 3px;
  background: var(--blue); border-radius: 2px;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after  { top: 7px; }

.site-nav { display: none; }
.site-nav a {
  font-weight: 700; font-size: .95rem;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--blue); text-decoration: none;
  padding: .8rem 0; display: block;
}
.site-nav a:hover { color: var(--red); }

body.nav-open .site-nav {
  display: flex; flex-direction: column;
  position: absolute; inset-inline: 0; top: 100%;
  background: var(--white);
  border-bottom: 4px solid var(--blue);
  padding: .5rem var(--pad-x) 1.25rem;
  box-shadow: 0 12px 24px rgba(0, 26, 66, .12);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-header__brand img { height: 52px; }
  .site-nav {
    display: flex; flex-direction: row;
    gap: 2.25rem; align-items: center;
  }
  .site-nav a { padding: 0; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  display: grid;
  background: var(--paper);
  border-bottom: 6px solid var(--red);
}

.hero__panel {
  padding: 3rem var(--pad-x) 3.5rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}

.hero__logo { width: min(24rem, 100%); margin-inline: auto; }

/* "Children First" is supplied artwork, not type — the campaign's script
   face (Gladiola) is not licensed for web embedding, so setting the slogan
   as text renders it in a substitute that visibly disagrees with the logo
   above it. Shipped pre-coloured, one file per colour, as plain <img> with
   real alt text. */
.tagline {
  width: min(22rem, 80%);
  height: auto;
  margin-inline: auto;
}

.hero__tagline { margin-block: 1.6rem 2rem; }

.quote__tagline { width: min(17rem, 62%); margin-block: 2.25rem 0; }


.hero__actions {
  display: flex; flex-direction: column; gap: .85rem;
  width: 100%; max-width: 20rem;
}

.hero__portrait {
  position: relative;
  background: var(--blue);
}
.hero__portrait img {
  width: 100%; height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover; object-position: center 18%;
}

@media (min-width: 768px) {
  .hero { grid-template-columns: 1.05fr .95fr; align-items: stretch; }
  /* Stays centred at every width. The lockup is a symmetrical, centre-
     balanced mark; left-aligning the tagline and buttons beneath it sets up
     a second axis and the text reads as detached from the logo rather than
     belonging to it. */
  .hero__panel { padding: 5rem 4rem; justify-content: center; }
  .hero__logo { width: min(32rem, 100%); }
  .hero__actions { flex-direction: row; max-width: none; justify-content: center; }
  .hero__portrait { overflow: hidden; min-height: 38rem; }
  .hero__portrait img {
    aspect-ratio: auto;
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-position: center 18%;
  }
}

/* ============================================================
   STAT STRIP
   ============================================================ */

.stats { background: var(--blue); color: var(--white); }
.stats__grid {
  display: grid; grid-template-columns: 1fr;
  text-align: center;
}
.stats__item { padding: 1.75rem 1rem; }
.stats__item + .stats__item { border-top: 1px solid rgba(255, 255, 255, .22); }

.stats__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 3.6rem);
  line-height: 1; display: block;
}
.stats__label {
  font-weight: 700; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase;
  opacity: .95; margin-top: .5rem; display: block;
}

@media (min-width: 768px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__item + .stats__item {
    border-top: 0; border-left: 1px solid rgba(255, 255, 255, .22);
  }
  .stats__item { padding: 2.5rem 1.5rem; }
}

/* ============================================================
   PULL QUOTE
   ============================================================ */

.quote {
  background: var(--white);
  padding-block: var(--section-y);
  text-align: center;
}
.quote blockquote {
  margin: 0 auto; max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 3.4rem);
  line-height: 1.05; letter-spacing: .01em;
  text-transform: uppercase; color: var(--blue);
}
.quote__mark {
  display: block; width: 4.5rem; height: 6px;
  background: var(--red); margin: 0 auto 2rem;
}

/* ============================================================
   ABOUT
   ============================================================ */

.about { background: var(--paper); }
.about__title {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  color: var(--blue); text-align: center;
  margin-bottom: 2.5rem;
}
.letter {
  background: var(--white);
  border-top: 6px solid var(--red);
  box-shadow: var(--shadow);
  padding: clamp(1.75rem, 5vw, 3.5rem);
  max-width: var(--measure);
  margin-inline: auto;
  font-size: 1.15rem;
  line-height: 1.75;
}
.letter__signature {
  font-family: var(--font-script);
  font-size: clamp(2.1rem, 6vw, 2.75rem);
  color: var(--blue);
  line-height: 1.1;
  margin-top: 2rem;
}

/* ============================================================
   EXPERIENCE
   ============================================================ */

.experience { background: var(--white); }
.experience__title {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  color: var(--blue); text-align: center;
  margin-bottom: 2.75rem;
}

.creds { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.creds li {
  background: var(--white);
  border: 1px solid #E2E8F2;
  border-left: 7px solid var(--red);
  border-radius: var(--radius);
  padding: 1.6rem 1.75rem;
  font-weight: 600; font-size: 1.075rem;
  color: var(--blue);
  line-height: 1.45;
  box-shadow: 0 1px 2px rgba(0,26,66,.04), 0 6px 18px rgba(0,26,66,.06);
}

.creds__note {
  text-align: center; max-width: 46ch;
  margin: 2.25rem auto 0;
  color: var(--ink-soft); font-weight: 500;
}

.closing {
  margin: 3.5rem auto 0; max-width: 44rem;
  background: var(--blue); color: var(--white);
  border-radius: var(--radius);
  padding: 2.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.closing p {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.6vw, 1.7rem);
  letter-spacing: .02em; text-transform: uppercase;
  margin: 0 0 .3rem; line-height: 1.15;
}
.closing p:last-child { margin-bottom: 0; color: #BBD3F5; }

@media (min-width: 768px) {
  .creds { grid-template-columns: repeat(2, 1fr); gap: 1.15rem; }
}

/* ============================================================
   YARD SIGNS
   ============================================================ */

.signs {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding-block: var(--section-y);
}
.signs__title {
  font-size: clamp(2.3rem, 8vw, 3.8rem);
  margin-bottom: 1rem;
}
.signs__body {
  max-width: 42ch; margin: 0 auto 2rem;
  font-size: 1.075rem; opacity: .95;
}
.signs__election {
  margin: 2rem 0 0;
  font-weight: 800; font-size: .85rem;
  letter-spacing: .12em; text-transform: uppercase;
}

/* ============================================================
   CONTACT
   ============================================================ */

.contact { background: var(--paper); }
.contact__title {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  color: var(--blue); text-align: center;
  margin-bottom: .85rem;
}
.contact__lead {
  text-align: center; max-width: 44ch;
  margin: 0 auto 2.5rem; color: var(--ink-soft);
}
.contact__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1rem;
}
.contact__list a {
  display: block;
  background: var(--white);
  border: 2px solid #DDE3EE;
  border-radius: var(--radius);
  padding: 1.4rem 1rem;
  text-align: center;
  font-weight: 700; font-size: 1.05rem; color: var(--blue);
  text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.contact__list a:hover { border-color: var(--red); color: var(--red); }

@media (min-width: 768px) {
  .contact__list { grid-template-columns: repeat(3, 1fr); gap: 1.15rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--blue);
  color: var(--white);
  padding-block: 3.5rem;
  text-align: center;
  border-top: 6px solid var(--red);
}
.site-footer__logo { width: 220px; margin: 0 auto 2.5rem; }

.voting {
  background: var(--white); color: var(--blue);
  max-width: 34rem; margin: 0 auto 2.5rem;
  padding: 1.75rem 1.5rem;
  border-top: 6px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.voting h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.45rem; letter-spacing: .06em;
  text-transform: uppercase; margin: 0 0 .9rem;
}
.voting ul { list-style: none; margin: 0; padding: 0; }
.voting li {
  font-size: 1.1rem; font-weight: 600;
  margin-bottom: .35rem; color: var(--ink);
}
.voting li:last-child { margin-bottom: 0; }
.voting li b { color: var(--blue); font-weight: 800; }

.site-footer__office {
  font-weight: 700; font-size: .95rem; margin: 0 0 .6rem;
}
/* .disclaimer carries no styling of its own — it inherits the copyright
   line completely so the two halves read as one sentence. The class remains
   as a hook so the legally required text stays independently assertable. */
.site-footer__copy {
  font-size: .9rem; opacity: .85; margin: 0;
}

/* ============================================================
   FOCUS VISIBILITY — must come after every component
   ============================================================ */

/* A "sandwich" ring: white inner, near-black outer. Whatever the element
   sits on — white, paper, brand blue, or the red CTA — at least one of the
   two clears 3:1. A single-coloured ring cannot: red vanishes on the red
   button, white vanishes on paper.
   This block is last on purpose. .btn--primary sets its own box-shadow,
   and at equal specificity the later rule wins, so an earlier focus rule
   would be silently dropped on the site's most important button. */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--focus-dark);
  border-radius: 2px;
}

/* Windows High Contrast mode strips box-shadow; fall back to a real outline. */
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid CanvasText; outline-offset: 2px; }
}

/* ============================================================
   REDUCED MOTION — must come after any scroll-behavior rule
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
