/*
 * Copyright (c) 2026 Fixing Mainstreet. All rights reserved.
 * Proprietary and confidential. Not open source. See LICENSE.
 *
 * Marketing site styles. Separate from the application's stylesheet on
 * purpose: this page has one job and no tenant theming, and keeping them apart
 * means a brand change here can never alter a municipality's live form.
 */

:root {
  --paving:   #F2F3EF;
  --surface:  #FFFFFF;
  --ink:      #17211C;
  --ink-soft: #4A554E;
  --rule:     #C6CCC2;
  --rule-firm:#8E9A91;

  /* Brand as drawn. These sit at roughly 2:1 against white, which is fine for
     a logo — WCAG exempts logotypes — and not fine for anything readable. */
  --brand-green:  #93C17C;
  --brand-orange: #E58F34;

  /* Adjusted to clear 4.5:1 against the background each is actually used on,
     holding the same hue (100 degrees) and saturation as the brand green.
     Deriving these against pure white is a trap: the page background is
     #F2F3EF, which is dark enough to push a white-derived green under the
     line. Every one of these was measured against its real backdrop. */
  --green:       #4F7A3A;  /* text and links on --paving   — 4.51:1 */
  --green-light: #99C584;  /* headings on --slate          — 4.53:1 */
  --orange:      #AE6416;  /* text on --paving if needed   — 4.5:1  */

  /* From the app icon. Carries the municipal half of the page. */
  --slate:      #334D5C;
  --slate-deep: #243844;

  --measure: 34rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paving);
  color: var(--ink);
  font-family: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

:focus-visible { outline: 3px solid var(--brand-orange); outline-offset: 3px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 0; top: 0; z-index: 99;
  background: var(--ink); color: #fff; padding: 0.75rem 1rem;
}

.wrap { max-width: 66rem; margin: 0 auto; padding: 0 1.5rem; }

/* --- Masthead ------------------------------------------------------------ */

.top { padding: 1.25rem 0; }

.top__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.top__logo { display: block; height: 1.75rem; width: auto; }

.top__alt {
  color: var(--green); font-weight: 700; font-size: 0.9375rem;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-thickness: 2px; white-space: nowrap;
}
.top__alt:hover { color: var(--ink); }

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

.hero { padding: 1.5rem 0 3.5rem; }

.hero__inner {
  display: grid; gap: 2rem; align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 56em) {
  .hero__inner { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 3rem; }
  .hero { padding: 2.5rem 0 5rem; }
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.125rem, 6.5vw, 3.375rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero__lede {
  margin: 0 0 2rem;
  max-width: var(--measure);
  font-size: 1.125rem;
  color: var(--ink-soft);
}

.hero__art { justify-self: center; }

.hero__art img {
  display: block; width: 100%; height: auto;
  max-width: 20rem;
  /* Grounds the cone rather than leaving it floating. */
  filter: drop-shadow(0 18px 20px rgba(23, 33, 28, 0.16));
}

@media (max-width: 55.99em) {
  .hero__art { order: -1; }
  .hero__art img { max-width: 11rem; }
}

/* --- Town finder --------------------------------------------------------- */

.finder {
  background: var(--surface);
  border: 1px solid var(--rule-firm);
  /* Amber edge: the one thing on the page a resident is looking for. */
  border-left: 5px solid var(--brand-orange);
  padding: 1.25rem;
  max-width: var(--measure);
}

.finder__label {
  display: block; font-weight: 700; font-size: 1.0625rem; margin-bottom: 0.5rem;
}

.finder__input {
  width: 100%; font: inherit; color: inherit;
  padding: 0.8125rem 0.875rem;
  min-height: 3rem;
  background: var(--paving);
  border: 2px solid var(--rule-firm);
  border-radius: 3px;
}

.finder__input:focus { border-color: var(--ink); background: var(--surface); }

.finder__count {
  margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.finder__count:empty { display: none; }

/* The listbox sits in flow rather than absolutely positioned: on a phone an
   overlay covering the page below is worse than simply pushing it down. */
.finder__box { position: relative; }

.towns {
  list-style: none; margin: 0.625rem 0 0; padding: 0;
  display: grid; gap: 0.375rem;
  max-height: 17rem; overflow-y: auto;
}

.towns[hidden] { display: none; }

.finder__none { margin: 0; font-size: 0.9375rem; color: var(--ink-soft); }

.town {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8125rem 0.875rem;
  min-height: 3rem;
  background: var(--paving);
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
}

.town__name { font-weight: 700; }

.town__go {
  font-weight: 600; font-size: 0.8125rem; color: var(--green); white-space: nowrap;
}

/* A prospect is not a dead end, but it should not look like a live town
   either. Muted, and the label says plainly what it is. */
.town--prospect { background: transparent; border-style: dashed; }
.town--prospect .town__name { font-weight: 600; color: var(--ink-soft); }

.town__tag {
  font-size: 0.8125rem; color: var(--ink-soft); white-space: nowrap;
}

.town:hover, .town--active {
  border-color: var(--green); border-style: solid; background: var(--surface);
}

/* --- Demand capture ------------------------------------------------------ */

.demand {
  margin-top: 0.875rem;
  padding: 0.875rem;
  background: var(--paving);
  border: 1px solid var(--rule-firm);
  border-left: 4px solid var(--green);
  border-radius: 3px;
}

.demand[hidden] { display: none; }

.demand__head { margin: 0 0 0.25rem; font-weight: 700; font-size: 0.9375rem; }
.demand__body { margin: 0 0 0.75rem; font-size: 0.875rem; color: var(--ink-soft); }

.demand__row { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.demand__input {
  flex: 1 1 11rem; font: inherit; font-size: 0.9375rem;
  padding: 0.625rem 0.75rem; min-height: 2.75rem;
  background: var(--surface); border: 2px solid var(--rule-firm); border-radius: 3px;
}

.demand__btn {
  font: inherit; font-weight: 700; font-size: 0.9375rem;
  padding: 0.625rem 1rem; min-height: 2.75rem;
  background: var(--green); color: #fff;
  border: 0; border-radius: 3px; cursor: pointer;
}
.demand__btn:hover { background: #436630; }
.demand__btn[disabled] { opacity: 0.6; cursor: default; }

.demand__result { margin: 0.625rem 0 0; font-size: 0.9375rem; font-weight: 600; }
.demand__result:empty { display: none; }

.finder__missing { margin: 0.875rem 0 0; font-size: 0.9375rem; color: var(--ink-soft); }
.finder__missing a { color: var(--green); font-weight: 700; text-underline-offset: 3px; }

/* --- Hazard stripe -------------------------------------------------------
   Works-tape rather than a decorative divider. It marks the point where the
   page stops speaking to residents and starts speaking to the people who run
   the department, which is a real change of address rather than a section
   break. */

.hazard {
  height: 0.875rem;
  background: repeating-linear-gradient(
    -45deg,
    var(--brand-orange) 0 0.875rem,
    #F6F4EF 0.875rem 1.75rem
  );
  border-top: 1px solid var(--rule-firm);
  border-bottom: 1px solid var(--rule-firm);
}

/* --- Municipal half ------------------------------------------------------ */

.pitch {
  background: var(--slate);
  color: #FFFFFF;
  padding: 3.5rem 0 4rem;
}

.pitch__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.875rem; font-weight: 700; color: var(--green-light);
}

.pitch__head {
  margin: 0 0 1rem;
  font-size: clamp(1.625rem, 4vw, 2.375rem);
  line-height: 1.12; letter-spacing: -0.025em; font-weight: 800;
}

.pitch__lede {
  margin: 0 0 2.75rem; max-width: 40rem;
  font-size: 1.0625rem; color: #D5DEE4;
}

.steps {
  list-style: none; counter-reset: step;
  margin: 0 0 3rem; padding: 0;
  display: grid; gap: 1.75rem;
}

@media (min-width: 44em) { .steps { grid-template-columns: 1fr 1fr; gap: 2rem 2.5rem; } }

.step { counter-increment: step; padding-left: 3rem; position: relative; }

.step::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.125rem;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  background: var(--brand-orange); color: #2A1A05;
  font-weight: 800; font-size: 0.9375rem;
  border-radius: 50%;
}

.step h3 { margin: 0 0 0.3125rem; font-size: 1.0625rem; font-weight: 700; }
.step p { margin: 0; color: #C9D5DC; font-size: 0.9375rem; }

.notes {
  display: grid; gap: 1.5rem;
  border-top: 1px solid #4A6373;
  padding-top: 2.25rem;
  margin-bottom: 3rem;
}

@media (min-width: 44em) { .notes { grid-template-columns: 1fr 1fr; gap: 1.75rem 2.5rem; } }

.note h3 {
  margin: 0 0 0.3125rem; font-size: 1rem; font-weight: 700;
  color: var(--green-light);
}
.note p { margin: 0; color: #C9D5DC; font-size: 0.9375rem; }

.cta {
  background: var(--slate-deep);
  border-left: 5px solid var(--brand-orange);
  padding: 1.75rem;
}

.cta__head { margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 800; }
.cta__body { margin: 0 0 1.25rem; max-width: 36rem; color: #D5DEE4; font-size: 0.9375rem; }

.btn {
  display: inline-block;
  background: var(--brand-orange); color: #2A1A05;
  font-weight: 800; font-size: 1rem;
  padding: 0.8125rem 1.375rem;
  min-height: 3rem;
  border-radius: 3px;
  text-decoration: none;
}
.btn:hover { background: #F6A44A; }

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

.foot { padding: 2.5rem 0 3rem; border-top: 1px solid var(--rule); }

.foot__inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem;
  justify-content: space-between; align-items: flex-start;
}

.foot__towns-label {
  margin: 0 0 0.5rem; font-size: 0.8125rem; font-weight: 700; color: var(--ink-soft);
}

.foot__towns {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
}

.foot__towns a {
  color: var(--ink); font-weight: 600; font-size: 0.9375rem;
  text-underline-offset: 3px;
}
.foot__towns a:hover { color: var(--green); }

.foot__legal { margin: 0; font-size: 0.8125rem; color: var(--ink-soft); max-width: 22rem; }

/* --- Pricing page -------------------------------------------------------- */

/* The home page switches to slate halfway down, where it changes audience.
   This page has only one audience, so it starts there and stays. */
.pitch--full { padding-bottom: 4.5rem; }

.prices {
  width: 100%;
  max-width: 34rem;
  border-collapse: collapse;
  margin: 0 0 1rem;
  background: var(--slate-deep);
  border-left: 5px solid var(--brand-orange);
}

.prices th, .prices td {
  text-align: left;
  padding: 0.9375rem 1.125rem;
  border-bottom: 1px solid #405B6B;
}

.prices thead th {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--green-light);
  padding-top: 1rem;
  padding-bottom: 0.5rem;
}

.prices tbody th {
  font-weight: 600;
  color: #D5DEE4;
}

.prices tbody td {
  font-weight: 800;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}

.prices tbody tr:last-child th,
.prices tbody tr:last-child td { border-bottom: 0; }

.prices__note {
  max-width: 34rem;
  margin: 0 0 2.5rem;
  font-size: 0.875rem;
  color: #C9D5DC;
}

/* --- Plain section on the light ground ----------------------------------- */

.plain { padding: 3.5rem 0 4rem; }

.plain__head {
  margin: 0 0 1rem;
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.plain__head + .qa, .plain .qa + .plain__head { margin-top: 2.5rem; }

.ticks {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  max-width: 38rem;
}

@media (min-width: 44em) { .ticks { grid-template-columns: 1fr 1fr; gap: 0.5rem 2rem; } }

.ticks li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.9375rem;
}

.ticks li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.45rem;
  width: 0.75rem; height: 0.4375rem;
  border-left: 2.5px solid var(--green);
  border-bottom: 2.5px solid var(--green);
  transform: rotate(-45deg);
}

.qa {
  max-width: 38rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.qa h3 { margin: 0 0 0.5rem; font-size: 1.0625rem; font-weight: 700; }
.qa p { margin: 0 0 0.75rem; font-size: 0.9375rem; color: var(--ink-soft); }
.qa p:last-child { margin-bottom: 0; }

.plain__close { margin: 2rem 0 0; font-size: 0.9375rem; }
.plain__close a { color: var(--green); font-weight: 700; text-underline-offset: 3px; }

.top__logo { transition: opacity 120ms; }
a:hover > .top__logo { opacity: 0.8; }

.cta__links { margin: 0; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }

.cta__secondary {
  color: var(--green-light);
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.cta__secondary:hover { color: #fff; }
