/* Capital Allocation Partners — styles */

@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-500-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-latin.woff2") format("woff2");
}

:root {
  --navy-900: #071a33;
  --navy-800: #0b2545;
  --navy-700: #12325c;
  --blue-500: #4f91cd; /* logo blue */
  --blue-300: #9cc2e8;
  --copper: #b8834f; /* map markers for held assets */
  --copper-deep: #8f6235; /* primary buttons */
  --copper-light: #d9b48a; /* admin pages */
  --stone-50: #faf8f4;
  --stone-100: #f3efe8;
  --stone-200: #e6e0d5;
  --ink: #0e1b2c;
  --ink-soft: #4a5566;
  --ink-mute: #596577;
  --white: #fff;
  --on-dark: rgba(255, 255, 255, 0.82);

  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Type roles. Cormorant is for display sizes only: 28px and up. */
  --t-display: clamp(44px, 5.3vw, 76px);
  --t-title: clamp(36px, 3.9vw, 56px);
  --t-figure: 40px;
  --t-sub: 28px;
  --t-lede: 20px;
  --t-body: 17px;
  --t-support: 16px;
  --t-meta: 14px;
  --t-control: 13px;
  --t-label: 12px;
  --track-label: 0.1em;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --section: clamp(56px, 7.2vw, 96px);
  --col-gap: clamp(40px, 4.5vw, 64px);
  --head-gap: clamp(32px, 3.4vw, 48px);
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1); /* admin pages */
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

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

::selection {
  background: var(--navy-800);
  color: var(--white);
}

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

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

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

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

/* The site uses no italics. */
em {
  font-style: normal;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.label {
  display: block;
  font-size: var(--t-label);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.section-title {
  font-size: var(--t-title);
  color: var(--navy-800);
}

.lede {
  font-size: var(--t-lede);
  line-height: 1.5;
  color: var(--ink-soft);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  z-index: 200;
  background: var(--white);
  padding: 10px 16px;
}

:focus-visible {
  outline: 3px solid var(--navy-800);
  outline-offset: 3px;
}

.site-header:not(.is-scrolled, .is-solid) :focus-visible,
.hero :focus-visible,
.page-hero :focus-visible,
.stats :focus-visible,
.alignment :focus-visible,
.contact__panel :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--blue-300);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 24px;
  font: 600 var(--t-control)/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn--primary {
  background: var(--copper-deep);
  color: var(--white);
}

.btn--primary:hover {
  background: #7a5330;
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
}

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

.btn--navy {
  background: var(--navy-800);
  color: var(--white);
}

.btn--navy:hover {
  background: var(--navy-700);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: var(--t-control);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  color: var(--navy-800);
}

.text-link:hover {
  color: var(--blue-500);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
}

/* The white bar sits on a pseudo-element so the full-screen mobile menu can cover it. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

.site-header.is-scrolled::before,
.site-header.is-solid::before {
  background: var(--white);
  box-shadow: 0 1px 0 var(--stone-200);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

.is-scrolled .logo img,
.is-solid .logo img {
  filter: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 32px);
}

.nav a {
  font-size: var(--t-control);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  color: var(--white);
  padding: 6px 0;
  transition: color 0.15s;
}

.is-scrolled .nav a,
.is-solid .nav a {
  color: var(--navy-800);
}

.nav a:not(.nav__cta):hover {
  color: var(--blue-300);
}

.is-scrolled .nav a:not(.nav__cta):hover,
.is-solid .nav a:not(.nav__cta):hover {
  color: var(--blue-500);
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.nav .nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: background 0.15s, color 0.15s;
}

.nav .nav__cta svg {
  width: 14px;
  height: 14px;
}

.nav .nav__cta:hover {
  background: var(--white);
  color: var(--navy-800);
}

.is-scrolled .nav .nav__cta,
.is-solid .nav .nav__cta {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

.is-scrolled .nav .nav__cta:hover,
.is-solid .nav .nav__cta:hover {
  background: var(--navy-700);
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--white);
  margin: 6px 0;
}

.is-scrolled .nav-toggle span,
.is-solid .nav-toggle span {
  background: var(--navy-800);
}

/* ---------- Page openers: full-bleed photograph, text on a soft navy scrim ---------- */
.hero,
.page-hero {
  /* Where the text column ends, so the scrim always sits behind the words */
  --text-edge: calc(max(var(--gutter), (100% - var(--container)) / 2) + 600px);
  position: relative;
  display: flex;
  background: var(--navy-900);
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
}

/* A full screen, so the track record starts cleanly below the fold on any window size */
.hero {
  min-height: max(100svh, 620px);
}

.page-hero {
  min-height: clamp(440px, 56vh, 560px);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 26, 51, 0.62) 0, rgba(7, 26, 51, 0) 22%),
    linear-gradient(0deg, rgba(7, 26, 51, 0.8) 0, rgba(7, 26, 51, 0) 34%),
    linear-gradient(90deg, rgba(7, 26, 51, 0.86) 0, rgba(7, 26, 51, 0.72) var(--text-edge), rgba(7, 26, 51, 0) calc(var(--text-edge) + 400px));
}

.hero__content,
.page-hero__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + 48px);
}

.hero__content {
  padding-bottom: 28px;
}

.page-hero__content {
  padding-bottom: clamp(48px, 5vw, 72px);
}

.hero__inner {
  max-width: 580px;
}

.page-hero::before {
  background:
    linear-gradient(180deg, rgba(7, 26, 51, 0.62) 0, rgba(7, 26, 51, 0) 30%),
    linear-gradient(90deg, rgba(7, 26, 51, 0.94) 0, rgba(7, 26, 51, 0.86) var(--text-edge), rgba(7, 26, 51, 0) calc(var(--text-edge) + 400px));
}

.hero h1 {
  font-size: var(--t-display);
  line-height: 1.04;
  margin-bottom: 24px;
}

.page-hero h1 {
  font-size: var(--t-title);
  margin-bottom: 16px;
}

.hero p,
.page-hero p {
  font-size: var(--t-lede);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero__caption {
  display: block;
  margin-top: clamp(40px, 7vh, 72px);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-size: var(--t-control);
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Stats: one lead figure, then six in a matching grid ---------- */
.stats {
  background: var(--navy-900);
  color: var(--white);
}

.stats__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--col-gap);
  align-items: center;
  margin-block: 0;
  padding-block: clamp(56px, 6vw, 88px);
}

.stats__rest {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
}

/* Label comes first for screen readers; the figure leads on screen */
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 8px;
  padding-block: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stats__rest .stat:nth-child(-n + 3) {
  border-top: 0;
  padding-top: 0;
}

.stats__rest .stat:nth-child(n + 4) {
  padding-bottom: 0;
}

.stat--lead {
  border-top: 0;
  padding-block: 0;
  gap: 12px;
}

.stat__value {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(44px, 4vw, 56px);
  font-weight: 500;
  line-height: 1;
  color: var(--white);
  font-variant-numeric: lining-nums tabular-nums;
}

.stat--lead .stat__value {
  font-size: clamp(88px, 10.5vw, 152px);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: var(--t-meta);
  line-height: 1.4;
  color: var(--on-dark);
}

.stat--lead .stat__label {
  font-size: var(--t-lede);
}

.stat__label sup {
  line-height: 0;
}

.stat__label sup a {
  color: var(--blue-300);
  padding-inline: 2px;
}

#note-1 {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

/* ---------- Flagship ---------- */
.flagship {
  padding: var(--section) 0;
  background: var(--stone-50);
}

.flagship__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--col-gap);
  align-items: center;
}

.flagship__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--stone-200);
}

.flagship__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flagship__body .lede {
  margin: 20px 0 28px;
}

.flagship__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--stone-200);
}

.flagship__facts div {
  padding: 16px 0;
  border-bottom: 1px solid var(--stone-200);
}

.flagship__facts dt {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.flagship__facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--t-sub);
  font-weight: 500;
  line-height: 1.1;
  color: var(--navy-800);
  font-variant-numeric: lining-nums;
}

.flagship__facts span {
  display: block;
  margin-top: 4px;
  font-size: var(--t-meta);
  color: var(--ink-mute);
}

/* ---------- Firm ---------- */
.firm {
  padding: var(--section) 0;
}

.firm__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--col-gap);
  align-items: start;
}

.firm__body {
  max-width: 68ch;
}

.firm__body .lede {
  color: var(--ink);
}

.firm__body p {
  color: var(--ink-soft);
}

.firm__body .lede {
  color: var(--ink);
  margin-bottom: 24px;
}

.firm__sig {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--stone-200);
}

.firm__sig strong {
  display: block;
  font-size: var(--t-body);
  font-weight: 600;
  color: var(--navy-800);
  line-height: 1.3;
}

.firm__sig span {
  font-size: var(--t-meta);
  color: var(--ink-mute);
}

.firm__media {
  margin-top: 40px;
}

.firm__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ---------- Section heads ---------- */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 20px var(--col-gap);
  align-items: end;
  margin-bottom: var(--head-gap);
}

.section-head > :only-child {
  grid-column: 1 / -1;
}

.section-head .lede {
  margin: 0;
}

.section-head .text-link {
  justify-self: end;
}

/* ---------- Alignment ---------- */
.alignment {
  padding: var(--section) 0;
  background: var(--navy-900);
  color: var(--white);
}

.alignment__statement {
  font-size: var(--t-title);
  line-height: 1.12;
  margin-bottom: 28px;
}

.alignment__statement span {
  display: block;
}

.alignment__intro {
  max-width: 68ch;
  color: var(--on-dark);
  font-size: var(--t-lede);
  line-height: 1.5;
  margin-bottom: var(--head-gap);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px var(--col-gap);
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pillar h3 {
  font-size: var(--t-sub);
  margin-bottom: 12px;
}

.pillar p {
  font-size: var(--t-support);
  color: var(--on-dark);
  margin: 0;
}

/* ---------- Strategies ---------- */
.strategies {
  padding: var(--section) 0;
}

.strategies__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--col-gap);
  align-items: start;
}

.strategies__intro .lede {
  margin: 20px 0 0;
}

.strategy-list {
  border-top: 1px solid var(--stone-200);
}

.strategy {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) 20px;
  gap: 12px 32px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--stone-200);
  color: inherit;
  text-decoration: none;
}

.strategy h3 {
  font-size: var(--t-sub);
  color: var(--navy-800);
  transition: color 0.15s;
}

.strategy p {
  font-size: var(--t-support);
  color: var(--ink-soft);
  margin: 0;
}

.strategy svg {
  width: 20px;
  height: 20px;
  align-self: center;
  color: var(--navy-800);
  transition: color 0.15s;
}

.strategy:hover h3,
.strategy:hover svg {
  color: var(--blue-500);
}

/* ---------- Portfolio (shared) ---------- */
.portfolio {
  padding: var(--section) 0;
  background: var(--stone-50);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 3vw, 40px) clamp(20px, 2.4vw, 32px);
}

.project {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.project__media {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--stone-200);
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project__body {
  padding: 16px 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name loc"
    "type type";
  align-items: baseline;
  gap: 4px 16px;
}

.project__type {
  grid-area: type;
  font-size: var(--t-meta);
  line-height: 1.4;
  color: var(--ink-soft);
}

.project__name {
  grid-area: name;
  font-family: var(--font-body);
  font-size: var(--t-lede);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--navy-800);
  transition: color 0.15s;
}

.project:hover .project__name {
  color: var(--blue-500);
}

.project__loc {
  grid-area: loc;
  font-size: var(--t-meta);
  color: var(--ink-mute);
  white-space: nowrap;
}

/* ---------- Markets ---------- */
.markets {
  padding: 0 0 var(--section);
  background: var(--stone-50);
}

.markets__wrap {
  padding-top: var(--section);
}

.markets__wrap::before {
  content: "";
  display: block;
  height: 1px;
  margin-top: calc(var(--section) * -1);
  margin-bottom: var(--section);
  background: var(--stone-200);
}

.markets__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--col-gap);
  align-items: start;
}

.map-panel__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-height: 46px;
  margin-bottom: 14px;
}

.map-views {
  display: inline-flex;
  border: 1px solid var(--stone-200);
  background: var(--white);
}

.map-view {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: none;
  font: 500 var(--t-meta)/1 var(--font-body);
  color: var(--ink-soft);
  cursor: pointer;
}

.map-view + .map-view {
  border-left: 1px solid var(--stone-200);
}

.map-view.is-active {
  background: var(--navy-800);
  color: var(--white);
}

.map-legend {
  display: flex;
  gap: 18px;
  font-size: var(--t-meta);
  color: var(--ink-soft);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot--sold {
  background: var(--navy-800);
}

.dot--held {
  background: var(--copper);
}

.deal-map {
  height: clamp(340px, 42vw, 560px);
  background: var(--stone-100);
  border: 1px solid var(--stone-200);
  z-index: 0;
}

.deal-map .leaflet-tooltip {
  font: var(--t-control)/1.45 var(--font-body);
  color: var(--ink);
  border-radius: 0;
  border: 1px solid var(--stone-200);
  box-shadow: 0 6px 20px rgba(7, 26, 51, 0.12);
  padding: 8px 12px;
}

.deal-map .leaflet-tooltip strong {
  font-size: var(--t-meta);
  font-weight: 600;
  color: var(--navy-800);
}

.deal-map .leaflet-control-zoom a {
  border-radius: 0 !important;
  color: var(--navy-800);
}

.market-list {
  list-style: none;
  margin: 60px 0 0;
  padding: 0;
  border-top: 1px solid var(--stone-200);
}

.market {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(0, 1fr) 64px;
  align-items: center;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--stone-200);
}

/* Net-lease and land markets have no apartment units to chart */
.market--plain {
  grid-template-columns: minmax(0, 1fr) auto;
}

.market__name {
  font-size: var(--t-meta);
  font-weight: 500;
  line-height: 1.3;
}

.market__name small,
.market__count small,
.market__deals {
  display: block;
  font-size: var(--t-label);
  font-weight: 400;
  color: var(--ink-mute);
}

.market__bar {
  height: 4px;
  background: var(--stone-100);
  position: relative;
}

.market__bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: var(--navy-800);
}

.market__count {
  font-size: var(--t-support);
  font-weight: 500;
  line-height: 1.2;
  text-align: right;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}

/* ---------- Team ---------- */
.team {
  padding: var(--section) 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px);
}

.member__photo {
  aspect-ratio: 4 / 5;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  background: var(--stone-200);
}

.member__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(1.02);
  transform: scale(1.001);
  transition: filter 0.7s var(--ease), transform 0.9s var(--ease);
}

/* White studio backdrops: multiply onto stone so the frame reads against the white section */
.member__photo--studio img {
  mix-blend-mode: multiply;
}

.member:hover .member__photo img {
  filter: grayscale(0) contrast(1) brightness(1);
  transform: scale(1.03);
}

.member__photo::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  pointer-events: none;
  transition: border-color 0.7s var(--ease);
}

.member:hover .member__photo::after {
  border-color: rgba(217, 180, 138, 0.8);
}

.member h3 {
  font-size: clamp(28px, 2.4vw, 32px);
  color: var(--navy-800);
  margin-bottom: 6px;
}

.member__role {
  font-size: var(--t-label);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--copper-deep);
  margin-bottom: 16px;
  display: block;
}

.member p {
  font-size: var(--t-support);
  color: var(--ink-soft);
}

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

/* ---------- Insights ---------- */
.insights {
  padding: 0;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  background: var(--stone-50);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.feature__media {
  min-height: 340px;
  background:
    linear-gradient(0deg, rgba(7, 26, 51, 0.5), rgba(7, 26, 51, 0.2)),
    url("../projects/arcadia-courtyards.webp") center / cover;
  display: grid;
  place-items: center;
}

.feature__play {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  color: var(--white);
  transition: background 0.15s;
}

.feature__play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.feature:hover .feature__play {
  background: rgba(255, 255, 255, 0.16);
}

.feature__body {
  padding: clamp(32px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.feature__tag {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.feature h3 {
  font-size: var(--t-figure);
  color: var(--navy-800);
  margin-bottom: 16px;
}

.feature p {
  font-size: var(--t-support);
  color: var(--ink-soft);
  margin-bottom: 20px;
}

/* ---------- Contact ---------- */
.contact {
  padding: var(--section) 0;
}

.contact__panel {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--col-gap);
  padding: clamp(32px, 5vw, 72px);
  background: var(--navy-800);
  color: var(--white);
}

.contact h2 {
  font-size: var(--t-title);
  margin-bottom: 20px;
}

.contact__intro {
  color: var(--on-dark);
  max-width: 480px;
  margin-bottom: 32px;
}

.contact__card {
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: var(--col-gap);
  align-self: center;
}

.contact__card dl {
  margin: 0;
}

.contact__card dt {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--on-dark);
  margin-bottom: 4px;
}

.contact__card dd {
  margin: 0 0 22px;
  font-size: var(--t-support);
}

.contact__card dd:last-child {
  margin-bottom: 0;
}

.contact__card a {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}

.contact__card a:hover {
  text-decoration-color: var(--white);
}

.contact__card .contact__name {
  font-family: var(--font-display);
  font-size: var(--t-sub);
  font-weight: 500;
  line-height: 1.2;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: var(--on-dark);
  padding: 64px 0 32px;
  font-size: var(--t-meta);
}

.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer__brand img {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 20px;
}

.footer__brand p {
  max-width: 360px;
}

.site-footer h4 {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 16px;
}

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

.site-footer li {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.site-footer a {
  text-decoration: none;
  transition: color 0.15s;
}

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

.footer__legal {
  padding-top: 28px;
  display: grid;
  gap: 16px;
}

.footer__disclaimer {
  font-size: var(--t-control);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.68);
  max-width: 1040px;
  margin: 0;
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 32px;
  font-size: var(--t-label);
}

.footer__meta,
.footer__credit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 24px;
}

.footer__meta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.footer__credit {
  gap: 12px;
}

.footer__credit a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  opacity: 0.85;
}

.footer__credit a:hover,
.footer__credit a:focus-visible {
  opacity: 1;
}

.footer__credit img {
  width: 84px;
  height: auto;
}

/* ---------- Portfolio page ---------- */
.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--stone-200);
}

.toolbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ink-mute) var(--stone-100);
  padding: 14px 0;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter);
}

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--stone-200);
  background: var(--white);
  font: 500 var(--t-meta)/1 var(--font-body);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip span {
  font-size: var(--t-label);
  color: var(--ink-mute);
}

.chip:hover {
  border-color: var(--navy-800);
}

.chip.is-active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

.chip.is-active span {
  color: var(--on-dark);
}

.result-count {
  flex: none;
  font-size: var(--t-meta);
  color: var(--ink-mute);
}

.portfolio--page {
  padding-top: clamp(40px, 4vw, 56px);
  background: none;
}

/* ---------- Deal history ---------- */
.deal-history {
  padding: var(--section) 0;
  border-top: 1px solid var(--stone-200);
}

.deal-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(5, minmax(0, 1fr));
  gap: 16px 12px;
  align-items: end;
}

.deal-filter {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.deal-filter > span {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
}

.deal-filter select,
.deal-filter input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--stone-200);
  border-radius: 0;
  background-color: var(--white);
  font: 500 var(--t-meta)/1.2 var(--font-body);
  color: var(--ink);
  transition: border-color 0.15s;
}

.deal-filter select {
  appearance: none;
  padding-right: 32px;
  text-overflow: ellipsis;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b2545' stroke-width='1.8'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
}

.deal-filter input::placeholder {
  color: var(--ink-mute);
}

.deal-filter select:hover,
.deal-filter input:hover {
  border-color: var(--navy-800);
}

.deal-filter select.is-set {
  border-color: var(--navy-800);
  box-shadow: inset 0 0 0 1px var(--navy-800);
}

.deal-tally {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin-top: 12px;
}

.deal-clear {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: 600 var(--t-meta)/1 var(--font-body);
  color: var(--navy-800);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.deal-sort {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  cursor: pointer;
}

.deal-sort::after {
  content: "";
  width: 0;
  height: 0;
  border-inline: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.25;
}

.deal-sort:hover::after {
  opacity: 0.6;
}

th[aria-sort] .deal-sort {
  color: var(--navy-800);
}

th[aria-sort] .deal-sort::after {
  opacity: 1;
}

th[aria-sort="ascending"] .deal-sort::after {
  transform: rotate(180deg);
}

.deal-sort:focus-visible {
  outline: 3px solid var(--navy-800);
  outline-offset: 3px;
}

.deal-link {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.deal-link svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--blue-500);
}

.deal-link:hover {
  color: var(--blue-500);
}

.deal-link:focus-visible {
  outline: 3px solid var(--navy-800);
  outline-offset: 3px;
}

.deal-table tr.has-photo {
  cursor: pointer;
}

/* The photo that pops up beside a deal */
.deal-peek {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  width: 320px;
  padding: 8px 8px 10px;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(7, 26, 51, 0.12), 0 24px 48px -12px rgba(7, 26, 51, 0.38);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.92) rotate(-2deg);
  transform-origin: 0 50%;
  transition: opacity 0.16s ease-out, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.deal-peek.is-on {
  opacity: 1;
  transform: none;
}

.deal-peek.is-flipped {
  transform-origin: 100% 50%;
}

.deal-peek img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--stone-100);
}

.deal-peek span {
  display: block;
  margin-top: 8px;
  font-size: var(--t-meta);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy-800);
}

/* Space held while the scripts fill these in, so nothing below jumps */
#portfolio-grid:empty {
  min-height: 2600px;
}

#deal-table tbody:empty {
  display: block;
  height: 2900px;
}

.deal-summary {
  margin: 0;
  font-size: var(--t-meta);
  color: var(--ink-mute);
}

.deal-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: lining-nums tabular-nums;
}

.deal-table th,
.deal-table td {
  padding: 12px 16px 12px 0;
  text-align: left;
  border-bottom: 1px solid var(--stone-200);
  vertical-align: baseline;
}

.deal-table th:nth-child(1) { width: 27%; }
.deal-table th:nth-child(2) { width: 15%; }
.deal-table th:nth-child(3) { width: 19%; }
.deal-table th:nth-child(4) { width: 14%; }
.deal-table th:nth-child(5) { width: 7%; }
.deal-table th:nth-child(6) { width: 8%; }
.deal-table th:nth-child(7) { width: 10%; }

.deal-table tbody tr:hover > * {
  background: var(--stone-50);
}

.deal-table thead th {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom-color: var(--navy-800);
  white-space: nowrap;
}

.deal-table tbody th {
  font-size: var(--t-support);
  font-weight: 600;
  color: var(--navy-800);
}

.deal-table td {
  color: var(--ink-soft);
}

.deal-table .num {
  text-align: right;
  padding-right: 32px;
}

.deal-status {
  white-space: nowrap;
}

.deal-status--held {
  font-weight: 600;
  color: var(--navy-800);
}

/* ---------- Lightbox ---------- */
/* Property view: one bounded panel. The page behind locks, and only .lightbox__body may scroll. */
html:has(.lightbox[open]) {
  background: var(--navy-900);
  scrollbar-gutter: stable;
}

body:has(.lightbox[open]) {
  overflow: hidden;
}

.lightbox {
  --w: min(1400px, 100vw - 48px);
  border: 0;
  padding: 0;
  margin: auto;
  max-width: none;
  max-height: none;
  width: var(--w);
  height: min(100dvh - 48px, max(var(--w) * 0.4, 560px));
  background: var(--white);
  color: var(--ink);
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  grid-template-rows: minmax(0, 1fr);
}

.lightbox::backdrop {
  background: rgba(7, 26, 51, 0.9);
}

.lightbox__media {
  position: relative;
  min-width: 0;
  min-height: 0;
  margin: 0;
  background: var(--navy-800);
  overflow: hidden;
}

.lightbox__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lightbox__media.is-loading img,
.lightbox__media.is-failed img {
  opacity: 0;
}

.lightbox__fallback {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  font-size: 15px;
  color: var(--blue-300);
}

.lightbox__media.is-failed .lightbox__fallback {
  display: grid;
}

.lightbox__panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.lightbox__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: 28px 32px 8px;
}

.lightbox__status {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-right: 56px;
}

.lightbox__name {
  margin-top: 12px;
  padding-right: 40px;
  font-size: clamp(30px, 2.7vw, 38px);
  line-height: 1.1;
  font-variant-numeric: lining-nums;
  color: var(--navy-800);
  outline: none;
}

.lightbox__loc {
  margin: 10px 0 0;
  font-size: var(--t-support);
  line-height: 1.4;
  color: var(--ink-soft);
}

/* The deal itself: two matching columns, read left to right */
.lightbox__deal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 24px 0 0;
  padding-block: 20px;
  border-block: 1px solid var(--stone-200);
}

.lightbox__deal dt {
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lightbox__deal dd {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.05;
  font-variant-numeric: lining-nums;
  color: var(--navy-800);
}

.lightbox__deal span {
  display: block;
  margin-top: 6px;
  font-size: var(--t-meta);
  color: var(--ink-mute);
}

/* Supporting details: label left, value right, one line each */
.lightbox__facts {
  margin: 0;
}

.lightbox__facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-block: 12px;
  border-bottom: 1px solid var(--stone-200);
}

.lightbox__facts div:last-child {
  border-bottom: 0;
}

.lightbox__facts dt {
  flex: none;
  font-size: var(--t-meta);
  color: var(--ink-soft);
}

.lightbox__facts dd {
  margin: 0;
  font-size: var(--t-support);
  font-weight: 500;
  line-height: 1.3;
  text-align: right;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--navy-800);
}

.lightbox__nav {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--stone-200);
}

.lightbox__pos {
  margin-right: auto;
  font-size: var(--t-meta);
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  white-space: nowrap;
}

.lightbox__step,
.lightbox__close {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--stone-200);
  background: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--navy-800);
  transition: background 0.15s;
}

.lightbox__step:hover,
.lightbox__close:hover {
  background: var(--stone-100);
}

.lightbox__step svg,
.lightbox__close svg {
  width: 18px;
  height: 18px;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1;
}

.lightbox.is-single .lightbox__nav {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Narrow laptops and landscape tablets: same split with a slimmer panel */
@media (max-width: 1120px) {
  .lightbox[open] {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  .lightbox__body {
    padding: 28px 24px 20px;
  }
  .lightbox__nav {
    padding-inline: 24px;
  }
}

/* Portrait tablets: photo above the facts, sized to its content */
@media (max-width: 900px) {
  .lightbox {
    width: min(640px, 100vw - 48px);
    height: fit-content;
    max-height: calc(100dvh - 48px);
  }
  .lightbox[open] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .lightbox__media {
    aspect-ratio: 16 / 9;
  }
  .lightbox__close {
    top: 12px;
    right: 12px;
  }
  .lightbox__status,
  .lightbox__name {
    padding-right: 0;
  }
}

/* Phones: a full-screen view instead of a floating panel */
@media (max-width: 640px) {
  .lightbox {
    width: 100vw;
    height: 100dvh;
    max-height: none;
  }
  .lightbox__body {
    padding: 22px 20px 18px;
  }
  .lightbox__nav {
    padding-inline: 20px;
  }
}

/* Short, wide screens such as landscape phones: full screen, side by side */
@media (max-height: 520px) and (min-width: 560px) {
  .lightbox {
    width: 100vw;
    height: 100dvh;
    max-height: none;
  }
  .lightbox[open] {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .lightbox__media {
    aspect-ratio: auto;
  }
  .lightbox__body {
    padding: 14px 24px 8px;
  }
  .lightbox__status,
  .lightbox__name {
    padding-right: 56px;
  }
  .lightbox__name {
    margin-top: 6px;
    font-size: 26px;
  }
  .lightbox__deal {
    margin-top: 12px;
    padding-block: 12px;
  }
  .lightbox__deal dd {
    margin-top: 4px;
    font-size: 26px;
  }
  .lightbox__facts div {
    padding-block: 7px;
  }
  .lightbox__nav {
    padding: 6px 24px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
  .member:hover .member__photo img {
    transform: scale(1.001);
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .markets__grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .market-list {
    margin-top: 0;
  }
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .deal-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .deal-filter--search {
    grid-column: 1 / -1;
  }
  .strategy {
    grid-template-columns: minmax(0, 1fr) 20px;
  }
  .strategy p {
    grid-column: 1;
  }
  .strategy svg {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  .deal-table th:nth-child(3),
  .deal-table td:nth-child(3) {
    display: none;
  }
}

@media (max-width: 1080px) {
  :root {
    --header-h: 72px;
  }

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 2;
  }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: safe center;
    gap: 8px;
    padding: var(--header-h) var(--gutter) 24px;
    overflow-y: auto;
    background: var(--navy-900);
    visibility: hidden;
  }

  .nav a,
  .is-scrolled .nav a,
  .is-solid .nav a {
    font-family: var(--font-display);
    font-size: var(--t-figure);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: var(--white);
  }

  .nav a:not(.nav__cta):hover,
  .is-scrolled .nav a:not(.nav__cta):hover,
  .is-solid .nav a:not(.nav__cta):hover {
    color: var(--blue-300);
  }

  .nav .nav__cta,
  .is-scrolled .nav .nav__cta,
  .is-solid .nav .nav__cta {
    margin-top: 24px;
    min-height: 48px;
    font-family: var(--font-body);
    font-size: var(--t-control);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--copper-deep);
    border-color: var(--copper-deep);
  }

  .nav-open .nav {
    visibility: visible;
  }

  .nav-open {
    overflow: hidden;
  }

  .nav-open .nav-toggle span,
  .nav-open .is-scrolled .nav-toggle span {
    background: var(--white);
  }

  .nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  .nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  .nav-open .site-header .logo img {
    filter: brightness(0) invert(1);
  }

  .logo {
    position: relative;
    z-index: 2;
  }

  .logo img {
    height: 34px;
  }
}

/* Short screens: the whole menu still fits below the logo */
@media (max-width: 1080px) and (max-height: 660px) {
  .nav {
    gap: 2px;
  }

  .nav a,
  .is-scrolled .nav a,
  .is-solid .nav a {
    font-size: 26px;
  }

  .nav .nav__cta,
  .is-scrolled .nav .nav__cta,
  .is-solid .nav .nav__cta {
    margin-top: 14px;
    font-family: var(--font-body);
    font-size: var(--t-control);
  }
}

@media (max-width: 960px) {
  .hero::before,
  .page-hero::before {
    background:
      linear-gradient(180deg, rgba(7, 26, 51, 0.62) 0, rgba(7, 26, 51, 0) 22%),
      linear-gradient(0deg, rgba(7, 26, 51, 0.94) 0, rgba(7, 26, 51, 0.78) 48%, rgba(7, 26, 51, 0) 78%);
  }

  .stats__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .flagship__grid,
  .firm__grid,
  .strategies__grid,
  .feature,
  .contact__panel,
  .pillars,
  .section-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-head .text-link {
    justify-self: start;
  }

  .firm__media {
    margin-top: 28px;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deal-table thead {
    display: none;
  }

  .deal-table tr.is-none td {
    flex: 1 1 100%;
  }

  .deal-table tr.is-none td::after {
    content: none;
  }

  .deal-peek {
    display: none;
  }

  .deal-table,
  .deal-table tbody {
    display: block;
  }

  .deal-table tr {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 6px;
    padding: 14px 0;
    border-bottom: 1px solid var(--stone-200);
  }

  .deal-table tbody tr:hover > * {
    background: none;
  }

  .deal-table tbody th {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    border: 0;
    padding: 0;
  }

  .deal-table td,
  .deal-table .num {
    display: block;
    width: auto;
    border: 0;
    padding: 0;
    text-align: left;
    font-size: var(--t-meta);
  }

  .deal-table td:nth-child(3),
  .deal-table td.is-empty {
    display: none;
  }

  /* Name and status on the first line, the details on the second */
  .deal-table tr::before {
    content: "";
    order: 1;
    flex-basis: 100%;
    height: 0;
  }

  .deal-table td {
    order: 2;
  }

  .deal-table td:nth-child(7) {
    order: 0;
  }

  .deal-table td:nth-child(2)::after,
  .deal-table td:nth-child(4)::after {
    content: " ·";
  }

  .deal-table td.num::after {
    content: " units ·";
  }

  .contact__card {
    border-left: 0;
    padding-left: 0;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .footer__top {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --t-body: 16px;
    --t-lede: 18px;
    --t-figure: 36px;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__actions .btn {
    padding: 0 12px;
    white-space: nowrap;
  }

  .hero__actions .btn svg {
    display: none;
  }

  .project-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats__rest {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
  }

  .stats__rest .stat:nth-child(3) {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 24px;
  }

  .stats__rest .stat:nth-child(4) {
    padding-bottom: 24px;
  }

  .deal-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Portfolio page: two small cards across; the property view holds the detail */
  .portfolio--page .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

  .portfolio--page .project__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "name" "loc";
    gap: 0;
    padding-top: 10px;
  }

  .portfolio--page .project__name {
    font-size: var(--t-support);
  }

  .portfolio--page .project__type {
    display: none;
  }

  #portfolio-grid:empty {
    min-height: 1900px;
  }

  .feature__media {
    min-height: 220px;
  }

  .feature h3 {
    font-size: var(--t-sub);
  }

  .team-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .member__photo {
    max-width: 420px;
  }

  .market {
    grid-template-columns: minmax(0, 1fr) 64px 56px;
    gap: 14px;
  }

  .market--plain {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .toolbar .container {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .result-count {
    display: none;
  }

  .site-footer {
    padding: 48px 0 24px;
  }

  .footer__top {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

/* Short phones: the text fills most of the photo */
@media (max-width: 960px) and (max-height: 720px) {
  .hero::before,
  .page-hero::before {
    background: linear-gradient(0deg, rgba(7, 26, 51, 0.94) 0, rgba(7, 26, 51, 0.82) 70%, rgba(7, 26, 51, 0.55) 100%);
  }
}

/* ---------- Not found ---------- */
.not-found {
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--navy-900);
  color: var(--white);
}

.not-found h1 {
  font-size: var(--t-display);
  margin: 40px 0 16px;
}

.not-found p {
  color: var(--on-dark);
  margin-bottom: 32px;
}

.not-found img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}
