/* Nexus Point - design tokens.
   One brand ramp plus warm neutrals; everything below is built from these.
   No webfonts and no inline styles, on purpose: the CSP allows styles only
   from this origin, and every asset is served from it. */
:root {
  --brand: #16375c;               /* sampled from the logo */
  --brand-700: #102941;
  --brand-900: #0a1a2b;
  --brand-400: #4a7aa8;
  --brand-100: #dbe4ee;
  --brand-050: #f1f5f9;

  --accent: #399497;              /* the teal in the mark: prices and CTAs */
  --accent-700: #2c7477;

  --ink: #141b22;
  --ink-600: #556170;
  --ink-400: #7d8894;
  --line: #dde2e8;
  --surface: #ffffff;
  --surface-2: #f6f8fa;

  --r-sm: .375rem;
  --r: .625rem;
  --r-lg: 1rem;
  --shadow-1: 0 1px 2px rgba(16,32,28,.06), 0 1px 3px rgba(16,32,28,.04);
  --shadow-2: 0 4px 6px -1px rgba(16,32,28,.08), 0 10px 24px -6px rgba(16,32,28,.14);

  --bs-link-color: #102941;
  --bs-link-hover-color: #0a1a2b;

  --chip-bg: #dbe4ee;
  --chip-ink: #0a1a2b;
  --chip-muted-bg: #f6f8fa;
  --chip-muted-ink: #556170;
}

/* ---------- Frame ---------- */
body { min-height: 100vh; display: flex; flex-direction: column; color: var(--ink); background: var(--surface); }
main { flex: 1; }

/* ---------- Type ---------- */
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .navbar-brand {
  letter-spacing: -.018em; font-weight: 650; color: var(--ink);
}
h1, .h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); line-height: 1.1; }
h2, .h2 { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 1.95rem); line-height: 1.18; }
p { line-height: 1.6; }
.lede { font-size: 1.125rem; color: var(--ink-600); max-width: 46ch; }
.text-muted { color: var(--ink-600) !important; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-400); }

/* ---------- Nav ---------- */
.navbar { background: var(--brand-900); box-shadow: var(--shadow-1); padding-block: .6rem; }
.navbar-brand { font-size: 1.15rem; color: #fff; }
.navbar-dark .nav-link { color: rgba(255,255,255,.82); border-radius: var(--r-sm); padding-inline: .7rem; }
.navbar-dark .nav-link:hover, .navbar-dark .nav-link:focus-visible { color: #fff; background: rgba(255,255,255,.1); }

/* ---------- Buttons ---------- */
.btn { border-radius: var(--r-sm); font-weight: 600; }
.btn-brand { --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  background-color: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus-visible { background-color: var(--brand-700); border-color: var(--brand-700); color: #fff; }
.btn-accent { --bs-btn-color: #fff; --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent);
  background-color: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover, .btn-accent:focus-visible { background-color: var(--accent-700); border-color: var(--accent-700); color: #fff; }
:focus-visible { outline: 2px solid var(--brand-400); outline-offset: 2px; }

/* ---------- Hero ----------
   The image is a real img element, not a background, so no inline style is needed. */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--brand-900); margin-bottom: 2.5rem; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .60; }
.hero-body { position: relative; padding: clamp(2rem, 1rem + 5vw, 4.5rem) clamp(1.25rem, .5rem + 3vw, 3rem); color: #fff; max-width: 40rem; }
.hero-body h1, .hero-body .eyebrow { color: #fff; }
.hero-body .lede { color: rgba(255,255,255,.88); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.75rem; margin-top: 1.5rem; }
.hero-stats strong { display: block; font-size: 1.5rem; letter-spacing: -.02em; color: #fff; }
.hero-stats span { font-size: .82rem; color: rgba(255,255,255,.72); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Sections ---------- */
.section { padding-block: 2.5rem; border-top: 1px solid var(--line); }
.section-first { border-top: 0; padding-top: 0; }

/* ---------- Listing cards ---------- */
.card { border-color: var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.listing-card { transition: transform .16s ease, box-shadow .16s ease; }
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.listing-card .card-body { padding: 1.1rem; }
.price { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; color: var(--accent); line-height: 1; }
.price small { font-size: .8rem; font-weight: 600; color: var(--ink-600); letter-spacing: 0; }
.table-terms { font-size: .875rem; margin-bottom: .75rem; }
.table-terms td { border-color: var(--line); padding: .3rem 0; }

/* ---------- Chips ---------- */
.chip { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: .18rem .5rem; border-radius: 999px; background: var(--chip-bg); color: var(--chip-ink); }
.chip-muted { background: var(--chip-muted-bg); color: var(--chip-muted-ink); }

/* ---------- Photos ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .5rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); }
.gallery-feature { margin-bottom: .5rem; display: block; }
.gallery-feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.gallery-thumbs figure { margin: 0; }
.gallery-thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); }
.gallery-thumbs figcaption { font-size: .72rem; color: var(--ink-600); margin-top: .2rem; }
.card-img-top { aspect-ratio: 4 / 3; object-fit: cover; }
.placeholder-img { aspect-ratio: 4 / 3; background: repeating-linear-gradient(45deg, #eef1f5, #eef1f5 12px, #e2e7ee 12px, #e2e7ee 24px);
  display: flex; align-items: center; justify-content: center; color: var(--ink-600); font-weight: 600; letter-spacing: .05em;
  border-top-left-radius: var(--r); border-top-right-radius: var(--r); }

/* ---------- Tables / money ---------- */
.table td, .table th { vertical-align: middle; }
.amount { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.fee-row + .fee-row { margin-top: .5rem; }
.ledger-out { color: #b02a37; }
.table-finance td, .table-finance th { white-space: nowrap; }

/* ---------- Avatars ---------- */
.avatar-lg { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; display: inline-flex; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: inline-flex; vertical-align: middle; }
.avatar-empty { background: var(--brand-100); color: var(--brand); font-size: 3.5rem; align-items: center; justify-content: center; }
.avatar-sm.avatar-empty { font-size: .9rem; }

/* ---------- Footer ---------- */
footer { background: var(--surface-2); color: var(--ink-600); }

/* ---------- Lease documents (print-first; deliberately outside the theme) ---------- */
.lease-doc { max-width: 52rem; margin: 0 auto; font-family: Georgia, "Times New Roman", serif; line-height: 1.55; color: #000; }
.lease-doc h1 { text-align: center; font-size: 1.6rem; letter-spacing: 0; }
.lease-doc h2 { font-size: 1.15rem; margin-top: 1.6rem; border-bottom: 1px solid #ccc; padding-bottom: .2rem; letter-spacing: 0; }
.lease-doc h3 { font-size: 1rem; margin-top: 1rem; font-weight: bold; letter-spacing: 0; }
.lease-doc .addendum { break-before: page; margin-top: 3rem; }
.lease-doc .sig { margin-top: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.lease-doc .sig div { border-top: 1px solid #000; padding-top: .3rem; margin-top: 2.5rem; }
.lease-doc .rules { white-space: pre-line; }
.lease-doc .notice { border: 2px solid #000; padding: .75rem 1rem; }
@media print { nav, footer, .no-print { display: none !important; } main { padding: 0 !important; } }

/* ---------- Utilities ---------- */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rules { white-space: pre-line; }

/* ---------- Device preview ---------- */
.preview-stage { overflow-x: auto; background: var(--surface-2); border-radius: var(--r); padding: 1rem; }
.preview-frame { display: block; margin: 0 auto; border: 10px solid #222; border-radius: 1.5rem; background: #fff; }
.preview-phone { width: 410px; height: 864px; }
.preview-tablet { width: 840px; height: 1000px; }
.preview-desktop { width: 1300px; height: 820px; border-radius: .5rem; }
.preview-path { min-width: 14rem; }
.filter-select { width: auto; min-width: 13rem; }

@media (prefers-reduced-motion: reduce) {
  .listing-card { transition: none; }
  .listing-card:hover { transform: none; }
}

/* ---------- Hero call-to-action row ----------
   flex + gap so the buttons keep a gap when they wrap on a phone, and stay flush left.
   Inline buttons with a left margin touched vertically and looked indented once wrapped. */
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- Lightbox ----------
   Pure CSS, driven by :target. No script, so it needs nothing from the CSP, and the
   browser back button closes it. The backdrop and the close control are both links. */
.lightbox { display: none; position: fixed; inset: 0; z-index: 1080; padding: 1.5rem;
  background: rgba(8,16,13,.93); align-items: center; justify-content: center; }
.lightbox:target { display: flex; }
.lightbox-backdrop { position: absolute; inset: 0; }
.lightbox-fig { position: relative; margin: 0; max-width: 72rem; text-align: center; }
.lightbox-fig img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: var(--r); }
.lightbox-fig figcaption { color: rgba(255,255,255,.85); margin-top: .65rem; font-size: .9rem; }
.lightbox-close, .lightbox-nav { position: absolute; color: #fff; text-decoration: none; line-height: 1;
  opacity: .8; z-index: 1; }
.lightbox-close:hover, .lightbox-nav:hover, .lightbox-close:focus-visible, .lightbox-nav:focus-visible { opacity: 1; color: #fff; }
.lightbox-close { top: 1rem; right: 1.25rem; font-size: 2.25rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 3rem; padding: 0 .5rem; }
.lightbox-prev { left: .25rem; }
.lightbox-next { right: .25rem; }

/* ---------- Dark theme ----------
   Bootstrap 5.3 switches its own components on data-bs-theme; these are our tokens. */
[data-bs-theme="dark"] {
  --ink: #e6edf4;
  --ink-600: #a4b2c0;
  --ink-400: #86939f;
  --line: #273341;
  --surface: #0e141b;
  --surface-2: #151e28;
  --brand-100: #1d3348;
  --brand-050: #16202b;
  --accent: #4fb4b7;
  --accent-700: #3d9497;
  --bs-link-color: #74c6c8;
  --bs-link-hover-color: #9ddadb;

  /* Dark green on dark green is unreadable, so the chip text lightens rather than darkens. */
  --chip-bg: #1f3c50;
  --chip-ink: #cbe0f0;
  --chip-muted-bg: #202a35;
  --chip-muted-ink: #b7c3cf;
}
[data-bs-theme="dark"] .navbar { background: #06111c; }
[data-bs-theme="dark"] .placeholder-img {
  background: repeating-linear-gradient(45deg, #19222c, #19222c 12px, #1f2a35 12px, #1f2a35 24px); }
/* A lease is a legal document people print. It stays on white in either theme. */
[data-bs-theme="dark"] .lease-doc { background: #fff; color: #000; padding: 1.75rem; border-radius: var(--r); }

/* ---------- Theme toggle ---------- */
#theme-toggle { font-size: 1.05rem; text-decoration: none; }
#theme-toggle .theme-dark-only { display: none; }
[data-bs-theme="dark"] #theme-toggle .theme-light-only { display: none; }
[data-bs-theme="dark"] #theme-toggle .theme-dark-only { display: inline; }

/* ---------- Impersonation ----------
   Deliberately loud and full-width: forgetting you are acting as someone else is the
   whole risk of the feature. */
.impersonation-bar { background: #9c3b22; color: #fff; font-size: .9rem; position: sticky; top: 0; z-index: 1030; }
.impersonation-bar strong { color: #fff; }

/* ---------- Brand mark ---------- */
.brand-logo { height: 34px; width: auto; display: block; }
/* The navbar shows the mark beside the name: the lockup's own wording is illegible at 34px. */
.navbar-brand { gap: .55rem; }
@media (max-width: 575.98px) { .brand-logo { height: 28px; } }

/* The lede is the whole pitch, so it carries more weight than body copy. */
.hero-body .lede { font-size: 1.22rem; max-width: 34ch; }
.hero-body .lede strong { color: #fff; font-weight: 650; }

/* ---------- Photo groups ---------- */
.gallery-group { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-600); margin: 1.25rem 0 .5rem; }

.narrow { max-width: 36rem; }

@font-face { font-family: "NP Script"; src: url("../fonts/dancing-script.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "NP Hand"; src: url("../fonts/caveat.woff2") format("woff2"); font-display: swap; }
.sig-font-script { font-family: "NP Script", cursive; font-size: 1.6rem; line-height: 1.3; }
.sig-font-hand { font-family: "NP Hand", cursive; font-size: 1.7rem; line-height: 1.3; }
.sig-font-print { font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; }
