:root {
  --bg: #F5EFE3;
  --band: #EDE5D2;
  --text: #2A3849;
  --quiet: #55616F;
  --wire: #6E815F;
  --line: #CFC6B0;
  --dot: #C97B5C;
  --cta-bg: #A35C40;
  --cta-bg-hover: #8A4C34;
  --cta-text: #F5EFE3;
  --link: #A35C40;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131C18;
    --band: #1C2722;
    --text: #F0E8D6;
    --quiet: #BDB7A7;
    --wire: #A8BC97;
    --line: #36423A;
    --dot: #E8A185;
    --cta-bg: #E8A185;
    --cta-bg-hover: #F0B9A3;
    --cta-text: #131C18;
    --link: #E8A185;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 "Atkinson Hyperlegible", system-ui, sans-serif;
}
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
.measure { max-width: 42rem; }
a { color: var(--link); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--wire); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 {
  font-family: Fraunces, Georgia, serif;
  font-variation-settings: "SOFT" 100;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}

/* The header bar stays dark in both colour schemes */
header { background: #2A3849; color: #F5EFE3; padding: 0.7rem 0; }
header :focus-visible { outline-color: #F5EFE3; }
.logo img { display: block; width: 11.5rem; height: auto; }
/* Stays in view on wider screens. On phones it takes two rows, so it scrolls away. */
@media (min-width: 761px) {
  header { position: sticky; top: 0; z-index: 10; }
  html { scroll-padding-top: 5.5rem; }
}

.intro { padding: 4.5rem 0 3.5rem; }
h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.028em;
  max-width: 15em;
}
.lede { font-size: 1.25rem; line-height: 1.55; margin: 1.5rem 0 2rem; }
.cta {
  display: inline-block;
  background: var(--cta-bg);
  color: var(--cta-text);
  font-weight: 700;
  padding: 0.85rem 1.4rem;
  border-radius: 0.6rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.cta:hover { background: var(--cta-bg-hover); }
.cta-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.6rem; }
.copy-email {
  font: inherit; color: var(--text); background: transparent;
  border: 1px solid var(--quiet); border-radius: 0.6rem;
  min-width: 7.5rem; min-height: 2.75rem; padding: 0.4rem 1rem; cursor: pointer;
}
.copy-email:hover { border-color: var(--link); color: var(--link); }

/* The paper trail: one bent wire, as in the logo, ending at the dot */
.trail { padding: 0 0 4.5rem; }
.trail h2 { font-size: 1.5rem; line-height: 1.25; margin-bottom: 1.75rem; }
.trailbox { position: relative; }
.stops {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 3.6rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.wire {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3.6rem;
  overflow: visible;
}
.wire path {
  fill: none;
  stroke: var(--wire);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.stop { position: relative; padding: 0.9rem 1.75rem 0 0; }
.stop::before {
  content: "";
  position: absolute;
  top: -0.6rem; left: -0.4rem;
  width: 0.8rem; height: 0.8rem;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--wire);
}
.stop.last::before { background: var(--dot); border-color: var(--dot); }
.stop h3 { font-size: 1.3rem; line-height: 1.25; margin-bottom: 0.35rem; }
.stop p { margin: 0; color: var(--quiet); font-size: 1rem; line-height: 1.5; }

.band { background: var(--band); padding: 4rem 0; }
.band h2, .more h2, .start h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.15; }
.services { margin: 2rem 0 0; display: grid; grid-template-columns: 15rem 1fr; }
.services dt, .services dd { padding: 1.15rem 0; border-top: 1px solid var(--line); margin: 0; }
.services dt {
  font-family: Fraunces, Georgia, serif;
  font-variation-settings: "SOFT" 100;
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.35;
  padding-right: 1.5rem;
}
.services dd { max-width: 42rem; }

.more { padding: 4rem 0 1rem; }
.more ul { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.more li { margin-bottom: 1rem; }
.more strong { font-weight: 700; }

.start { padding: 3rem 0 4.5rem; }
.start p { margin: 1rem 0 1.75rem; }
.start .limits { color: var(--quiet); font-size: 0.95rem; margin: 1.75rem 0 0; }

footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; color: var(--quiet); font-size: 0.95rem; }

@media (max-width: 760px) {
  .logo img { width: 10rem; }
  .intro { padding: 3rem 0 2.5rem; }
  .lede { font-size: 1.15rem; }
  .stops { display: block; padding: 0 0 0 1.5rem; }
  .stop:not(.last)::after {
    content: "";
    position: absolute;
    top: 0.8rem; bottom: -0.5rem; left: -1.1rem;
    width: 3px;
    background: var(--wire);
  }
  .stop::before { z-index: 1; }
  .wire { display: none; }
  .stop { padding: 0 0 1.5rem; }
  .stop:last-child { padding-bottom: 0; }
  .stop::before { top: 0.4rem; left: -1.5rem; }
  .services { display: block; }
  .services dt { padding: 1.15rem 0 0.2rem; }
  .services dd { border-top: 0; padding: 0 0 1.15rem; }
}

/* Shared by all pages */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.nav a { color: #F5EFE3; text-decoration: none; padding: 0.35rem 0; }
.nav a:hover { color: #E8A185; text-decoration: underline; }
.nav a[aria-current="page"] { font-weight: 700; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 2rem; }
footer address { font-style: normal; }
footer a { color: inherit; }
.footlinks { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }

/* Example project page */
.report h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.15; margin: 0 0 1rem; }
.report section { padding: 0 0 3.5rem; }
.report section.band { padding: 4rem 0; margin-bottom: 3.5rem; }
.report section:not(.start) p { margin: 0 0 1rem; }
.report ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.report li { margin-bottom: 0.65rem; }

/* Projects deck */
[hidden] { display: none !important; }
.report .intro { padding: 3rem 0 2rem; }
.report .intro .lede { margin-bottom: 0; }
.deck-wrap { padding: 0 0 1rem; }
.deck-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.75rem; }
.deck-filters button, .deck-nav button {
  font: inherit; color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: 0.6rem;
  min-height: 2.75rem; padding: 0.4rem 0.9rem; cursor: pointer;
}
.deck-filters button:hover, .deck-nav button:hover { border-color: var(--wire); }
.deck-filters button[aria-pressed="true"] { background: var(--band); border-color: var(--wire); font-weight: 700; }
.cards { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.card {
  background: var(--band); border: 1px solid var(--line); border-radius: 0.9rem;
  padding: 1.75rem; margin-bottom: 1.25rem;
  display: flex; flex-direction: column;
}
.card-cat { color: var(--quiet); font-size: 0.95rem; margin: 0 0 0.4rem; }
.card h3 { font-size: 1.7rem; line-height: 1.2; margin: 0 0 1.1rem; }
.card dl { margin: 0 0 1rem; }
.card > a { margin-top: auto; }
.card dt { font-weight: 700; }
.card dd { margin: 0 0 0.8rem; }
.deck-nav { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }
.report .start { padding: 2rem 0 1.5rem; }
.deck-count { color: var(--quiet); margin-left: 0.25rem; }
/* The deck itself: every card shares one grid cell, so the height holds still */
.deck-live .cards { display: grid; position: relative; isolation: isolate; }
.deck-live .cards::before, .deck-live .cards::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--band); border: 1px solid var(--line); border-radius: 0.9rem;
}
.deck-live .cards::before { transform: rotate(1.4deg) translate(5px, 7px); }
.deck-live .cards::after { transform: rotate(-1deg) translate(-3px, 5px); }
.deck-live .card { grid-area: 1 / 1; margin: 0; visibility: hidden; }
.deck-live .card.is-active { visibility: visible; }
.deck-live .card.from-next { animation: deal-next 240ms ease-out; }
.deck-live .card.from-prev { animation: deal-prev 240ms ease-out; }
@keyframes deal-next { from { opacity: 0; transform: translateX(28px) rotate(1.5deg); } }
@keyframes deal-prev { from { opacity: 0; transform: translateX(-28px) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) {
  .deck-live .card.from-next, .deck-live .card.from-prev { animation: none; }
}
@media (max-width: 760px) {
  .card { padding: 1.25rem; }
  .card h3 { font-size: 1.45rem; }
}

/* Cattails from the first TendPress site, growing up to the footer */
.marsh {
  position: relative; height: 16rem; overflow: hidden;
  background: url("images/cattails.png") repeat-x center bottom -0.5rem / auto 100%;
}
.marsh img { position: absolute; bottom: 0.4rem; left: max(1.5rem, calc(50% - 26rem)); width: 7.5rem; height: auto; }
.marsh + footer { border-top: 0; }
@media (max-width: 760px) {
  .marsh { height: 14rem; }
  .marsh img { width: 6rem; }
}
