/* =====================================================================
 *  VABB portal · shared styles
 *  Implementing BRAIN_PORTAL_TEMPLATE_DOCTRINE_2026-06-06 (v0.1)
 *  4-element pattern:
 *    1. Top: sub-entity logo + callout + portal button (3 horizontal cards)
 *    2. Middle: Chat-with-the-VABB-Sage surface
 *    3. Below: Bulletin board of open priority items
 *    4. Footer: Cross-links + doctrine references
 *  Aesthetic: crisp technology + mystical · cream + gold on black ·
 *  Cormorant Garamond display + Inter body · cyan HUD accents.
 * ===================================================================== */

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  background: #0A0F14;
  color: #F5F0E8;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 1px 1px, rgba(0,212,255,0.10) 1px, transparent 0) 0 0 / 26px 26px,
    radial-gradient(ellipse at top, #0E1722 0%, #0A0F14 55%, #05080C 100%);
  background-attachment: fixed, fixed;
}
a { color: #5DC9E8; text-decoration: none; transition: color .15s; }
a:hover { color: #C9A84C; }

/* === GLOBAL PINNED NAV === */
:root {
  --nav-h: 48px;
  --nav-bg: rgba(10,15,20,0.92);
  --nav-border: rgba(201,168,76,0.4);
  --nav-gold: #C9A84C;
  --nav-cream: #F5F0E8;
  --nav-cyan: #5DC9E8;
}
body { padding-top: var(--nav-h) !important; }
.jbrain-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nav-border);
  display: flex; align-items: center;
  padding: 0 16px; z-index: 9999;
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
}
.jbrain-nav-brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--nav-gold); font-size: 1.05rem; font-weight: 600;
  text-decoration: none; display: flex; align-items: center; gap: 6px;
  margin-right: auto; letter-spacing: 0.01em;
}
.jbrain-nav-brand:hover { color: var(--nav-cyan); }
.jbrain-nav-links { display: flex; gap: 2px; align-items: center; }
.jbrain-nav-links a {
  color: var(--nav-cream); text-decoration: none;
  padding: 6px 12px; border-radius: 4px;
  font-size: 0.85rem;
  transition: color 0.15s, background 0.15s;
}
.jbrain-nav-links a:hover { color: var(--nav-gold); background: rgba(201,168,76,0.1); }
.jbrain-nav-links a.current { color: var(--nav-gold); background: rgba(201,168,76,0.12); font-weight: 600; }
.jbrain-nav-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--nav-cyan); margin-right: 4px; vertical-align: 1px;
  box-shadow: 0 0 6px var(--nav-cyan);
  animation: jbrain-pulse 2s ease-in-out infinite;
}
@keyframes jbrain-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
@media (max-width: 500px) {
  .jbrain-nav-brand { font-size: 0.95rem; }
  .jbrain-nav-links a { padding: 6px 8px; font-size: 0.8rem; }
  .jbrain-nav-brand .jbrain-brand-full { display: none; }
}

/* === HERO === */
.hero { max-width: 980px; margin: 0 auto; padding: 48px 24px 8px; text-align: center; }
.eyebrow {
  font-family: 'Inter', sans-serif; font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase;
  color: #5DC9E8; font-weight: 600; margin-bottom: 14px; opacity: 0.85;
}
.eyebrow::before, .eyebrow::after {
  content: ""; display: inline-block; width: 32px; height: 1px;
  background: rgba(0,212,255,0.4); vertical-align: middle; margin: 0 12px;
}
h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(36px, 6vw, 58px); font-weight: 600;
  color: #F5F0E8; letter-spacing: 0.4px; line-height: 1.05;
  margin-bottom: 16px;
}
h1 .accent { color: #C9A84C; }
.tagline {
  color: #9A958E; font-size: 15px; letter-spacing: 0.2px;
  max-width: 720px; margin: 0 auto 6px; line-height: 1.6;
}
.tagline .cy { color: #5DC9E8; }
.role-line {
  font-family: 'Inter', sans-serif; font-size: 12px;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: #9A958E; margin-top: 16px; opacity: 0.7;
}
.role-line .gold { color: #C9A84C; }

/* === POSTURE PANEL === */
.posture {
  max-width: 820px; margin: 30px auto 0;
  padding: 16px 22px;
  background: linear-gradient(135deg, rgba(16,22,32,0.7) 0%, rgba(10,15,20,0.85) 100%);
  border: 1px solid rgba(201,168,76,0.20);
  border-left: 3px solid #C9A84C;
  border-radius: 10px;
  font-family: 'Inter', sans-serif; font-size: 13.5px;
  line-height: 1.6; color: #B0A89C;
}
.posture .seal { color: #C9A84C; font-size: 18px; margin-right: 6px; vertical-align: -2px; }
.posture strong { color: #F5F0E8; font-weight: 600; }
.posture .quiet { display: block; margin-top: 8px; font-size: 12px; color: #7A7570; letter-spacing: 0.3px; }

/* === SECTION WRAPPER === */
.section-wrap { max-width: 1180px; margin: 48px auto 0; padding: 0 20px; }
.section-title {
  font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600;
  color: #9A958E; letter-spacing: 2px; text-transform: uppercase;
  text-align: center; margin-bottom: 26px; opacity: 0.7;
}
.section-title::before, .section-title::after {
  content: ""; display: inline-block; width: 36px; height: 1px;
  background: rgba(0,212,255,0.3); vertical-align: middle; margin: 0 12px;
}

/* === ENTITY ROW (3-card horizontal layout) === */
.entity-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}
.entity-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  background: linear-gradient(165deg, rgba(16,22,32,0.40) 0%, rgba(10,15,20,0.65) 100%);
  border: 1px solid rgba(201,168,76,0.14);
  border-radius: 14px;
  padding: 26px 22px 22px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: all 0.3s cubic-bezier(0.2,0.8,0.2,1);
  position: relative;
}
.entity-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201,168,76,0.4);
  box-shadow: 0 10px 32px rgba(201,168,76,0.12);
}

/* === LOGO FRAME (circular · v0.2 aesthetic refinement 2026-06-07) ===
 * Per BRAIN_PORTAL_TEMPLATE_DOCTRINE_2026-06-06: circular frames replace
 * the rectangular HUD-bracket treatment from v0.1. Each logo gets a
 * backdrop chosen to make IT pop, NOT a uniform cream chip. Restraint
 * over ornament. The circle does the visual work.
 * --------------------------------------------------------------------- */
.logo-frame {
  position: relative;
  width: 172px;
  height: 172px;
  margin: 6px auto 22px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  /* thin gold ring + subtle soft glow ... that's the whole frame */
  border: 1.5px solid rgba(201,168,76,0.55);
  box-shadow:
    0 0 0 4px rgba(10,15,20,0.6),
    0 0 22px rgba(201,168,76,0.10),
    0 4px 18px rgba(0,0,0,0.45);
  transition: box-shadow 0.3s cubic-bezier(0.2,0.8,0.2,1),
              border-color 0.3s cubic-bezier(0.2,0.8,0.2,1);
}
.entity-card:hover .logo-frame {
  border-color: rgba(93,201,232,0.7);
  box-shadow:
    0 0 0 4px rgba(10,15,20,0.6),
    0 0 28px rgba(93,201,232,0.20),
    0 4px 22px rgba(0,0,0,0.50);
}

/* Logo image inside the circle. v0.3 polish (2026-06-07): Jimmy asked
   for ABB + BRCF to take up more of the frame · Vantico V monogram
   sized slightly smaller to balance visual weight (the V is the
   boldest of the three marks). */
.logo-frame img {
  display: block;
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Per-entity backdrop ... chosen to make THAT logo pop. */

/* ABB CRE: navy-on-white mark. White circle makes the navy pop against
   the dark portal. v0.3 sizing: ~90% fill, was ~70%. */
.logo-frame.abbcre {
  background: #FFFFFF;
}
.logo-frame.abbcre img { max-width: 92%; max-height: 80%; }

/* Vantico: gold V monogram (cropped from full lockup) on near-black.
   v0.3 sizing: ~78%, slightly smaller than ABB/BRCF because the V is
   visually heavier and would dominate if scaled to 90%. */
.logo-frame.vantico {
  background: #0A0A0C;
}
.logo-frame.vantico img { max-width: 78%; max-height: 78%; }

/* BRCF: royal cobalt blue mark from brcfund.com. White circle makes the
   blue pop ... institutional brand register preserved. v0.3 sizing:
   ~90% fill, was ~78%. */
.logo-frame.brcf {
  background: #FFFFFF;
}
.logo-frame.brcf img { max-width: 90%; max-height: 88%; }

/* === ENTITY CALLOUT (aspirational copy beneath logo) === */
.entity-callout {
  font-size: 13.5px; line-height: 1.6;
  color: #B0A89C;
  margin-bottom: 18px;
  flex-grow: 1;
  text-align: left;
}
.entity-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px; font-weight: 600;
  color: #C9A84C; letter-spacing: 0.3px;
  margin-bottom: 4px;
  display: flex; align-items: baseline; gap: 8px;
  justify-content: center; flex-wrap: wrap;
}
.entity-tag {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px; letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #7A7570; font-weight: 500;
}
.entity-callout p { margin: 8px 0; }
.entity-callout strong { color: #F5F0E8; font-weight: 600; }

/* === PORTAL BUTTON === */
.portal-button {
  display: block;
  text-align: center;
  padding: 12px 14px;
  border: 1.5px solid #C9A84C;
  border-radius: 8px;
  color: #F5F0E8;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(201,168,76,0.04);
  transition: all 0.25s cubic-bezier(0.2,0.8,0.2,1);
  margin-top: auto;
}
.portal-button:hover {
  border-color: #5DC9E8;
  color: #5DC9E8;
  background: rgba(93,201,232,0.08);
  box-shadow: 0 0 18px rgba(93,201,232,0.18);
  letter-spacing: 1.2px;
}

/* === SAGE CHAT SURFACE === */
.sage-chat {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 26px 28px 24px;
  background: linear-gradient(160deg, rgba(16,22,32,0.65) 0%, rgba(10,15,20,0.85) 100%);
  border: 1px solid #C9A84C;
  border-radius: 14px;
  box-shadow:
    inset 0 0 32px rgba(201,168,76,0.04),
    0 6px 28px rgba(0,0,0,0.4);
  position: relative;
}
.sage-chat-header {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201,168,76,0.18);
}
.sage-chat-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 600;
  color: #C9A84C;
}
.sage-chat-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11px; letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #7A7570;
  margin-left: auto;
}
.sage-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #F1C40F; font-weight: 500;
  margin-bottom: 12px;
}
.sage-status::before {
  content: ""; display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: #F1C40F;
  box-shadow: 0 0 6px rgba(241,196,15,0.6);
  animation: jbrain-pulse 2s ease-in-out infinite;
}
.sage-chat-input-wrap {
  display: flex; gap: 10px; align-items: stretch;
  margin-top: 14px;
}
.sage-chat-input {
  flex-grow: 1;
  padding: 12px 14px;
  background: rgba(10,15,20,0.6);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 8px;
  color: #F5F0E8;
  font-family: 'Inter', sans-serif; font-size: 13px;
  outline: none;
}
.sage-chat-input::placeholder { color: #7A7570; }
.sage-chat-input:focus { border-color: #5DC9E8; box-shadow: 0 0 0 1px rgba(93,201,232,0.4); }
.sage-chat-send {
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(201,168,76,0.18) 0%, rgba(201,168,76,0.08) 100%);
  border: 1px solid #C9A84C;
  border-radius: 8px;
  color: #C9A84C;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.8px; text-transform: uppercase;
  cursor: not-allowed;
  transition: all 0.2s;
  white-space: nowrap;
}
.sage-chat-send:hover {
  background: linear-gradient(135deg, rgba(201,168,76,0.28) 0%, rgba(201,168,76,0.14) 100%);
}
.sage-chat-foot {
  margin-top: 14px;
  font-size: 11.5px; color: #7A7570;
  line-height: 1.5; font-style: italic;
}
.sage-chat-foot .cy { color: #5DC9E8; font-style: normal; font-weight: 600; }

/* === BULLETIN BOARD EMBED ===
 * Supporting layer, deliberately reduced visual weight vs the
 * entity row + sage chat above.
 */
.bulletin-wrap {
  max-width: 980px; margin: 56px auto 0; padding: 0 20px;
}
.bulletin-header {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}
.bulletin-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 600;
  color: #C9A84C; letter-spacing: 0.4px;
}
.bulletin-header .bulletin-sub {
  font-size: 11px; letter-spacing: 1.4px;
  text-transform: uppercase; color: #7A7570;
  margin-left: auto;
}
.bulletin-frame {
  width: 100%;
  height: 540px;
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 10px;
  background: rgba(10,15,20,0.4);
  overflow: hidden;
  opacity: 0.92;
}
.bulletin-frame iframe {
  width: 100%; height: 100%; border: 0; display: block;
}
.bulletin-footnote {
  margin-top: 10px;
  font-size: 11.5px; color: #7A7570;
  font-style: italic; text-align: center;
}
.bulletin-footnote a { color: #5DC9E8; }

/* === FOOTER ... cross-links === */
.crosslinks {
  max-width: 1100px; margin: 56px auto 0; padding: 0 20px;
}
.crosslinks h3 {
  font-family: 'Cormorant Garamond', serif; font-size: 16px;
  font-weight: 600; color: #9A958E; letter-spacing: 1.5px;
  text-transform: uppercase; text-align: center;
  margin-bottom: 18px; opacity: 0.65;
}
.crosslink-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.crosslink-grid a {
  display: block; padding: 11px 14px;
  background: rgba(16,22,32,0.4);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 6px;
  color: #B0A89C;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif; font-size: 13px;
}
.crosslink-grid a:hover {
  border-color: rgba(201,168,76,0.4);
  color: #C9A84C;
  background: rgba(201,168,76,0.06);
}
.crosslink-grid a .crosslink-blurb {
  display: block; margin-top: 2px;
  font-size: 11px; color: #7A7570; letter-spacing: 0.2px;
}

.footer {
  text-align: center; padding: 32px 20px 28px;
  color: #5A5550; font-size: 11px; letter-spacing: 0.4px;
  margin-top: 36px; border-top: 1px solid rgba(0,212,255,0.08);
}
.footer .sep { margin: 0 8px; color: #2A2F38; }
.footer .gold { color: #C9A84C; opacity: 0.7; }

/* === RESPONSIVE === */
@media (max-width: 960px) {
  .entity-row { grid-template-columns: 1fr; gap: 16px; }
  .logo-frame { width: 156px; height: 156px; margin: 4px auto 18px; }
  .bulletin-frame { height: 480px; }
}
@media (max-width: 620px) {
  .hero { padding: 32px 18px 4px; }
  h1 { font-size: 32px; }
  .entity-card { padding: 18px 16px 16px; }
  .sage-chat { padding: 20px 18px; }
  .sage-chat-input-wrap { flex-direction: column; }
  .crosslink-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .jbrain-nav-dot, .sage-status::before { animation: none; }
}

/* === STUB PAGE STYLES (used by sub-entity placeholder pages) === */
.stub-wrap {
  max-width: 720px; margin: 0 auto;
  padding: 80px 24px 64px;
  text-align: center;
}
.stub-eyebrow {
  font-family: 'Inter', sans-serif; font-size: 11px;
  letter-spacing: 3px; text-transform: uppercase;
  color: #5DC9E8; font-weight: 600; opacity: 0.85;
  margin-bottom: 16px;
}
.stub-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 42px; font-weight: 600; color: #F5F0E8;
  letter-spacing: 0.4px; margin-bottom: 14px;
}
.stub-title .accent { color: #C9A84C; }
.stub-msg {
  color: #B0A89C; font-size: 15px; line-height: 1.7;
  max-width: 560px; margin: 0 auto 28px;
}
.stub-msg .cy { color: #5DC9E8; font-weight: 600; }
.stub-back {
  display: inline-block; padding: 11px 22px;
  border: 1px solid #C9A84C;
  border-radius: 8px;
  color: #C9A84C; font-family: 'Inter', sans-serif;
  font-size: 12.5px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.2s;
}
.stub-back:hover {
  background: rgba(201,168,76,0.08);
  color: #5DC9E8; border-color: #5DC9E8;
}
