/* Nofil Imran, REALTOR®: taken from his business card. Black ground, gold #C79116, Bebas Neue and Montserrat, square corners */

:root {
  --bg: #000000;
  --bg-2: #080808;
  --panel: #0e0e0e;
  --panel-2: #181818;
  --field: #050505;
  --line: #242424;
  --line-2: #383838;
  --text: #ffffff;
  --muted: #bdbdbd;
  --faint: #8c8c8c;
  --gold: #c79116;
  --gold-2: #e6b23a;
  --gold-deep: #8f6810;
  --gold-tint: rgba(199, 145, 22, 0.14);
  --real: #00c2ff;
  --display: 'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* The card's frame: a gold top line, and sides that fade to nothing on the way down */
  --frame:
    linear-gradient(var(--gold), var(--gold)) 0 0 / 100% 2px no-repeat,
    linear-gradient(180deg, var(--gold), transparent 86%) 0 0 / 2px 100% no-repeat,
    linear-gradient(180deg, var(--gold), transparent 86%) 100% 0 / 2px 100% no-repeat;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15.5px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #000; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--gold); color: #000; padding: 10px 16px; border-radius: 2px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* A blank detail from site.json. Loud on purpose: none may go live. */
mark.fill {
  background: #ff3b6b; color: #fff;
  font: 700 12px/1.4 var(--sans); letter-spacing: 0; text-transform: none; font-style: normal;
  padding: 2px 7px; border-radius: 2px; white-space: normal;
}

/* ---------- Type ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; flex: none; }
.section-title { font-family: var(--display); font-size: clamp(42px, 5vw, 66px); line-height: 1; letter-spacing: 0.01em; }
.section-lead { color: var(--muted); font-size: 17px; max-width: 40em; margin-top: 14px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.link-arrow::after { content: '\2192'; font-size: 16px; transition: transform 0.3s var(--ease); }
.link-arrow:hover::after, a:hover > .link-arrow::after { transform: translateX(5px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 2px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; letter-spacing: 0.03em; line-height: 1.2;
  cursor: pointer; transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold-2); }
.btn-outline { border-color: rgba(199, 145, 22, 0.6); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-dark { background: var(--gold); color: #000; }
.btn-dark:hover { background: var(--gold-2); }
.btn-dark-outline { border-color: rgba(199, 145, 22, 0.6); color: var(--text); background: transparent; }
.btn-dark-outline:hover { border-color: var(--gold); color: var(--gold-2); }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-full { width: 100%; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(0, 0, 0, 0.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--display); font-size: 30px; letter-spacing: 0.02em; line-height: 1; }
.brand-sub { font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav > a:not(.btn) { font-size: 13.5px; font-weight: 500; color: var(--muted); position: relative; padding: 6px 0; transition: color 0.2s; }
.site-nav > a:not(.btn):hover { color: var(--text); }
.site-nav > a.active { color: var(--gold); }
.site-nav > a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 2px; background: transparent; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); transition: transform 0.3s var(--ease), top 0.3s var(--ease); }
.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.nav-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.nav-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- Hero: his business card ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg); }
.card-hero { position: relative; margin-top: 52px; padding: 44px 48px 44px; }
.card-frame { position: absolute; inset: 0; background: var(--frame); pointer-events: none; }
/* His head breaks the top of the frame, and his body fades into the black (the fade is in the image itself) */
.card-photo { position: absolute; top: -52px; right: 72px; height: 380px; display: flex; justify-content: flex-end; pointer-events: none; }
.portrait-img { display: block; height: 100%; width: auto; max-width: none; }
.hero-copy { position: relative; z-index: 2; }
.hero-title { font-family: var(--display); font-size: clamp(88px, 9.2vw, 128px); line-height: 0.92; letter-spacing: 0.005em; white-space: nowrap; }
.hero-role { font-size: 16px; font-weight: 500; letter-spacing: 0.02em; margin-top: 10px; }
.hero-tagline { color: var(--gold-2); font-size: 13px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; margin-top: 12px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-contact { margin-top: 22px; }
.hero-contact a { font-size: 21px; font-weight: 700; letter-spacing: 0.01em; transition: color 0.2s; }
.hero-contact a:hover { color: var(--gold-2); }
.hero-stats { margin-top: 30px; }
.hero-stats ul { display: flex; gap: 40px; margin: 0; padding: 0; list-style: none; }
.hero-stats li + li { padding-left: 40px; border-left: 1px solid var(--line-2); }
.hero-stats .stat-rank { display: flex; align-items: center; }
.stat-rank b { margin-left: 4px; color: var(--text); font-size: 76px; font-weight: 400; line-height: 0.9; -webkit-text-stroke: 1px currentColor; }
.stat-rank sup { margin-left: 2px; color: var(--gold-2); font-size: 0.5em; line-height: 0; vertical-align: 0.7em; -webkit-text-stroke: 0; }
.hero-stats-note { margin-top: 14px; color: var(--muted); font-size: 12px; }
.hero-stats strong { display: block; font-family: var(--display); font-size: 56px; font-weight: 400; line-height: 1; letter-spacing: 0.01em; color: var(--gold-2); }
.hero-stats span { display: block; margin-top: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
/* Stats pop (js/stats-pop.js): staggered rise, Canada wipes in, a gold bar draws under each */
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats li > :last-child { margin-bottom: 14px; }
.hero-stats li::after { content: ''; display: block; width: 48px; height: 3px; margin-top: auto; background: var(--gold); }
.hero-stats .stat-rank { flex-direction: column; align-items: flex-start; justify-content: flex-end; }
.stat-country { display: inline-block; }
.hero-stats strong span { display: inline-block; margin: 0; font: inherit; letter-spacing: inherit; text-transform: none; }
.hero-stats .count-up { text-align: right; }
.hero-stats.stats-armed li { opacity: 0; transform: translateY(36px); }
.hero-stats.stats-armed li::after { width: 0; }
.hero-stats.stats-armed .stat-country { clip-path: inset(0 100% 0 0); }
.hero-stats.stats-pop li { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.2, 0.9, 0.25, 1.2); }
.hero-stats.stats-pop li::after { width: 48px; transition: width 0.8s cubic-bezier(0.6, 0, 0.2, 1) 0.45s; }
.hero-stats.stats-pop .stat-country { clip-path: inset(0 0 0 0); transition: clip-path 0.9s cubic-bezier(0.6, 0, 0.2, 1) 0.35s; }
.hero-stats.stats-pop li:nth-child(2) { transition-delay: 0.12s, 0.12s; }
.hero-stats.stats-pop li:nth-child(3) { transition-delay: 0.24s, 0.24s; }
.hero-stats.stats-pop li:nth-child(2)::after { transition-delay: 0.57s; }
.hero-stats.stats-pop li:nth-child(3)::after { transition-delay: 0.69s; }
.hero-about .hero-title { font-size: clamp(60px, 6.2vw, 84px); }
.hero-about .prose { margin-top: 22px; max-width: 560px; }
.hero-about .prose p { font-size: 16px; text-wrap: pretty; }

.quick-search {
  margin-top: 30px; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 4px; align-items: stretch;
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 8px;
}
.qs-field { min-width: 0; display: flex; flex-direction: column; padding: 8px 12px; border-radius: 2px; transition: background 0.2s; }
.qs-field:hover { background: var(--panel-2); }
.qs-field + .qs-field { border-left: 1px solid var(--line); }
.qs-field span { white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.qs-field select { width: 100%; background: transparent; border: 0; padding: 4px 0 2px; font-size: 14px; font-weight: 500; outline: none; cursor: pointer; }
.qs-field select option { background: var(--panel); color: var(--text); }
.qs-go { border-radius: 2px; padding: 0 22px; }

.portrait-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.portrait-mono { font-family: var(--display); font-size: clamp(90px, 11vw, 150px); line-height: 1; color: var(--gold); opacity: 0.55; letter-spacing: 0.04em; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-tight { padding: 24px 0 104px; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 44px; }

.help-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.help-card {
  display: flex; flex-direction: column; gap: 14px; padding: 34px 28px 30px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.help-card:hover { border-color: var(--gold-deep); transform: translateY(-4px); }
.help-num { font-family: var(--display); font-size: 52px; line-height: 1; color: var(--gold); }
.help-card h3 { font-family: var(--display); font-size: 40px; line-height: 1; letter-spacing: 0.01em; }
.help-card p { color: var(--muted); font-size: 16px; flex: 1; }
.help-card .link-arrow { margin-top: 8px; }

.meet { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 72px; align-items: start; }
.meet-text { font-size: 16.5px; color: var(--muted); margin: 20px 0 0; max-width: 40em; }
.meet-text:first-child { margin-top: 0; }
.meet-copy .link-arrow { margin-top: 26px; }

.cta-band { background: var(--bg); color: var(--text); padding: 72px 0 88px; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band .cta-inner { width: calc(100% - 48px); max-width: 1152px; padding: 48px 48px 24px; background: var(--frame); }
.cta-copy { flex: 1 1 420px; }
.cta-text { color: var(--muted); font-size: 16px; max-width: 40em; margin-top: 12px; }
.signature { color: var(--gold-2); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; margin-top: 18px; }
.cta-band h2 { font-family: var(--display); font-size: clamp(38px, 4.4vw, 58px); line-height: 1.02; letter-spacing: 0.01em; max-width: 17em; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Page heroes ---------- */
.page-hero { padding: 56px 24px 48px; background: var(--bg); }
.page-hero > .container { max-width: 1152px; padding: 46px 46px 10px; background: var(--frame); }
.page-hero > .container.narrow { max-width: 820px; }
.page-hero-compact { padding: 48px 24px 28px; }
.page-title { font-family: var(--display); font-size: clamp(54px, 7vw, 96px); line-height: 0.98; letter-spacing: 0.01em; }
.page-lead { color: var(--muted); font-size: 18px; max-width: 40em; margin-top: 20px; }

/* ---------- About ---------- */
.career-story { display: grid; grid-template-columns: 1fr 1.2fr; gap: 72px; align-items: center; }
.career-story img { width: 170px; height: auto; margin-top: 24px; }
.gold-note { margin: 0; padding: 44px 48px; border-radius: 2px; background: var(--gold); color: #000; font-size: 21px; font-weight: 600; line-height: 1.5; }
#join { scroll-margin-top: var(--header-h); }
.team-block { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
.team-block img, .team-block .real-logo { width: 220px; height: auto; }
.areas { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 0; padding: 0; margin: 26px 0 0; }
.areas li { font-family: var(--display); font-size: clamp(30px, 3.8vw, 48px); line-height: 1; letter-spacing: 0.01em; padding: 0 26px; border-left: 2px solid var(--gold); }
.areas li:first-child { padding-left: 0; border-left: 0; }

.prose p { color: var(--muted); font-size: 17px; margin-bottom: 16px; }
.prose h2 { font-size: 20px; font-weight: 700; margin: 38px 0 12px; }
.prose h2:first-child { margin-top: 0; }

/* ---------- Forms ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 36px; }
.form-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.form-title { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.lead-form .field-grid + .form-title { margin-top: 32px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-wide { grid-column: 1 / -1; }
.field span, .mls-field span {
  display: block; margin-bottom: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint);
}
.field input, .field select, .field textarea,
.mls-field input, .mls-field select, .mls-sort {
  width: 100%; background: var(--field); border: 1px solid var(--line-2); border-radius: 2px;
  padding: 13px 15px; font-size: 15px; color: var(--text); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.field select, .mls-field select, .mls-sort {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c79116' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; cursor: pointer;
}
.field select option, .mls-field select option, .mls-sort option { background: var(--panel); }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus,
.mls-field input:focus, .mls-field select:focus, .mls-sort:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.field input::placeholder, .field textarea::placeholder, .mls-field input::placeholder { color: #6e6e6e; }
.lead-form > .btn-full { margin-top: 26px; }
.form-error, .lead-error { color: #ff9a9a; font-size: 14px; margin-top: 16px; }
.form-note { color: var(--faint); font-size: 13px; margin-top: 14px; }
.form-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.form-sent { background: var(--panel); border: 1px solid var(--gold-deep); border-radius: 2px; padding: 44px 36px; }
.form-sent p:last-child { color: var(--muted); }
.form-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.aside-card .eyebrow { margin-bottom: 8px; }
.aside-line { display: block; font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 24px; word-break: break-word; }
.aside-line:hover { color: var(--gold-2); }
.aside-line-plain { color: var(--text); font-size: 16px; }
.aside-note { color: var(--faint); font-size: 13px; }

/* ---------- MLS® search ---------- */
.mls-search { padding: 8px 0 104px; }
.mls-filters {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end;
  background: var(--panel); border: 1px solid var(--line); border-radius: 2px; padding: 24px; margin-bottom: 28px;
}
.mls-field-community { grid-column: 1 / -1; }
.mls-filter-actions { display: flex; gap: 10px; grid-column: 1 / -1; justify-content: flex-end; }
.suggest-wrap { position: relative; }
.suggest-list {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 2px; max-height: 330px; overflow: auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.suggest-item { padding: 10px 12px; border-radius: 2px; cursor: pointer; font-size: 15px; }
.suggest-item.active { background: var(--gold-tint); }
.suggest-meta { display: block; font-size: 12px; color: var(--faint); }

.mls-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.mls-toolbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mls-sort { width: auto; padding-top: 10px; padding-bottom: 10px; font-size: 14px; border-radius: 2px; }
.mls-views { display: inline-flex; border: 1px solid var(--line-2); border-radius: 2px; overflow: hidden; }
.mls-views button { background: transparent; border: 0; padding: 10px 18px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.mls-views button.active { background: var(--gold); color: #000; }
.mls-status { color: var(--muted); font-size: 14px; }

.mls-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.mls-pages:empty { display: none; }
.mls-pages-bottom { margin: 32px 0 0; justify-content: center; }
.mls-pages button {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 2px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 600;
}
.mls-pages button:hover:not(:disabled) { border-color: var(--gold-deep); }
.mls-pages button.active { background: var(--gold); border-color: var(--gold); color: #000; }
.mls-pages button:disabled { opacity: 0.35; cursor: default; }

.mls-results.mls-view-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mls-results.mls-view-list { display: grid; gap: 16px; }
#justListed:empty { display: none; }
#justListed + .mls-status { padding: 40px 0; text-align: center; }

.listing-card {
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; overflow: hidden;
  transition: border-color 0.3s, transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.listing-card:hover { border-color: var(--gold-deep); transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45); }
.listing-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #1a1a1a; }
.listing-real-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.listing-card:hover .listing-real-image { transform: scale(1.045); }
.mls-no-photo { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 14px; }
.listing-badge {
  position: absolute; top: 12px; left: 12px; background: var(--gold); color: #000;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 6px 11px; border-radius: 2px;
}
.listing-info { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mls-address { font-size: 17px; line-height: 1.25; font-weight: 700; }
.mls-price { color: var(--gold); font-size: 19px; font-weight: 700; margin-top: 4px; }
.mls-price span { color: var(--muted); font-size: 14px; font-weight: 500; }
.mls-meta { color: var(--muted); font-size: 14px; }
.mls-office { color: var(--faint); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; margin-top: auto; padding-top: 12px; }
.listing-info .mls-office { border-top: 1px solid var(--line); margin-top: 12px; }
.mls-view-list .listing-card { flex-direction: row; }
.mls-view-list .listing-image { width: 320px; flex: none; aspect-ratio: auto; min-height: 200px; }

.mls-map { height: min(680px, 70vh); border-radius: 2px; overflow: hidden; border: 1px solid var(--line); }
.mls-popup { display: flex; flex-direction: column; gap: 2px; font-family: var(--sans); color: #111; min-width: 170px; }
.mls-popup strong { font-size: 16px; }
.mls-popup span { font-size: 13px; color: #555; }
.mls-popup button { margin-top: 8px; background: var(--gold); border: 0; color: #000; font-weight: 700; padding: 8px 12px; border-radius: 2px; cursor: pointer; }

/* ---------- Listing popup ---------- */
.lead-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.lead-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.74); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lead-modal-panel {
  position: relative; width: min(940px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 2px; box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}
.lead-modal-close {
  position: sticky; top: 12px; z-index: 3; display: grid; place-items: center;
  width: 42px; height: 42px; margin: 12px 12px -54px auto;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(11, 11, 11, 0.7); color: var(--text);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.lead-modal-close:hover { border-color: var(--gold); color: var(--gold); }
#mlsDetail > .mls-status { padding: 64px 32px; text-align: center; }
.lead-photo-main { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #1a1a1a; }
.lead-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.lead-thumbs img { width: 92px; height: 66px; flex: none; object-fit: cover; border-radius: 2px; cursor: pointer; opacity: 0.75; transition: opacity 0.2s; }
.lead-thumbs img:hover { opacity: 1; }
.lead-details-body { padding: 28px 36px 36px; }
.section-tag { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin-bottom: 8px; }
.lead-modal-title { font-family: var(--display); font-size: clamp(36px, 4.6vw, 48px); line-height: 1.02; letter-spacing: 0.01em; }
.lead-price { color: var(--gold); font-size: 28px; font-weight: 700; margin-top: 10px; }
.lead-specs { font-size: 16px; margin-top: 4px; }
.mls-open-house-line { color: var(--gold-2); font-weight: 600; margin-top: 10px; }
.lead-highlights { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 18px 0 0; }
.lead-highlights li { border: 1px solid var(--line-2); border-radius: 2px; padding: 6px 13px; font-size: 13px; color: var(--muted); }
.lead-description { color: var(--muted); font-size: 15.5px; line-height: 1.75; margin-top: 20px; white-space: pre-line; }
.lead-details-body > .mls-office { border: 0; padding-top: 0; margin-top: 18px; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }
.mls-showing { margin-top: 18px; padding: 22px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 2px; }
.form-group { position: relative; margin-bottom: 12px; }
.form-group input, .form-group textarea {
  width: 100%; background: var(--field); border: 1px solid var(--line-2); border-radius: 2px; padding: 22px 15px 8px;
  font-size: 15px; color: var(--text); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group textarea { resize: vertical; }
.form-group label { position: absolute; left: 16px; top: 15px; font-size: 14px; color: var(--faint); pointer-events: none; transition: all 0.2s var(--ease); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.form-group input:focus + label, .form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label, .form-group textarea:not(:placeholder-shown) + label { top: 6px; font-size: 11px; color: var(--gold); }
.mls-sent { margin-top: 18px; padding: 16px 18px; border-radius: 2px; background: var(--gold-tint); color: var(--gold-2); }
.mls-badge { display: inline-block; margin-top: 22px; background: #fff; padding: 8px 12px; border-radius: 2px; }
.mls-badge img { width: 125px; height: auto; }

/* ---------- Headshot on the contact cards: cropped to the shoulders, fading into the panel ---------- */
.avatar {
  display: block; width: 100%; max-width: 300px; height: auto; aspect-ratio: 300 / 272; margin: 0 auto -30px;
  object-fit: cover; object-position: 50% 0;
  -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 100%); mask-image: linear-gradient(180deg, #000 58%, transparent 100%);
}
.avatar + .eyebrow { position: relative; }
.avatar-mono { width: 72px; height: 72px; margin: 0 0 20px; -webkit-mask-image: none; mask-image: none; border: 1px solid var(--gold); display: grid; place-items: center; font-family: var(--display); font-size: 30px; color: var(--gold); }

/* ---------- Sell Your Home ---------- */
.sell-flow { margin-top: 34px; }
.sell-steps { display: flex; flex-wrap: wrap; gap: 12px 30px; list-style: none; padding: 0; margin: 0 0 16px; counter-reset: step; }
.sell-steps li {
  counter-increment: step; display: flex; align-items: center; gap: 10px; color: var(--faint);
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; transition: color 0.3s;
}
.sell-steps li::before {
  content: counter(step); width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line-2); font-size: 13px; letter-spacing: 0; transition: all 0.3s;
}
.sell-steps li.on { color: var(--text); }
.sell-steps li.on::before { background: var(--gold); border-color: var(--gold); color: #000; }
.sell-steps li.done { color: var(--muted); }
.sell-steps li.done::before { content: '\2713'; border-color: var(--gold); color: var(--gold); }
.sell-box {
  display: flex; align-items: center; gap: 8px; padding: 8px; background: var(--panel);
  border: 1px solid var(--line-2); border-radius: 2px; transition: border-color 0.2s, box-shadow 0.2s;
}
.sell-box:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.sell-box .suggest-wrap { flex: 1; min-width: 0; }
.sell-box input { width: 100%; background: transparent; border: 0; outline: none; padding: 14px 14px; font-size: 18px; color: var(--text); }
.sell-box input::placeholder { color: #6e6e6e; }
.sell-box .btn { flex: none; padding: 16px 30px; border-radius: 2px; }
.sell-box .suggest-list { top: calc(100% + 16px); left: -8px; right: -8px; }
.sell-start .form-error { margin-top: 12px; }
.sell-address {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px;
  padding: 16px 18px; background: var(--field); border: 1px solid var(--line-2); border-radius: 2px;
}
.sell-address .eyebrow { margin-bottom: 6px; }
.sell-address strong { font-size: 18px; line-height: 1.25; font-weight: 700; }
.link-btn {
  background: transparent; border: 0; padding: 6px 0; cursor: pointer; flex: none;
  color: var(--gold-2); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.link-btn:hover { color: var(--gold); }
.sell-aside { margin-top: 8px; }
/* The address step is short: keep the footer off the first screen so the suggestions have room */
.page-sell .page-hero { min-height: calc(100vh - var(--header-h)); }

/* ---------- Calculators ---------- */
.calc-layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 32px; align-items: start; }
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-content: start; }
.calc-group { grid-column: 1 / -1; font-size: 18px; font-weight: 700; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-top: 14px; }
.calc-group:first-child { margin-top: 0; }
.calc-field { display: flex; flex-direction: column; justify-content: flex-end; }
.calc-field-wide { grid-column: 1 / -1; }
.calc-field > span:first-child {
  display: block; margin-bottom: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--faint);
}
.calc-input {
  display: flex; align-items: center; background: var(--field); border: 1px solid var(--line-2); border-radius: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.calc-input:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.calc-input em { font-style: normal; font-weight: 600; color: var(--gold); padding-left: 15px; }
.calc-input input + em { padding: 0 15px 0 0; }
.calc-input input, .calc-input select {
  flex: 1; min-width: 0; width: 100%; background: transparent; border: 0; outline: none;
  padding: 13px 15px; font-size: 16px; color: var(--text); -webkit-appearance: none; appearance: none;
}
.calc-input em + input { padding-left: 8px; }
.calc-input select {
  cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c79116' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.calc-input select option { background: var(--panel); }
.calc-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; cursor: pointer; }
.calc-check input { width: 18px; height: 18px; accent-color: var(--gold); }
.calc-results { position: sticky; top: calc(var(--header-h) + 24px); }
.calc-stat { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.calc-stat span { color: var(--muted); font-size: 14.5px; }
.calc-stat strong { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.calc-stat.big { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 0 22px; }
.calc-stat.big span { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.calc-stat.big strong { font-family: var(--display); font-weight: 400; font-size: clamp(58px, 6.4vw, 80px); line-height: 1; color: var(--gold-2); text-align: left; }
.calc-stat strong.negative { color: #ff9a9a; }
.calc-rule { margin-top: 20px; padding: 18px 20px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 2px; }
.calc-rule span { display: block; color: var(--muted); font-size: 14px; }
.calc-rule strong { display: block; font-family: var(--display); font-weight: 400; font-size: 40px; color: var(--gold-2); margin-top: 4px; }
.calc-rule p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.calc-note { margin-top: 20px; padding: 14px 16px; border-radius: 2px; background: var(--gold-tint); color: var(--gold-2); font-size: 14px; line-height: 1.55; }
.calc-note.warn { background: rgba(255, 120, 120, 0.1); color: #ff9a9a; }
.source-note { color: var(--faint); font-size: 12.5px; line-height: 1.6; margin-top: 18px; }
.calc-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 32px; }
.calc-cta p { font-size: 19px; font-weight: 600; line-height: 1.35; max-width: 28em; }

/* ---------- Footer ---------- */
.site-footer { background: #080808; border-top: 1px solid var(--line); padding: 80px 0 84px; }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand > p { color: var(--muted); font-size: 14px; max-width: 26em; margin-top: 18px; }
.footer-logos { display: flex; align-items: center; gap: 26px; margin-top: 26px; }
.footer-logos img { width: 118px; height: auto; }
.real-logo { display: block; width: 76px; height: auto; color: var(--real); }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer-col a, .footer-col p { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14.5px; margin-bottom: 11px; transition: color 0.2s; word-break: break-word; }
.footer-col a:hover { color: var(--gold-2); }
.footer-legal { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); }
.footer-legal p { color: var(--faint); font-size: 12px; line-height: 1.65; margin-bottom: 10px; max-width: 980px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; color: var(--faint); font-size: 13px; }
.footer-bottom a:hover { color: var(--gold-2); }

/* Call and text, on screen at all times. Sits under the popups, over everything else. */
.quick-contact { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60; display: flex; gap: 8px; }
.quick-contact a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 2px; background: var(--gold); color: #000; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55); transition: background 0.2s; }
.quick-contact a:hover { background: var(--gold-2); }
.quick-contact svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.85s var(--ease), transform 0.85s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .quick-search { grid-template-columns: 1fr 1fr; }
  .qs-field + .qs-field { border-left: 0; }
  .qs-go { grid-column: 1 / -1; padding: 14px; }
  .hero-stats ul { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 10px; }
  .hero-stats li + li { padding-left: 10px; }
  .hero-stats strong { font-size: 40px; }
  .hero-stats span { font-size: 9.5px; letter-spacing: 0.06em; line-height: 1.35; }
  .stat-rank strong { font-size: 28px; line-height: 1; }
  .stat-rank b { display: block; margin-left: 0; font-size: 38px; line-height: 1; -webkit-text-stroke: 0.6px currentColor; }
}

@media (max-width: 350px) {
  .hero-stats ul { gap: 6px; }
  .hero-stats li + li { padding-left: 6px; }
  .hero-stats strong { font-size: 34px; }
  .hero-stats span { font-size: 8.5px; letter-spacing: 0.03em; }
  .stat-rank strong { font-size: 24px; }
  .stat-rank b { font-size: 30px; }
}

/* Below this the card stacks: the small photo, then the words over the fade */
@media (max-width: 900px) {
  .card-hero { display: flow-root; margin-top: 40px; padding: 0 28px 36px; }
  .card-photo { position: relative; top: auto; right: auto; height: auto; justify-content: center; width: 240px; margin: -40px auto -30px; }
  .portrait-img { width: 100%; height: auto; }
}

@media (max-width: 1080px) {
  .help-grid { grid-template-columns: 1fr 1fr; }
  .mls-results.mls-view-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }

  /* Seven tabs do not fit beside the name below this width, so the menu folds into the button */
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 49;
    flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px;
    padding: 28px 24px 40px; background: var(--bg); border-top: 1px solid var(--line); overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
  .site-nav > a:not(.btn) { font-family: var(--display); font-size: 40px; font-weight: 400; letter-spacing: 0.01em; color: var(--text); padding: 4px 0; }
  .site-nav > a.active { color: var(--gold); }
  .site-nav > a.active::after { display: none; }
}

@media (max-width: 900px) {
  .meet, .form-layout, .team-block, .calc-layout, .career-story { grid-template-columns: 1fr; }
  .career-story { gap: 32px; }
  .calc-results { position: static; }
  .meet { gap: 24px; }
  .form-aside { position: static; }
  .team-block { gap: 28px; }
  .section { padding: 80px 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .card-hero { padding: 0 18px 32px; }
  .card-photo { width: 200px; margin-bottom: -24px; }
  .hero-title { font-size: 20vw; }
  .hero-about .hero-title { font-size: 14vw; }
  .hero-role { font-size: clamp(12px, 3.45vw, 13.5px); letter-spacing: 0; }
  .hero-tagline { font-size: 12px; letter-spacing: 0.12em; }
  .help-grid { grid-template-columns: 1fr; }
  .page-hero > .container { padding: 32px 20px 6px; }
  .cta-band .cta-inner { width: calc(100% - 32px); padding: 34px 20px 16px; }
  .areas li { padding: 0 16px; }
  .brand-name { font-size: 27px; }
  .brand-sub { font-size: 9.5px; letter-spacing: 0.14em; }
  .page-lead { font-size: 16.5px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .quick-search { grid-template-columns: 1fr; }
  .qs-field:first-child { grid-column: auto; }
  .section { padding: 64px 0; }
  .section-tight { padding-bottom: 64px; }
  .section-head { flex-direction: column; align-items: flex-start; margin-bottom: 30px; }
  .mls-results.mls-view-grid { grid-template-columns: 1fr; }
  .mls-view-list .listing-card { flex-direction: column; }
  .mls-view-list .listing-image { width: auto; aspect-ratio: 4 / 3; min-height: 0; }
  .field-grid { grid-template-columns: 1fr; }
  .panel { padding: 24px 20px; }
  .help-card { padding: 32px 24px 28px; }
  .gold-note { padding: 28px 24px; font-size: 18px; }
  .career-story img { width: 130px; }
  .lead-details-body { padding: 22px 20px 28px; }
  .mls-filters { padding: 18px; }
  .mls-filter-actions .btn { flex: 1; }
  .mls-toolbar-right { width: 100%; flex-wrap: nowrap; }
  .mls-sort { flex: 1 1 auto; min-width: 0; }
  .mls-views button { padding: 10px 10px; }
  .mls-pages { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .mls-pages-bottom { justify-content: flex-start; }
  .mls-pages button { min-width: 38px; flex: none; }
  #justListed .listing-card:nth-child(n + 4) { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .cta-band { padding: 56px 0; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { flex: 1 1 auto; }
  .page-hero { padding: 36px 16px 32px; }
  .calc-form { grid-template-columns: 1fr; gap: 16px; }
  .calc-cta p { font-size: 17px; }
  .calc-cta .cta-actions .btn { flex: 1 1 auto; }
  .sell-box { flex-direction: column; align-items: stretch; }
  .sell-box input { font-size: 17px; padding: 12px 10px; }
  .sell-box .btn { width: 100%; }
  .sell-box .suggest-list { top: calc(100% + 8px); left: -8px; right: -8px; }
  .sell-address { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* CREA DDF® display rules: the REALTOR.ca badge on every listing, and the terms of use before listings */
.mls-card { cursor: pointer; }
.mls-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.mls-card-badge, .mls-popup-badge { align-self: flex-start; display: inline-block; margin-top: 12px; padding: 6px 8px; background: #fff; border-radius: 2px; line-height: 0; }
.mls-card-badge img, .mls-popup-badge img { display: block; width: 90px; height: auto; }
.mls-popup-office { color: #555; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.terms-panel { width: min(720px, 100%); padding: 36px 40px; }
.terms-lead { margin-top: 12px; color: var(--text); font-size: 15px; }
.terms-text { margin-top: 18px; max-height: 40vh; max-height: 40dvh; overflow: auto; padding: 4px 16px 4px 0; border-top: 1px solid var(--line); }
.terms-text p { margin-top: 14px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.terms-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.terms-again { padding: 0; border: 0; background: none; color: var(--gold); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.terms-show { display: table; margin: 18px auto 0; }
.terms-page p { font-size: 15.5px; }
@media (max-width: 640px) {
  .terms-panel { padding: 28px 22px; }
  .terms-actions .btn { flex: 1; }
}
