/* ============================================================
   BLC — Body Language Curriculum
   Shared design system
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Core */
  --bg-deep:        #07071a;
  --bg:             #0a0a1f;
  --bg-elev:        #11112a;
  --bg-elev-2:      #181838;
  --line:           rgba(255,255,255,0.08);
  --line-strong:    rgba(255,255,255,0.16);

  /* Kingdoms */
  --ibm:            #2563EB;   /* Timing — royal blue */
  --ibm-glow:       #60A5FA;
  --pcr:            #DB2777;   /* Framing — magenta */
  --pcr-glow:       #F472B6;
  --eos:            #7C3AED;   /* Grounding — purple */
  --eos-glow:       #A78BFA;
  --gold:           #F59E0B;   /* CTAs/highlights */
  --gold-soft:      #FBBF24;
  --cyan:           #22D3EE;

  /* Text */
  --text:           #F8FAFC;
  --text-mute:      #94A3B8;
  --text-dim:       #64748B;

  /* Glass */
  --glass:          rgba(255,255,255,0.04);
  --glass-strong:   rgba(255,255,255,0.07);
  --glass-border:   rgba(255,255,255,0.10);

  /* Layout */
  --radius:         14px;
  --radius-sm:      8px;
  --radius-lg:      22px;
  --maxw:           1280px;

  /* Fonts */
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --serif: 'Instrument Serif', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg-deep);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: inherit; }

/* ============================================================
   Background atmosphere — starfield + aurora
   ============================================================ */

.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(124,58,237,0.25), transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 40%, rgba(219,39,119,0.12), transparent 60%),
    radial-gradient(ellipse 50% 50% at 0% 80%, rgba(37,99,235,0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 100%);
  overflow: hidden;
}
.bg-stage::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 23% 12%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 67% 31%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 14% 67%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 88% 78%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 45% 89%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 92% 18%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 34% 44%, rgba(255,255,255,0.5), transparent),
    radial-gradient(2px 2px at 76% 56%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 6% 30%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 58% 7%, rgba(255,255,255,0.5), transparent);
  background-size: 100% 100%;
  opacity: 0.7;
  animation: starshift 60s linear infinite;
}
@keyframes starshift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-40px); }
}

/* ============================================================
   Layout primitives
   ============================================================ */

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before {
  content: ''; width: 18px; height: 1px; background: var(--text-mute);
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6vw, 84px); font-weight: 500; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4vw, 56px); }
h3 { font-size: clamp(22px, 2vw, 28px); }
p  { margin: 0; text-wrap: pretty; }

.serif { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: #1a1003;
  box-shadow: 0 0 0 0 rgba(245,158,11,0.5), 0 10px 30px -8px rgba(245,158,11,0.5);
}
.btn-primary:hover { background: var(--gold-soft); box-shadow: 0 0 0 6px rgba(245,158,11,0.12), 0 14px 40px -8px rgba(245,158,11,0.6); }
.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(20px);
}
.btn-ghost:hover { background: var(--glass-strong); border-color: var(--line-strong); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn .arr { transition: transform .2s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,7,26,0.7);
  backdrop-filter: blur(24px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -0.02em;
}
.brand-logo {
  height: 30px;
  width: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  flex-shrink: 0;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 30%, var(--pcr-glow), var(--pcr) 40%, var(--eos) 100%);
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 0 24px -4px rgba(219,39,119,0.5);
}
.brand-mark::after {
  content: ''; position: absolute; inset: 6px;
  border-radius: 4px;
  background: var(--bg-deep);
  clip-path: polygon(50% 8%, 92% 92%, 8% 92%);
}
.brand-name { font-size: 17px; }
.brand-name b { font-weight: 700; }
.brand-sub { font-family: var(--mono); font-size: 11px; color: var(--text-mute); margin-left: 4px; font-weight: 400; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-mute);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: var(--glass); }
.nav-links a.active { color: var(--text); background: var(--glass-strong); }

.nav-cta { display: flex; align-items: center; gap: 10px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: var(--text-mute); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--text-dim);
  font-family: var(--mono);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Cards / panels
   ============================================================ */

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
}
.panel {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 28px;
}

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-mute);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.ibm { color: var(--ibm-glow); border-color: rgba(96,165,250,0.3); background: rgba(37,99,235,0.08); }
.tag.pcr { color: var(--pcr-glow); border-color: rgba(244,114,182,0.3); background: rgba(219,39,119,0.08); }
.tag.eos { color: var(--eos-glow); border-color: rgba(167,139,250,0.3); background: rgba(124,58,237,0.08); }
.tag.gold { color: var(--gold); border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.08); }
.tag.cyan { color: var(--cyan); border-color: rgba(34,211,238,0.3); background: rgba(34,211,238,0.08); }

/* Decorative diamond glow (riff on triangle visuals) */
.glow-diamond {
  position: relative;
  display: inline-block;
}
.glow-diamond::before {
  content: '';
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, var(--c, var(--eos)) 0%, transparent 60%);
  opacity: 0.4;
  filter: blur(40px);
  z-index: -1;
}

/* ============================================================
   Utility
   ============================================================ */
.hide-mobile { }
@media (max-width: 720px) { .hide-mobile { display: none !important; } }
.mono { font-family: var(--mono); }
.muted { color: var(--text-mute); }
.dim   { color: var(--text-dim); }
.gold  { color: var(--gold); }
#dev-placeholder { display: none; }
.flex { display: flex; }
.center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

/* Prevent FOUC for DB-managed content: hidden until fetch resolves or fails */
[data-content-key] { opacity: 0; }
