/* ==========================================================
   documentations.css  –  light + charcoal-dark theme  (2025-06-30)
   ========================================================== */

/*  RESET  */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
body {
  font-family: "Poppins", "Segoe UI", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

/* ─────────────────────────
   COLOR-TOKENS — LIGHT MODE
   ───────────────────────── */
:root {
  /* brand blues */
  --primary-dark: #1e3a8a; /* indigo-900 */
  --primary: #2563eb; /* blue-600   */
  --primary-light: #3b82f6; /* blue-500   */

  --success: #10b981;
  --info: #17a2b8;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* neutrals */
  --bg: #f8fafc;
  --bg-alt: #ffffff;
  --bg-card: #ffffff;
  --border: #e9ecef;

  /* text */
  --text: #334155;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --text-white: #f8fafc;

  /* misc */
  --radius: 0.5rem;
  --radius-sm: 0.25rem;
  --radius-lg: 0.75rem;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 20px rgba(0, 0, 0, 0.12);
}

/* ─────────────────────────
   DARK-MODE OVERRIDES
   ───────────────────────── */
.dark-mode {
  --bg: #0c0c0f;
  --bg-alt: #131417;
  --bg-card: #131417;
  --border: #2d333d;

  --text: #e2e8f0;
  --text-dark: #e5e7eb;
  --text-light: #cbd5e1;
  --text-muted: #9ca3af;

  /* keep same brand blues */
  --primary-dark: #1e3a8a;
  --primary: #2563eb;
  --primary-light: #3b82f6;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 12px 20px rgba(0, 0, 0, 0.65);
}

/* ==========================================================
   TYPOGRAPHY
   ========================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", "Segoe UI", sans-serif;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.25;
  margin-bottom: 1rem;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}
h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
}
h2::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--primary-dark);
}
p {
  margin-bottom: 1.5rem;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: 0.2s;
}
a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

/* ==========================================================
   HEADER & NAV
   ========================================================== */
header {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'><path fill='rgba(255,255,255,0.05)' d='M0,288L48,272C96,256,192,224,288,197.3C384,171,480,149,576,165.3C672,181,768,235,864,250.7C960,267,1056,245,1152,208C1248,171,1344,117,1392,90.7L1440,64L1440,0L1392,0C1344,0,1248,0,1152,0C1056,0,960,0,864,0C768,0,672,0,576,0C480,0,384,0,288,0C192,0,96,0,48,0L0,0Z'></path></svg>")
    center/cover no-repeat;
  opacity: 0.45;
  z-index: 0;
}
header h1,
header p {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}
header p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

nav {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  padding: 0.5rem;
  border-radius: 0.5rem;
  max-width: 90%;
  margin: 0 auto;
}
nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
}
nav li a {
  display: block;
  padding: 8px 16px;
  color: #fff;
  border-radius: 0.25rem;
  font-weight: 500;
  transition: 0.2s;
}
nav li a:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

/* ==========================================================
   MAIN
   ========================================================== */
main {
  max-width: 1200px;
  margin: -20px auto 0;
  padding: 2rem;
  background: var(--bg-card);
  box-shadow: var(--shadow-xs);
  border-radius: 0.75rem;
  position: relative;
  z-index: 2;
}
section {
  margin-bottom: 3rem;
}
ul,
ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}
li {
  margin-bottom: 0.75rem;
}
li strong {
  color: var(--primary);
}

section ol {
  counter-reset: item;
  list-style: none;
  margin-left: 2.5rem;
}
section ol > li {
  background: var(--bg-alt);
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-xs);
  margin-bottom: 1rem;
  position: relative;
}
section ol > li::before {
  counter-increment: item;
  content: counter(item) ".";
  position: absolute;
  left: -30px;
  font-weight: 700;
  color: var(--primary);
}

/* FAQ */
#faq ul {
  list-style: none;
  margin-left: 0;
}
#faq li {
  border-bottom: 1px solid var(--border);
  padding: 0 0 1rem;
  margin-bottom: 1rem;
}
#faq li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
#faq strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  position: relative;
  padding-left: 1.5rem;
}
#faq strong::before {
  content: "Q:";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--primary);
}
#faq p {
  padding-left: 1.5rem;
  position: relative;
}
#faq p::before {
  content: "A:";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--text-light);
}

/* ==========================================================
   FOOTER
   ========================================================== */
footer {
  background: #1e293b;
  color: #e2e8f0;
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
}
footer .footer-links {
  margin-bottom: 1rem;
}
footer .footer-links a {
  color: #cbd5e1;
  padding: 0 1rem;
  font-weight: 500;
}
footer .footer-links a:hover {
  color: #f8fafc;
  text-decoration: underline;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  header {
    padding: 2rem 1rem;
  }
  nav ul {
    flex-direction: column;
    align-items: center;
  }
  main {
    padding: 1.5rem;
  }
  section ol {
    margin-left: 1.5rem;
  }
  section ol > li::before {
    left: -20px;
  }
}

/* ==========================================================
   PRINT
   ========================================================== */
@media print {
  header,
  nav {
    display: none;
  }
  main {
    box-shadow: none;
    padding: 0;
  }
  footer {
    background: none;
    color: #000;
    border-top: 1px solid #eee;
    padding: 1rem 0;
  }
  footer .footer-links a {
    color: var(--primary);
  }
}
