/* ═══════════════════════════════════════════════════════════════════════════
   Intellicapital Advisors — shared site chrome & primitives
   Exported from the DC prototypes (design/): SiteHeader, SiteFooter, WealthChat.
   Register: cream paper body, navy chrome, gold accents. Light only.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Fonts ─────────────────────────────────────────────────────────────────
   Variable TTFs, vendored. Fraunces is referenced only on Home / BAFAos /
   Health Score / Journeys, so browsers fetch it only there. */
@font-face { font-family: 'Cormorant'; src: url('/fonts/CormorantGaramond-VariableFont_wght.ttf') format('truetype-variations'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('/fonts/CormorantGaramond-Italic-VariableFont_wght.ttf') format('truetype-variations'); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/fonts/EBGaramond-VariableFont_wght.ttf') format('truetype-variations'); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'EB Garamond'; src: url('/fonts/EBGaramond-Italic-VariableFont_wght.ttf') format('truetype-variations'); font-weight: 400 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/JetBrainsMono-VariableFont_wght.ttf') format('truetype-variations'); font-weight: 100 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/Fraunces-VariableFont_SOFT_WONK_opsz_wght.ttf') format('truetype-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/Fraunces-Italic-VariableFont_SOFT_WONK_opsz_wght.ttf') format('truetype-variations'); font-weight: 100 900; font-style: italic; font-display: swap; }

/* ── Tokens (design system, CLAUDE.md) ───────────────────────────────────── */
:root {
  color-scheme: light only;
  --paper: #F5EEDD;
  --paper-soft: #EFE6D0;
  --paper-deep: #E4D9BE;
  --paper-faint: #FAF4E6;
  --edge: #D4C6A5;
  --ink: #141019;
  --ink-soft: #2A2520;
  --ink-mute: #534838;
  --ink-caption: #6A5E4E;
  --navy: #14213E;
  --navy-deep: #0C162A;
  --gold: #9C7C32;        /* display gold — italic ems, numerals, dashes */
  --gold-bright: #C9A957; /* navy-register gold — logo family, chrome accents */
  --gold-text: #735A0E;   /* links / AA small text on paper */
  --gold-faint: #E8D9A8;
  --burgundy: #5A1D20;
  --rule: rgba(20, 16, 25, 0.14);
  --rule-soft: rgba(20, 16, 25, 0.07);
  --rule-gold: rgba(168, 134, 58, 0.28);
  /* status ramp — paper register */
  --ok: #5C6B3F; --watch: #8A6D1E; --risk: #5A1D20;
  /* status ramp — navy register */
  --ok-navy: #9FB07A; --watch-navy: #D8B24A; --risk-navy: #D67478;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
html, body { margin: 0; padding: 0; background: #F5EEDD; }
a { color: #735A0E; }
a:hover { color: #141019; }
::selection { background: #E8D9A8; }
:focus-visible { outline: 2px solid #9C7C32; outline-offset: 3px; border-radius: 1px; }

/* Page body wrapper — every page's content sits inside one of these. */
.ic-page { background: #F5EEDD; color: #141019; font-family: 'EB Garamond', Garamond, serif; font-size: 17.5px; line-height: 1.65; -webkit-font-smoothing: antialiased; }

/* Skip link */
.ic-skip { position: absolute; left: 12px; top: -64px; z-index: 200; background: #C9A957; color: #0C162A; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; padding: 11px 18px; text-decoration: none; border-radius: 2px; transition: top .18s; }
.ic-skip:focus { top: 10px; }

/* ── Shared primitives ─────────────────────────────────────────────────────── */
/* Navy CTA button */
.ic-btn { white-space: nowrap; display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: #F5EEDD; background: #14213E; text-decoration: none; padding: 18px 34px; border-radius: 2px; border: none; cursor: pointer; transition: background .18s; }
.ic-btn:hover { background: #0C162A; color: #F5EEDD; }

/* Quiet underline link (mono microtext) */
.ic-quiet-link { font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: #735A0E; text-decoration: none; border-bottom: 1px solid rgba(168, 134, 58, 0.5); padding-bottom: 3px; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; }
.ic-quiet-link:hover { color: #141019; border-bottom-color: #141019; }

/* Form field (Contact, Journal signup, Login) */
.ic-field { box-sizing: border-box; width: 100%; background: #FAF4E6; border: 1px solid rgba(20, 16, 25, 0.2); color: #141019; font-family: 'EB Garamond', Garamond, serif; font-size: 16.5px; padding: 14px 16px; outline: none; border-radius: 2px; transition: border-color .18s; }
.ic-field:focus { border-color: #9C7C32; }
.ic-field::placeholder { color: #6A5E4E; }

/* Mobile tracking reduction — replaces the prototype's
   [style*="letter-spacing: …"] attribute selectors (audit A7). Apply the class
   matching the element's desktop letter-spacing. */
.ic-ls-40 { letter-spacing: 0.4em; }
.ic-ls-34 { letter-spacing: 0.34em; }
.ic-ls-32 { letter-spacing: 0.32em; }
.ic-ls-28 { letter-spacing: 0.28em; }
@media (max-width: 660px) {
  .ic-ls-40 { letter-spacing: 0.22em; }
  .ic-ls-34 { letter-spacing: 0.22em; }
  .ic-ls-32 { letter-spacing: 0.2em; }
  .ic-ls-28 { letter-spacing: 0.18em; }
  .ic-dash40 { display: none !important; }
}

/* ═══ HEADER ═══════════════════════════════════════════════════════════════ */
.ic-header { background: #0C162A; font-family: 'EB Garamond', Garamond, serif; }

.ic-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 9px clamp(20px, 3.5vw, 48px); border-bottom: 1px solid rgba(245, 238, 221, 0.12); font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(245, 238, 221, 0.55); }
.ic-topbar > :first-child, .ic-topbar > :last-child { white-space: nowrap; }
.ic-topbar-gold { color: #C9A957; }

.ic-mainbar { display: flex; justify-content: space-between; align-items: center; gap: clamp(14px, 2vw, 28px); flex-wrap: wrap; padding: 18px clamp(20px, 3.5vw, 48px); border-bottom: 1px solid rgba(201, 169, 87, 0.45); }
.ic-logo-link { display: block; text-decoration: none; }
.ic-logo { height: 50px; width: auto; display: block; }

.ic-nav { display: flex; align-items: baseline; gap: clamp(14px, 1.8vw, 26px); flex-wrap: wrap; }
.ic-nav-link { font-size: 16px; color: rgba(245, 238, 221, 0.85); text-decoration: none; border-bottom: 1px solid transparent; padding-bottom: 2px; transition: color .18s, border-color .18s; }
.ic-nav-link:hover { color: #C9A957; border-bottom: 1px solid rgba(201, 169, 87, 0.6); }
.ic-nav-link.is-active { color: #C9A957; font-style: italic; border-bottom: 1px solid rgba(201, 169, 87, 0.7); }
.ic-nav-caret { font-size: 10px; color: #C9A957; font-style: normal; }

/* About dropdown */
.ic-about { position: relative; padding-bottom: 20px; margin-bottom: -20px; }
.ic-about-menu { display: none; position: absolute; top: 100%; left: -16px; min-width: 212px; background: #0C162A; border: 1px solid rgba(201, 169, 87, 0.45); box-shadow: 0 26px 52px -26px rgba(12, 22, 42, 0.7); padding: 6px 0; z-index: 130; }
.ic-about:hover .ic-about-menu, .ic-about:focus-within .ic-about-menu { display: block; }
.ic-about-menu a { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 11px 20px; font-size: 15px; color: rgba(245, 238, 221, 0.85); text-decoration: none; white-space: nowrap; transition: color .15s, background .15s; }
.ic-about-menu a:hover { color: #C9A957; background: rgba(201, 169, 87, 0.08); }
.ic-about-menu .ic-am-num { font-family: 'JetBrains Mono', monospace; font-size: 8.5px; letter-spacing: 0.2em; color: #C9A957; }

.ic-header-right { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 22px); }
.ic-login { white-space: nowrap; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(245, 238, 221, 0.8); text-decoration: none; border-bottom: 1px solid rgba(245, 238, 221, 0.35); padding-bottom: 3px; }
.ic-login:hover { color: #C9A957; border-bottom: 1px solid rgba(201, 169, 87, 0.7); }
.ic-cta { white-space: nowrap; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: #0C162A; background: linear-gradient(135deg, #F3DC82 0%, #F5C561 18%, #CC9840 60%, #CC9840 80%, #915C1B 100%); text-decoration: none; padding: 12px 22px; border-radius: 2px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -1px 0 rgba(145, 92, 27, 0.6); transition: filter .18s; }
.ic-cta:hover { filter: brightness(1.08); color: #0C162A; }

.ic-burger { display: none; align-items: center; justify-content: center; gap: 8px; box-sizing: border-box; background: transparent; border: 1px solid rgba(245, 238, 221, 0.4); border-radius: 2px; padding: 10px 13px; cursor: pointer; font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 1; color: #F5EEDD; }

/* Mobile nav (burger menu) */
.ic-mobile-nav { display: none; border-bottom: 1px solid rgba(201, 169, 87, 0.45); background: #0C162A; padding: 4px clamp(20px, 3.5vw, 48px) 20px; flex-direction: column; }
.ic-mobile-nav.is-open { display: flex; }
.ic-mnav-item { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 2px; border-bottom: 1px solid rgba(245, 238, 221, 0.1); text-decoration: none; }
.ic-mnav-item > span:first-child { font-family: 'Cormorant', Georgia, serif; font-weight: 500; font-size: 23px; color: #F5EEDD; }
.ic-mnav-item > span:last-child { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.2em; color: #C9A957; }
.ic-mnav-sub { display: flex; gap: 20px; flex-wrap: wrap; padding: 4px 2px 12px 14px; border-bottom: 1px solid rgba(245, 238, 221, 0.1); }
.ic-mnav-sub a { font-family: 'Cormorant', Georgia, serif; font-style: italic; font-size: 17px; color: rgba(245, 238, 221, 0.8); text-decoration: none; }
.ic-mnav-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 16px; }
.ic-mnav-est { font-family: 'JetBrains Mono', monospace; font-size: 8.5px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(245, 238, 221, 0.5); }

@media (max-width: 1120px) {
  .ic-nav { display: none; }
  .ic-burger { display: inline-flex; }
}
@media (max-width: 720px) {
  .ic-topbar { display: none; }
  .ic-mainbar .ic-login { display: none; }
  .ic-logo { height: 30px; }
  .ic-mainbar { flex-wrap: nowrap; gap: 12px; padding: 13px 16px; }
  .ic-cta { padding: 10px 13px; font-size: 9px; letter-spacing: 0.14em; }
  .ic-burger { padding: 9px 11px; font-size: 12px; }
}

/* ═══ FOOTER ═══════════════════════════════════════════════════════════════ */
.ic-footer { background: #0C162A; border-top: 1px solid rgba(201, 169, 87, 0.4); font-family: 'EB Garamond', Garamond, serif; color: #F5EEDD; }
.ic-footer-inner { max-width: 1280px; margin: 0 auto; padding: 72px clamp(20px, 3.5vw, 48px) 0; }

.ic-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(28px, 4vw, 64px); }
.ic-foot-logo { height: 46px; width: auto; display: block; }
.ic-foot-tagline { font-family: 'Cormorant', Georgia, serif; font-style: italic; font-size: 19px; line-height: 1.5; color: rgba(245, 238, 221, 0.7); margin: 0 0 26px; max-width: 340px; }
.ic-foot-address { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(245, 238, 221, 0.6); line-height: 2.1; }
.ic-foot-head { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase; color: #C9A957; border-bottom: 1px solid rgba(245, 238, 221, 0.18); padding-bottom: 10px; margin-bottom: 14px; }
.ic-foot-links { display: flex; flex-direction: column; gap: 9px; }
.ic-foot-links a { font-size: 15.5px; color: rgba(245, 238, 221, 0.82); text-decoration: none; }
.ic-foot-links a:hover { color: #C9A957; }

.ic-foot-disclosure { border-top: 1px solid rgba(245, 238, 221, 0.15); margin-top: 56px; padding: 28px 0; }
.ic-foot-disclosure p { font-size: 13.5px; line-height: 1.7; color: rgba(245, 238, 221, 0.5); margin: 0; max-width: 1040px; }
.ic-foot-disclosure a { color: #C9A957; }

.ic-foot-colophon { border-top: 1px solid rgba(245, 238, 221, 0.15); display: flex; justify-content: space-between; align-items: baseline; gap: 18px; flex-wrap: wrap; padding: 20px 0 26px; }
.ic-foot-colophon > div { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(245, 238, 221, 0.65); }
.ic-foot-verify { color: rgba(245, 238, 221, 0.65); text-decoration: none; border-bottom: 1px solid rgba(201, 169, 87, 0.55); padding-bottom: 1px; }
.ic-foot-verify:hover { color: #C9A957; }
.ic-foot-legal { display: flex; gap: 22px; flex-wrap: wrap; }
.ic-foot-legal a { color: rgba(245, 238, 221, 0.65); text-decoration: none; }
.ic-foot-legal a:hover { color: #C9A957; }

@media (max-width: 880px) {
  .ic-foot-grid { grid-template-columns: repeat(2, 1fr); }
  .ic-foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .ic-foot-grid { grid-template-columns: 1fr; }
}

/* Very narrow phones — keep the header on one line at 320px. */
@media (max-width: 360px) {
  .ic-mainbar { gap: 8px !important; padding: 11px 10px !important; }
  .ic-logo { height: 24px !important; }
  .ic-cta { padding: 9px 10px !important; letter-spacing: 0.08em !important; }
  .ic-burger { padding: 8px 9px !important; }
}

/* ═══ WEALTHCHAT ═══════════════════════════════════════════════════════════ */
@keyframes wc-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes wc-blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes wc-seal-idle { 0%, 92%, 100% { transform: rotate(0deg); } 96% { transform: rotate(-4deg); } }

.wc-root { font-family: 'EB Garamond', Garamond, serif; }
.wc-dot { width: 6px; height: 6px; border-radius: 50%; background: #C9A957; display: inline-block; animation: wc-blink 1.2s infinite; }

.wc-launch { all: unset; box-sizing: border-box; cursor: pointer; width: clamp(60px, 9vw, 74px); height: clamp(60px, 9vw, 74px); display: flex; align-items: center; justify-content: center; transition: transform .2s; filter: drop-shadow(0 10px 22px rgba(90, 29, 32, 0.4)); position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(20px, 4vw, 30px); z-index: 9999; }
.wc-launch:hover { transform: scale(1.06); }
.wc-launch:hover .wc-seal { animation: none; transform: rotate(-6deg); }
.wc-launch:focus-visible { outline: 2px solid #9C7C32; outline-offset: 3px; }
.wc-seal { width: 100%; height: 100%; object-fit: contain; animation: wc-seal-idle 6s ease-in-out infinite; }
.wc-badge { position: absolute; top: 2px; right: 2px; width: 15px; height: 15px; border-radius: 50%; background: #14213E; border: 1px solid #C9A957; color: #C9A957; font-family: 'JetBrains Mono', monospace; font-size: 9px; display: flex; align-items: center; justify-content: center; }

.wc-panel { position: fixed; right: clamp(16px, 3vw, 28px); bottom: clamp(94px, 12vw, 108px); z-index: 9998; width: min(384px, calc(100vw - 32px)); height: min(560px, calc(100vh - 150px)); background: #F5EEDD; border: 1px solid rgba(201, 169, 87, 0.5); border-radius: 2px; box-shadow: 0 30px 70px -24px rgba(12, 22, 42, 0.6); display: flex; flex-direction: column; overflow: hidden; animation: wc-in 0.28s cubic-bezier(.2, .7, .2, 1); }
.wc-panel[hidden] { display: none; }

.wc-head { background: #0C162A; padding: 16px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(201, 169, 87, 0.4); }
.wc-head img { width: 38px; height: 38px; object-fit: contain; }
.wc-title { font-family: 'Cormorant', Georgia, serif; font-size: 21px; color: #F5EEDD; line-height: 1; }
.wc-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.wc-sub span:last-child { font-family: 'JetBrains Mono', monospace; font-size: 8px; letter-spacing: 0.22em; text-transform: uppercase; color: #C9A957; }
.wc-close { all: unset; box-sizing: border-box; cursor: pointer; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: rgba(245, 238, 221, 0.7); font-family: 'JetBrains Mono', monospace; font-size: 15px; }

.wc-scroll { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: #FAF4E6; }
.wc-msg { max-width: 86%; }
.wc-msg-who { font-family: 'JetBrains Mono', monospace; font-size: 7.5px; letter-spacing: 0.2em; text-transform: uppercase; color: #6A5E4E; margin-bottom: 5px; }
.wc-msg-bubble { border-radius: 2px; padding: 11px 14px; font-size: 15.5px; line-height: 1.5; white-space: pre-wrap; }
.wc-msg.user { align-self: flex-end; }
.wc-msg.user .wc-msg-who { text-align: right; }
.wc-msg.user .wc-msg-bubble { background: #14213E; color: #F5EEDD; border: 1px solid #14213E; }
.wc-msg.assistant { align-self: flex-start; }
.wc-msg.assistant .wc-msg-bubble { background: #F5EEDD; color: #141019; border: 1px solid rgba(20, 16, 25, 0.14); }
.wc-thinking { align-self: flex-start; background: #F5EEDD; border: 1px solid rgba(20, 16, 25, 0.14); border-radius: 2px; padding: 12px 14px; }

.wc-chips { display: flex; gap: 7px; flex-wrap: wrap; padding: 10px 14px 0; background: #FAF4E6; }
.wc-chip { all: unset; box-sizing: border-box; cursor: pointer; font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: #735A0E; border: 1px solid rgba(156, 124, 50, 0.4); padding: 7px 11px; border-radius: 2px; }
.wc-chip:hover { background: #E8D9A8; }

.wc-inputrow { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; background: #FAF4E6; border-top: 1px solid rgba(20, 16, 25, 0.1); }
.wc-input { flex: 1; box-sizing: border-box; resize: none; max-height: 96px; background: #F5EEDD; border: 1px solid rgba(20, 16, 25, 0.2); border-radius: 2px; padding: 10px 12px; font-family: 'EB Garamond', Garamond, serif; font-size: 15px; color: #141019; outline: none; }
.wc-send { all: unset; box-sizing: border-box; cursor: pointer; white-space: nowrap; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #F5EEDD; background: #14213E; padding: 12px 15px; border-radius: 2px; }
.wc-send:hover { background: #0C162A; }
.wc-legal { background: #FAF4E6; padding: 0 14px 11px; font-family: 'JetBrains Mono', monospace; font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: #6A5E4E; text-align: center; }

/* ═══ PRINT (audit E5) ═════════════════════════════════════════════════════ */
@media print {
  .ic-skip, .ic-burger, .ic-mobile-nav, .ic-cta, .wc-launch, .wc-panel { display: none !important; }
  .ic-header, .ic-footer { background: #fff !important; }
  .ic-page { background: #fff; }
}
