/* ==========================================================================
   Malcolm Real Estate
   Brand tokens live here. Change these six values and the whole site follows.
   ========================================================================== */

:root {
  /* Palette is taken from the logo. --brand is the navy of the wordmark itself;
     everything else is built around it. Neutrals are biased blue so they sit
     under the navy rather than muddying it. Brick is the one warm note, used
     sparingly — navy and brick is a settled Virginia pairing, not a trend. */
  --ink:        #161d2e;   /* blue-black */
  --ink-soft:   #4d566b;
  --ink-faint:  #858ea3;
  --brand:      #1b3281;   /* logo navy */
  --brand-dark: #16255f;
  --accent:     #a3462c;   /* brick — used sparingly */
  --paper:      #fdfdfd;
  --paper-alt:  #eef1f6;
  --line:       #dde2ea;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 1140px;
  --r: 12px;
  --shadow: 0 1px 2px rgba(22,29,46,.05), 0 8px 24px rgba(22,29,46,.06);
}

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

/* Any element given `display` loses to nothing but this — the browser's own
   [hidden] rule is weaker than a class setting display:flex/grid, so toggling
   el.hidden would silently do nothing without it. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

a { color: var(--brand); text-decoration-color: rgba(27,50,129,.3); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.center { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 0 0 var(--r) 0;
}
.skip:focus { left: 0; }

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

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .8em;
}

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

.btn {
  display: inline-block; font-family: var(--sans); font-size: .95rem; font-weight: 600;
  padding: 13px 24px; border-radius: 999px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 16px; font-size: .87rem; border-color: var(--line); }
.btn-sm:hover { border-color: var(--brand); }
.btn-lg { padding: 16px 34px; font-size: 1.03rem; }
.btn-block { width: 100%; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }

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

/* The real logo. Sized by height so the script stays legible; the mark is wide
   (roughly 2.85:1) so it needs room. Hidden until it actually loads — see the
   logo fallback in script.js — so a missing file shows the text lockup rather
   than a broken image. */
.brand-logo { height: 50px; width: auto; }
.brand-logo[hidden] { display: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.brand-text em {
  font-style: normal; font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* Text fallback mark, used only when the logo file is missing. */
.brand-mark {
  width: 40px; height: 40px; flex: none; border-radius: 9px;
  background: var(--brand); color: #fff;
  font-family: var(--serif); font-size: 1.35rem; font-weight: 600;
  display: grid; place-items: center;
}

/* On the dark footer the navy logo would disappear, so the footer keeps the
   text lockup and never swaps in the image. */
.site-footer .brand-logo { display: none; }

@media (max-width: 720px) {
  .brand-logo { height: 36px; }
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-size: .95rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--brand); }
.nav a.btn { color: var(--ink); }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav-toggle span + span { margin-top: 5px; }

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

.hero { padding: clamp(48px, 8vw, 88px) 0 clamp(40px, 6vw, 72px); }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.lede { font-size: 1.13rem; color: var(--ink-soft); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { font-size: .87rem; color: var(--ink-faint); margin-top: 18px; }

.photo-slot {
  background:
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(27,50,129,.045) 12px, rgba(27,50,129,.045) 24px),
    var(--paper-alt);
  border: 1.5px dashed var(--line); border-radius: var(--r);
  display: grid; place-items: center;
  color: var(--ink-faint); font-size: .85rem; letter-spacing: .05em; text-transform: uppercase;
}
.photo-slot-hero { aspect-ratio: 4 / 3; }
.photo-slot-portrait { aspect-ratio: 4 / 5; }

/* --- Trust bar ----------------------------------------------------------- */

.trustbar { background: var(--brand); color: #fff; }
.trustbar-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; padding-block: 34px; text-align: center;
}
.trustbar-inner div { display: flex; flex-direction: column; gap: 4px; }
.trustbar-inner strong { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; }
.trustbar-inner span { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.72); }

/* --- Sections ------------------------------------------------------------ */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head.center { margin-inline: auto; }
.section-head p { color: var(--ink-soft); margin: 0; }

/* --- Listings ------------------------------------------------------------ */

.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }

.listing {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.listing:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(22,29,46,.06), 0 16px 40px rgba(22,29,46,.1); }
.listing-photo { aspect-ratio: 3 / 2; position: relative; }
.listing-photo .photo-slot { border: 0; border-radius: 0; height: 100%; }
.listing-photo img { width: 100%; height: 100%; object-fit: cover; }
.listing-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--paper); color: var(--ink); border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 5px 12px; box-shadow: var(--shadow);
}
.listing-badge.is-soon { background: var(--accent); color: #fff; }
.listing-badge.is-leased { background: var(--ink-soft); color: #fff; }
.listing-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.listing-rent { font-family: var(--serif); font-size: 1.42rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.listing-rent span { font-family: var(--sans); font-size: .82rem; font-weight: 500; color: var(--ink-faint); }
.listing-rent-tbd { font-size: 1.12rem; color: var(--ink-soft); }
.listing-avail { font-size: .88rem; font-weight: 500; color: var(--brand); margin: 0 0 12px; }
.listing-addr { font-weight: 500; margin: 0; }
.listing-city { color: var(--ink-faint); font-size: .9rem; margin: 0 0 12px; }
.listing-specs {
  display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; margin: 0 0 18px; padding: 0;
  font-size: .88rem; color: var(--ink-soft);
}
.listing-specs li { display: flex; align-items: center; gap: 5px; }
.listing-specs li + li::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); margin-right: 9px; }
.listing .btn { margin-top: auto; text-align: center; }

.empty-note { text-align: center; color: var(--ink-soft); padding: 48px 0; }

/* --- About --------------------------------------------------------------- */

.about-inner { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about-copy p:not(.eyebrow) { color: var(--ink-soft); max-width: 58ch; }
.about-copy h2 + p:not(.eyebrow) { font-size: 1.1rem; color: var(--ink); }

/* The brokers panel is the one lifted object in this section. */
.about-panel {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 26px 26px 22px; box-shadow: var(--shadow);
}
.about-panel h3 {
  font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin: 0 0 16px;
}
.broker-list { margin: 0; display: grid; gap: 16px; }
.broker-list > div + div { border-top: 1px solid var(--line); padding-top: 16px; }
.broker-list dt { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.broker-list dd { margin: 4px 0 0; font-size: .92rem; color: var(--ink-soft); line-height: 1.55; }
.broker-list a { font-weight: 500; font-variant-numeric: tabular-nums; }
.about-license {
  margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: .8rem; color: var(--ink-faint);
}
.checklist { list-style: none; padding: 0; margin: 24px 0 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--ink-soft); }
.checklist li::before {
  content: ""; position: absolute; left: 4px; top: .55em;
  width: 11px; height: 6px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

/* --- Steps --------------------------------------------------------------- */

.steps {
  list-style: none; padding: 0; margin: 0 0 48px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 32px; counter-reset: s;
}
.steps li { position: relative; padding-top: 8px; }
.step-n {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px;
  border-radius: 50%; border: 1.5px solid var(--brand); color: var(--brand);
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
}
.steps p { color: var(--ink-soft); margin: 0; font-size: .96rem; }
.fineprint { font-size: .85rem; color: var(--ink-faint); margin-top: 18px; }

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

.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-copy p:not(.eyebrow) { color: var(--ink-soft); }

/* Two offices, shown side by side — neither is a card; a rule separates them. */
.offices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; margin-top: 34px; }
.office { border-top: 2px solid var(--brand); padding-top: 16px; }
.office h3 {
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px;
}
.office p { margin: 0 0 8px; font-size: .95rem; }
.office a { font-weight: 500; font-variant-numeric: tabular-nums; }
.office-note { color: var(--ink-faint); font-size: .85rem !important; margin-bottom: 0 !important; }

.contact-form {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow);
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 7px; }
.field .opt { font-weight: 400; color: var(--ink-faint); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .97rem; color: var(--ink);
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--paper); transition: border-color .16s, box-shadow .16s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(27,50,129,.12);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #b4432f; }
.field-error { color: #b4432f; font-size: .82rem; margin: 6px 0 0; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-status { margin: 14px 0 0; font-size: .9rem; min-height: 1.4em; }
.form-status.is-ok { color: var(--brand); }
.form-status.is-err { color: #b4432f; }

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

.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding-top: 56px; font-size: .93rem; }
.site-footer a { color: rgba(255,255,255,.9); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; padding-bottom: 36px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand strong { color: #fff; font-family: var(--serif); font-size: 1.08rem; }
.footer-brand p { margin: 4px 0 0; font-size: .88rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-start; }

.legal {
  display: flex; gap: 16px; align-items: flex-start;
  border-top: 1px solid rgba(255,255,255,.13); padding-top: 26px;
}
.legal .eho { color: rgba(255,255,255,.85); flex: none; }
.legal p { font-size: .82rem; line-height: 1.6; margin: 0; max-width: 78ch; }
.legal strong { color: #fff; }

.copyright { border-top: 1px solid rgba(255,255,255,.13); margin-top: 26px; padding-block: 20px 28px; }
.copyright p { margin: 0; font-size: .82rem; color: rgba(255,255,255,.5); }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  .hero-inner, .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .hero-media { max-width: 520px; }
  .trustbar-inner { grid-template-columns: repeat(2, 1fr); gap: 26px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; box-shadow: var(--shadow);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav a.btn { border: 1.5px solid var(--line); text-align: center; margin-top: 14px; }
  .field-row { grid-template-columns: 1fr; }
  .contact-list div { grid-template-columns: 1fr; gap: 2px; }
}

@media print {
  .site-header, .nav-toggle, .hero-cta, .contact-form, .btn { display: none; }
  body { font-size: 12pt; }
}

/* Consent line under the contact form. Small, but must stay readable. */
.form-consent {
  margin: 14px 0 0; font-size: .8rem; line-height: 1.6; color: var(--ink-faint);
}
.form-consent a { color: var(--ink-soft); }

/* Hero photograph. Fixed aspect so the text beside it doesn't jump while the
   image loads; cover-cropped so any lead photo fits the frame. */
.hero-photo {
  /* height:auto matters: the height attribute on the <img> otherwise becomes a
     CSS height, and with both set the browser ignores aspect-ratio. */
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--r); box-shadow: var(--shadow);
}
