/* ============================================================
   CRCGS — KNOWLEDGE HUB PAGE — knowledge-hub.css
   Prefix: crcgs-kh-
   Variables + reset scoped to .crcgs-kh-root — fully isolated.
   ============================================================ */

.crcgs-kh-root *,
.crcgs-kh-root *::before,
.crcgs-kh-root *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.crcgs-kh-root {
  --kh-navy:        #1D3461;
  --kh-navy-deep:   #111F3D;
  --kh-navy-mid:    #243a6e;
  --kh-gold:        #D4A84A;
  --kh-gold-light:  #E8C97A;
  --kh-gold-pale:   #f5e8c4;
  --kh-orange:      #C4572D;
  --kh-cream:       #F5EDE0;
  --kh-warm-white:  #FDFAF5;
  --kh-pearl:       #FAFAF7;
  --kh-text:        #1A1A2E;
  --kh-muted:       #6B7280;
  --kh-border:      #ddd0b8;
  --kh-border-lt:   #ece5d5;
  --kh-transition:  0.3s cubic-bezier(0.4,0,0.2,1);

  font-family: 'Spectral', Georgia, serif;
  color: var(--kh-text);
  background: var(--kh-warm-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.crcgs-kh-root h1, .crcgs-kh-root h2, .crcgs-kh-root h3 { font-family: 'Cormorant Garamond', Georgia, serif; }
.crcgs-kh-root a:focus-visible,
.crcgs-kh-root button:focus-visible { outline: 2px solid var(--kh-gold); outline-offset: 3px; }

/* ── SHARED ───────────────────────────────────────────────── */
.crcgs-kh-section-head { margin-bottom: 2rem; }
.crcgs-kh-section-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--kh-orange);
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.crcgs-kh-section-title { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 300; color: var(--kh-navy); }
.crcgs-kh-section-title em { font-style: italic; color: var(--kh-navy-mid); }

.crcgs-kh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 1.9rem;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--kh-transition);
  white-space: nowrap;
}
.crcgs-kh-btn-primary { background: var(--kh-gold); color: var(--kh-navy-deep); border-color: var(--kh-gold); }
.crcgs-kh-btn-primary:hover { background: var(--kh-gold-light); transform: translateY(-2px); }
.crcgs-kh-btn-ghost { background: transparent; color: var(--kh-warm-white); border-color: rgba(253,250,245,0.35); }
.crcgs-kh-btn-ghost:hover { border-color: var(--kh-gold); color: var(--kh-gold); }

.crcgs-kh-js .crcgs-kh-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.crcgs-kh-js .crcgs-kh-reveal.crcgs-kh-visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════════════════
   HERO  (left-aligned, compact, no vh)
════════════════════════════════════════════════════════════ */
.crcgs-kh-hero {
  position: relative;
  overflow: hidden;
  background: var(--kh-navy);
  padding: 80px clamp(20px, 6vw, 80px) 56px;
}
/* Grid-boxes background removed for a clean hero background */
.crcgs-kh-hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 55% 70% at 85% 15%, rgba(212,168,74,.10) 0%, transparent 65%);
  pointer-events: none;
}
.crcgs-kh-hero-inner { max-width: 700px; position: relative; z-index: 2; }
.crcgs-kh-hero-eyebrow {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--kh-gold);
  font-weight: 700;
  margin-bottom: 1rem;
}
.crcgs-kh-hero-title {
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  font-weight: 400;
  color: var(--kh-warm-white);
  line-height: 1.12;
  margin-bottom: 1.1rem;
}
.crcgs-kh-hero-title em { font-style: italic; font-weight: 600; color: var(--kh-gold-light); }
.crcgs-kh-hero-sub {
  font-size: 1rem;
  color: rgba(253,250,245,.7);
  max-width: 52ch;
  margin-bottom: 1.8rem;
  line-height: 1.8;
  font-weight: 300;
}
.crcgs-kh-hero-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.6rem;
  padding-top: 1.5rem;
  position: relative;
}
.crcgs-kh-stat { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; margin-right: 1.6rem; }
.crcgs-kh-stat:last-child { margin-right: 0; }
.crcgs-kh-stat-num { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 600; color: var(--kh-gold); line-height: 1; }
.crcgs-kh-stat-num--static { font-size: 1.4rem; }
.crcgs-kh-stat-lbl { font-family: 'Josefin Sans', sans-serif; font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(253,250,245,.45); }
.crcgs-kh-stat-div { width: 1px; height: 30px; background: rgba(212,168,74,.2); }

/* ════════════════════════════════════════════════════════════
   ARTICLE LIBRARY
════════════════════════════════════════════════════════════ */
.crcgs-kh-library { background: var(--kh-warm-white); padding: 3.5rem clamp(20px, 6vw, 80px); }
.crcgs-kh-library-inner { max-width: 1180px; margin: 0 auto; }

.crcgs-kh-grid { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.crcgs-kh-card {
  flex: 1 1 220px;
  max-width: 280px;
  background: var(--kh-pearl);
  border: 1px solid var(--kh-border-lt);
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: var(--kh-transition);
}
.crcgs-kh-card:hover { transform: translateY(-4px); border-color: var(--kh-gold); box-shadow: 0 14px 36px rgba(29,52,97,0.1); }
.crcgs-kh-card-icon { font-size: 1.8rem; margin-bottom: 1rem; }
.crcgs-kh-card-title { font-size: 1.1rem; font-weight: 600; color: var(--kh-navy); line-height: 1.4; margin-bottom: 0.6rem; }
.crcgs-kh-card-excerpt { font-size: 0.86rem; color: var(--kh-muted); line-height: 1.6; font-weight: 300; flex-grow: 1; margin-bottom: 1.1rem; }
.crcgs-kh-card-link {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--kh-navy-mid);
  white-space: nowrap;
}
.crcgs-kh-card:hover .crcgs-kh-card-link { color: var(--kh-orange); }
.crcgs-kh-empty-state { text-align: center; color: var(--kh-muted); font-style: italic; padding: 2rem 0; }

/* ════════════════════════════════════════════════════════════
   CLOSING CTA
════════════════════════════════════════════════════════════ */
.crcgs-kh-closing {
  background: radial-gradient(ellipse 70% 100% at 50% 0%, rgba(212,168,74,.1) 0%, transparent 60%), var(--kh-navy);
  padding: 3.5rem clamp(20px, 6vw, 80px);
  text-align: center;
  border-top: 3px solid var(--kh-gold);
}
.crcgs-kh-closing-inner { max-width: 620px; margin: 0 auto; }
.crcgs-kh-closing-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 300; color: var(--kh-warm-white); margin-bottom: 0.9rem; }
.crcgs-kh-closing-title em { font-style: italic; color: var(--kh-gold-light); }
.crcgs-kh-closing-sub { font-size: 0.94rem; color: rgba(253,250,245,.62); font-weight: 300; margin-bottom: 1.8rem; }
.crcgs-kh-closing-ctas { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .crcgs-kh-hero { padding: 64px clamp(20px,5vw,48px) 44px; }
  .crcgs-kh-library, .crcgs-kh-closing { padding: 3rem clamp(20px,5vw,48px); }
  .crcgs-kh-card { flex: 1 1 45%; }
}

@media (max-width: 600px) {
  .crcgs-kh-hero { padding: 56px 20px 36px; }
  .crcgs-kh-hero-title { font-size: 2rem; }
  .crcgs-kh-hero-sub { font-size: 0.9rem; }
  .crcgs-kh-hero-stats { flex-direction: column; gap: 0.7rem; align-items: flex-start; }
  .crcgs-kh-stat { flex-direction: row; align-items: baseline; gap: 0.5rem; margin-right: 0; }
  .crcgs-kh-stat-lbl { margin-left: 0.2rem; }
  .crcgs-kh-stat-div { display: none; }

  .crcgs-kh-library, .crcgs-kh-closing { padding: 2.4rem 20px; }
  .crcgs-kh-card { flex: 1 1 100%; max-width: 100%; }
  .crcgs-kh-closing-ctas { flex-direction: column; width: 100%; }
  .crcgs-kh-closing-ctas .crcgs-kh-btn { width: 100%; justify-content: center; }
  .crcgs-kh-section-title { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .crcgs-kh-root * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .crcgs-kh-reveal, .crcgs-kh-js .crcgs-kh-reveal { opacity: 1 !important; transform: none !important; }
}


/* ════════════════════════════════════════════════════════════
   HOME-PAGE LOGO EMBLEM + LAYOUT — same-to-same as index/about
   Two-column hero (content left, animated logo right), slow
   rotating rings, orbiting flares, twinkling particles, glow
   pulse, floating logo. Fully self-contained + responsive.
════════════════════════════════════════════════════════════ */

/* Two-column hero layout — mirrors the home page hero grid */
.crcgs-kh-hero-layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}
.crcgs-kh-hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 3rem 3rem 1rem;
  position: relative;
  z-index: 1;
  animation: crcgsHpFadeUp .7s .2s ease both;
}

/* Shortened stats divider line — anchored left, trimmed from the right */
.crcgs-kh-hero-stats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: min(400px, 62%);
  height: 1px;
  background: rgba(212,168,74,0.2);
}

.crcgs-kh-hero .crcgs-hp-hero-emblem {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1.5px solid rgba(212,168,74,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow:
    0 0 50px rgba(212,168,74,.4),
    0 0 100px rgba(212,168,74,.18),
    0 30px 60px -20px rgba(17,31,61,.55);
}
.crcgs-kh-hero .crcgs-hp-hero-emblem::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid rgba(212,168,74,.15);
}
.crcgs-kh-hero .crcgs-hp-hero-emblem img {
  width: 210px;
  height: 210px;
  object-fit: contain;
  filter: drop-shadow(0 6px 32px rgba(0,0,0,.45));
}
.crcgs-kh-hero .crcgs-hp-emblem-glow {
  position: absolute;
  inset: -70px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(232,201,122,.35) 0%, transparent 55%),
    radial-gradient(circle at 60% 60%, rgba(29,52,97,.55) 0%, transparent 60%);
  filter: blur(30px);
  z-index: 0;
  animation: crcgsHpGlowPulse 7s ease-in-out infinite;
}
.crcgs-kh-hero .crcgs-hp-emblem-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(212,168,74,.28);
  z-index: 1;
  pointer-events: none;
}
.crcgs-kh-hero .crcgs-hp-emblem-ring--a { inset: -18px; animation: crcgsHpSpin 34s linear infinite; }
.crcgs-kh-hero .crcgs-hp-emblem-ring--b { inset: -46px; border-color: rgba(212,168,74,.16); animation: crcgsHpSpinReverse 52s linear infinite; }
.crcgs-kh-hero .crcgs-hp-emblem-ring--c { inset: -78px; border-style: dashed; border-color: rgba(253,250,245,.14); animation: crcgsHpSpin 90s linear infinite; }
.crcgs-kh-hero .crcgs-hp-emblem-orbit {
  position: absolute;
  inset: -34px;
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  animation: crcgsHpSpin 16s linear infinite;
}
.crcgs-kh-hero .crcgs-hp-emblem-orbit--b { inset: -60px; animation: crcgsHpSpinReverse 24s linear infinite; }
.crcgs-kh-hero .crcgs-hp-emblem-orbit span {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: #E8C97A;
  box-shadow: 0 0 8px 2px rgba(232,201,122,.8), 0 0 16px 4px rgba(212,168,74,.4);
}
.crcgs-kh-hero .crcgs-hp-emblem-orbit--b span {
  width: 4px;
  height: 4px;
  background: #FDFAF5;
  box-shadow: 0 0 6px 2px rgba(253,250,245,.7);
}
.crcgs-kh-hero .crcgs-hp-emblem-particles { position: absolute; inset: -90px; z-index: 1; pointer-events: none; }
.crcgs-kh-hero .crcgs-hp-emblem-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #E8C97A;
  box-shadow: 0 0 6px 2px rgba(232,201,122,.7);
  animation: crcgsHpTwinkle 4.5s ease-in-out infinite;
}
.crcgs-kh-hero .crcgs-hp-emblem-particles span:nth-child(1) { top: 6%;  left: 12%; animation-delay: 0s; }
.crcgs-kh-hero .crcgs-hp-emblem-particles span:nth-child(2) { top: 22%; left: 88%; animation-delay: .6s; }
.crcgs-kh-hero .crcgs-hp-emblem-particles span:nth-child(3) { top: 78%; left: 90%; animation-delay: 1.3s; }
.crcgs-kh-hero .crcgs-hp-emblem-particles span:nth-child(4) { top: 92%; left: 20%; animation-delay: 2s; }
.crcgs-kh-hero .crcgs-hp-emblem-particles span:nth-child(5) { top: 50%; left: 2%;  animation-delay: 2.6s; }
.crcgs-kh-hero .crcgs-hp-emblem-particles span:nth-child(6) { top: 4%;  left: 55%; animation-delay: 3.3s; }
.crcgs-kh-hero .crcgs-hp-emblem-float {
  position: relative;
  z-index: 2;
  animation: crcgsHpFloat 6s ease-in-out infinite;
}

/* Keyframes — identical to the home page (styles.css) */
@keyframes crcgsHpSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes crcgsHpSpinReverse { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }
@keyframes crcgsHpFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes crcgsHpGlowPulse { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes crcgsHpTwinkle { 0%, 100% { opacity: .15; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes crcgsHpFadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* ── RESPONSIVE — full screen-size coverage ── */

/* Wide monitors ≥1440px */
@media (min-width: 1440px) {
  .crcgs-kh-hero-right { padding-right: 5rem; }
}

/* Small laptops 1025–1200px — narrow the emblem column slightly */
@media (max-width: 1200px) and (min-width: 1025px) {
  .crcgs-kh-hero-layout { grid-template-columns: 1.3fr .7fr; }
  .crcgs-kh-hero-right { padding: 3rem 1.5rem 3rem 0.5rem; }
}

/* Tablets ≤1024px — stack: content on top, logo centered below */
@media (max-width: 1024px) {
  .crcgs-kh-hero-layout { grid-template-columns: 1fr; }
  .crcgs-kh-hero-right { padding: 2.5rem 1.5rem 0.5rem; }
  .crcgs-kh-hero .crcgs-hp-hero-emblem { width: 230px; height: 230px; }
  .crcgs-kh-hero .crcgs-hp-hero-emblem img { width: 170px; height: 170px; }
  .crcgs-kh-hero .crcgs-hp-emblem-glow { inset: -50px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--a { inset: -14px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--b { inset: -34px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--c { inset: -58px; }
  .crcgs-kh-hero .crcgs-hp-emblem-orbit--a { inset: -26px; }
  .crcgs-kh-hero .crcgs-hp-emblem-orbit--b { inset: -46px; }
  .crcgs-kh-hero .crcgs-hp-emblem-particles { inset: -66px; }
}

/* Phones ≤768px */
@media (max-width: 768px) {
  .crcgs-kh-hero-right { padding: 2rem 1.2rem 0.5rem; }
  .crcgs-kh-hero .crcgs-hp-hero-emblem { width: 200px; height: 200px; }
  .crcgs-kh-hero .crcgs-hp-hero-emblem img { width: 150px; height: 150px; }
  .crcgs-kh-hero .crcgs-hp-emblem-glow { inset: -38px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--a { inset: -10px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--b { inset: -26px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--c { inset: -44px; }
  .crcgs-kh-hero .crcgs-hp-emblem-orbit--a { inset: -20px; }
  .crcgs-kh-hero .crcgs-hp-emblem-orbit--b { inset: -36px; }
  .crcgs-kh-hero .crcgs-hp-emblem-particles { inset: -50px; }
}

/* Small phones ≤480px */
@media (max-width: 480px) {
  .crcgs-kh-hero-right { padding: 1.6rem 1rem 0.5rem; }
  .crcgs-kh-hero .crcgs-hp-hero-emblem { width: 168px; height: 168px; }
  .crcgs-kh-hero .crcgs-hp-hero-emblem img { width: 126px; height: 126px; }
  .crcgs-kh-hero .crcgs-hp-emblem-glow { inset: -30px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--a { inset: -8px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--b { inset: -20px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--c { inset: -34px; }
  .crcgs-kh-hero .crcgs-hp-emblem-orbit--a { inset: -16px; }
  .crcgs-kh-hero .crcgs-hp-emblem-orbit--b { inset: -28px; }
  .crcgs-kh-hero .crcgs-hp-emblem-particles { inset: -40px; }
}

/* Very small phones ≤360px */
@media (max-width: 360px) {
  .crcgs-kh-hero .crcgs-hp-hero-emblem { width: 148px; height: 148px; }
  .crcgs-kh-hero .crcgs-hp-hero-emblem img { width: 110px; height: 110px; }
  .crcgs-kh-hero .crcgs-hp-emblem-glow { inset: -24px; }
  .crcgs-kh-hero .crcgs-hp-emblem-ring--c { inset: -28px; }
  .crcgs-kh-hero .crcgs-hp-emblem-particles { inset: -32px; }
}
