/* ==========================================================================
   Warren McSweeney for Superior Court Judge — WebPro360 static rebuild
   Brand tokens derived from the campaign logo + live Elementor kit:
   Judicial Navy #010151, Campaign Crimson #a31f37, Flag Red #d00f0f,
   Courthouse Greige #ded7d1. Libre Baskerville (display) + Inter (body).
   ========================================================================== */

:root {
  /* Colors in OKLCH, neutrals tinted toward the navy hue */
  --navy:        oklch(24% 0.13 274);   /* #010151 judicial navy */
  --navy-deep:   oklch(18% 0.10 274);
  --navy-tint:   oklch(32% 0.11 274);
  --crimson:     oklch(43% 0.16 15);    /* #a31f37 campaign crimson */
  --crimson-dark:oklch(38% 0.16 15);
  --flag-red:    oklch(54% 0.22 25);    /* #d00f0f — urgency accent, sparing */
  --flag-red-dark: oklch(48% 0.22 25);
  --greige:      oklch(89% 0.008 60);   /* #ded7d1 courthouse stone */
  --greige-deep: oklch(83% 0.01 60);
  --paper:       oklch(98.5% 0.004 60);
  --white:       oklch(99% 0.002 274);
  --ink:         oklch(22% 0.02 274);
  --ink-muted:   oklch(44% 0.02 274);
  --gold:        oklch(72% 0.12 78);    /* seal/gavel signature accent */
  --border:      oklch(88% 0.008 274);
  --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 Baskerville", Georgia, "Times New Roman", serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-card: 0 4px 20px oklch(24% 0.13 274 / 0.10), 0 1px 3px oklch(24% 0.13 274 / 0.08);
  --shadow-lifted: 0 24px 50px oklch(18% 0.10 274 / 0.28);

  --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: 84px; }

@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;
  }
}

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: 700;
  line-height: 1.18;
  margin: 0 0 0.5em;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

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

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

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

.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.14em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 14px;
}
.eyebrow.on-dark { color: var(--gold); }

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

/* 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: 600;
}
.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(--flag-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-crimson {
  background: var(--crimson);
  color: var(--white);
  box-shadow: 0 6px 18px oklch(43% 0.16 15 / 0.35);
}
.btn-crimson:hover { background: var(--crimson-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% 0.002 274 / 0.6);
}
.btn-outline:hover { background: oklch(99% 0.002 274 / 0.14); color: var(--white); }

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

.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(99% 0.002 274 / 0.92);
  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: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { height: 46px; width: auto; border-radius: var(--radius-sm); }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.1;
  color: var(--navy);
}
.brand-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

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

.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: 600; font-size: 1.1rem; padding: 10px 0; display: block; border-bottom: 1px solid oklch(99% 0.002 274 / 0.12); }
.mobile-nav .close-btn {
  position: absolute;
  top: 22px; right: 22px;
  background: none; border: none; color: var(--white);
  font-size: 1rem; font-weight: 600; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy-deep);
  color: var(--white);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, oklch(18% 0.10 274 / 0.94) 0%, oklch(18% 0.10 274 / 0.72) 46%, oklch(18% 0.10 274 / 0.34) 100%), url("/assets/img/courthouse.webp");
  background-size: cover;
  background-position: center 30%;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 76px 24px 84px;
}
.hero-copy { max-width: 34rem; }
.hero-copy h1 {
  font-size: clamp(2.6rem, 6vw, 4.1rem);
  line-height: 1.04;
  margin-bottom: 10px;
}
.hero-office {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.16rem;
  letter-spacing: 0.01em;
  color: var(--white);
  margin-bottom: 6px;
}
.hero-jurisdiction {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.98rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 30px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

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

.hero-badges {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 16px 24px 22px;
  border-top: 1px solid oklch(99% 0.002 274 / 0.14);
  background: oklch(18% 0.10 274 / 0.6);
}
.hero-badges .badge {
  text-align: center;
  font-family: var(--font-body);
}
.hero-badges .badge strong {
  display: block;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}
.hero-badges .badge span {
  font-size: 0.92rem;
  color: oklch(99% 0.002 274 / 0.85);
  letter-spacing: 0.04em;
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-paper { background: var(--greige); }
.section-navy { background: var(--navy); color: var(--white); }
.section-header { text-align: center; max-width: 44rem; margin: 0 auto 52px; }
.section-header p { margin-left: auto; margin-right: auto; }
.section-navy .section-header p { color: oklch(99% 0.002 274 / 0.82); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 44px;
}
.about-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.about-figure .figure-plate {
  margin-top: 14px;
  font-family: var(--font-body);
  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-copy h2 + p { font-size: 1.06rem; }

/* 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(--crimson);
  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(--gold);
  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: 700;
  font-size: 1.02rem;
  color: var(--crimson);
}
.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: 600;
  letter-spacing: 0.03em;
  color: var(--navy);
  background: var(--greige);
  border: 1px solid var(--greige-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);
}

/* ---------- Join the Team ---------- */
.join-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: center;
}
.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: 600;
  font-size: 0.86rem;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.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), box-shadow 160ms var(--ease-out);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--navy);
  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: 600;
  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: 500;
  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(--crimson);
  background: var(--white);
}
.check-options input { accent-color: var(--crimson); width: 16px; height: 16px; }

.radio-row { display: flex; gap: 18px; }
.radio-row label { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; font-size: 0.95rem; }
.radio-row input { accent-color: var(--crimson); }

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

.form-msg {
  margin: 16px 0 0;
  font-size: 0.94rem;
  font-weight: 600;
  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); }

.join-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* ---------- Courtroom band ---------- */
.creed-band {
  position: relative;
  color: var(--white);
  text-align: center;
  padding: 96px 0;
  overflow: hidden;
}
.creed-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(oklch(24% 0.13 274 / 0.86), oklch(18% 0.10 274 / 0.9)), url("/assets/img/courtroom.webp");
  background-size: cover;
  background-position: center 25%;
}
.creed-inner { position: relative; max-width: 46rem; margin: 0 auto; }
.creed-inner h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--white); }
.creed-inner p { margin-left: auto; margin-right: auto; color: oklch(99% 0.002 274 / 0.88); font-size: 1.08rem; }
.creed-seal {
  width: 74px; height: 74px;
  margin: 0 auto 26px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: grid; place-items: center;
  color: var(--gold);
}
.creed-seal svg { width: 38px; height: 38px; }

/* ---------- 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: 600; }
.contact-address {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.contact-address strong {
  display: block;
  font-family: var(--font-body);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.contact-address p { font-size: 1.05rem; color: var(--navy); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--white); padding: 54px 0 30px; }
.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% 0.002 274 / 0.14);
}
.footer-brand img { height: 60px; width: auto; border-radius: var(--radius-sm); }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { color: oklch(99% 0.002 274 / 0.85); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 24px;
}
.footer-disclaimer {
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: oklch(99% 0.002 274 / 0.7);
}
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: oklch(99% 0.002 274 / 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(18% 0.10 274 / 0.4);
}
.wp360-credit img { height: 30px; width: auto; display: block; }

/* ---------- Resources / interior page ---------- */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 62px 0 56px;
  text-align: center;
}
.page-hero .eyebrow { color: var(--gold); }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3rem); color: var(--white); }
.page-hero p { margin: 10px auto 0; max-width: 40rem; color: oklch(99% 0.002 274 / 0.85); }

.resources-form-wrap { max-width: 760px; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav, .header-actions .btn-crimson { display: none; }
  .nav-toggle { display: block; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; 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; }
  .about-grid, .join-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-figure { max-width: 420px; margin: 0 auto; }
  .join-photo { max-width: 460px; margin: 0 auto; }
  .section { padding: 64px 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .form-card { padding: 24px; }
  .hero-badges { flex-direction: column; gap: 14px; }
  .docket-item { flex-direction: column; gap: 4px; }
  .docket-item .yr { flex-basis: auto; }
  .footer-top, .footer-bottom { flex-direction: column; align-items: flex-start; }
}
