/* Lapeer Deserves Better
   Palette: black + white + orange. Flat bands, thick rules, square corners. */

:root {
  --ink: #0C0A09;
  --white: #FFFFFF;
  --orange: #FF5733;
  --orange-deep: #E0431F;
  --panel: #EDEDED;
  --ink-70: #4A4542;
  --ink-on-dark: #D9D6D3;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 5vw, 64px);
  --band: clamp(4rem, 9vw, 7.5rem);
  --nav-h: 68px;
  --checker: 28px;
  --checker-bg: repeating-conic-gradient(var(--ink) 0 25%, var(--white) 0 50%);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
.hero :focus-visible,
.band-ink :focus-visible,
.nav :focus-visible,
.footer :focus-visible {
  outline-color: var(--white);
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--orange);
  color: var(--ink);
  padding: .6rem 1rem;
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---------- Type ---------- */

.display {
  font-weight: 800;
  font-stretch: 62%;
  text-transform: uppercase;
  line-height: .86;
  letter-spacing: -.005em;
  margin: 0;
}
h1.display { font-size: clamp(4rem, 13vw, 11rem); }

h2 {
  font-weight: 800;
  font-stretch: 68%;
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: .95;
  letter-spacing: -.01em;
  margin: 0;
}
h3 {
  font-weight: 700;
  font-stretch: 85%;
  font-size: 1.4rem;
  line-height: 1.15;
  margin: 2rem 0 .6rem;
}
p { margin: 0 0 1.1em; }

.lede {
  font-size: 1.25rem;
  font-weight: 500;
  font-stretch: 95%;
  line-height: 1.4;
  max-width: 24em;
  margin: 1.1rem 0 0;
}
.note {
  font-size: .95rem;
  color: var(--ink-70);
  max-width: 60ch;
}
.band-ink .note { color: var(--ink-on-dark); }

.prose { max-width: 62ch; }
.prose a, .note a {
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose-intro {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .7rem 1.5rem;
  font: inherit;
  font-weight: 700;
  font-stretch: 90%;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 3px solid var(--orange);
  border-radius: 0;
  background: var(--orange);
  color: var(--ink);
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { background: var(--orange-deep); border-color: var(--orange-deep); }
.btn:active { transform: translateY(1px); }
.btn[aria-disabled="true"], .btn:disabled { opacity: .55; cursor: not-allowed; }

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

.btn-ink { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-ink:hover { background: #2A2624; border-color: #2A2624; }

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

.btn-sm { min-height: 2.5rem; padding: .35rem 1rem; font-size: .95rem; }

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--ink);
  color: var(--white);
  border-bottom: 3px solid var(--orange);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--nav-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  font-stretch: 70%;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: .01em;
  white-space: nowrap;
}
.brand-mark { width: 1.6rem; height: 1.6rem; color: var(--orange); }
.nav-inner nav { margin-left: auto; }
.nav-links {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-stretch: 90%;
  padding-block: .25rem;
  border-bottom: 3px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--orange); }
.nav-actions { display: flex; gap: .5rem; }
@media (max-width: 900px) {
  .nav-inner nav { display: none; }
  .nav-actions { margin-left: auto; }
}
@media (max-width: 520px) {
  .brand span { display: none; }
  .brand-mark { width: 2rem; height: 2rem; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--white);
  padding-block: clamp(3rem, 7vw, 5.5rem) calc(var(--band) + var(--checker));
  overflow: hidden;
}

/* Checkered strip: the floor the gavel lands on, repeated at the top of the footer. */
.hero::after,
.footer::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: var(--checker);
  background: var(--checker-bg) 0 0 / var(--checker) var(--checker);
}
.hero::after { bottom: 0; }
.footer::before { top: 0; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
}
.hero-sub {
  color: var(--orange);
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 700;
  font-stretch: 80%;
  line-height: 1.15;
  margin: 1.5rem 0 .9rem;
}
.hero-lede {
  color: var(--ink-on-dark);
  max-width: 36em;
  margin: 0 0 2rem;
}
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; }

.gavel {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-bottom: calc(-1 * var(--band));
  overflow: visible;
}
.gavel-swing {
  transform-box: view-box;
  transform-origin: 305px 295px;
  animation: strike .95s cubic-bezier(.55, 0, .85, .35) .3s both;
}
@keyframes strike {
  0%   { transform: rotate(26deg); }
  68%  { transform: rotate(0deg); }
  80%  { transform: rotate(4deg); }
  100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .gavel-swing { animation: none; }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .gavel { max-width: min(58vw, 300px); order: -1; margin-bottom: .5rem; }
}

/* ---------- Bands and section grid ---------- */

.band { padding-block: var(--band); }
.band-panel { background: var(--panel); }
.band-ink { background: var(--ink); color: var(--white); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.section-head {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}
@media (max-width: 820px) {
  .section-grid { grid-template-columns: 1fr; gap: 2rem; }
  .section-head { position: static; }
}

/* ---------- Placeholders (remove class="ph" before launch) ---------- */

.ph {
  position: relative;
  outline: 2px dashed var(--orange);
  outline-offset: 6px;
}
.ph::after {
  content: "Placeholder: replace before launch";
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  font-size: .7rem;
  font-weight: 700;
  font-stretch: 90%;
  line-height: 1;
  background: var(--orange);
  color: var(--ink);
  padding: .3rem .45rem;
  white-space: nowrap;
}
p.ph { margin-top: 2rem; }
.ph-inline {
  border-bottom: 2px dashed var(--orange);
  padding-bottom: .05em;
}

/* ---------- Why we started ---------- */

.reasons {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
  border-top: 3px solid var(--ink);
}
.reasons li {
  padding: 1.1rem 0;
  border-bottom: 3px solid var(--ink);
  font-weight: 600;
  font-stretch: 90%;
  font-size: 1.15rem;
  line-height: 1.35;
}
.reasons li.ph { outline-offset: -4px; padding-inline: .75rem; }
.reasons li.ph::after { bottom: auto; top: -.9rem; right: .5rem; }

/* ---------- Our goal ---------- */

.progress { margin-top: 1.5rem; max-width: 24em; }
.progress-track {
  height: 18px;
  width: calc(round(down, calc(100% - 4px), 14px) + 4px); /* whole squares only; ignored by older browsers */
  border: 2px solid var(--ink);
  background: var(--checker-bg) 0 0 / 14px 14px;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--orange);
  border-right: 2px solid var(--ink);
  transition: width .6s ease;
}
.progress-fill[hidden] { display: none; }
.progress-text { margin: .6rem 0 0; font-size: .95rem; color: var(--ink-70); }

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem;
  padding: 1.4rem 0;
  border-top: 3px solid var(--ink);
}
.steps li::before {
  content: counter(step);
  grid-column: 1;
  grid-row: 1 / span 2;
  font-weight: 800;
  font-stretch: 62%;
  font-size: 2.75rem;
  line-height: .9;
  color: var(--ink);
}
.steps li > * { grid-column: 2; }
.steps h3 { margin: 0 0 .35rem; }
.steps p { margin: 0; max-width: 52ch; }
.step-status {
  display: inline-block;
  margin-left: .5rem;
  vertical-align: .2em;
  font-size: .8rem;
  font-weight: 700;
  font-stretch: 90%;
  padding: .15rem .5rem;
  background: var(--ink);
  color: var(--white);
}
.steps li.is-done::before { color: #9A9593; }
.steps li.is-done h3 { color: var(--ink-70); }
.steps li.is-done .step-status { background: transparent; color: var(--ink-70); border: 2px solid #9A9593; }
.steps li.is-current {
  background: var(--ink);
  color: var(--white);
  padding-inline: 1.25rem;
  margin-inline: -1.25rem;
}
.steps li.is-current::before { color: var(--orange); }
.steps li.is-current .step-status { background: var(--orange); color: var(--ink); }
.steps li.is-current + li { border-top-color: transparent; }
.steps li.is-upcoming .step-status { display: none; }
@media (max-width: 820px) {
  .steps li.is-current {
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
  }
}

/* ---------- Register form ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.25rem;
}
.field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.field.span { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
}
label { font-weight: 700; font-stretch: 90%; }
.optional { font-weight: 400; color: var(--ink-70); }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  font: inherit;
  width: 100%;
  min-height: 3.25rem;
  padding: .7rem .9rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
}
textarea { min-height: 7rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: #8C8783; }

.field.is-invalid input { border-color: var(--orange); border-width: 3px; }
.field-error { margin: 0; font-size: .9rem; font-weight: 700; }
.field-error:empty { display: none; }
.hint { margin: 0; font-size: .9rem; color: var(--ink-70); }

.check {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  font-weight: 500;
  cursor: pointer;
}
.check input {
  width: 1.35rem;
  height: 1.35rem;
  margin: .15rem 0 0;
  flex: none;
  accent-color: var(--orange);
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 1rem;
}
.form-status { margin: 0; font-weight: 600; }
.form-status:empty { display: none; }

.signup-done::before {
  content: "";
  display: block;
  width: round(down, 100%, var(--checker)); /* whole squares only; ignored by older browsers */
  height: var(--checker);
  margin-bottom: 1.5rem;
  background: var(--checker-bg) 0 0 / var(--checker) var(--checker);
}
.signup-done h3 { margin-top: 0; font-size: 1.8rem; }

/* ---------- Donate ---------- */

.address {
  font-size: 1.2rem;
  font-weight: 600;
  font-stretch: 90%;
  white-space: pre-line;
  border-left: 6px solid var(--orange);
  padding-left: 1rem;
}

/* ---------- Articles ---------- */

.articles, .videos {
  list-style: none;
  padding: 0;
  margin: 0;
}
.articles { border-top: 3px solid var(--ink); }
.articles li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 3px solid var(--ink);
}
@media (max-width: 600px) {
  .articles li { grid-template-columns: 1fr; gap: .4rem; }
}
.article-meta { font-size: .9rem; color: var(--ink-70); line-height: 1.4; }
.article-meta .outlet { display: block; font-weight: 700; color: var(--ink); }
.article-title {
  font-size: 1.35rem;
  font-weight: 700;
  font-stretch: 85%;
  line-height: 1.15;
  margin: 0 0 .4rem;
}
.article-title a {
  text-decoration: none;
  border-bottom: 3px solid var(--orange);
}
.article-title a:hover { background: var(--orange); }
.article-summary { margin: 0; max-width: 60ch; }
.articles li.ph { outline-offset: -6px; padding-inline: .75rem; }
.articles li.ph::after { bottom: auto; top: -.9rem; right: .5rem; }

/* ---------- Videos ---------- */

.videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .videos { grid-template-columns: 1fr; }
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: 3px solid var(--ink);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--white);
  padding: 1rem;
  font-weight: 600;
  font-stretch: 90%;
}
.video-empty svg { width: 3rem; height: 3rem; color: var(--orange); margin: 0 auto .5rem; }
.video-title {
  font-weight: 700;
  font-stretch: 85%;
  font-size: 1.1rem;
  line-height: 1.2;
  margin: .75rem 0 .2rem;
}
.video-note { margin: 0; font-size: .9rem; color: var(--ink-70); }
.videos li.ph { outline-offset: 6px; }

.loading, .empty { color: var(--ink-70); padding: 1rem 0; }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  background: var(--ink);
  color: var(--ink-on-dark);
  padding: calc(3rem + var(--checker)) 0 3rem;
  font-size: .95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 4rem;
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer p { margin: 0 0 .5rem; }
.footer-brand {
  color: var(--white);
  font-weight: 800;
  font-stretch: 68%;
  font-size: 1.6rem;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: .5rem;
}
.footer a { color: var(--white); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.legal { max-width: 48ch; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
