/* ==========================================================================
   Town Development Group — thetowndg.com
   Design system. Warm, civic, credible. Oakland.

   Palette rationale:
     oak   — deep evergreen, the oak of Oakland. Institutional weight without
             feeling corporate-cold. Primary brand colour.
     clay  — terracotta / fired brick. Warmth, construction, ground floor.
     bone  — warm paper. The whole site sits on paper, not on white.
   Nothing here is shared with any other project.
   ========================================================================== */

/* ---------- Fonts (self-hosted, SIL OFL) ---------------------------------- */

@font-face {
  font-family: 'Libre Franklin';
  src: url('../fonts/librefranklin-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* ---------- Tokens -------------------------------------------------------- */

:root {
  /* colour */
  --ink: #131a17;
  --oak: #1e4b3c;
  --oak-deep: #16382c;
  --oak-mid: #3c6b59;
  --clay: #c2622f;
  --clay-text: #a34e22; /* AA-safe on bone for small text */
  --clay-soft: #e9c3a4;
  --bone: #f7f3ec;
  --bone-2: #efe9de;
  --sage: #e3eae0;
  --slate: #5f6b64;
  --line: rgba(19, 26, 23, 0.13);
  --line-strong: rgba(19, 26, 23, 0.24);
  --white: #fffdf9;

  /* type */
  --font-display: 'Libre Franklin', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.75vw, 1.95rem);
  --step-3: clamp(1.8rem, 1.5rem + 1.4vw, 2.7rem);
  --step-4: clamp(2.2rem, 1.6rem + 2.8vw, 4rem);
  --step-5: clamp(2.5rem, 1.7rem + 3.6vw, 4.6rem);

  /* space */
  --gutter: clamp(1.25rem, 0.9rem + 1.7vw, 2.5rem);
  --section-y: clamp(4rem, 2.6rem + 6vw, 8.5rem);
  --measure: 62ch;
  --wrap: 1200px;
  --wrap-narrow: 780px;

  --radius: 3px;
  --radius-lg: 6px;

  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* ---------- Reset / base -------------------------------------------------- */

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

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.021em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
  font-weight: 800;
  letter-spacing: -0.032em;
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
  letter-spacing: -0.014em;
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--oak);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.18s var(--ease);
}

a:hover {
  color: var(--clay-text);
}

:focus-visible {
  outline: 2.5px solid var(--clay);
  outline-offset: 3px;
  border-radius: 2px;
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.15em;
}

li {
  margin-bottom: 0.4em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

::selection {
  background: var(--clay-soft);
  color: var(--ink);
}

/* ---------- Utilities ----------------------------------------------------- */

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

.wrap-narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: clamp(2.5rem, 1.8rem + 3vw, 5rem);
}

.measure {
  max-width: var(--measure);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--slate);
  max-width: 56ch;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--oak);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Eyebrow — the small civic label above section headings. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--clay-text);
  margin: 0 0 1.4rem;
}

.eyebrow::before {
  content: '';
  width: 1.75rem;
  height: 2px;
  background: var(--clay);
  flex: none;
}

.eyebrow--on-dark {
  color: var(--clay-soft);
}

.eyebrow--on-dark::before {
  background: var(--clay-soft);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 1.6rem;
  border: 1.5px solid var(--oak);
  border-radius: var(--radius);
  background: var(--oak);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn:hover {
  background: var(--oak-deep);
  border-color: var(--oak-deep);
  color: var(--white);
  transform: translateY(-1px);
}

.btn .arrow {
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.btn--ghost {
  background: transparent;
  color: var(--oak);
}

.btn--ghost:hover {
  background: var(--oak);
  color: var(--white);
}

.btn--on-dark {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--white);
}

.btn--on-dark:hover {
  background: #ad5526;
  border-color: #ad5526;
}

.btn--ghost-on-dark {
  background: transparent;
  border-color: rgba(255, 253, 249, 0.45);
  color: var(--white);
}

.btn--ghost-on-dark:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--oak-deep);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

/* Inline text link with a moving underline. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.055em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--oak);
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 0.3rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.link-arrow:hover {
  color: var(--clay-text);
  border-color: var(--clay);
}

.link-arrow .arrow {
  transition: transform 0.25s var(--ease);
}

.link-arrow:hover .arrow {
  transform: translateX(3px);
}

/* ---------- Header -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 243, 236, 0.88);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  flex: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.brand__sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.63rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: 0.28rem;
}

/* "The Town Development Group" is a long lockup for a 375px bar. Step it down
   so the wordmark and the menu button both keep their full size. */
@media (max-width: 560px) {
  .brand {
    gap: 0.55rem;
    min-width: 0;
  }

  .brand__mark {
    width: 30px;
    height: 30px;
  }

  .brand__name {
    font-size: 0.78rem;
  }

  .brand__sub {
    font-size: 0.55rem;
    letter-spacing: 0.16em;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 0.3rem + 1.7vw, 2.2rem);
}

.nav a {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}

.nav a:hover {
  color: var(--clay-text);
}

.nav a[aria-current='page'] {
  border-bottom-color: var(--clay);
}

.nav__cta {
  margin-left: 0.4rem;
  padding: 0.7rem 1.15rem !important;
  border: 1.5px solid var(--oak) !important;
  border-radius: var(--radius);
  color: var(--oak) !important;
}

.nav__cta:hover {
  background: var(--oak);
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  /* Never let a long brand name squeeze the tap target. */
  flex: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    inset: 100% 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.5rem;
    display: none;
  }

  .nav[data-open='true'] {
    display: flex;
  }

  .nav a {
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1rem;
  }

  .nav a[aria-current='page'] {
    color: var(--clay-text);
    border-bottom-color: var(--line);
  }

  .nav__cta {
    margin: 1rem 0 0;
    text-align: center;
    justify-content: center;
    display: block;
    border-bottom: 1.5px solid var(--oak) !important;
  }
}

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

.hero {
  position: relative;
  overflow: hidden;
  background: var(--bone);
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin-bottom: 1.5rem;
}

.hero__lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--slate);
  max-width: 46ch;
}

/* ---------- Film hero (home) ---------------------------------------------
   Looping West Oakland aerial behind the type. The poster is a background on
   .hero__media so it paints immediately and stays put; the video fades in on
   top only once it is actually playing, so a blocked, refused, or slow video
   degrades to a still photograph rather than to a blank panel. */

.hero--film {
  min-height: clamp(30rem, 26rem + 22vh, 44rem);
  display: grid;
  align-items: center;
  border-bottom: 0;
  background: var(--oak-deep);
  isolation: isolate;
}

.hero--film > * {
  grid-area: 1 / 1;
}

/* The backdrop layers must fill the row; only .hero__inner is centred in it.
   Without this they collapse to their (zero) content height. */
.hero__media,
.hero__scrim {
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
}

.hero__media {
  position: relative;
  overflow: hidden;
  background: var(--oak-deep) url('/assets/img/west-oakland-poster.jpg') center /
    cover no-repeat;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s var(--ease);
  pointer-events: none;
}

.hero__video.is-playing {
  opacity: 1;
}

/* Scrim. Three layers, in order: a warm oak wash that pulls the cool footage
   into the palette; a left-weighted darkener that buys contrast exactly where
   the type sits; and a foot that hands off to the marquee below. */
.hero__scrim {
  /* Positioned so it paints above .hero__media, which is itself positioned;
     without this, DOM order loses to the painting order and the scrim vanishes
     underneath the footage. */
  position: relative;
  z-index: 1;
  background:
    linear-gradient(
      100deg,
      rgba(14, 16, 12, 0.84) 0%,
      rgba(14, 16, 12, 0.72) 35%,
      rgba(14, 16, 12, 0.55) 62%,
      rgba(14, 16, 12, 0.18) 100%
    ),
    linear-gradient(to top, rgba(22, 56, 44, 0.6) 0%, rgba(22, 56, 44, 0) 38%),
    linear-gradient(rgba(30, 75, 60, 0.13), rgba(30, 75, 60, 0.13));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(4.5rem, 3rem + 8vw, 8rem);
  color: var(--white);
}

.hero--film h1 {
  color: var(--white);
  max-width: 15ch;
  text-shadow: 0 1px 24px rgba(11, 18, 15, 0.4);
}

/* Held to 40ch so the line never runs out past the scrim's dark zone into the
   blown-out sky on the right. Opacity kept high for the same reason. */
.hero--film .hero__lede {
  color: rgba(255, 253, 249, 0.93);
  max-width: 40ch;
}

@media (max-width: 700px) {
  .hero--film {
    min-height: 0;
  }

  /* Weight the scrim to the bottom on tall screens: the type stacks under the
     horizon rather than beside it. */
  .hero__scrim {
    background:
      linear-gradient(
        rgba(11, 18, 15, 0.55) 0%,
        rgba(11, 18, 15, 0.72) 45%,
        rgba(11, 18, 15, 0.88) 100%
      ),
      linear-gradient(rgba(30, 75, 60, 0.34), rgba(30, 75, 60, 0.34));
  }
}

/* Ticker strip of what the firm does, under the hero. */
.marquee {
  background: var(--oak-deep);
  color: var(--white);
  border-block: 1px solid var(--oak-deep);
  overflow: hidden;
}

.marquee__inner {
  display: flex;
  gap: 3rem;
  padding-block: 0.85rem;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: marquee 42s linear infinite;
}

.marquee__inner span {
  display: inline-flex;
  align-items: center;
  gap: 3rem;
}

.marquee__inner span::after {
  content: '◆';
  color: var(--clay-soft);
  font-size: 0.6em;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__inner {
    animation: none;
    white-space: normal;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
  }
  .marquee__inner span {
    gap: 2rem;
  }
}

/* ---------- Page header (interior pages) ---------------------------------- */

.page-header {
  background: var(--oak);
  color: var(--white);
  padding-block: clamp(3.5rem, 2.4rem + 5vw, 7rem);
  position: relative;
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  right: -6%;
  bottom: -55%;
  width: min(46%, 480px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 253, 249, 0.16);
  pointer-events: none;
}

.page-header h1 {
  color: var(--white);
  max-width: 18ch;
  margin-bottom: 1.25rem;
}

.page-header p {
  color: rgba(255, 253, 249, 0.78);
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 52ch;
}

/* ---------- Section heading block ----------------------------------------- */

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 0.5rem + 3vw, 4rem);
  align-items: end;
  margin-bottom: clamp(2.25rem, 1.5rem + 2.5vw, 3.75rem);
}

@media (max-width: 800px) {
  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1rem;
  }
}

.section-head h2 {
  margin: 0;
  max-width: 20ch;
}

.section-head p {
  color: var(--slate);
  max-width: 48ch;
}

/* ---------- Cards / grids ------------------------------------------------- */

.grid {
  display: grid;
  gap: clamp(1.25rem, 0.7rem + 1.8vw, 2rem);
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

/* Always 2-up on desktop — used for the four numbered process steps, which
   read as a 2x2 block rather than a 3 + orphan row. */
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 720px) {
  .grid--2 {
    grid-template-columns: 1fr;
  }
}

/* Numbered capability card. */
.capability {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 1.2rem + 1.2vw, 2.4rem);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.capability:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 40px -28px rgba(19, 26, 23, 0.45);
}

.capability__num {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--clay-text);
  margin-bottom: 1.5rem;
}

.capability h3 {
  margin-bottom: 0.6rem;
}

.capability p {
  color: var(--slate);
  font-size: 0.97em;
  margin: 0;
}

/* Commitment list — the "how we work" band. */
.band-dark {
  background: var(--oak);
  color: var(--white);
}

.band-dark h2,
.band-dark h3 {
  color: var(--white);
}

.band-dark p {
  color: rgba(255, 253, 249, 0.8);
}

.band-sage {
  background: var(--sage);
}

.commitments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 0;
  border-top: 1px solid rgba(255, 253, 249, 0.2);
}

.commitments li {
  margin: 0;
  padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem) clamp(0rem, -0.5rem + 2vw, 2rem)
    clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem) 0;
  border-bottom: 1px solid rgba(255, 253, 249, 0.2);
}

@media (min-width: 780px) {
  .commitments li:not(:last-child) {
    border-right: 1px solid rgba(255, 253, 249, 0.2);
    padding-right: clamp(1rem, 0.2rem + 2vw, 2.25rem);
  }
  .commitments li + li {
    padding-left: clamp(1rem, 0.2rem + 2vw, 2.25rem);
  }
}

.commitments h3 {
  font-size: var(--step-0);
  letter-spacing: 0;
  margin-bottom: 0.5rem;
}

.commitments p {
  font-size: 0.94em;
  margin: 0;
}

/* ---------- Project cards ------------------------------------------------- */

.project {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.project:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 48px -30px rgba(19, 26, 23, 0.45);
}

.project__plate {
  aspect-ratio: 4 / 3;
  background: var(--bone-2);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.project__plate svg,
.project__plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project__body {
  padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.project__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--slate);
}

.project h3 {
  margin: 0;
  font-size: var(--step-1);
}

.project p {
  color: var(--slate);
  font-size: 0.95em;
  margin: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: var(--sage);
  color: var(--oak-deep);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.tag--clay {
  background: #f6e2d3;
  color: #8a4119;
}

/* ---------- Featured project ---------------------------------------------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
  }
}

/* Anchor targets (#the-forge, #zowa) must clear the sticky header. */
.feature[id] {
  scroll-margin-top: calc(76px + 1.5rem);
}

.feature + .feature {
  margin-top: clamp(1.25rem, 0.9rem + 1.6vw, 2rem);
}

/* Alternate the plate side so a stacked pair has some rhythm. */
.feature--flip .feature__plate {
  order: 2;
  border-right: 0;
  border-left: 1px solid var(--line);
}

@media (max-width: 900px) {
  .feature--flip .feature__plate {
    order: 0;
    border-left: 0;
  }
}

/* The plate fills its column whatever the body's height. It is absolutely
   positioned so the row height is driven by the copy, not by the image. */
.feature__plate {
  position: relative;
  background: var(--bone-2);
  border-right: 1px solid var(--line);
  min-height: 320px;
}

.feature__plate img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .feature__plate {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    min-height: 0;
  }
  .feature__plate img {
    position: static;
    aspect-ratio: 3 / 2;
    height: auto;
  }
}

.feature__body {
  padding: clamp(1.75rem, 1.15rem + 2.6vw, 3.25rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature__body h3 {
  font-size: var(--step-3);
  letter-spacing: -0.026em;
  margin: 0 0 0.65rem;
}

.feature__body > p {
  color: var(--slate);
}

.feature__note {
  font-size: var(--step--1);
  color: var(--slate);
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  margin-top: 1.4rem;
  line-height: 1.55;
}

/* Spec row — only ever states what is actually confirmed. */
.spec {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(1.25rem, 0.5rem + 2vw, 2.5rem);
  margin: 0 0 1.5rem;
  padding: 0;
}

.spec div {
  padding: 0.85rem 0;
}

.spec dt {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.3rem;
}

.spec dd {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-0);
  letter-spacing: -0.01em;
}

/* ---------- Stat / principle row ------------------------------------------ */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principle {
  padding: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem) clamp(1rem, 0.4rem + 1.6vw, 2rem)
    clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem) 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 780px) {
  .principle {
    border-bottom: 0;
  }
  .principle:not(:last-child) {
    border-right: 1px solid var(--line);
  }
  .principle + .principle {
    padding-left: clamp(1rem, 0.2rem + 2vw, 2.25rem);
  }
}

.principle__k {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--oak);
  display: block;
  margin-bottom: 0.4rem;
}

.principle p {
  color: var(--slate);
  font-size: 0.95em;
  margin: 0;
}

/* Same row, reversed out — used for a partner's published figures, which sit
   on the oak band so they read as quoted rather than as our own claim. */
.principles--on-dark {
  border-color: rgba(255, 253, 249, 0.22);
}

.principles--on-dark .principle {
  border-color: rgba(255, 253, 249, 0.22);
}

.principles--on-dark .principle__k {
  color: var(--clay-soft);
}

.principles--on-dark .principle p {
  color: rgba(255, 253, 249, 0.78);
}

/* ---------- Program pillars ----------------------------------------------- */

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.pillar {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.pillar:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 48px -30px rgba(19, 26, 23, 0.45);
}

.pillar__shot {
  aspect-ratio: 4 / 5;
  background: var(--bone-2);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.pillar__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pillar__body {
  padding: clamp(1.1rem, 0.9rem + 0.7vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.pillar h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--oak);
}

.pillar p {
  margin: 0;
  color: var(--slate);
  font-size: 0.94em;
  line-height: 1.55;
}

/* ---------- Context photo set --------------------------------------------
   Captioned neighborhood photography. The caption is load-bearing: these
   images show the district a project sits in, never the project itself, and
   the words under them have to keep saying so. */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: clamp(1rem, 0.7rem + 1.2vw, 1.5rem);
}

.shot {
  margin: 0;
}

.shot img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bone-2);
}

.shot figcaption {
  margin-top: 0.7rem;
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--slate);
}

.band-dark .shot figcaption {
  color: rgba(255, 253, 249, 0.72);
}

.band-dark .shot img {
  border-color: rgba(255, 253, 249, 0.2);
}

/* ---------- Prose (About) ------------------------------------------------- */

/* Editorial column: left-aligned inside the full container so it shares a left
   edge with the card grids on the same page, rather than sitting centred. */
.prose > * {
  max-width: 68ch;
}

.prose h2 {
  margin-top: 2.5em;
  font-size: var(--step-2);
  max-width: 22ch;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 1.9em;
}

.prose p,
.prose li {
  color: #2c3833;
}

.pull-quote {
  border-left: 3px solid var(--clay);
  padding: 0.4rem 0 0.4rem 1.6rem;
  margin: 2.5rem 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--oak-deep);
  max-width: 24ch;
}

/* ---------- Contact ------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}

@media (max-width: 880px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-detail {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0;
}

.contact-detail dt {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.4rem;
}

.contact-detail dd {
  margin: 0;
  font-size: var(--step-1);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.012em;
}

.contact-detail dd a {
  text-decoration: none;
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 0.1rem;
}

.contact-detail dd a:hover {
  border-color: var(--clay);
}

.form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.field .req {
  color: var(--clay-text);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bone);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.field textarea {
  min-height: 8.5rem;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--oak-mid);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  background: var(--white);
  border-color: var(--oak);
  outline: 2px solid rgba(30, 75, 60, 0.18);
  outline-offset: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.form__note {
  font-size: var(--step--1);
  color: var(--slate);
  margin: 1.1rem 0 0;
  line-height: 1.5;
}

/* ---------- CTA band ------------------------------------------------------ */

.cta-band {
  background: var(--oak-deep);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  left: -8%;
  top: -70%;
  width: min(52%, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 253, 249, 0.14);
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(1.5rem, 0.5rem + 3vw, 4rem);
  align-items: center;
}

@media (max-width: 860px) {
  .cta-band__inner {
    grid-template-columns: 1fr;
  }
}

.cta-band h2 {
  color: var(--white);
  margin: 0;
  max-width: 17ch;
}

.cta-band p {
  color: rgba(255, 253, 249, 0.78);
  margin: 1rem 0 0;
  max-width: 46ch;
}

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

.site-footer {
  background: var(--ink);
  color: rgba(255, 253, 249, 0.72);
  font-size: 0.94rem;
  padding-block: clamp(3rem, 2.2rem + 3vw, 5rem) 2rem;
}

.site-footer a {
  color: rgba(255, 253, 249, 0.9);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--clay-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 1rem + 3vw, 4rem);
  padding-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  border-bottom: 1px solid rgba(255, 253, 249, 0.16);
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

.footer-brand .brand__name,
.footer-brand .brand__sub {
  color: var(--white);
}

.footer-brand p {
  margin: 1.25rem 0 0;
  max-width: 34ch;
  line-height: 1.6;
}

.footer-col h4 {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 253, 249, 0.55);
  margin: 0 0 1.1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.75rem;
  font-size: 0.85rem;
  color: rgba(255, 253, 249, 0.5);
}

/* ---------- Reveal on scroll --------------------------------------------- */

/* Scoped to .js (set by an inline script in <head>) so that if scripting is
   blocked or fails, nothing is ever left invisible. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
