/* =========================================================
   GLUCOSE WIKI — LIBRARY CORE STYLESHEET
   Purpose: One unified style for legacy wiki pages
   Scope:
   - Design variables
   - Navigation (header)
   - Page layout & typography
   - Core components (hero, content)
   - Footer
   - Dark mode harmony
   - Mobile refinements
========================================================= */


/* =========================================================
   1. DESIGN VARIABLES
   Nuance: Change these to theme the entire library
========================================================= */

:root {
  /* Primary brand tone (used for headers, accents, buttons) */
  --primary: #6a55d3;

  /* Secondary accent (used for borders, highlights, glows) */
  --accent: #9a8aff;

  /* Light mode background */
  --bg-light: #d9d4f5;

  /* Base text color (light mode) */
  --text: #1a1a1a;
}


/* =========================================================
   2. GLOBAL BODY & TYPOGRAPHY
   Nuance: Reading comfort > visual drama
========================================================= */

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: var(--bg-light, #e1d3ff);
  color: #222;
  line-height: 1.7;
}

/* Headings: calm authority, not aggressive contrast */
h2, h3 {
  color: #5c48c5;
  margin-top: 2rem;
}

/* Paragraph rhythm */
p,
li {
  font-size: 1rem;
  margin-bottom: 1rem;
}

ul {
  padding-left: 1.5rem;
}


/* =========================================================
   3. SITE HEADER / NAVIGATION
   Nuance:
   - Glassy, light, non-dominant
   - Sticky for orientation, not control
========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(12px);

  border-bottom: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);

  padding: 0.8rem 1.5rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Logo behaviour: subtle, no gimmicks */
.nav-logo {
  height: 42px;
  opacity: 0.9;
  transition: transform 0.3s ease;
}

.nav-logo:hover {
  transform: scale(1.05);
}

/* Navigation links */
.nav-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  font-family: 'Roboto', sans-serif;
  color: #333;
  font-weight: 500;
  text-decoration: none;

  padding: 0.4rem 0.6rem;
  border-radius: 8px;

  transition: all 0.25s ease;
}

/* Hover: gentle lift, not button-like */
.nav-links a:hover {
  background: rgba(255,255,255,0.6);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  color: var(--primary);
}

/* Controls: theme selector, dark mode toggle */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-selector {
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  background: rgba(255,255,255,0.7);
  font-family: 'Roboto', sans-serif;
}


/* =========================================================
   4. HERO SECTION
   Nuance:
   - Establish topic
   - Do not overwhelm
========================================================= */

.kc-hero {
  text-align: center;
  padding: 4rem 1rem 2rem;

  background: linear-gradient(
    135deg,
    rgba(106,85,211,0.08),
    rgba(255,255,255,0.6)
  );

  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.kc-hero h1 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.kc-hero p {
  max-width: 700px;
  margin: 0 auto;
  color: #555;
}


/* =========================================================
   5. MAIN CONTENT WRAPPER
   Nuance: Optimal reading width, mobile-first
========================================================= */

main {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}


/* =========================================================
   6. FOOTER
   Nuance:
   - Grounding, not legal intimidation
   - Quiet confidence
========================================================= */

.site-footer {
  margin-top: 4rem;
  padding: 2rem 1rem 1.5rem;

  text-align: center;
  font-size: 0.85rem;
  color: rgba(40,40,60,0.6);

  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.0),
    rgba(255,255,255,0.35)
  );

  backdrop-filter: blur(6px);
}

.footer-copy {
  margin: 0 0 0.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(80,80,120,0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-links span {
  opacity: 0.4;
}


/* =========================================================
   7. DARK MODE HARMONY
   Nuance:
   - Preserve contrast
   - Avoid pure black
========================================================= */

body.dark-mode {
  background: #1e1e2f;
  color: #eee;
}

body.dark-mode h2,
body.dark-mode h3 {
  color: #a99aff;
}

body.dark-mode .site-header {
  background: rgba(30,30,50,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}

body.dark-mode .nav-links a {
  color: #e0e0ff;
}

body.dark-mode .nav-links a:hover {
  background: rgba(80,70,150,0.4);
  color: #ffffff;
}

body.dark-mode .theme-selector {
  background: rgba(30,30,50,0.9);
  color: #e0e0ff;
}

body.dark-mode .kc-hero {
  background: linear-gradient(
    135deg,
    rgba(90,70,180,0.3),
    rgba(25,25,45,0.9)
  );
}

body.dark-mode .kc-hero h1 {
  color: #c7b8ff;
}

body.dark-mode .kc-hero p {
  color: #ccc;
}

body.dark-mode .site-footer {
  color: rgba(220,220,240,0.6);
  background: linear-gradient(
    to bottom,
    rgba(20,20,40,0.0),
    rgba(20,20,40,0.8)
  );
}

body.dark-mode .footer-links a {
  color: rgba(200,200,255,0.75);
}

body.dark-mode .footer-links a:hover {
  color: #c7b8ff;
}


/* =========================================================
   8. MOBILE REFINEMENTS
   Nuance: Tighten, never shrink meaning
========================================================= */

@media (max-width: 768px) {
  .nav-links {
    gap: 0.6rem;
  }

  .nav-logo {
    height: 34px;
  }
}

@media (max-width: 600px) {
  .site-footer {
    font-size: 0.8rem;
  }
}
