/* BLUEXIS™ — INSTITUTIONAL PSYCHOLOGICAL EXPERIENCE LAYER
   Purpose: unify the public experience around calm authority, human clarity,
   cognitive ease and decision confidence without changing the 10++ domain model.
*/

:root {
  --bx-paper: #0B0E12;
  --bx-surface: #15191E;
  --bx-line: #2A323A;
  --bx-gold: #C7B198;
  --bx-ink: #E0E5E9;
  --bx-muted: #8D98A1;
  --bx-paper-warm: #F4F1E9;
  --bx-ink-warm: #171A1C;
}

/* One institutional surface language. */
body:has(.home-page),
body:has(.start-situation-page),
body:has(.home-page) main,
body:has(.start-situation-page) main {
  background: var(--bx-paper);
}

body:has(.home-page) h1,
body:has(.home-page) h2,
body:has(.home-page) h3,
body:has(.start-situation-page) h1,
body:has(.start-situation-page) h2,
body:has(.start-situation-page) h3 {
  text-wrap: balance;
}

/* The public site should feel spacious, not empty. */
.home-page .home-hero > .relative.mx-auto {
  min-height: min(760px, calc(100vh - 76px));
  display: flex;
  align-items: center;
}

.home-page .home-hero h1 {
  max-width: 920px;
}

.home-page .home-hero p {
  max-width: 690px;
}

.home-page .home-hero-diagram {
  opacity: .88;
  transform: translateY(4px);
}

.home-page .home-architecture > div {
  transition: background-color .2s ease, border-color .2s ease;
}

.home-page .home-architecture > div:hover {
  background: rgba(199,177,152,.025);
}

/* Human recognition should precede technical explanation. */
.home-page .home-paper-section {
  position: relative;
}

.home-page .home-paper-section::before {
  content: "THE REALITY OF REDEVELOPMENT";
  display: block;
  position: absolute;
  top: 0;
  left: max(24px, calc((100vw - 1480px) / 2));
  transform: translateY(-50%);
  padding: 0 10px;
  background: var(--bx-paper);
  color: var(--bx-gold);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .24em;
}

/* Unify legacy dark pages with the homepage's calmer institutional rhythm. */
body:has(.min-h-screen.bg-\[\#060913\]) .min-h-screen.bg-\[\#060913\],
body:has(.min-h-screen.bg-\[\#0B0E12\]) .min-h-screen.bg-\[\#0B0E12\] {
  background: var(--bx-paper) !important;
  color: var(--bx-ink) !important;
}

body:has(.min-h-screen.bg-\[\#060913\]) .min-h-screen.bg-\[\#060913\] > section,
body:has(.min-h-screen.bg-\[\#0B0E12\]) .min-h-screen.bg-\[\#0B0E12\] > section {
  border-color: var(--bx-line) !important;
}

body:has(.min-h-screen.bg-\[\#060913\]) .min-h-screen.bg-\[\#060913\] > section:first-of-type,
body:has(.min-h-screen.bg-\[\#0B0E12\]) .min-h-screen.bg-\[\#0B0E12\] > section:first-of-type {
  padding-top: clamp(104px, 11vw, 152px);
  padding-bottom: clamp(72px, 8vw, 112px);
}

/* Reduce the feeling of a SaaS dashboard: cards become quiet information fields. */
body:has(.min-h-screen.bg-\[\#060913\]) .bg-\[\#0A0F1D\],
body:has(.min-h-screen.bg-\[\#060913\]) .bg-\[\#070B14\],
body:has(.min-h-screen.bg-\[\#060913\]) .bg-\[\#070C18\],
body:has(.min-h-screen.bg-\[\#060913\]) .bg-\[\#070A11\],
body:has(.min-h-screen.bg-\[\#0B0E12\]) .bg-\[\#15191E\] {
  box-shadow: none !important;
}

/* Make the governing architecture read as a framework, not eight product cards. */
body:has(.min-h-screen.bg-\[\#060913\]) .grid.md\:grid-cols-2.lg\:grid-cols-4 > div {
  border-color: var(--bx-line);
}

/* Editorial reading: less compression, better comprehension. */
body:has(.min-h-screen.bg-\[\#060913\]) p,
body:has(.min-h-screen.bg-\[\#0B0E12\]) p {
  text-wrap: pretty;
}

body:has(.min-h-screen.bg-\[\#060913\]) .font-serif,
body:has(.min-h-screen.bg-\[\#0B0E12\]) .font-serif {
  letter-spacing: -.012em;
}

/* Start is an institutional conversation, not a lead form. */
.start-situation-page .max-w-4xl.mx-auto {
  max-width: 980px;
}

.start-situation-page section:last-of-type {
  background: rgba(21,25,30,.35);
}

.start-situation-page button,
.start-situation-page input,
.start-situation-page textarea,
.start-situation-page select {
  border-radius: 0 !important;
}

/* Calls to action should feel like deliberate next actions, never sales buttons. */
.cta-primary,
.cta-secondary {
  min-height: 48px;
}

.cta-primary:focus-visible,
.cta-secondary:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 1px solid var(--bx-gold);
  outline-offset: 3px;
}

/* Mobile: preserve authority without creating intimidation or excessive density. */
@media (max-width: 767px) {
  .home-page .home-hero > .relative.mx-auto {
    min-height: auto;
    display: block;
  }

  .home-page .home-hero {
    padding-top: 8px;
  }

  .home-page .home-hero h1 {
    font-size: clamp(3rem, 14vw, 4.4rem);
  }

  .home-page .home-paper-section::before {
    left: 18px;
    font-size: 7px;
  }

  body:has(.min-h-screen.bg-\[\#060913\]) .min-h-screen.bg-\[\#060913\] > section:first-of-type,
  body:has(.min-h-screen.bg-\[\#0B0E12\]) .min-h-screen.bg-\[\#0B0E12\] > section:first-of-type {
    padding-top: 96px;
    padding-bottom: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
