/* Light presentation from the supplied Brickmark reference.
   Dark feature sections and explicitly marked dark panels retain their palette. */
:root {
  --bm-bg: #f7f6f2;
  --bm-light-ink: #262622;
  --bm-light-muted: #716e66;
  --bm-light-panel: #eae8e1;
  --bm-light-line: #dedbd2;
}

body { background: var(--bm-bg); }

[data-bm-surface="light"] {
  color-scheme: light;
  color: var(--bm-light-ink);
  background: var(--bm-bg) !important;
  border-color: var(--bm-light-line) !important;
}

/* The exclusions protect phone bezels, image captions, integration tiles,
   the provider callout and contact form inside otherwise light sections. */
:where([data-bm-surface="light"]) :is(.text-white, [class*="text-white/"], .company-name, .nav-link, .navbar-toggler):not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) {
  color: var(--bm-light-ink) !important;
}

:where([data-bm-surface="light"]) :is([class*="text-white/50"], [class*="text-white/40"], [class*="text-white/20"], [class~="text-[#85817B]"]):not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) {
  color: var(--bm-light-muted) !important;
}

:where([data-bm-surface="light"]) :is(.glass-card, [class~="bg-[#1A1A18]"], [class~="bg-[#171614]"], [class~="bg-[#141412]"], [class~="bg-[#121211]"], [class~="bg-[#181817]"], [class~="bg-white/5"], [class~="bg-white/10"]):not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) {
  background: #fff !important;
  border-color: var(--bm-light-line) !important;
  box-shadow: 0 3px 14px rgb(42 36 24 / 3%) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

:where([data-bm-surface="light"]) :is([class*="border-white/"], [class~="border-[#2C2B28]"]):not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) {
  border-color: var(--bm-light-line) !important;
}

:where([data-bm-surface="light"]) :is(.btn-bm-outline, .btn-outline-light, .tag-pill):not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) {
  background: #fff;
  color: var(--bm-light-ink);
  border-color: var(--bm-light-line);
}

:where([data-bm-surface="light"]) :is(.btn-bm-outline:hover, .tag-pill:hover):not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) {
  background: #fff3e9;
  border-color: #ff7f32;
}

/* Orange actions keep white labels against the brand color. */
:where([data-bm-surface="light"]) :is(.btn-bm-primary, .btn-bm-primary *, [class~="bg-[#FF7F32]"], [class~="bg-[#FF7F32]"] *, .riyadh-district-pin, .riyadh-district-pin *) {
  color: #fff !important;
}

:where([data-bm-surface="light"]) :is(.glass-card-interactive:hover, .glass-card:focus-within):not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) {
  border-color: #ffb383 !important;
  box-shadow: 0 8px 24px rgb(74 52 29 / 8%) !important;
}

[data-purpose="site-header"][data-bm-surface="light"] {
  background: rgb(250 249 246 / 96%) !important;
  box-shadow: 0 1px 0 rgb(50 45 35 / 7%);
}
[data-purpose="site-header"] .navbar-toggler { border-color: var(--bm-light-line); }
[data-purpose="site-header"] .dropdown-menu {
  --bs-dropdown-bg: #fff;
  --bs-dropdown-color: #262622;
  --bs-dropdown-link-color: #262622;
  --bs-dropdown-link-hover-color: #b64c0b;
  --bs-dropdown-link-hover-bg: #fff3e9;
  --bs-dropdown-border-color: #dedbd2;
}
[data-purpose="site-header"] .dropdown-item { color: var(--bm-light-ink) !important; }
[data-purpose="site-header"] .nav-link:hover { color: #b64c0b !important; }

/* Warm gray presentation trays with white cards, as in the reference. */
[data-purpose="leasing-flow-diagram"],
[data-bm-panel="tray"],
[data-purpose="portfolio-dashboard"] > .container > .glass-card,
[data-purpose="facilities-maintenance"] .glass-card,
[data-purpose="real-estate-marketing"] .glass-card,
[data-purpose="how-we-work"] .glass-card,
[data-purpose="dark-mode-map"] {
  background: var(--bm-light-panel) !important;
  border-color: var(--bm-light-line) !important;
  box-shadow: none !important;
}

[data-purpose="services-section"] .service-twotone-icon { color: #646159; }
[data-purpose="services-section"] .service-number { color: #ff7f32; }
[data-purpose="services-section"] .glass-card { border: 1px solid #edeae3 !important; }
[data-purpose="why-brickmark"] .glass-card { border-radius: .75rem; }

:where([data-bm-surface="light"]) :is(.text-emerald-400, .text-emerald-500):not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) { color: #138765 !important; }
:where([data-bm-surface="light"]) .text-sky-400:not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) { color: #167aa0 !important; }
:where([data-bm-surface="light"]) :is(.text-amber-300, .text-amber-400):not(:where([data-bm-surface="dark"], [data-bm-surface="dark"] *)) { color: #94630c !important; }

[data-purpose="dark-mode-map"] [data-map-filter][aria-pressed="false"] {
  background: #fff !important;
  color: var(--bm-light-muted) !important;
}
[data-purpose="dark-mode-map"] [data-map-filter][aria-pressed="true"] { color: #fff !important; }
#roles-vertical-list .role-list-row:hover { background: #eeece5; }
#roles-vertical-list .role-row-text.font-bold { color: #262622 !important; }

/* The contact card stays charcoal against a light section. */
[data-purpose="request-management"] [data-bm-surface="dark"] {
  background: #191917;
  border-color: #33312b;
  box-shadow: 0 18px 45px rgb(36 31 21 / 16%);
}
[data-bm-surface="dark"] { color-scheme: dark; color: #fff; }

[data-bm-surface="light"] .form-control,
[data-bm-surface="light"] .form-select {
  --bs-body-color: #262622;
  --bs-body-bg: #fff;
}
[data-bm-surface="light"] .form-control:focus,
[data-bm-surface="light"] .form-select:focus {
  border-color: #ff7f32 !important;
  box-shadow: 0 0 0 .2rem rgb(255 127 50 / 16%) !important;
}
[data-bm-surface="light"] .form-control::placeholder { color: #777269; }

[data-purpose="site-footer"][data-bm-surface="light"] { background: #f4f3ef !important; }
[data-purpose="site-footer"] a:hover { color: #b64c0b !important; }

/* Keyboard focus remains visible on both palettes. */
/* Keep the entire role orbit readable on cream, including its shaded side. */
[data-purpose="who-we-serve-app"] .role-orbit-border::before {
  background: conic-gradient(
    from 20deg,
    #dca77f,
    #d98245 80deg,
    #dca77f 165deg,
    #cfa58a 245deg,
    #dca77f
  );
}

[data-purpose="maintenance-providers-section"] .bm-provider-lifecycle {
  background: var(--bm-light-panel) !important;
  border-color: #dedbd2 !important;
  box-shadow: none !important;
}
.bm-provider-lifecycle .provider-flow-step {
  background: #fff !important;
  border-color: #dedbd2 !important;
}
.bm-provider-lifecycle .provider-flow-step [id^="flow-circle-"] {
  background: #f1efea !important;
  border-color: #e5e1d8 !important;
  color: #716e66 !important;
}
.bm-provider-lifecycle .provider-flow-step [id^="flow-text-"] {
  color: #57544c !important;
}
.bm-provider-lifecycle .provider-flow-step[data-state="active"] {
  background: #fff0e5 !important;
  border-color: #ff7f32 !important;
}
.bm-provider-lifecycle .provider-flow-step[data-state="active"] [id^="flow-circle-"] {
  background: #ff7f32 !important;
  border-color: #ff7f32 !important;
  color: #fff !important;
}
.bm-provider-lifecycle .provider-flow-step[data-state="completed"] {
  background: #fff8f1 !important;
  border-color: #efc7ab !important;
}
.bm-provider-lifecycle .provider-flow-step[data-state="completed"] [id^="flow-circle-"] {
  background: #ffe0c9 !important;
  border-color: #efc7ab !important;
  color: #94420f !important;
}
.bm-provider-lifecycle .bm-provider-track { background: #d7d2c7 !important; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid #ff7f32;
  outline-offset: 4px;
}
