/* BackChannel — base.css
   Brand prefix: bcl
   Palette: Navy #0B1E36 / Cyan #00C9A7 / Institutional Gray-White #EDF2F7
   Typography: Inter + JetBrains Mono
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Palette */
  --bcl-navy:            #0B1E36;
  --bcl-navy-alt:        #132A4A;
  --bcl-navy-deeper:     #071627;
  --bcl-cyan:            #00C9A7;
  --bcl-cyan-aa-light:   #007A65;
  --bcl-cyan-aa-dark:    #00C9A7;

  /* Backgrounds */
  --bcl-bg-dark:         #0B1E36;
  --bcl-bg-dark-alt:     #132A4A;
  --bcl-bg-light:        #F7F9FC;
  --bcl-bg-white:        #FFFFFF;
  --bcl-bg-cream:        #F0F4EF;

  /* Foregrounds */
  --bcl-fg-dark-primary:    #EDF2F7;
  --bcl-fg-dark-secondary:  #94A3B8;
  --bcl-fg-light-primary:   #0B1E36;
  --bcl-fg-light-secondary: #4A5568;

  /* Highlight */
  --bcl-highlight:       #F5C518;

  /* Border */
  --bcl-border-dark:     rgba(255,255,255,0.08);
  --bcl-border-light:    rgba(11,30,54,0.12);

  /* Typography */
  --bcl-font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --bcl-font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --bcl-section-pad-desktop: 96px;
  --bcl-section-pad-mobile:  48px;
  --bcl-container-max:       1200px;
  --bcl-container-pad:       clamp(24px, 5vw, 80px);

  /* Transitions */
  --bcl-transition: 200ms ease;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--bcl-font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--bcl-fg-light-primary);
  background: var(--bcl-bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.bcl-dark-top {
  background: var(--bcl-bg-dark);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--bcl-font-body);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; }
h3 { font-size: clamp(18px, 2vw, 24px); font-weight: 600; }
h4 { font-size: 18px; font-weight: 600; }
h5 { font-size: 16px; font-weight: 600; }

p { line-height: 1.75; }

a {
  color: var(--bcl-cyan-aa-light);
  text-decoration: none;
  transition: color var(--bcl-transition);
}

a:hover { color: var(--bcl-cyan); }

/* Monospace — FX terminal aesthetic */
.bcl-mono, code, kbd, samp, pre {
  font-family: var(--bcl-font-mono);
}

code {
  background: rgba(0,201,167,0.08);
  border: 1px solid rgba(0,201,167,0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.875em;
}

pre {
  background: var(--bcl-bg-dark);
  color: var(--bcl-fg-dark-primary);
  border: 1px solid var(--bcl-border-dark);
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  line-height: 1.5;
  font-size: 0.9rem;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

/* ── Container ── */
.bcl-container {
  max-width: var(--bcl-container-max);
  margin: 0 auto;
  padding-left: var(--bcl-container-pad);
  padding-right: var(--bcl-container-pad);
}

/* ── Section bg themes ── */
.bcl-section--dark {
  background: var(--bcl-bg-dark);
  color: var(--bcl-fg-dark-primary);
}

.bcl-section--dark-alt {
  background: var(--bcl-bg-dark-alt);
  color: var(--bcl-fg-dark-primary);
}

.bcl-section--light {
  background: var(--bcl-bg-light);
  color: var(--bcl-fg-light-primary);
}

.bcl-section--white {
  background: var(--bcl-bg-white);
  color: var(--bcl-fg-light-primary);
}

.bcl-section--cream {
  background: var(--bcl-bg-cream);
  color: var(--bcl-fg-light-primary);
}

/* ── Eyebrow labels ── */
.bcl-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 16px;
}

.bcl-section--dark .bcl-eyebrow,
.bcl-section--dark-alt .bcl-eyebrow {
  color: var(--bcl-cyan-aa-dark);
}

.bcl-section--light .bcl-eyebrow,
.bcl-section--white .bcl-eyebrow,
.bcl-section--cream .bcl-eyebrow {
  color: var(--bcl-cyan-aa-light);
}

/* ── Utility ── */
.bcl-text-center { text-align: center; }
.bcl-text-mono   { font-family: var(--bcl-font-mono); }
.bcl-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Divider ── */
.bcl-divider {
  height: 1px;
  background: var(--bcl-border-light);
  border: none;
  margin: 0;
}

.bcl-section--dark .bcl-divider,
.bcl-section--dark-alt .bcl-divider {
  background: var(--bcl-border-dark);
}

/* ── Images ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Lists ── */
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

/* ── Table ── */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--bcl-border-light);
}

th {
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bcl-fg-light-secondary);
}

/* ── Scroll reveal ── */
.bcl-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.bcl-fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Failsafe — always visible after 600ms */
@keyframes bcl-reveal-fallback {
  to { opacity: 1; transform: none; }
}
