/**
 * umg.ummah.city: layout + components
 * Scaffold only (see index.html header comment). No em/en dashes, no
 * emoji anywhere in this file or the markup it styles (CMO-2, CMO-4).
 * The crescent mark below is inline SVG, never a glyph.
 */

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

html { color-scheme: light dark; }
:root[data-umg-theme="void"] { color-scheme: dark; }
:root[data-umg-theme="ummah"] { color-scheme: light; }

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  transition: background-color .2s ease, color .2s ease;
}

h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
a { color: inherit; }

.umg-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--action-primary);
  color: var(--action-primary-text);
  padding: var(--space-2) var(--space-4);
  z-index: 100;
}
.umg-skip-link:focus { left: var(--space-2); top: var(--space-2); }

/* Nav */
.umg-nav {
  border-bottom: 1px solid var(--border-default);
  position: sticky;
  top: 0;
  background: var(--surface-base);
  z-index: 20;
}
.umg-nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.umg-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.umg-wordmark span {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-secondary);
}
.umg-nav nav {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.umg-nav nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  /* QA round 1: nav links measured 22px tall on mobile -- same 44px rule
     as .umg-btn. Merged into the base rule (was a silently-overriding
     appended duplicate lower in this file; QA round 2 flagged it). */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.umg-nav nav a:hover { color: var(--action-primary); }

.umg-nav-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.umg-theme-toggle {
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.umg-theme-toggle:hover { border-color: var(--border-strong); }

/* Mobile hamburger: reuses the live ummahmediagroup.com nav pattern
   (real <button>, three <span> bars, aria-expanded), hidden on desktop.
   Six nav links wrapping into three rows pushed the hero ~350px down on
   mobile before this existed (CD finding, Aug 11 2026). */
.umg-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
.umg-nav-toggle span {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .2s ease, opacity .2s ease;
}
.umg-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.umg-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.umg-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Masthead coordinate dateline (design spec 2.1): the one licensed
   "you are in a city" gesture beyond the khatim geometry itself. */
.umg-masthead-dateline {
  border-top: 1px solid var(--rule-soft);
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-1) var(--space-6);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-editorial);
}
:root[data-umg-theme="void"] .umg-masthead-dateline { color: rgba(250, 248, 243, 0.5); }

/* Buttons */
.umg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.umg-btn-primary {
  background: var(--action-primary);
  color: var(--action-primary-text);
  border-color: var(--action-primary);
}
.umg-btn-primary:hover { background: var(--action-primary-hover); border-color: var(--action-primary-hover); }
.umg-btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.umg-btn-secondary:hover { border-color: var(--action-primary); color: var(--action-primary); }

/* Hero */
.umg-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-10);
}

/**
 * Khatim tessellation (design spec section 2.1): "the only licensed map
 * gesture" for this page, an echo of a city grid viewed from above
 * without literally drawing one. Canonical khatim polygon at 110px tile,
 * stroke-opacity baked into the SVG (not a CSS opacity on the element,
 * so content layered on top is never dimmed with it) -- same pattern
 * pricing-language.css specifies, swapped to this page's own gold/void
 * pair rather than a third invented tint.
 */
.umg-khatim-bg {
  position: relative;
}
.umg-khatim-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat;
  background-size: 110px 110px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpolygon fill='none' stroke='%23166534' stroke-opacity='0.08' stroke-width='2.5' points='100,10 114.27,65.56 163.64,36.36 134.44,85.73 190,100 134.44,114.27 163.64,163.64 114.27,134.44 100,190 85.73,134.44 36.36,163.64 65.56,114.27 10,100 65.56,85.73 36.36,36.36 85.73,65.56'/%3E%3C/svg%3E");
}
:root[data-umg-theme="void"] .umg-khatim-bg::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpolygon fill='none' stroke='%23DFA032' stroke-opacity='0.07' stroke-width='2.5' points='100,10 114.27,65.56 163.64,36.36 134.44,85.73 190,100 134.44,114.27 163.64,163.64 114.27,134.44 100,190 85.73,134.44 36.36,163.64 65.56,114.27 10,100 65.56,85.73 36.36,36.36 85.73,65.56'/%3E%3C/svg%3E");
}
.umg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 var(--space-4);
}
:root[data-umg-theme="void"] .umg-eyebrow { color: var(--gold-bright); }
.umg-crescent { flex: 0 0 auto; }

.umg-hero-headline {
  font-weight: 500;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.01em;
  max-width: 18ch;
}
.umg-hero-lede {
  margin-top: var(--space-6);
  max-width: 52ch;
  font-size: 18px;
  color: var(--text-secondary);
}
.umg-hero-actions {
  margin-top: var(--space-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* City-vocabulary gloss (CMO-5): visible on first use, not a click-to-reveal
   disclosure. A cold reader must parse "District" without extra effort. */
.umg-gloss {
  margin-top: var(--space-6);
  max-width: 58ch;
  padding: var(--space-4) var(--space-5);
  border-left: 2px solid var(--gold);
  background: var(--surface-tint);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.umg-gloss-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0;
}
:root[data-umg-theme="void"] .umg-gloss-label { color: var(--gold-bright); }
.umg-gloss p {
  margin: var(--space-1) 0 0;
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* Bismillah (hero, top) and footer benediction (Tab's ruling, Aug 11 2026).
   Sacred layer: Arabic fonts only here, static, no animation, small and
   quiet, never a watermark, kept clear of any CTA or metric. */
.umg-bismillah {
  margin: 0 0 var(--space-5);
}
.umg-bismillah-text {
  font-family: var(--font-arabic);
  font-size: 16px;
  font-weight: 400;
  color: var(--gold-text);
  opacity: 0.55;
  letter-spacing: 2px;
  line-height: 1.8;
  direction: rtl;
  unicode-bidi: isolate;
}
:root[data-umg-theme="void"] .umg-bismillah-text { color: var(--gold-bright); }

.umg-footer-benediction {
  font-family: var(--font-arabic-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold-text);
  opacity: 0.5;
  text-align: center;
  direction: rtl;
  unicode-bidi: isolate;
  letter-spacing: 1px;
  margin: var(--space-6) 0 0;
}
:root[data-umg-theme="void"] .umg-footer-benediction { color: var(--gold-bright); }

/* Section shell */
.umg-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
  border-top: 1px solid var(--border-default);
}
.umg-section-head { margin-bottom: var(--space-8); }
.umg-section-head h2 { font-size: 28px; font-weight: 500; }
.umg-section-head p { color: var(--text-secondary); margin-top: var(--space-2); max-width: 60ch; }
/* A second chapter head sharing one <section> (Our Story holds two): no
   repeated top border, less lead-in space than the section's own head. */
.umg-section-head--tight { margin-top: var(--space-10); margin-bottom: var(--space-6); }
/* Reuse the hero eyebrow style as a small section label above an h2 */
.umg-eyebrow--section { margin-bottom: var(--space-2); }

/* Body copy blocks (Our Story, Who Lives in This District) */
.umg-prose { max-width: 62ch; }
.umg-prose p { margin: 0 0 var(--space-4); color: var(--text-secondary); font-size: 15.5px; }
.umg-prose p:last-child { margin-bottom: 0; }

/* Two wings */
.umg-wings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (max-width: 720px) { .umg-wings { grid-template-columns: 1fr; } }
.umg-wing-card {
  background: var(--surface-raised);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.umg-wing-card h3 { font-size: 21px; font-weight: 500; }
.umg-wing-card p { color: var(--text-secondary); font-size: 15px; }
.umg-wing-card .umg-btn { align-self: flex-start; margin-top: auto; }

/* Numbers */
.umg-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
}
.umg-stat-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
}
.umg-stat-card .umg-stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
}
/* Some tiles carry a multi-line-item value ("7 paying citizens (dot)
   0 family seats (dot) ...") rather than a single short numeral; those
   need a smaller size so the line wraps like a sentence, not a giant
   numeral running off the card. */
.umg-stat-card .umg-stat-value--list {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.umg-stat-card .umg-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}
/* A context label ABOVE the value instead of a caption below it (tiles
   that need "as of DATE" framing before a multi-line-item value). */
.umg-stat-label--top {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--ink-editorial-faint);
}
.umg-stat-source {
  margin-top: var(--space-3);
  font-size: 11px;
  color: var(--ink-editorial-faint);
  border-top: 1px solid var(--rule-soft);
  padding-top: var(--space-2);
}

/* Districts grid (all 14) */
.umg-districts-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}
.umg-district-card {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-5);
}
.umg-district-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}
.umg-district-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: var(--space-2);
}

/* Our Industry strip -- MuslimReach, kept OUT of the Districts grid;
   enterprise wing, not a consumer District. */
.umg-industry-strip {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-default);
}
.umg-industry-strip-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}
.umg-industry-cards {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.umg-industry-cards a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-5);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.umg-industry-cards a:hover { border-color: var(--action-primary); color: var(--action-primary); }

/* Team teaser */
.umg-team-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
  background: var(--surface-tint);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.umg-team-teaser h2 { font-size: 22px; font-weight: 500; }
.umg-team-teaser p { color: var(--text-secondary); margin-top: var(--space-2); max-width: 46ch; }

/* /team roster page */
.umg-team-page { max-width: 1000px; margin: 0 auto; padding: var(--space-10) var(--space-6) var(--space-12); }
.umg-team-page-head { border-bottom: 1px solid var(--border-default); padding-bottom: var(--space-6); margin-bottom: var(--space-8); }
.umg-team-page-head h1 { font-size: 32px; font-weight: 500; margin-top: var(--space-2); }
.umg-team-page-sub { color: var(--text-secondary); margin-top: var(--space-3); max-width: 56ch; }
.umg-team-signout { margin-top: var(--space-4); }
.umg-team-dept { margin-bottom: var(--space-8); }
.umg-team-dept h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-secondary); font-family: var(--font-body); font-weight: 600; }
.umg-team-grid { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.umg-team-card { border: 1px solid var(--border-default); border-radius: var(--radius-sm); padding: var(--space-4); }
.umg-team-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.umg-team-card-name { font-weight: 600; margin: 0; }
.umg-team-card-title { font-size: 13.5px; color: var(--text-secondary); margin: var(--space-1) 0 0; }
.umg-team-card-mentor { font-size: 12.5px; color: var(--gold-text); margin: var(--space-2) 0 0; }
:root[data-umg-theme="void"] .umg-team-card-mentor { color: var(--gold-bright); }
.umg-team-error { color: var(--text-secondary); }

/* Small neutral classification tag (e.g. "Intern") -- one plain variant,
   no per-department color system (departments are not properties, so
   they do not borrow PRISM identity colors). */
.umg-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.umg-badge-stone {
  background: var(--rule-soft);
  color: var(--ink-editorial-faint);
}
:root[data-umg-theme="void"] .umg-badge-stone { background: rgba(250, 248, 243, 0.1); color: var(--text-secondary); }

/* Sign-in gate card (auth error states) */
.umg-team-gate { display: flex; align-items: center; justify-content: center; min-height: 100vh; margin: 0; background: var(--surface-base); color: var(--text-primary); font-family: var(--font-body); }
.umg-team-gate-card { max-width: 440px; padding: var(--space-8); text-align: center; }
.umg-team-gate-label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--text-secondary); }
.umg-team-gate-card h1 { font-size: 22px; font-weight: 500; margin-top: var(--space-3); }
.umg-team-gate-card p { margin-top: var(--space-6); display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* Closing contact beat: the page was ending at the Industry strip with
   no route back to a human (CD finding, Aug 11 2026). One quiet line,
   not a second contact form -- Build A owns the full contact section. */
.umg-contact-beat {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
  text-align: center;
  border-top: 1px solid var(--border-default);
}
.umg-contact-beat p {
  font-size: 14.5px;
  color: var(--text-secondary);
}
.umg-contact-beat a {
  color: var(--action-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* Footer */
.umg-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-10);
  border-top: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 13px;
}
.umg-footer a { text-decoration: underline; }
.umg-footer-tagline {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}
.umg-footer-desc { margin-top: var(--space-2); max-width: 52ch; }
.umg-footer-links {
  margin-top: var(--space-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}
.umg-footer-meta {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--rule-soft);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  font-size: 12px;
}
/* The benediction is the plain LAST line, per Tab's ruling: never behind
   numbers, never adjacent to a CTA/metric. Nothing renders after it. */

/* Hamburger breakpoint (matches the live corp site's own nav-toggle
   breakpoint and design spec 0.6): six links no longer wrap into rows,
   they collapse behind the toggle. */
@media (max-width: 768px) {
  .umg-nav-toggle { display: flex; }
  .umg-nav nav {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--surface-base);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    z-index: 999;
  }
  .umg-nav nav.is-open { display: flex; }
  .umg-nav nav.is-open a { font-size: 20px; min-height: auto; }
}

/* Mobile (390px reference) */
@media (max-width: 480px) {
  .umg-hero { padding-top: var(--space-8); }
  .umg-section { padding: var(--space-8) var(--space-4); }
  .umg-team-teaser { flex-direction: column; align-items: flex-start; }
  .umg-industry-cards { flex-direction: column; align-items: stretch; }
  .umg-industry-cards a { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
