/* Real Estate Capital Resources — Design System */
:root {
  --navy: #0B1C2C;
  --graphite: #18222C;
  --ivory: #F5F1E8;
  --white: #FFFFFF;
  --green: #2F6655;
  --green-hover: #3a7d69;
  --gold: #B79A5B;
  --gold-soft: rgba(183, 154, 91, 0.15);
  --gray-blue: #DCE3E7;
  --body: #1A232B;
  --muted: #5A6670;
  --line: rgba(11, 28, 44, 0.1);
  --line-light: rgba(255, 255, 255, 0.12);
  --shadow: 0 12px 40px rgba(11, 28, 44, 0.08);
  --shadow-lg: 0 24px 60px rgba(11, 28, 44, 0.12);
  --radius: 12px;
  --radius-lg: 18px;
  --max: 1180px;
  --font-display: "Libre Baskerville", "Georgia", serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --header-h: 76px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--ivory);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.section--navy { background: var(--navy); color: var(--ivory); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--graphite { background: var(--graphite); color: var(--ivory); }
.section--graphite h1, .section--graphite h2, .section--graphite h3 { color: var(--white); }
.section--white { background: var(--white); }
.section--ivory { background: var(--ivory); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.85rem;
}
.section--navy .eyebrow, .section--graphite .eyebrow { color: var(--gold); }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 42rem; }
.section--navy .lead, .section--graphite .lead { color: rgba(245, 241, 232, 0.78); }
.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.15rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.15rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  padding: 0.85rem 1.35rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  border: 1.5px solid transparent; cursor: pointer; transition: 0.2s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-hover); }
.btn-secondary { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 241, 232, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
}
.header-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo {
  display: flex; flex-direction: column; line-height: 1.15; flex-shrink: 0;
}
.logo-mark {
  font-family: var(--font-display); font-size: 1.15rem; color: var(--navy); letter-spacing: -0.02em;
}
.logo-sub {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold);
}
.nav-desktop { display: flex; align-items: center; gap: 0.15rem; }
.nav-desktop > a, .nav-item > button {
  font-size: 0.9rem; font-weight: 600; color: var(--body); padding: 0.55rem 0.7rem;
  border-radius: 8px; background: none; border: 0; cursor: pointer;
}
.nav-desktop > a:hover, .nav-item > button:hover { background: rgba(11,28,44,0.05); color: var(--navy); }
.nav-item { position: relative; }
.mega, .dropdown {
  display: none; position: absolute; top: calc(100% + 0.35rem); left: 0;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 1.1rem; min-width: 280px; z-index: 50;
}
.mega { width: min(720px, 90vw); display: none; grid-template-columns: 1fr 1fr; gap: 0.35rem 1.5rem; }
.nav-item:hover .mega, .nav-item:focus-within .mega,
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { display: grid; }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { display: block; }
.mega a, .dropdown a {
  display: block; padding: 0.55rem 0.65rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600;
}
.mega a span, .dropdown a span { display: block; font-weight: 400; font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }
.mega a:hover, .dropdown a:hover { background: var(--ivory); }
.header-cta { flex-shrink: 0; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--white); cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--navy); }
.mobile-nav {
  display: none; position: fixed; inset: var(--header-h) 0 0 0; background: var(--ivory);
  z-index: 90; padding: 1.25rem 1.5rem 2rem; overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; padding: 1rem 0; border-bottom: 1px solid var(--line);
  font-size: 1.15rem; font-weight: 600; color: var(--navy);
}
.mobile-nav .btn { width: 100%; margin-top: 1.25rem; }

/* Placeholders */
.ph {
  background: linear-gradient(145deg, var(--graphite) 0%, var(--navy) 55%, #1a3a4a 100%);
  color: rgba(245,241,232,0.85); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 2rem 1.25rem; min-height: 220px; position: relative; overflow: hidden;
  border: 1px solid rgba(183,154,91,0.2);
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(183,154,91,0.06) 50%, transparent 100%),
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(255,255,255,0.03) 28px, rgba(255,255,255,0.03) 29px),
    repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(255,255,255,0.03) 28px, rgba(255,255,255,0.03) 29px);
}
.ph span {
  position: relative; z-index: 1; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; max-width: 16rem; line-height: 1.45;
}
.ph--tall { min-height: 320px; }
.ph--hero { min-height: 420px; }
.ph--portrait { min-height: 380px; aspect-ratio: 4/5; }
.ph--wide { min-height: 200px; }
.ph--light {
  background: linear-gradient(145deg, #e8eef1, var(--gray-blue));
  color: var(--navy); border-color: var(--line);
}

/* Cards */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.35rem 1.4rem; box-shadow: var(--shadow); height: 100%;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(47,102,85,0.25); }
.card-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--green); margin-bottom: 0.55rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card-link { display: inline-block; margin-top: 1rem; font-weight: 700; color: var(--green); font-size: 0.9rem; }
.icon-dot {
  width: 40px; height: 40px; border-radius: 10px; background: var(--gold-soft);
  color: var(--gold); display: grid; place-items: center; font-weight: 700; font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

/* Hero */
.hero {
  background: linear-gradient(165deg, var(--navy) 0%, #0f2a3d 50%, var(--graphite) 100%);
  color: var(--ivory); padding: clamp(3rem, 8vw, 5.5rem) 0;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -10%; top: -20%; width: 50%; height: 140%;
  background: radial-gradient(circle, rgba(183,154,91,0.12), transparent 65%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 1.1rem; }
.hero .lead { color: rgba(245,241,232,0.8); font-size: 1.12rem; }
.support-line {
  margin-top: 1.25rem; font-size: 0.92rem; color: rgba(183,154,91,0.95); font-weight: 600;
}
.path-pills { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.5rem; }
.path-pills span {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.4rem 0.75rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.18);
  color: rgba(245,241,232,0.9); background: rgba(255,255,255,0.04);
}

/* Trust strip */
.trust-strip {
  background: var(--white); border-bottom: 1px solid var(--line); padding: 1.5rem 0;
}
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center;
}
.trust-grid strong { display: block; font-size: 0.95rem; color: var(--navy); margin-bottom: 0.2rem; }
.trust-grid span { font-size: 0.85rem; color: var(--muted); }

/* Process / steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; counter-reset: step; }
.step {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem; position: relative;
}
.step-num {
  font-family: var(--font-display); font-size: 1.5rem; color: var(--gold); margin-bottom: 0.5rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.9rem; color: var(--muted); }

/* Diagram */
.diagram {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: center;
  margin: 2rem 0;
}
.diagram-node {
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 0.65rem 1.1rem; font-size: 0.85rem; font-weight: 700; color: var(--navy);
}
.diagram-arrow { color: var(--gold); font-weight: 700; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); }
th {
  background: var(--navy); color: var(--ivory); font-size: 0.75rem; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 700;
}
tr:last-child td { border-bottom: 0; }
td a { color: var(--green); font-weight: 700; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item button {
  width: 100%; text-align: left; background: none; border: 0; padding: 1.15rem 0;
  font-weight: 700; color: var(--navy); cursor: pointer; display: flex; justify-content: space-between;
  gap: 1rem; font-size: 1rem;
}
.faq-item button span { color: var(--gold); font-size: 1.2rem; }
.faq-body { display: none; padding: 0 0 1.15rem; color: var(--muted); max-width: 48rem; }
.faq-item.open .faq-body { display: block; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 0.82rem; font-weight: 700; color: var(--navy); }
.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 0.75rem 0.9rem;
  background: var(--white); transition: border-color 0.15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid rgba(47,102,85,0.25); border-color: var(--green);
}
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.75rem; }
.form-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem; box-shadow: var(--shadow);
}

/* Calculator */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.calc-result {
  background: var(--navy); color: var(--ivory); border-radius: var(--radius-lg); padding: 1.5rem;
}
.calc-result .label { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.calc-result .value { font-family: var(--font-display); font-size: 2.2rem; margin: 0.4rem 0 0.75rem; color: var(--white); }
.calc-result .meta { font-size: 0.9rem; color: rgba(245,241,232,0.7); }

/* Deal cards */
.deal-card .ph { min-height: 160px; margin-bottom: 1rem; border-radius: var(--radius); }
.deal-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0; }
.chip {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.3rem 0.55rem; border-radius: 6px; background: var(--ivory); color: var(--muted);
}
.chip--green { background: rgba(47,102,85,0.12); color: var(--green); }
.verify {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--gold); margin-top: 0.75rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem; color: var(--muted); padding: 1.25rem 0 0;
}
.breadcrumb a { color: var(--green); font-weight: 600; }
.page-hero { padding: 2rem 0 2.5rem; }
.page-hero h1 { margin-bottom: 0.85rem; }

/* Footer */
.site-footer {
  background: var(--navy); color: rgba(245,241,232,0.8); padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem;
}
.site-footer h4 {
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.site-footer a { display: block; padding: 0.28rem 0; font-size: 0.92rem; }
.site-footer a:hover { color: var(--white); }
.footer-brand .logo-mark { color: var(--white); font-size: 1.25rem; }
.footer-brand p { margin-top: 0.85rem; font-size: 0.92rem; max-width: 22rem; }
.footer-bottom {
  border-top: 1px solid var(--line-light); padding-top: 1.25rem;
  font-size: 0.8rem; color: rgba(245,241,232,0.55); display: grid; gap: 0.75rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-legal a { display: inline; padding: 0; }

/* Misc */
.pull-quote {
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1.4; color: var(--navy);
  border-left: 3px solid var(--gold); padding-left: 1.25rem; margin: 1.5rem 0; max-width: 36rem;
}
.section--navy .pull-quote, .section--graphite .pull-quote { color: var(--ivory); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.list-check li {
  position: relative; padding: 0.4rem 0 0.4rem 1.4rem; color: var(--muted);
}
.list-check li::before {
  content: ""; position: absolute; left: 0; top: 0.75rem; width: 8px; height: 8px;
  border-radius: 50%; background: var(--green);
}
.matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.matrix-item {
  background: var(--ivory); border-radius: 10px; padding: 0.9rem 1rem; border: 1px solid var(--line);
}
.matrix-item strong { display: block; color: var(--navy); margin-bottom: 0.25rem; }
.matrix-item span { font-size: 0.88rem; color: var(--muted); }
.toc { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.toc a { display: block; padding: 0.35rem 0; color: var(--green); font-weight: 600; font-size: 0.92rem; }
.disclosure {
  font-size: 0.82rem; color: var(--muted); background: var(--ivory); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.15rem; margin-top: 2rem;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

@media (max-width: 980px) {
  .grid-2, .two-col, .calc-grid, .footer-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .trust-grid, .steps { grid-template-columns: 1fr 1fr; }
  .nav-desktop, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
  .mega { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .trust-grid, .steps, .matrix { grid-template-columns: 1fr; }
  .container { width: min(100% - 1.5rem, var(--max)); }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}

/* —— Claim + condition pattern —————————————————————————— */
/* A quantitative claim never ships without its qualifying clause. */
.claim-condition {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  border-left: 2px solid var(--gold);
  padding-left: 0.9rem;
  margin-top: 1.1rem;
  max-width: 42rem;
}
.section--navy .claim-condition,
.section--graphite .claim-condition,
.section--feature .claim-condition {
  color: rgba(245, 241, 232, 0.62);
}

/* —— Feature band: the 100% / JV differentiator ——————————— */
.section--feature {
  background: linear-gradient(160deg, var(--graphite) 0%, var(--navy) 100%);
  color: var(--ivory);
  position: relative;
  overflow: hidden;
}
.section--feature::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 70%);
}
.section--feature h1,
.section--feature h2,
.section--feature h3,
.section--feature strong { color: var(--white); }
.section--feature .eyebrow { color: var(--gold); }
.section--feature .lead { color: rgba(245, 241, 232, 0.85); }
.section--feature p { color: rgba(245, 241, 232, 0.76); }
.section--feature .matrix-item {
  border-color: var(--line-light);
  background: rgba(255, 255, 255, 0.04);
}
.section--feature .matrix-item strong { color: var(--gold); }
.section--feature .matrix-item span { color: rgba(245, 241, 232, 0.7); }

/* Program card carrying the headline claim */
.card--feature {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold-soft), var(--shadow);
}
.card--feature .icon-dot { background: var(--gold); color: var(--navy); }

/* —— Key parameters box (program pages) ————————————————— */
.params {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  margin: 1.5rem 0;
}
.params-row {
  display: grid;
  grid-template-columns: minmax(9rem, 34%) 1fr;
  gap: 1rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.params-row:last-child { border-bottom: 0; }
.params-row dt {
  font-weight: 600;
  color: var(--navy);
  font-family: var(--font-body);
}
.params-row dd { margin: 0; color: var(--body); }
.params-row dd .pending {
  color: var(--muted);
  font-style: italic;
  font-size: 0.88rem;
}
@media (max-width: 560px) {
  .params-row { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* —— Worked example table ————————————————————————————— */
.worked {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.94rem;
}
.worked th, .worked td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.worked th { font-weight: 600; color: var(--navy); }
.worked td.num { text-align: right; font-variant-numeric: tabular-nums; }
.worked tr.total td {
  border-top: 2px solid var(--navy);
  border-bottom: 0;
  font-weight: 700;
  color: var(--navy);
}
.worked caption {
  caption-side: bottom;
  text-align: left;
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 0.75rem;
}
.table-scroll { overflow-x: auto; }
