/* ============================================================
   THE KHAN GROUP — Global Stylesheet
   Brokerage, property management and rental management — Chicago
   Accent is RED, drawn from the crest's maroon field. The crest's gold is left
   in the artwork only and is no longer used as an interface colour.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&family=Oxygen:wght@300;400;700&display=swap');

:root {
  --black:      #0A0A0A;
  --dark:       #131313;
  --dark-2:     #1B1A19;
  /* Three reds, because one cannot serve every ground:
     --accent      small text and rules on DARK grounds (4.7:1 on --black)
     --accent-mid  button fills, carrying white text (5.8:1)
     --accent-deep text on LIGHT grounds, and hovers (7.3:1 on --cream) */
  --accent:      #DE3350;
  --accent-mid:  #C2263F;
  --accent-deep: #971E38;
  --maroon:     #971E38;
  --maroon-lit: #B93049;
  --gray:       #8B8785;
  --light-gray: #D6D2CE;
  --cream:      #F6F3EE;
  --cream-2:    #EFEAE2;
  --white:      #FFFFFF;
  --line:       rgba(255,255,255,0.10);
  --line-dark:  rgba(10,10,10,0.12);

  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  /* Standfirst / subtext face, matching the sister site. Currently scoped to
     the About page only (body.page-about), per Danish 2026-09-01. */
  --font-sub:   'Oxygen', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-h: 82px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --t:    0.4s var(--ease);
  --tf:   0.2s ease;
  --pad:  clamp(22px, 5vw, 64px);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }

/* Shared type scale */
.eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow.on-light { color: var(--maroon); }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.06; letter-spacing: -0.01em; }
h2 { font-size: clamp(32px, 4.4vw, 56px); }
h3 { font-size: clamp(21px, 2.2vw, 28px); }

.lede { font-size: clamp(16px, 1.5vw, 18px); color: var(--light-gray); max-width: 62ch; }
.lede.on-light { color: #4A4644; }

/* ────────────────────────────────────────
   Navigation
──────────────────────────────────────── */
#navbar {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  height: var(--nav-h); padding: 0 var(--pad);
  border-bottom: 1px solid transparent;
  transition: background var(--t), border-color var(--t), backdrop-filter var(--t);
}
#navbar.scrolled {
  background: rgba(10,10,10,0.93);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

/* Crest + typeset wordmark. The supplied lockup has a near-black wordmark, so
   it disappears on dark grounds. The crest alone survives (its gold rim keeps
   the silhouette) and the words are set in live type instead. */
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { height: 42px; width: auto; }
.brand-word {
  font-family: var(--font-serif); font-size: 19px; line-height: 1.05;
  letter-spacing: 0.10em; text-transform: uppercase; white-space: nowrap;
}
.brand-word .k { color: var(--accent); }
.brand-sub {
  display: block; font-family: var(--font-sans); font-size: 8.5px;
  letter-spacing: 0.24em; color: var(--gray); margin-top: 3px;
}

.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  font-size: 13px; letter-spacing: 0.07em; text-transform: uppercase;
  color: rgba(255,255,255,0.82); position: relative; padding: 6px 0;
  transition: color var(--tf);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--accent); transition: width var(--t);
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
  border: 1px solid var(--accent); color: var(--accent);
  padding: 11px 22px; font-size: 12px; letter-spacing: 0.10em;
  text-transform: uppercase; transition: background var(--t), color var(--t);
}
.nav-cta:hover { background: var(--accent-mid); color: var(--white); border-color: var(--accent-mid); }

.nav-toggle { display: none; width: 30px; height: 20px; position: relative; }
.nav-toggle span {
  position: absolute; left: 0; width: 100%; height: 1.5px; background: var(--white);
  transition: transform var(--t), opacity var(--tf);
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ────────────────────────────────────────
   Buttons
──────────────────────────────────────── */
.btn {
  display: inline-block; padding: 15px 32px; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.btn-accent { background: var(--accent-mid); color: var(--white); }
.btn-accent:hover { background: var(--accent-deep); }
.btn-ghost { border: 1px solid rgba(255,255,255,0.34); color: var(--white); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-dark  { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--maroon); }

/* ────────────────────────────────────────
   Hero
──────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; display: flex; overflow: hidden; background: var(--black); }
.hero video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  /* The source is an interview film with burned-in name captions in the lower
     third. Grading it down and weighting the wash to the bottom keeps those
     from competing with the headline. */
  filter: brightness(0.46) contrast(1.06) saturate(0.92);
}
@media (prefers-reduced-motion: reduce) { .hero video { display: none; } }
.hero-wash {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(ellipse 66% 58% at 30% 46%, rgba(8,8,8,0.52) 0%, rgba(8,8,8,0.18) 55%, rgba(8,8,8,0) 82%),
    linear-gradient(to bottom, rgba(10,10,10,0.72) 0%, rgba(10,10,10,0.12) 26%,
                    rgba(10,10,10,0.30) 62%, rgba(10,10,10,0.92) 100%);
}
.hero-inner {
  position: relative; z-index: 2; width: 100%;
  max-width: 1280px; margin: 0 auto;
  /* Bottom padding must clear .hero-foot, which is absolutely positioned over
     the foot of the hero — otherwise the rail sits on top of the buttons. */
  padding: calc(var(--nav-h) + 40px) var(--pad) 210px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero h1 {
  font-size: clamp(40px, min(6.6vw, 10.5vh), 92px);
  max-width: 15ch; margin: 20px 0 22px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
/* Sized to break across two lines on a normal desktop window. It will wrap to
   three on a narrow laptop, which is unavoidable at this character count. */
.hero .lede { max-width: 76ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Divisions rail pinned to the foot of the hero */
.hero-foot { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 0 var(--pad) 30px; }
.hero-rail {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border-top: 1px solid var(--line);
}
/* Each rail item is an <a> to its service page. Its children are <span>s, which
   are inline by default and would collapse the padding and margins, so every one
   is forced to display:block. */
.rail-item {
  display: block; background: rgba(10,10,10,0.62); padding: 20px 22px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background var(--t), transform var(--t);
}
.rail-item:hover { background: rgba(24,10,14,0.86); transform: translateY(-3px); }
.rail-item .n { display: block; font-size: 10px; letter-spacing: 0.2em; color: var(--accent); }
.rail-item .t {
  display: block; font-family: var(--font-serif); font-size: 20px; margin-top: 6px;
  transition: color var(--tf);
}
.rail-item .t::after {
  content: '\2192'; display: inline-block; margin-left: 9px;
  /* Kept faintly visible at rest so the tile reads as clickable without a hover. */
  opacity: 0.4; color: var(--accent);
  transition: opacity var(--t), transform var(--t);
}
.rail-item:hover .t { color: var(--accent); }
.rail-item:hover .t::after { opacity: 1; transform: translateX(4px); }
.rail-item .d { display: block; font-size: 12.5px; color: var(--gray); margin-top: 3px; }

/* Linked service names, wherever they appear in a heading. */
.card h3 a, .svc-grid h2 a { transition: color var(--tf); }
.card h3 a:hover, .svc-grid h2 a:hover { color: var(--accent-deep); }
.lede a, .value p a, .card p a {
  color: var(--accent-deep); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color var(--tf);
}
.lede a:hover, .value p a:hover, .card p a:hover { color: var(--accent-mid); }
/* On dark grounds the deep maroon is unreadable, so links lift to the bright red. */
.sec-dark .lede a, .sec-black .lede a, .page-head .lede a, .cta .lede a,
.areas .lede a { color: var(--accent); }

/* ────────────────────────────────────────
   Sections
──────────────────────────────────────── */
section { padding: clamp(72px, 9vw, 130px) 0; }
.sec-light { background: var(--cream); color: var(--black); }
.sec-cream2 { background: var(--cream-2); color: var(--black); }
.sec-dark  { background: var(--dark); }
.sec-black { background: var(--black); }

.sec-head { max-width: 780px; margin-bottom: clamp(38px, 5vw, 60px); }
.sec-head h2 { margin: 14px 0 18px; }

/* Stats band */
.stats { background: var(--maroon); color: var(--white); padding: clamp(46px, 6vw, 78px) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat .v { font-family: var(--font-serif); font-size: clamp(38px, 5vw, 62px); line-height: 1; color: var(--accent); }
.stat .l { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 10px; color: rgba(255,255,255,0.82); }

/* Service / division cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.2vw, 30px); }
.card {
  border: 1px solid var(--line-dark); padding: clamp(26px, 3vw, 40px);
  background: var(--white); transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(10,10,10,0.10); border-color: var(--accent-mid); }
.card .num { font-family: var(--font-serif); font-size: 15px; color: var(--accent-deep); letter-spacing: 0.1em; }
.card h3 { margin: 12px 0 12px; }
.card p { font-size: 15px; color: #55504D; }
.card ul { margin-top: 18px; }
.card ul li {
  font-size: 13.5px; color: #55504D; padding: 7px 0 7px 20px; position: relative;
  border-top: 1px solid var(--line-dark);
}
.card ul li::before {
  content: ''; position: absolute; left: 0; top: 15px;
  width: 7px; height: 7px; background: var(--accent-mid);
}

/* Split feature */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 76px); align-items: center; }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-body p + p { margin-top: 16px; }

/* Team */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.member { border-top: 2px solid var(--accent-mid); padding-top: 20px; }
.member .role { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.member h3 { margin: 8px 0 10px; }
.member p { font-size: 14.5px; color: var(--light-gray); }
.sec-light .member p { color: #55504D; }

/* Value list */
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-dark); border: 1px solid var(--line-dark); }
.value { background: var(--cream); padding: clamp(24px, 3vw, 38px); }
.value h3 { font-size: 22px; margin-bottom: 10px; }
.value p { font-size: 14.5px; color: #55504D; }

/* CTA strip */
.cta {
  background: var(--dark-2); text-align: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.cta h2 { margin: 14px auto 18px; max-width: 18ch; }
.cta .lede { margin: 0 auto; }
.cta .btn { margin-top: 30px; }

/* ────────────────────────────────────────
   Contact
──────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(34px, 5vw, 76px); }
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 15px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  color: var(--white); transition: border-color var(--tf), background var(--tf);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: rgba(255,255,255,0.07);
}
.field select option { background: var(--dark); color: var(--white); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.hp { position: absolute; left: -9999px; opacity: 0; }

.form-note { font-size: 13px; color: var(--gray); margin-top: 16px; }
.form-msg { margin-top: 18px; padding: 14px 16px; font-size: 14px; display: none; }
.form-msg.ok   { display: block; background: rgba(222,51,80,0.12); border: 1px solid var(--accent); color: var(--accent); }
.form-msg.err  { display: block; background: rgba(151,30,56,0.16); border: 1px solid var(--maroon-lit); color: #F0A9B7; }

.detail { border-top: 1px solid var(--line); padding: 22px 0; }
.detail .k { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.detail .v { font-family: var(--font-serif); font-size: 22px; margin-top: 8px; }
.detail .v a:hover { color: var(--accent); }

/* ────────────────────────────────────────
   Footer
──────────────────────────────────────── */
footer { background: var(--black); border-top: 1px solid var(--line); padding: clamp(50px, 6vw, 78px) 0 30px; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-top p { font-size: 14px; color: var(--gray); max-width: 34ch; margin-top: 18px; }
.foot-col h4 { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.foot-col a, .foot-col .addr { display: block; font-size: 14px; color: var(--light-gray); padding: 5px 0; }
.foot-col a:hover { color: var(--accent); }
.foot-bot {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 12px; color: var(--gray);
}

/* ────────────────────────────────────────
   Reveal on scroll
──────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ────────────────────────────────────────
   Responsive
──────────────────────────────────────── */
@media (max-width: 1000px) {
  .cards, .team, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid, .foot-top { grid-template-columns: 1fr; }
  .hero-rail { grid-template-columns: 1fr; }
  /* The rail stops floating over the hero and stacks beneath it. `.hero` is a
     flex container, so it must also switch to a column — otherwise the rail
     becomes a second flex COLUMN sitting next to the headline. */
  .hero { min-height: auto; flex-direction: column; }
  .hero-foot { position: static; padding-top: 8px; }
  .hero-inner { padding-top: calc(var(--nav-h) + 72px); padding-bottom: 72px; min-height: 88svh; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    background: rgba(10,10,10,0.98); backdrop-filter: blur(22px);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px var(--pad) 26px; border-bottom: 1px solid var(--line);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity var(--t), transform var(--t);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .cards, .team, .values, .stats-grid, .field-row { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}

/* ────────────────────────────────────────
   Inner-page header banner
──────────────────────────────────────── */
.page-head {
  padding: calc(var(--nav-h) + clamp(56px, 8vw, 104px)) 0 clamp(50px, 7vw, 92px);
  background:
    radial-gradient(ellipse 60% 90% at 12% 0%, rgba(151,30,56,0.30) 0%, rgba(151,30,56,0) 68%),
    var(--dark);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(38px, 6vw, 76px); margin: 16px 0 20px; max-width: 18ch; }
.page-head h1 em { font-style: italic; color: var(--accent); }

/* Numbered story steps (About) */
/* Every page using this has FOUR steps, so two-across gives 2 + 2 rather than
   3 + 1 with an orphan. */
.story { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.story-step { background: var(--black); padding: clamp(26px, 3vw, 40px); }
.story-step .n { font-family: var(--font-serif); font-size: 42px; color: var(--accent); line-height: 1; }
.story-step h3 { margin: 14px 0 10px; }
.story-step p { font-size: 14.5px; color: var(--light-gray); }

/* Deep service blocks (Services) */
.svc { border-top: 1px solid var(--line-dark); padding: clamp(38px, 5vw, 64px) 0; }
.svc:last-child { border-bottom: 1px solid var(--line-dark); }
.svc-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(24px, 4vw, 60px); align-items: start; }
.svc-grid h2 { font-size: clamp(28px, 3.4vw, 44px); }
.svc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 34px; margin-top: 22px; }
.svc-list li {
  font-size: 14.5px; color: #55504D; padding: 11px 0 11px 22px;
  border-top: 1px solid var(--line-dark); position: relative;
}
.svc-list li::before {
  content: ''; position: absolute; left: 0; top: 19px;
  width: 8px; height: 8px; background: var(--maroon);
}
@media (max-width: 1000px) {
  .story { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) { .svc-list { grid-template-columns: 1fr; } }

/* ────────────────────────────────────────
   Areas served — replaces the old stats band
──────────────────────────────────────── */
.areas {
  background:
    radial-gradient(ellipse 70% 120% at 88% 50%, rgba(151,30,56,0.26) 0%, rgba(151,30,56,0) 70%),
    var(--dark);
  border-block: 1px solid var(--line);
}
.areas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 76px); align-items: start; }
.areas-grid h2 { font-size: clamp(26px, 3vw, 40px); max-width: 20ch; }
.areas-list { column-count: 2; column-gap: 40px; }
.areas-list li {
  font-family: var(--font-serif); font-size: clamp(19px, 2vw, 25px);
  line-height: 1.75; break-inside: avoid;
}
.areas-list li.more {
  font-family: var(--font-sans); font-size: 13.5px; color: var(--gray);
  letter-spacing: 0.02em; margin-top: 10px;
}

/* ────────────────────────────────────────
   Team photos
──────────────────────────────────────── */
.member-photo {
  aspect-ratio: 4 / 5; width: 100%; margin-bottom: 22px;
  overflow: hidden; background: var(--dark-2);
}
.member-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
  transition: transform 0.8s var(--ease);
}
.member:hover .member-photo img { transform: scale(1.035); }
/* Placeholder for a broker whose headshot we do not have yet. */
.member-photo.pending {
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 80% 80% at 50% 40%, rgba(151,30,56,0.22) 0%, rgba(151,30,56,0) 72%),
    var(--dark-2);
}
.member-photo.pending img { width: 42%; height: auto; object-fit: contain; opacity: 0.5; filter: none; }
.sec-light .member-photo.pending { border-color: var(--line-dark); background: var(--cream-2); }
/* The photo sits above the accent rule, so move the rule onto the block itself. */
.team-photos .member { border-top: none; padding-top: 0; }
.team-photos .member .role { padding-top: 16px; border-top: 2px solid var(--accent-mid); display: block; }

/* ────────────────────────────────────────
   Sister-company band
──────────────────────────────────────── */
.sister { background: var(--cream); color: var(--black); padding: clamp(52px, 6vw, 84px) 0; }
.sister-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(24px, 4vw, 56px); flex-wrap: wrap;
}
.sister-inner h2 { font-size: clamp(28px, 3.2vw, 42px); }
.sister-inner .lede { max-width: 56ch; }
.sister-inner .btn { flex: none; }

@media (max-width: 1000px) {
  .areas-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .areas-list { column-count: 1; }
}

/* ────────────────────────────────────────
   Transaction map
──────────────────────────────────────── */
.map-sec { background: var(--dark); border-block: 1px solid var(--line); }
.map-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 30px; }
.map-head h2 { margin-top: 14px; }
.map-count { font-size: 13px; color: var(--gray); letter-spacing: 0.04em; }
.map-count b { color: var(--accent); font-weight: 500; }

.map-layout {
  display: grid; grid-template-columns: 268px 1fr;
  border: 1px solid var(--line); background: var(--black);
}
#tkgMap { height: 560px; width: 100%; background: #1a1a1a; z-index: 0; }

/* The keyless OSM basemap is far too colourful next to the rest of the page, so
   it is desaturated here rather than swapped for a paid tile provider. */
.leaflet-tile-pane {
  filter: grayscale(0.94) invert(0.92) contrast(0.82) brightness(1.06) sepia(0.12);
}
.leaflet-container { font-family: var(--font-sans); background: #1a1a1a; }
.leaflet-control-attribution {
  background: rgba(10,10,10,0.72) !important; color: var(--gray) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--light-gray) !important; }
.leaflet-bar a {
  background: rgba(20,20,20,0.94) !important; color: var(--white) !important;
  border-bottom-color: var(--line) !important;
}
.leaflet-bar a:hover { background: var(--accent-mid) !important; }

/* Pins are plain dots rather than numbers: at 44 properties the numerals turn
   into noise and nothing refers to them. */
.tkg-pin {
  display: block; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent-mid); border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 1px 5px rgba(0,0,0,0.5);
  transition: transform var(--tf), background var(--tf);
}
.tkg-pin:hover { transform: scale(1.35); }
.tkg-pin.is-active { background: var(--white); border-color: var(--accent); transform: scale(1.5); }

/* ── Popups: previews only, nothing in here is a link ── */
.leaflet-popup-content-wrapper { border-radius: 0; padding: 0; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.leaflet-popup-content { margin: 0; width: auto !important; }
.leaflet-popup-tip { background: var(--white); }
.map-pop-img { height: 128px; background-size: cover; background-position: center; background-color: var(--cream-2); }
.map-pop-body { padding: 13px 16px 15px; background: var(--white); color: var(--black); }
.map-pop-body .hood {
  display: block; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: 5px;
}
.map-pop-body h4 { font-family: var(--font-serif); font-size: 20px; font-weight: 400; line-height: 1.15; }
.map-pop.no-img .map-pop-body { padding: 15px 18px 16px; }

/* ── Side rail ── */
.map-rail {
  height: 560px; overflow-y: auto; border-right: 1px solid var(--line);
  background: var(--black);
}
.rail-row {
  display: block; width: 100%; text-align: left; padding: 11px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background var(--tf), padding-left var(--tf);
}
.rail-row .a { display: block; font-family: var(--font-serif); font-size: 16.5px; color: var(--white); }
.rail-row .h { display: block; font-size: 11px; color: var(--gray); margin-top: 1px; }
.rail-row:hover { background: rgba(255,255,255,0.045); padding-left: 22px; }
.rail-row.is-active { background: rgba(194,38,63,0.20); padding-left: 22px; }
.rail-row.is-active .a { color: var(--accent); }
.map-rail::-webkit-scrollbar { width: 8px; }
.map-rail::-webkit-scrollbar-track { background: var(--black); }
.map-rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); }

.map-note { font-size: 12.5px; color: var(--gray); margin-top: 16px; }

@media (max-width: 900px) {
  .map-layout { grid-template-columns: 1fr; }
  .map-rail { height: 232px; border-right: none; border-bottom: 1px solid var(--line); order: 2; }
  #tkgMap { height: 400px; order: 1; }
}

/* ────────────────────────────────────────
   About page: subtext set in Oxygen
──────────────────────────────────────── */
body.page-about .lede,
body.page-about .value p,
body.page-about .member p,
body.page-about .map-count { font-family: var(--font-sub); }

/* The crest standing in for a missing headshot. Sized off the shorter axis so
   it can never overflow the 4:5 tile at any column width. */
.member-photo.pending img { width: auto; height: 46%; max-width: 62%; }
