/* ==========================================================================
   Noel Buckley for St. Andrew's Ward — campaign stylesheet
   Brand tokens live at the top. Everything else references them.
   ========================================================================== */

:root {
  /* Core palette */
  --navy-900: #081826;
  --navy-800: #0F2A44;   /* primary brand */
  --navy-700: #1B3A57;
  --navy-600: #2C5074;

  --gold-500: #F2A71B;   /* accent */
  --gold-600: #D98D0B;
  --gold-800: #8C5A00;  /* text-safe gold on light backgrounds (AA) */
  --gold-100: #FDF0D3;

  --cream:    #F8F4EB;
  --paper:    #FFFFFF;
  --ink:      #14181C;
  --slate:    #56636F;
  --line:     #E2DCD0;

  --ok:       #1F7A5A;

  /* Type */
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;

  /* Space + shape */
  --max: 1180px;
  --pad: clamp(20px, 5vw, 40px);
  --r-sm: 4px;
  --r: 8px;
  --shadow: 0 2px 4px rgba(8, 24, 38, .06), 0 12px 32px rgba(8, 24, 38, .08);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy-800); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-800); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.05rem; letter-spacing: 0; }

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

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.narrow { max-width: 760px; }

.eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-800);
  margin: 0 0 .9em;
}
.eyebrow.on-dark { color: var(--gold-500); }

.lede { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--slate); }
.lede.on-dark { color: rgba(255,255,255,.82); }

/* --------------------------------------------------------------- skip link */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--gold-500); color: var(--navy-900);
  padding: 12px 18px; font-weight: 700;
}
.skip:focus { left: 8px; top: 8px; }

/* ------------------------------------------------------------------ header */
.topbar {
  background: var(--navy-900);
  color: rgba(255,255,255,.85);
  font-size: .82rem;
  letter-spacing: .04em;
}
.topbar .wrap {
  display: flex; gap: 16px; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  min-height: 40px; padding-block: 8px;
}
.topbar strong { color: var(--gold-500); font-family: var(--display); letter-spacing: .06em; }
.topbar a { color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 78px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { height: 42px; width: auto; }

.nav-toggle {
  display: none; border: 1px solid var(--line); background: var(--paper);
  border-radius: var(--r-sm); padding: 9px 12px; cursor: pointer;
  font-family: var(--display); font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--navy-800);
}

.nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 26px); }
.nav a {
  font-family: var(--display); font-weight: 600; font-size: .92rem;
  color: var(--navy-800); text-decoration: none; letter-spacing: -.01em;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--gold-500); color: var(--navy-800); }
.nav a[aria-current="page"] { border-bottom-color: var(--navy-800); }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  letter-spacing: .01em;
  padding: 14px 26px; border-radius: var(--r-sm);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }
.btn-primary:hover { background: var(--gold-600); border-color: var(--gold-600); color: var(--navy-900); }
.btn-navy { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.btn-navy:hover { background: var(--navy-900); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy-800); border-color: var(--navy-800); }
.btn-ghost:hover { background: var(--navy-800); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-ghost-light:hover { background: #fff; color: var(--navy-900); }
.btn-sm { padding: 10px 18px; font-size: .85rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------ layout */
section { padding-block: clamp(56px, 8vw, 96px); }
section.tight { padding-block: clamp(40px, 5vw, 60px); }
.bg-cream { background: var(--cream); }
.bg-navy { background: var(--navy-800); color: #fff; }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy-deep { background: var(--navy-900); color: #fff; }
.bg-navy-deep h2, .bg-navy-deep h3 { color: #fff; }

.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 52px); }

.rule { height: 4px; width: 64px; background: var(--gold-500); border: 0; margin: 0 0 26px; }

/* -------------------------------------------------------------------- hero */
.hero {
  background: var(--navy-800);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding-block: clamp(52px, 7vw, 88px);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 460px at 78% 12%, rgba(242,167,27,.16), transparent 62%),
    linear-gradient(180deg, rgba(8,24,38,0) 55%, rgba(8,24,38,.5) 100%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid; gap: clamp(28px, 5vw, 56px);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
}
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero h1 .accent { color: var(--gold-500); display: block; }
.hero p { color: rgba(255,255,255,.86); }

.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  border-radius: 100px; padding: 7px 16px;
  font-family: var(--display); font-weight: 600; font-size: .82rem;
  letter-spacing: .08em; text-transform: uppercase; color: #fff;
  margin-bottom: 22px;
}
.hero-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); }

.portrait {
  border: 6px solid var(--gold-500);
  border-radius: var(--r);
  background: var(--navy-700);
  aspect-ratio: 4 / 5;
  display: grid; place-items: center;
  text-align: center; padding: 0;
  color: rgba(255,255,255,.6);
  font-size: .85rem; letter-spacing: .04em;
  overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .ph {
  padding: 24px;
  font-family: var(--display); font-weight: 700; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5);
}
.portrait img ~ .ph { display: none; }  /* hidden while the photo is present */

/* ---------------------------------------------------------------- counters */
.factbar { background: var(--navy-900); color: #fff; }
.factbar .wrap {
  display: grid; gap: 24px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-block: 30px;
}
.fact { text-align: center; }
.fact .n {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1;
  color: var(--gold-500); display: block;
}
.fact .l {
  font-size: .78rem; letter-spacing: .11em; text-transform: uppercase;
  color: rgba(255,255,255,.7); margin-top: 8px; display: block;
}

/* ------------------------------------------------------------------- cards */
.grid { display: grid; gap: clamp(18px, 2.4vw, 28px); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(24px, 3vw, 34px);
  display: flex; flex-direction: column;
}
.card.on-cream { background: var(--paper); }
.card .num {
  font-family: var(--display); font-weight: 800; font-size: .8rem;
  letter-spacing: .14em; color: var(--gold-800); margin-bottom: 14px;
}
.card h3 { margin-bottom: .5em; }
.card p { color: var(--slate); font-size: .98rem; }
.card .more {
  margin-top: auto; padding-top: 18px;
  font-family: var(--display); font-weight: 700; font-size: .88rem;
  text-decoration: none; color: var(--navy-800);
}
.card .more:hover { color: var(--gold-800); }
.card .more::after { content: " →"; }

.card-dark {
  background: var(--navy-700); border-color: var(--navy-600); color: #fff;
}
.card-dark p { color: rgba(255,255,255,.78); }
.card-dark .more { color: var(--gold-500); }

/* ---------------------------------------------------------------- pillars */
.pillar {
  border-top: 5px solid var(--gold-500);
  background: var(--paper);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0 0 var(--r) var(--r);
  padding: clamp(26px, 3vw, 36px);
  display: flex; flex-direction: column;
}
.pillar .icon { width: 40px; height: 40px; margin-bottom: 18px; color: var(--navy-800); }
.pillar h3 { font-size: 1.3rem; }
.pillar p { color: var(--slate); font-size: .98rem; }

/* ------------------------------------------------------------- plank block */
.plank {
  display: grid; grid-template-columns: 76px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 36px);
  padding-block: clamp(34px, 5vw, 54px);
  border-top: 1px solid var(--line);
}
.plank:first-of-type { border-top: 0; padding-top: 0; }
.plank .marker {
  font-family: var(--display); font-weight: 800;
  font-size: 2.6rem; line-height: 1; color: var(--gold-500);
  border-top: 5px solid var(--gold-500); padding-top: 14px;
}
.plank h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.checklist { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.checklist li {
  position: relative; padding-left: 34px; color: var(--ink); font-size: 1rem;
}
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 18px; height: 10px; border-left: 3px solid var(--gold-500);
  border-bottom: 3px solid var(--gold-500); transform: rotate(-45deg);
}

/* ---------------------------------------------------------------- timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line);
}
.timeline li { position: relative; padding: 0 0 30px 40px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--gold-500);
}
.timeline .yr {
  font-family: var(--display); font-weight: 700; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--gold-800);
}
.timeline .role { font-family: var(--display); font-weight: 800; font-size: 1.15rem; margin: 2px 0 2px; }
.timeline .org { color: var(--slate); font-size: .98rem; }

/* --------------------------------------------------------------- list cols */
.cols-2 { columns: 2; column-gap: clamp(24px, 4vw, 48px); }
.tick-list { list-style: none; margin: 0; padding: 0; }
.tick-list li {
  break-inside: avoid; padding: 9px 0 9px 26px; position: relative;
  border-bottom: 1px solid var(--line); font-size: .97rem;
}
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 1.05em;
  width: 10px; height: 2px; background: var(--gold-500);
}

/* ------------------------------------------------------------------- quote */
.pullquote {
  border-left: 5px solid var(--gold-500);
  padding: 6px 0 6px 28px;
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.25;
  letter-spacing: -.02em;
}
.pullquote cite {
  display: block; margin-top: 16px; font-family: var(--body);
  font-style: normal; font-weight: 600; font-size: .92rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gold-800);
}
.bg-navy .pullquote cite, .bg-navy-deep .pullquote cite { color: var(--gold-500); }

/* --------------------------------------------------------------- countdown */
.countdown { display: flex; gap: 12px; flex-wrap: wrap; }
.cd-unit {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-sm); padding: 12px 18px; min-width: 84px; text-align: center;
}
.cd-unit b {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: 1.9rem; line-height: 1; color: #fff;
}
.cd-unit span {
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.65);
}

/* ------------------------------------------------------------------- forms */
.form-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: clamp(24px, 3.4vw, 40px);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: .82rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy-800); margin-bottom: 7px;
}
.field input, .field textarea, .field select {
  width: 100%; font-family: var(--body); font-size: 1rem;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 3px solid rgba(242,167,27,.4); outline-offset: 1px; border-color: var(--gold-500);
}
.field textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.checks { display: grid; gap: 10px; margin-top: 4px; }
.checks label {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--body); font-weight: 400; font-size: 1rem;
  text-transform: none; letter-spacing: 0; color: var(--ink);
}
.checks input { width: auto; margin-top: .32em; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: .86rem; color: var(--slate); margin-top: 14px; }

/* ------------------------------------------------------------------ misc */
.badge {
  display: inline-block; background: var(--gold-100); color: var(--navy-800);
  border: 1px solid var(--gold-500); border-radius: 100px;
  font-family: var(--display); font-weight: 700; font-size: .74rem;
  letter-spacing: .1em; text-transform: uppercase; padding: 5px 13px;
}
.note {
  background: var(--gold-100); border-left: 4px solid var(--gold-500);
  padding: 18px 22px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: .95rem;
}
.datelist { list-style: none; margin: 0; padding: 0; }
.datelist li {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px;
  padding: 16px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.datelist .d {
  font-family: var(--display); font-weight: 800; font-size: .95rem;
  color: var(--navy-800); letter-spacing: -.01em;
}
.bg-navy .datelist li, .bg-navy-deep .datelist li { border-bottom-color: rgba(255,255,255,.16); }
.bg-navy .datelist .d, .bg-navy-deep .datelist .d { color: var(--gold-500); }

.cta-band { background: var(--gold-500); color: var(--navy-900); }
.cta-band h2 { color: var(--navy-900); }
.cta-band p { color: rgba(8,24,38,.78); }
.cta-band .wrap {
  display: flex; flex-wrap: wrap; gap: 26px;
  align-items: center; justify-content: space-between;
  padding-block: clamp(38px, 5vw, 58px);
}

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.72); font-size: .93rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold-500); text-decoration: underline; }
.footer-grid {
  display: grid; gap: 36px;
  grid-template-columns: 1.4fr 1fr 1fr;
  padding-block: clamp(44px, 6vw, 64px);
}
.footer-grid h4 {
  color: #fff; font-size: .8rem; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 14px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-brand svg { height: 46px; width: auto; margin-bottom: 16px; }
.legal {
  border-top: 1px solid rgba(255,255,255,.14);
  padding-block: 22px; font-size: .82rem; color: rgba(255,255,255,.55);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
}

/* ------------------------------------------------------------ page header */
.page-head { background: var(--navy-800); color: #fff; padding-block: clamp(48px, 6vw, 78px); }
.page-head h1 { color: #fff; font-size: clamp(2.2rem, 5.2vw, 3.6rem); }
.page-head p { color: rgba(255,255,255,.82); max-width: 680px; }

/* ----------------------------------------------------------- brand guide */
.swatch { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.swatch .chip { height: 120px; }
.swatch .meta { padding: 14px 16px; font-size: .86rem; }
.swatch .meta b { display: block; font-family: var(--display); font-size: .95rem; margin-bottom: 4px; }
.swatch .meta code { font-size: .8rem; color: var(--slate); display: block; }
.spec { border: 1px solid var(--line); border-radius: var(--r); padding: 26px; background: var(--paper); }
.do-dont { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.do-dont div { border-radius: var(--r); padding: 20px 22px; font-size: .95rem; }
.do { background: #EAF5F0; border-left: 4px solid var(--ok); }
.dont { background: #FBECEC; border-left: 4px solid #B4362F; }
.do h4, .dont h4 { margin-bottom: 10px; }
.do ul, .dont ul { margin: 0; padding-left: 18px; display: grid; gap: 7px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .portrait { max-width: 380px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factbar .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 20px;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:hover { border-bottom-color: var(--line); }
  .nav .btn { margin-top: 14px; border-bottom: 0; }
  .site-header .wrap { position: relative; }
}

@media (max-width: 720px) {
  body { font-size: 17px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .cols-2 { columns: 1; }
  .plank { grid-template-columns: 1fr; gap: 16px; }
  .plank .marker { font-size: 2rem; width: 56px; }
  .datelist li { grid-template-columns: 1fr; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .do-dont { grid-template-columns: 1fr; }
  .cta-band .wrap { display: block; }
  .cta-band .btn-row { margin-top: 22px; }
}

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

@media print {
  .site-header, .topbar, .site-footer, .cta-band, .nav-toggle { display: none; }
  body { font-size: 11pt; color: #000; }
}
