/* ==========================================================================
   Wendy Maynard for Union County Clerk of Court — WebPro360 static rebuild
   Brand tokens sampled from the campaign's own assets:
   Sign Red #e11f27, Campaign Blue #3569b4, Deep Navy #0b3968, Sky #39a3d1.
   Libre Franklin (display) + Mulish (body — the live site's Muli).
   ========================================================================== */

:root {
  --red:        oklch(55% 0.21 26);    /* #e11f27 yard-sign red */
  --red-dark:   oklch(48% 0.20 26);
  --blue:       oklch(52% 0.13 258);   /* #3569b4 campaign blue */
  --blue-dark:  oklch(44% 0.12 258);
  --navy:       oklch(33% 0.09 255);   /* #0b3968 deep navy */
  --navy-deep:  oklch(25% 0.07 255);
  --sky:        oklch(67% 0.10 232);   /* #39a3d1 sky accent */
  --paper:      oklch(97.5% 0.006 255);
  --paper-deep: oklch(94.5% 0.01 255);
  --white:      oklch(99.5% 0.001 255);
  --ink:        oklch(24% 0.02 255);
  --ink-muted:  oklch(46% 0.02 255);
  --border:     oklch(89% 0.008 255);
  --success:    oklch(52% 0.13 150);
  --success-bg: oklch(96% 0.03 150);
  --error:      oklch(48% 0.18 25);
  --error-bg:   oklch(96% 0.03 25);

  --font-display: "Libre Franklin", "Segoe UI", system-ui, sans-serif;
  --font-body: "Mulish", "Segoe UI", system-ui, sans-serif;

  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-card: 0 4px 20px oklch(33% 0.09 255 / 0.10), 0 1px 3px oklch(33% 0.09 255 / 0.08);
  --shadow-lifted: 0 24px 50px oklch(25% 0.07 255 / 0.30);

  --container: 1160px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  margin: 0 0 0.5em;
  text-wrap: balance;
  letter-spacing: -0.015em;
  color: var(--navy);
}

p { margin: 0 0 1em; max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
a:hover { color: var(--red); }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.eyebrow.on-dark { color: var(--sky); }
.eyebrow.on-band { color: oklch(99.5% 0.001 255 / 0.85); }

.accent { color: var(--red); }

/* Reveal-on-scroll (JS adds .is-visible; reduced-motion overrides above) */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* Visible focus ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), background-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-red {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 6px 18px oklch(55% 0.21 26 / 0.35);
}
.btn-red:hover { background: var(--red-dark); color: var(--white); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-deep); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: oklch(99.5% 0.001 255 / 0.6);
}
.btn-outline:hover { background: oklch(99.5% 0.001 255 / 0.14); color: var(--white); }

.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(99.5% 0.001 255 / 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: block; line-height: 0; flex-shrink: 1; min-width: 0; }
.brand img { width: 330px; max-width: 100%; height: auto; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.main-nav a {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.main-nav a:hover { color: var(--red); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .btn { padding: 10px 22px; font-size: 0.88rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  margin: 4px 0;
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 84vw);
  background: var(--navy);
  color: var(--white);
  padding: 84px 28px 28px;
  transform: translateX(100%);
  transition: transform 260ms var(--ease-out);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav ul { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a { color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.1rem; padding: 10px 0; display: block; border-bottom: 1px solid oklch(99.5% 0.001 255 / 0.12); }
.mobile-nav .close-btn {
  position: absolute;
  top: 22px; right: 22px;
  background: none; border: none; color: var(--white);
  font-size: 1rem; font-weight: 700; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 82% 10%, oklch(52% 0.13 258 / 0.35), transparent 62%),
    linear-gradient(168deg, var(--navy) 0%, var(--navy-deep) 78%);
  color: var(--white);
  overflow: hidden;
}
.hero-stripe {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(var(--red) 0 33.3%, var(--white) 33.3% 66.6%, var(--blue) 66.6% 100%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
  padding: 84px 24px 88px;
}
.hero-copy { max-width: 34rem; }
.hero-copy h1 {
  font-size: clamp(2.7rem, 6vw, 4.3rem);
  font-weight: 900;
  line-height: 1.02;
  margin-bottom: 16px;
  color: var(--white);
}
.hero-office {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: 0.01em;
  color: oklch(99.5% 0.001 255 / 0.92);
  margin-bottom: 32px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-portrait { position: relative; justify-self: center; }
.hero-portrait img {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-md);
  border: 5px solid var(--white);
  box-shadow: var(--shadow-lifted);
}

.hero-badges {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding: 26px 40px 30px;
  border-top: 1px solid oklch(99.5% 0.001 255 / 0.14);
  background: oklch(25% 0.07 255 / 0.6);
  max-width: var(--container);
  margin: 0 auto;
}
.hero-badges .badge { font-family: var(--font-body); }
.hero-badges .badge strong {
  display: block;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 4px;
}
.hero-badges .badge span {
  font-size: 0.92rem;
  line-height: 1.55;
  color: oklch(99.5% 0.001 255 / 0.85);
}

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section-paper { background: var(--paper); }
.section-header { text-align: center; max-width: 46rem; margin: 0 auto 52px; }
.section-header p { margin-left: auto; margin-right: auto; }
.section-header h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }

/* ---------- Career ---------- */
.career-photo { margin: 0 auto 48px; max-width: 900px; }
.career-photo img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.career-photo figcaption {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.02em;
}
.career-copy { max-width: 760px; margin: 0 auto 56px; }
.career-copy h3 { font-size: 1.5rem; }
.career-copy p { max-width: none; }

/* Signature element: Record of Service docket card */
.docket {
  max-width: 880px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--red);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.docket-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  background: var(--navy);
  color: var(--white);
}
.docket-head h3 {
  font-size: 1.05rem;
  margin: 0;
  color: var(--white);
  letter-spacing: 0.02em;
}
.docket-head .docket-meta {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
  white-space: nowrap;
}
.docket-body { padding: 8px 22px 20px; }
.docket-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.docket-item:last-child { border-bottom: none; }
.docket-item .yr {
  flex: 0 0 62px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--red);
}
.docket-item .desc { font-size: 0.98rem; line-height: 1.55; }
.docket-item .desc strong { color: var(--navy); }

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.case-tags .tag {
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--paper-deep);
  border-radius: var(--radius-pill);
  padding: 4px 13px;
}
.docket-source {
  padding: 12px 22px 16px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--ink-muted);
  background: var(--paper);
  border-top: 1px solid var(--border);
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.about-figure img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.about-figure .figure-plate {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
  letter-spacing: 0.02em;
}
.about-copy h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.about-lede {
  font-size: 1.14rem;
  font-weight: 700;
  color: var(--blue);
}

/* ---------- Family ---------- */
.family-section { padding-bottom: 0; }
.family-section .section-header p {
  font-size: 1.08rem;
  margin-bottom: 0.35em;
}
.family-photo {
  margin: 0 auto;
  max-width: 1000px;
  padding-bottom: 92px;
}
.family-photo img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* ---------- Contribute band ---------- */
.contribute-band {
  position: relative;
  background:
    radial-gradient(900px 400px at 18% 0%, oklch(55% 0.21 26 / 0.5), transparent 60%),
    linear-gradient(160deg, var(--red-dark) 0%, oklch(38% 0.16 22) 100%);
  color: var(--white);
  text-align: center;
  padding: 96px 0;
}
.contribute-inner h2 { color: var(--white); font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.contribute-inner > p {
  margin: 0 auto 34px;
  color: oklch(99.5% 0.001 255 / 0.9);
  font-size: 1.1rem;
}
.donate-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 640px;
  margin: 0 auto 18px;
}
.donate-btn {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 16px 22px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--red-dark);
  background: var(--white);
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: 0 6px 18px oklch(25% 0.07 255 / 0.25);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.donate-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px oklch(25% 0.07 255 / 0.32);
  color: var(--red);
}
.donate-btn:active { transform: translateY(0) scale(0.98); }
.donate-note {
  font-size: 0.82rem;
  color: oklch(99.5% 0.001 255 / 0.7);
  margin: 0 auto;
}

/* ---------- Volunteer ---------- */
.join-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: start;
}
.join-side { position: sticky; top: 110px; text-align: center; }
.join-sign {
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.join-side-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-card);
}
.section-paper .form-card { box-shadow: var(--shadow-lifted); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field .req { color: var(--red); }
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--paper);
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue);
  background: var(--white);
}
.field textarea { min-height: 130px; resize: vertical; }

.check-group { border: none; margin: 0 0 18px; padding: 0; }
.check-group legend {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--navy);
  margin-bottom: 10px;
  padding: 0;
}
.check-options { display: flex; flex-wrap: wrap; gap: 12px; }
.check-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  cursor: pointer;
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.check-options label:has(input:checked) {
  border-color: var(--red);
  background: var(--white);
}
.check-options input { accent-color: var(--red); width: 16px; height: 16px; }

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-msg {
  margin: 16px 0 0;
  font-size: 0.94rem;
  font-weight: 700;
  padding: 0;
}
.form-msg.is-success { color: var(--success); background: var(--success-bg); padding: 12px 16px; border-radius: var(--radius-sm); }
.form-msg.is-error { color: var(--error); background: var(--error-bg); padding: 12px 16px; border-radius: var(--radius-sm); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 52px; align-items: start; }
.contact-copy h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.contact-detail { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.contact-detail a { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--white); padding: 46px 0 30px; }
.footer-disclosure {
  max-width: 560px;
  margin: 0 auto 34px;
  padding: 13px 26px;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(99.5% 0.001 255 / 0.92);
  border: 1.5px solid oklch(99.5% 0.001 255 / 0.35);
  border-radius: var(--radius-sm);
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid oklch(99.5% 0.001 255 / 0.14);
}
.footer-brand img {
  height: 90px;
  width: auto;
  border-radius: var(--radius-sm);
  background: var(--white);
  padding: 4px;
}
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { color: oklch(99.5% 0.001 255 / 0.85); text-decoration: none; font-weight: 700; font-size: 0.92rem; }
.footer-links a:hover { color: var(--sky); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 24px;
}
.footer-copyright {
  font-size: 0.86rem;
  color: oklch(99.5% 0.001 255 / 0.7);
}
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: oklch(99.5% 0.001 255 / 0.62);
}
.wp360-credit {
  display: inline-flex;
  align-items: center;
  background: var(--white);
  padding: 7px 12px;
  border-radius: var(--radius-md);
  line-height: 0;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.wp360-credit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px oklch(25% 0.07 255 / 0.4);
}
.wp360-credit img { width: 140px; max-width: 100%; height: auto; display: block; }

/* ---------- Thank-you page ---------- */
.thanks-hero {
  min-height: calc(100vh - 260px);
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(1100px 520px at 82% 10%, oklch(52% 0.13 258 / 0.35), transparent 62%),
    linear-gradient(168deg, var(--navy) 0%, var(--navy-deep) 78%);
  color: var(--white);
  padding: 90px 24px;
}
.thanks-hero h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.4rem); }
.thanks-hero p { margin: 0 auto 30px; color: oklch(99.5% 0.001 255 / 0.9); font-size: 1.12rem; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .main-nav, .header-actions .btn-red { display: none; }
  .nav-toggle { display: block; }
  .brand img { width: 280px; }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; text-align: center; padding-top: 56px; padding-bottom: 60px; }
  .hero-copy { max-width: none; margin: 0 auto; }
  .hero-cta { justify-content: center; }
  .hero-portrait { order: -1; }
  .hero-portrait img { max-width: 300px; }
  .hero-badges { grid-template-columns: 1fr; gap: 18px; text-align: center; padding: 22px 24px 26px; }
  .about-grid, .join-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-figure { max-width: 460px; margin: 0 auto; }
  .join-side { position: static; max-width: 380px; margin: 0 auto; }
  .section { padding: 64px 0; }
  .family-photo { padding-bottom: 64px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand img { width: 230px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 24px; }
  .donate-grid { gap: 10px; }
  .donate-btn { min-width: 84px; padding: 14px 18px; flex: 1 1 28%; }
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-disclosure { font-size: 0.85rem; padding: 11px 16px; }
}
