/* BLACK X system page hero — canonical source authority (V0.1.1).
   Templates opt in with .bx-system-hero; legacy hero selectors are intentionally absent. */

:root {
  --bx-hero-navy: #1f2a44;
  --bx-hero-ink: #070a0f;
  --bx-hero-ivory: #e8dcc8;
  --bx-hero-gold: #c6a75e;
  --bx-hero-jade: #238673;
  --bx-hero-text: #f8f5ef;
  --bx-hero-muted: rgba(232, 220, 200, 0.78);
  --bx-hero-ring: rgba(232, 220, 200, 0.15);
  --bx-hero-radius: clamp(1.15rem, 2vw, 1.85rem);
  --bx-hero-gutter: clamp(1rem, 3.4vw, 3.25rem);
}

.bx-system-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  overflow: clip;
  color: var(--bx-hero-text);
  border-block: 1px solid var(--bx-hero-ring);
  background:
    radial-gradient(circle at 14% 8%, rgba(198, 167, 94, 0.24), transparent 28%),
    radial-gradient(circle at 86% 12%, rgba(35, 134, 115, 0.23), transparent 30%),
    radial-gradient(circle at 62% 118%, rgba(232, 220, 200, 0.09), transparent 38%),
    linear-gradient(118deg, rgba(7, 10, 15, 0.99), rgba(21, 29, 47, 0.97) 48%, rgba(5, 8, 12, 0.99));
  box-shadow:
    0 1.5rem 4.5rem rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.bx-system-hero::before,
.bx-system-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.bx-system-hero::before {
  z-index: -2;
  inline-size: clamp(18rem, 48vw, 48rem);
  block-size: clamp(7rem, 15vw, 14rem);
  inset-block-start: -28%;
  inset-inline-start: 7%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(198, 167, 94, 0.28), rgba(232, 220, 200, 0.055), rgba(35, 134, 115, 0.22));
  filter: blur(3.25rem);
  opacity: 0.76;
  transform: rotate(-7deg);
  animation: bxHeroLightDrift 14s ease-in-out infinite alternate;
}

.bx-system-hero::after {
  z-index: -1;
  inline-size: clamp(15rem, 30vw, 31rem);
  aspect-ratio: 1;
  inset-inline-end: clamp(-12rem, -9vw, -6rem);
  inset-block-start: 50%;
  border: 1px solid rgba(232, 220, 200, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 2rem rgba(198, 167, 94, 0.028),
    0 0 0 4.5rem rgba(35, 134, 115, 0.02);
  transform: translateY(-50%);
}

.bx-system-hero > .container,
.bx-system-hero > .bx-system-hero__content {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: clamp(11rem, 18vw, 17rem);
  padding-block: clamp(2rem, 4vw, 4.25rem);
}

.bx-system-hero:not(:has(> .container)):not(:has(> .bx-system-hero__content)) {
  min-height: clamp(11rem, 18vw, 17rem);
  padding: clamp(2rem, 4vw, 4.25rem) var(--bx-hero-gutter);
}

.bx-system-hero--compact > .container,
.bx-system-hero--compact:not(:has(> .container)) {
  min-height: clamp(8.75rem, 13vw, 12rem);
  padding-block: clamp(1.45rem, 2.8vw, 2.7rem);
}

.bx-system-hero--dashboard,
.bx-system-hero--decision > .container,
.bx-system-hero--auth > .container,
.bx-system-hero--state > .container {
  border: 1px solid var(--bx-hero-ring);
  border-radius: var(--bx-hero-radius);
}

.bx-system-hero--dashboard {
  min-height: clamp(11rem, 18vw, 16rem);
  padding: clamp(1.6rem, 3.4vw, 3.2rem);
}

.bx-system-hero--decision,
.bx-system-hero--auth,
.bx-system-hero--state {
  display: grid;
  min-height: min(68svh, 42rem);
  padding: clamp(1rem, 3vw, 2.5rem);
  place-items: center;
}

.bx-system-hero--decision > .container,
.bx-system-hero--auth > .container,
.bx-system-hero--state > .container {
  width: min(100%, 58rem);
  min-height: 0;
  padding: clamp(1.5rem, 3.3vw, 3rem);
  background: rgba(7, 10, 15, 0.42);
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
}

.bx-system-hero--danger {
  --bx-hero-ring: rgba(220, 92, 92, 0.28);
  background:
    radial-gradient(circle at 16% 8%, rgba(185, 57, 57, 0.22), transparent 31%),
    radial-gradient(circle at 88% 18%, rgba(198, 167, 94, 0.16), transparent 30%),
    linear-gradient(118deg, rgba(13, 7, 10, 0.99), rgba(40, 19, 24, 0.96), rgba(7, 8, 12, 0.99));
}

.bx-system-hero :where(.container, .bx-system-hero__content, .copy-stack, .hero-copy, .bx-page-header__text) {
  min-width: 0;
}

.bx-system-hero :where(
  .organization-heading,
  .property-hero-grid,
  .client-hero-grid,
  .request-hero-grid,
  .request-board-heading,
  .request-profile-heading,
  .request-portal-heading,
  .deal-overview-heading,
  .deal-board-heading,
  .deal-profile-heading,
  .deal-subpage-heading,
  .deal-conversion-heading,
  .crm-hero-inner,
  .profile-hero-grid,
  .bx-page-header__inner
) {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
}

.bx-system-hero--dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
}

.bx-system-hero :where(
  .bx-page-eyebrow,
  .page-kicker,
  .vault-kicker,
  .eyebrow,
  .crm-eyebrow,
  .property-kicker,
  .client-kicker,
  .luxury-caption
) {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.7rem;
  padding: 0.34rem 0.72rem;
  border: 1px solid rgba(232, 220, 200, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--bx-hero-ivory);
  font-family: var(--font-data, var(--font-body));
  font-size: clamp(0.68rem, 1.2vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
}

.bx-system-hero :where(.bx-page-eyebrow, .page-kicker, .vault-kicker, .eyebrow)::before {
  content: "";
  flex: 0 0 auto;
  inline-size: 0.42rem;
  block-size: 0.42rem;
  border-radius: 50%;
  background: var(--bx-hero-jade);
  box-shadow: 0 0 0 0.25rem rgba(35, 134, 115, 0.12);
}

.bx-system-hero :where(h1, .bx-page-title, .page-title, .luxury-heading) {
  max-width: 24ch;
  margin: 0;
  color: var(--bx-hero-text);
  font-family: var(--font-display, var(--font-heading));
  font-size: clamp(2rem, 4.6vw, 4.75rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-shadow: 0 0.9rem 2.8rem rgba(0, 0, 0, 0.48);
}

html[dir="rtl"] .bx-system-hero :where(h1, .bx-page-title, .page-title, .luxury-heading) {
  letter-spacing: 0;
}

.bx-system-hero :where(
  .bx-page-description,
  .page-lead,
  .page-summary,
  .luxury-lead,
  .hero-text,
  .crm-hero-copy > p:not(.crm-eyebrow)
) {
  max-width: 70ch;
  margin-block: 1rem 0;
  color: var(--bx-hero-muted);
  font-size: clamp(0.96rem, 1.5vw, 1.12rem);
  line-height: 1.75;
  text-wrap: pretty;
}

.bx-system-hero :where(.action-row, .bx-page-actions, .hero-actions, .placeholder-actions, .crm-hero-actions, .bx-dashboard-command__header-actions) {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
  margin-block-start: 1.35rem;
}

.bx-system-hero :where(.action-row, .bx-page-actions, .hero-actions, .placeholder-actions, .crm-hero-actions, .bx-dashboard-command__header-actions) :where(.btn, a.btn, button.btn) {
  min-height: 2.8rem;
  max-width: 100%;
  border-radius: 999px;
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
}

.bx-system-hero :where(.btn-primary, a.btn-primary, button.btn-primary) {
  border-color: rgba(232, 220, 200, 0.24);
  background: var(--bx-hero-ivory);
  color: #111722;
}

.bx-system-hero :where(.btn-primary, a.btn-primary, button.btn-primary):hover {
  background: #f6efe4;
  color: #090d14;
}

.bx-system-hero :where(.btn-outline, .btn-ghost) {
  border-color: rgba(232, 220, 200, 0.16);
  background: rgba(255, 255, 255, 0.055);
  color: var(--bx-hero-text);
}

.bx-system-hero :where(.bx-page-meta, .meta-strip, .vault-signal-row, .client-badge-row) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-block-start: 1.35rem;
}

.bx-system-hero :where(.bx-page-meta, .meta-strip, .vault-signal-row, .client-badge-row) > * {
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(232, 220, 200, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(248, 245, 239, 0.82);
  font-size: 0.78rem;
}

.bx-system-hero :where(aside, .bx-page-context, .request-next-action, .deal-next-action, .crm-hero-summary) {
  min-width: min(100%, 16rem);
  max-width: 26rem;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid rgba(232, 220, 200, 0.13);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.045);
  color: var(--bx-hero-muted);
  backdrop-filter: blur(0.75rem);
  -webkit-backdrop-filter: blur(0.75rem);
}

.bx-system-hero :where(aside, .bx-page-context) :where(strong, h2) {
  color: var(--bx-hero-text);
}

.bx-system-hero .bx-page-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-block-end: 0.85rem;
  color: rgba(232, 220, 200, 0.68);
}

.bx-system-hero .bx-page-breadcrumbs > * + *::before {
  content: "/";
  margin-inline-end: 0.45rem;
  opacity: 0.52;
}

.bx-system-hero--landing {
  min-height: calc(100svh - var(--header-height, 4.5rem));
  display: grid;
  align-items: center;
}

.bx-system-hero--landing > .hero-grid {
  min-height: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.bx-system-hero--landing .hero-copy h1 {
  font-size: clamp(3.25rem, 8vw, 8rem);
}

.bx-system-hero--landing .hero-copy h2 {
  max-width: 18ch;
  margin: 0.7rem 0 0;
  color: var(--bx-hero-ivory);
  font-family: var(--font-display, var(--font-heading));
  font-size: clamp(1.55rem, 3.4vw, 3.3rem);
  font-weight: 500;
  line-height: 1.08;
  text-wrap: balance;
}

.bx-system-hero--landing .hero-visual {
  position: relative;
  z-index: 2;
  min-width: 0;
}

@keyframes bxHeroLightDrift {
  from { transform: translate3d(-4%, -2%, 0) rotate(-7deg) scale(0.98); opacity: 0.58; }
  to { transform: translate3d(15%, 9%, 0) rotate(-3deg) scale(1.08); opacity: 0.88; }
}

@media (max-width: 991px) {
  .bx-system-hero :where(
    .organization-heading,
    .property-hero-grid,
    .client-hero-grid,
    .request-hero-grid,
    .request-board-heading,
    .request-profile-heading,
    .request-portal-heading,
    .deal-overview-heading,
    .deal-board-heading,
    .deal-profile-heading,
    .deal-subpage-heading,
    .deal-conversion-heading,
    .crm-hero-inner,
    .profile-hero-grid,
    .bx-page-header__inner
  ),
  .bx-system-hero--dashboard,
  .bx-system-hero--landing > .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .bx-system-hero :where(aside, .bx-page-context, .request-next-action, .deal-next-action, .crm-hero-summary) {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 575px) {
  .bx-system-hero > .container,
  .bx-system-hero > .bx-system-hero__content {
    min-height: 0;
    padding-block: 1.6rem;
  }

  .bx-system-hero--dashboard {
    min-height: 0;
    padding: 1.25rem;
    border-radius: 1rem;
  }

  .bx-system-hero--decision,
  .bx-system-hero--auth,
  .bx-system-hero--state {
    min-height: auto;
    padding: 0.65rem;
  }

  .bx-system-hero :where(h1, .bx-page-title, .page-title, .luxury-heading) {
    font-size: clamp(1.75rem, 10vw, 2.7rem);
  }

  .bx-system-hero :where(.action-row, .bx-page-actions, .hero-actions, .placeholder-actions, .crm-hero-actions, .bx-dashboard-command__header-actions) {
    align-items: stretch;
  }

  .bx-system-hero :where(.action-row, .bx-page-actions, .hero-actions, .placeholder-actions, .crm-hero-actions, .bx-dashboard-command__header-actions) :where(.btn, a.btn, button.btn) {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .bx-system-hero--landing {
    min-height: auto;
  }

  .bx-system-hero--landing > .hero-grid {
    min-height: 0;
    padding-block: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bx-system-hero::before {
    animation: none;
  }
}

@media (forced-colors: active) {
  .bx-system-hero,
  .bx-system-hero :where(.btn, aside) {
    border: 1px solid CanvasText;
  }
}
