/* HJ premium visual foundation
   Shared, archetype-aware finishing layer for every canonical page.
   Layout-specific composition remains owned by each page-family stylesheet. */

:root {
  --hj-navy-1000: #02050b;
  --hj-navy-975: #040812;
  --hj-navy-950: #050a14;
  --hj-navy-925: #080e1a;
  --hj-navy-900: #0a101d;
  --hj-navy-850: #0e1726;
  --hj-navy-800: #142033;
  --hj-line: rgba(203, 226, 255, .13);
  --hj-line-soft: rgba(203, 226, 255, .07);
  --hj-line-strong: rgba(203, 226, 255, .22);
  --hj-cyan: #55dcff;
  --hj-cyan-bright: #8ceaff;
  --hj-cyan-soft: rgba(85, 220, 255, .105);
  --hj-cyan-line: rgba(85, 220, 255, .36);
  --hj-white: #f8fbff;
  --hj-text: #e5edf8;
  --hj-muted: #a8b5c9;
  --hj-dim: #7d8da6;
  --hj-surface: rgba(11, 18, 31, .88);
  --hj-surface-raised: rgba(16, 26, 43, .9);
  --hj-surface-soft: rgba(255, 255, 255, .025);
  --hj-max: 1200px;
  --hj-radius-lg: 16px;
  --hj-radius-md: 11px;
  --hj-control-radius: 10px;
  --hj-shadow: 0 26px 70px rgba(0, 0, 0, .38);
  --hj-shadow-soft: 0 14px 38px rgba(0, 0, 0, .2);
  --hj-space-section: clamp(3rem, 5vw, 4.75rem);
  --hj-reading: 72ch;
}

html {
  color-scheme: dark;
  scrollbar-color: rgba(85, 220, 255, .34) var(--hj-navy-950);
  scrollbar-width: thin;
}

body[data-hj-archetype] {
  min-width: 0;
  color: var(--hj-text);
  background-color: var(--hj-navy-950);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-kerning: normal;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body[data-hj-archetype]::selection,
body[data-hj-archetype] *::selection {
  color: #031019;
  background: var(--hj-cyan-bright);
}

body[data-hj-archetype] :where(h1, h2, h3, h4) {
  color: var(--hj-white);
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-kerning: normal;
  text-wrap: balance;
}

body[data-hj-archetype] :where(h1, h2) {
  letter-spacing: -.035em;
}

body[data-hj-archetype] :where(p, li, dd) {
  text-wrap: pretty;
}

body[data-hj-archetype] :where(.pc-lead, .hero-subtitle, .hj-hub-hero-copy > p, .hj-home-hero-copy > p) {
  max-width: var(--hj-reading);
  color: var(--hj-muted);
  line-height: 1.72;
}

body[data-hj-archetype] :where(.pc-hero h1, .hero h1, .hj-hub-hero h1, .hj-home-hero h1) {
  font-size: clamp(2.3rem, 5.2vw, 4.05rem);
  line-height: .99;
  letter-spacing: -.048em;
}

body[data-hj-archetype] :where(.pc-section-head h2, .section-head h2, .hj-section-head h2) {
  font-size: clamp(1.75rem, 3.8vw, 2.7rem);
  line-height: 1.06;
}

body[data-hj-archetype] :where(.pc-eyebrow, .eyebrow, .hj-section-kicker) {
  color: var(--hj-cyan);
  letter-spacing: .115em;
}

body[data-hj-archetype] :where(.pc-section, .hj-section) {
  padding-block: var(--hj-space-section);
}

body[data-hj-archetype] :where(.pc-section--alt, .hj-section--alt, .section-alt) {
  background-color: var(--hj-navy-925);
  background-image: linear-gradient(180deg, rgba(18, 30, 49, .42), rgba(5, 10, 20, .38));
}

body[data-hj-archetype] :where(.pc-container, .container, .hj-container) {
  width: min(calc(100% - 40px), var(--hj-max));
  margin-inline: auto;
  min-width: 0;
}

/* Remove the legacy always-on spectacle. Motion is reserved for user intent. */
body[data-hj-archetype] :where(.accent),
body[data-hj-archetype] :where(.meteor),
body[data-hj-archetype] :where(.section-alt, .page-intro, .cta-band)::before {
  animation: none !important;
}

body[data-hj-archetype] :where(a, button, input, select, textarea, summary) {
  font: inherit;
}

body[data-hj-archetype] :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--hj-cyan-bright);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(85, 220, 255, .11);
}

body[data-hj-archetype] :where(input, select, textarea) {
  color: var(--hj-text);
  border-color: var(--hj-line-strong);
  border-radius: var(--hj-control-radius);
  background-color: rgba(2, 7, 15, .78);
  caret-color: var(--hj-cyan);
}

body[data-hj-archetype] :where(input, textarea)::placeholder {
  color: var(--hj-dim);
  opacity: 1;
}

body[data-hj-archetype] :where(.btn, .pc-button, .hj-shell-cta, .sm-cta) {
  min-height: 46px;
  border-radius: var(--hj-control-radius);
  letter-spacing: -.005em;
  text-decoration: none;
}

body[data-hj-archetype] :where(.pc-button--primary, .btn-primary) {
  color: #031019;
  border-color: var(--hj-cyan);
  background-color: var(--hj-cyan);
  box-shadow: 0 10px 26px rgba(21, 172, 211, .16);
}

body[data-hj-archetype] :where(.pc-button--primary, .btn-primary):hover {
  color: #020c13;
  border-color: var(--hj-cyan-bright);
  background-color: var(--hj-cyan-bright);
}

body[data-hj-archetype] :where(.btn-outline, .pc-button:not(.pc-button--primary)) {
  border-color: var(--hj-line-strong);
  background-color: rgba(255, 255, 255, .018);
}

body[data-hj-archetype] :where(.btn-outline, .pc-button:not(.pc-button--primary)):hover {
  border-color: var(--hj-cyan-line);
  background-color: var(--hj-cyan-soft);
}

body[data-hj-archetype] :where(.card, .pc-card, .decision-card, .function-card, .tier-card, .related-card, .solution-entry-card) {
  border-color: var(--hj-line);
  border-radius: var(--hj-radius-lg);
  box-shadow: var(--hj-shadow-soft);
}

body[data-hj-archetype] :where(.pc-boundary, .hj-role-panel, .cta-panel) {
  border-color: var(--hj-cyan-line);
  border-radius: var(--hj-radius-lg);
  background-color: var(--hj-surface);
  box-shadow: var(--hj-shadow-soft);
}

body[data-hj-archetype] :where(.pc-breadcrumb, .breadcrumb) {
  color: var(--hj-dim);
  font-size: .78rem;
  letter-spacing: .01em;
}

body[data-hj-archetype] :where(.pc-breadcrumb, .breadcrumb) a:hover {
  color: var(--hj-cyan-bright);
}

body[data-hj-archetype] :where(.pc-jumps, .hj-jump-nav) {
  border-color: var(--hj-line);
  background-color: rgba(5, 10, 20, .9);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .14);
}

body[data-hj-archetype] :where(.pc-jump-list a, .hj-jump-nav a) {
  border-color: var(--hj-line);
  border-radius: 8px;
}

body[data-hj-archetype] :where(.site-header.hj-shell-header) {
  background-color: rgba(4, 8, 18, .9);
  border-bottom-color: var(--hj-line);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .18);
}

body[data-hj-archetype] :where(.hj-shell-popover, .hj-mobile-panel) {
  border-color: var(--hj-line-strong);
  background-color: rgba(4, 8, 18, .98);
  box-shadow: var(--hj-shadow);
}

body[data-hj-archetype] :where(.site-footer, .hj-shell-footer) {
  border-top-color: var(--hj-line);
  background-color: var(--hj-navy-1000);
}

body[data-hj-archetype] :where(table) {
  border-color: var(--hj-line);
}

body[data-hj-archetype] :where(th) {
  color: var(--hj-white);
  background-color: rgba(85, 220, 255, .055);
}

body[data-hj-archetype] :where(td, th) {
  border-color: var(--hj-line);
}

@media (hover: hover) and (pointer: fine) {
  body[data-hj-archetype] :where(.btn, .pc-button, .hj-shell-cta, .sm-cta, .card, .pc-card, .decision-card, .function-card, .tier-card, .related-card, .solution-entry-card) {
    transition: color .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
  }

  body[data-hj-archetype] :where(.card, .pc-card, .decision-card, .function-card, .tier-card, .related-card, .solution-entry-card):hover {
    border-color: var(--hj-line-strong);
    box-shadow: 0 18px 46px rgba(0, 0, 0, .25);
  }
}

@media (max-width: 720px) {
  :root {
    --hj-space-section: clamp(2.7rem, 12vw, 3.6rem);
    --hj-radius-lg: 14px;
  }

  body[data-hj-archetype] :where(.pc-hero h1, .hero h1, .hj-hub-hero h1, .hj-home-hero h1) {
    font-size: clamp(2.1rem, 11.2vw, 3.15rem);
    line-height: 1.01;
  }

  body[data-hj-archetype] :where(.pc-button, .btn, .hj-shell-cta, .sm-cta) {
    min-height: 48px;
  }

  body[data-hj-archetype] :where(.pc-container, .container, .hj-container) {
    width: min(calc(100% - 32px), var(--hj-max));
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }

  body[data-hj-archetype] *,
  body[data-hj-archetype] *::before,
  body[data-hj-archetype] *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --hj-line: rgba(235, 246, 255, .32);
    --hj-line-soft: rgba(235, 246, 255, .2);
    --hj-line-strong: rgba(235, 246, 255, .46);
    --hj-muted: #c9d5e5;
    --hj-dim: #aab9cd;
  }
}
