/* Kingdom Atmosphere 2.0 — shared visual architecture
   Safe presentation layer shared by the public site, Academy and Kingdom Study. */
:root {
  --ka-shell-bg: #f6f2e9;
  --ka-shell-surface: #fffdf9;
  --ka-shell-surface-soft: #f1ece2;
  --ka-shell-ink: #152238;
  --ka-shell-muted: #6d7480;
  --ka-shell-border: #e5ded2;
  --ka-shell-navy: #10233d;
  --ka-shell-gold: #c8952e;
  --ka-shell-gold-soft: #f4e7c8;
  --ka-shell-sage: #8da392;
  --ka-shell-radius-sm: 12px;
  --ka-shell-radius-md: 16px;
  --ka-shell-radius-lg: 22px;
  --ka-shell-shadow: 0 14px 40px rgba(20, 31, 48, .07);
  --ka-shell-shadow-hover: 0 18px 48px rgba(20, 31, 48, .11);
  --ka-shell-content: 1180px;
}

html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] {
  --ka-shell-bg: #0d1623;
  --ka-shell-surface: #121f2f;
  --ka-shell-surface-soft: #182739;
  --ka-shell-ink: #f4f1e9;
  --ka-shell-muted: #aeb7c3;
  --ka-shell-border: rgba(255,255,255,.1);
  --ka-shell-navy: #f4f1e9;
  --ka-shell-gold: #ddb966;
  --ka-shell-gold-soft: rgba(221,185,102,.15);
  --ka-shell-shadow: 0 18px 48px rgba(0,0,0,.26);
  --ka-shell-shadow-hover: 0 22px 58px rgba(0,0,0,.34);
  color-scheme: dark;
}

body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }

/* Reusable product primitives. */
.ka2-page { width: min(var(--ka-shell-content), calc(100% - 32px)); margin-inline: auto; }
.ka2-page-header { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:28px; }
.ka2-page-header h1 { margin:0; color:var(--ka-shell-ink); font-size:clamp(2rem,4vw,3.5rem); line-height:1.02; letter-spacing:-.045em; }
.ka2-page-header p { max-width:680px; margin:.7rem 0 0; color:var(--ka-shell-muted); }
.ka2-eyebrow { color:var(--ka-shell-gold); font-size:.72rem; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
.ka2-card { background:var(--ka-shell-surface); border:1px solid var(--ka-shell-border); border-radius:var(--ka-shell-radius-lg); box-shadow:var(--ka-shell-shadow); }
.ka2-card--quiet { box-shadow:none; }
.ka2-card--interactive { transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.ka2-card--interactive:hover { transform:translateY(-2px); box-shadow:var(--ka-shell-shadow-hover); border-color:color-mix(in srgb,var(--ka-shell-gold) 45%,var(--ka-shell-border)); }
.ka2-button { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; min-height:42px; padding:.68rem 1rem; border:1px solid transparent; border-radius:999px; font-weight:780; text-decoration:none; cursor:pointer; }
.ka2-button--primary { background:var(--ka-shell-navy); color:#fff; }
html[data-theme="dark"] .ka2-button--primary { background:var(--ka-shell-gold); color:#1b1508; }
.ka2-button--secondary { background:var(--ka-shell-surface); color:var(--ka-shell-ink); border-color:var(--ka-shell-border); }
.ka2-button--ghost { background:transparent; color:var(--ka-shell-muted); }
.ka2-grid { display:grid; gap:16px; }
.ka2-grid--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.ka2-list { display:grid; gap:10px; }
.ka2-list-row { display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:62px; padding:14px 16px; background:var(--ka-shell-surface); border:1px solid var(--ka-shell-border); border-radius:var(--ka-shell-radius-md); }

/* Public website shell alignment. */
.site-header { background:color-mix(in srgb,var(--ka-shell-surface) 88%,transparent)!important; border-color:var(--ka-shell-border)!important; }
.site-header .brand-mark { border-radius:12px!important; background:linear-gradient(145deg,#f1d58d,var(--ka-shell-gold))!important; }
.site-nav a { color:var(--ka-shell-muted)!important; }
.site-nav a:hover { color:var(--ka-shell-ink)!important; }
.site-nav .nav-community { background:var(--ka-shell-navy); color:#fff!important; border-color:var(--ka-shell-navy)!important; }

/* Academy and Kingdom Study use the same visual sidebar proportions. */
.academy-sidebar,
.ks-unified-sidebar { width:252px!important; }
.academy-main { margin-left:252px!important; }
.academy-sidebar,
.ks-unified-sidebar { box-shadow:none!important; }
.academy-sidebar a,
.ks-shell-nav a,
.ks-shell-footer a { min-height:44px; }

/* Reduce decorative clutter in the shared chrome. */
.sidebar-card { display:none!important; }
.academy-topbar { min-height:64px!important; }
.academy-topbar,
.ks-top { box-shadow:none!important; }

@media (max-width: 900px) {
  .ka2-page-header { align-items:flex-start; flex-direction:column; }
  .ka2-grid--3 { grid-template-columns:1fr; }
}
@media (max-width: 780px) {
  .academy-main { margin-left:0!important; }
}
@media (prefers-reduced-motion: reduce) {
  .ka2-card--interactive { transition:none; }
}
