/* ============ BASE ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #faf7ff;
  --bg-alt: #f3ebff;
  --card: #ffffff;
  --ink: #1a0f2e;
  --muted: #6b5b7e;
  --violet: #7c3aed;
  --violet-d: #5b21b6;
  --violet-l: #a855f7;
  --magenta: #c026d3;
  --pink: #ec4899;
  --indigo: #4f46e5;
  --indigo-l: #6366f1;
  --amber: #d97706;
  --teal: #0d9488;
  --teal-l: #14b8a6;
  --border: rgba(124, 58, 237, 0.14);
  --shadow-sm:
    0 1px 2px rgba(26, 15, 46, 0.06), 0 2px 8px rgba(124, 58, 237, 0.06);
  --shadow-md:
    0 4px 12px rgba(26, 15, 46, 0.08), 0 12px 32px rgba(124, 58, 237, 0.07);
  --shadow-lg:
    0 18px 48px rgba(26, 15, 46, 0.12), 0 6px 16px rgba(124, 58, 237, 0.08);
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Lora", Georgia, serif;
  --ui:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html.dark {
  --bg: #0f0820;
  --bg-alt: #1a0f2e;
  --card: #231438;
  --ink: #ede9fe;
  --muted: #a78bfa;
  --border: rgba(167, 139, 250, 0.18);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.6), 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.7), 0 6px 16px rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition:
    background 0.3s,
    color 0.3s;
}

/* ============ SCROLL PROGRESS ============ */
.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 999;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #7c3aed, #c026d3, #ec4899);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.5);
  transition: width 0.1s linear;
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(250, 247, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
html.dark .nav {
  background: rgba(15, 8, 32, 0.94);
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}
.brand-logo {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff;
  font-size: 22px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}
.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-name {
  font-family: var(--ui);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-name .accent {
  color: var(--violet);
}
.brand-tag {
  font-family: var(--ui);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  align-items: center;
}
.nav-links::-webkit-scrollbar {
  display: none;
}
.nav-links a {
  font-family: var(--ui);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: 7px 13px;
  border-radius: 999px;
  transition: all 0.22s ease;
}
.nav-links a:hover {
  color: var(--violet);
  background: rgba(124, 58, 237, 0.08);
}
.theme-btn {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink);
  transition: 0.2s;
  margin-left: 8px;
}
.theme-btn:hover {
  border-color: var(--violet);
}

/* ============ BREADCRUMB ============ */
.bc {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px 0;
  font: 13px var(--ui);
  color: var(--muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bc a {
  color: var(--violet);
  text-decoration: none;
  font-weight: 600;
}
.bc a:hover {
  text-decoration: underline;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 24px 78px;
  background:
    radial-gradient(
      900px 500px at 10% -10%,
      rgba(124, 58, 237, 0.16),
      transparent 62%
    ),
    radial-gradient(
      800px 480px at 95% 10%,
      rgba(192, 38, 211, 0.14),
      transparent 60%
    ),
    linear-gradient(180deg, var(--card) 0%, var(--bg-alt) 100%);
  border-bottom: 1px solid var(--border);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(124, 58, 237, 0.06) 1px,
    transparent 1px
  );
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 75%);
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5),
    transparent 75%
  );
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.15);
  }
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5.6vw, 3.9rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, #7c3aed, #c026d3, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto 32px;
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.meta-chip {
  font-family: var(--ui);
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
html.dark .meta-chip {
  background: rgba(35, 20, 56, 0.75);
}
.meta-chip .mini-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet);
}

/* ============ STATS ============ */
.stats-band {
  max-width: 1040px;
  margin: -34px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 3;
}
.stats-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 32px;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
}
.stat-item {
  text-align: center;
  padding: 6px 12px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child {
  border-right: 0;
}
.stat-num {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  margin-bottom: 6px;
}
.stat-label {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}

/* ============ CATEGORY NAV ============ */
.cat-nav {
  background: rgba(250, 247, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  margin-top: 34px;
  transition: background 0.3s;
}
html.dark .cat-nav {
  background: rgba(15, 8, 32, 0.94);
}
.cat-nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.cat-tab {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cat-tab:hover {
  border-color: var(--violet);
  color: var(--violet);
}
.cat-tab.cat1.active,
.cat-tab.cat1:hover {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}
.cat-tab.cat2.active,
.cat-tab.cat2:hover {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}
.cat-tab.cat3.active,
.cat-tab.cat3:hover {
  background: linear-gradient(135deg, #c026d3, #ec4899);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(192, 38, 211, 0.3);
}
.cat-tab.cat4.active,
.cat-tab.cat4:hover {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.3);
}
.cat-tab.cat5.active,
.cat-tab.cat5:hover {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.3);
}

/* ============ SECTIONS ============ */
.section {
  padding: 70px 24px;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.cat-head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 22px 28px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}
.cat-head.cat1 {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.09),
    rgba(168, 85, 247, 0.07)
  );
  border: 1px solid rgba(124, 58, 237, 0.16);
}
.cat-head.cat2 {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.09),
    rgba(99, 102, 241, 0.07)
  );
  border: 1px solid rgba(79, 70, 229, 0.16);
}
.cat-head.cat3 {
  background: linear-gradient(
    135deg,
    rgba(192, 38, 211, 0.09),
    rgba(236, 72, 153, 0.07)
  );
  border: 1px solid rgba(192, 38, 211, 0.16);
}
.cat-head.cat4 {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.09),
    rgba(20, 184, 166, 0.07)
  );
  border: 1px solid rgba(13, 148, 136, 0.16);
}
.cat-head.cat5 {
  background: linear-gradient(
    135deg,
    rgba(217, 119, 6, 0.1),
    rgba(245, 158, 11, 0.07)
  );
  border: 1px solid rgba(217, 119, 6, 0.18);
}
.cat-head .ch-ico {
  flex: none;
  width: 62px;
  height: 62px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #fff;
}
.cat-head.cat1 .ch-ico {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}
.cat-head.cat2 .ch-ico {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
}
.cat-head.cat3 .ch-ico {
  background: linear-gradient(135deg, #c026d3, #ec4899);
}
.cat-head.cat4 .ch-ico {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
}
.cat-head.cat5 .ch-ico {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}
.cat-head .ch-body {
  flex: 1;
  min-width: 0;
}
.cat-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 4px;
  color: var(--ink);
}
.cat-head .ch-range {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.cat-head .ch-count {
  flex: none;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink);
  white-space: nowrap;
}
html.dark .cat-head .ch-count {
  background: rgba(35, 20, 56, 0.85);
}

/* ============ CHAPTER GRID ============ */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}
.chapter-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: all 0.24s ease;
  display: flex;
  gap: 15px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.chapter-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}
.chapter-card.cat1::before {
  background: linear-gradient(180deg, #7c3aed, #a855f7);
}
.chapter-card.cat2::before {
  background: linear-gradient(180deg, #4f46e5, #6366f1);
}
.chapter-card.cat3::before {
  background: linear-gradient(180deg, #c026d3, #ec4899);
}
.chapter-card.cat4::before {
  background: linear-gradient(180deg, #0d9488, #14b8a6);
}
.chapter-card.cat5::before {
  background: linear-gradient(180deg, #d97706, #f59e0b);
}
.chapter-card:hover::before {
  transform: scaleY(1);
}
.chapter-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.chapter-card.cat1:hover {
  border-color: rgba(124, 58, 237, 0.35);
}
.chapter-card.cat2:hover {
  border-color: rgba(79, 70, 229, 0.35);
}
.chapter-card.cat3:hover {
  border-color: rgba(192, 38, 211, 0.35);
}
.chapter-card.cat4:hover {
  border-color: rgba(13, 148, 136, 0.35);
}
.chapter-card.cat5:hover {
  border-color: rgba(217, 119, 6, 0.4);
}

.ch-num {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  transition: transform 0.25s ease;
}
.chapter-card.cat1 .ch-num {
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.14),
    rgba(168, 85, 247, 0.1)
  );
  color: #7c3aed;
}
.chapter-card.cat2 .ch-num {
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.14),
    rgba(99, 102, 241, 0.1)
  );
  color: #4f46e5;
}
.chapter-card.cat3 .ch-num {
  background: linear-gradient(
    135deg,
    rgba(192, 38, 211, 0.14),
    rgba(236, 72, 153, 0.1)
  );
  color: #c026d3;
}
.chapter-card.cat4 .ch-num {
  background: linear-gradient(
    135deg,
    rgba(13, 148, 136, 0.14),
    rgba(20, 184, 166, 0.1)
  );
  color: #0d9488;
}
.chapter-card.cat5 .ch-num {
  background: linear-gradient(
    135deg,
    rgba(217, 119, 6, 0.16),
    rgba(245, 158, 11, 0.12)
  );
  color: #d97706;
}
html.dark .chapter-card.cat1 .ch-num {
  background: rgba(124, 58, 237, 0.22);
  color: #c4b5fd;
}
html.dark .chapter-card.cat2 .ch-num {
  background: rgba(79, 70, 229, 0.22);
  color: #a5b4fc;
}
html.dark .chapter-card.cat3 .ch-num {
  background: rgba(192, 38, 211, 0.22);
  color: #f0abfc;
}
html.dark .chapter-card.cat4 .ch-num {
  background: rgba(13, 148, 136, 0.22);
  color: #5eead4;
}
html.dark .chapter-card.cat5 .ch-num {
  background: rgba(217, 119, 6, 0.22);
  color: #fcd34d;
}
.chapter-card:hover .ch-num {
  transform: scale(1.08) rotate(-4deg);
}

.ch-body {
  flex: 1;
  min-width: 0;
}
.ch-title {
  font-family: var(--ui);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 4px;
}
.ch-sub {
  font-family: var(--ui);
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  display: block;
  line-height: 1.5;
}
.chapter-card.legacy .ch-title {
  color: #d97706;
}
.legacy-tag {
  display: inline-block;
  font-family: var(--ui);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(217, 119, 6, 0.14);
  color: #b45309;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
html.dark .legacy-tag {
  background: rgba(217, 119, 6, 0.25);
  color: #fcd34d;
}

/* ============ WHY US ============ */
.why-section {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}
.sec-head {
  margin-bottom: 40px;
  text-align: center;
}
.sec-kicker {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 12px;
  display: block;
}
.sec-head h2 {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sec-head p {
  color: var(--muted);
  margin-top: 12px;
  font-size: 1rem;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.why-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.why-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #c026d3);
}
.why-card:nth-child(even)::before {
  background: linear-gradient(90deg, #4f46e5, #c026d3);
}
.why-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.why-card .why-ico {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 21px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--violet);
  margin-bottom: 14px;
}
.why-card h4 {
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.why-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

/* ============ CTA ============ */
.cta-band {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}
.cta-inner {
  background: linear-gradient(135deg, #5b21b6, #c026d3);
  border-radius: 26px;
  padding: 60px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-inner::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.cta-inner::after {
  content: "";
  position: absolute;
  bottom: -90px;
  left: -50px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}
.cta-inner .cta-ico {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.18);
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}
.cta-inner h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.6vw, 2.15rem);
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.015em;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}
.cta-inner p {
  color: rgba(243, 232, 255, 0.85);
  font-size: 1.02rem;
  max-width: 560px;
  margin: 0 auto 30px;
  position: relative;
  z-index: 1;
}
.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.btn {
  font-family: var(--ui);
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: all 0.24s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(124, 58, 237, 0.45);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

/* ============ FOOTER ============ */
footer {
  background: #150a26;
  color: #d4c8e8;
  padding: 64px 24px 40px;
  margin-top: 70px;
  font-family: var(--ui);
}
.footer-inner {
  max-width: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.f-brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.f-logo {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff;
  font-size: 24px;
  border-radius: 14px;
}
.f-brand {
  font-family: var(--ui);
  font-size: 1.4rem;
  font-weight: 800;
  color: #faf7ff;
  letter-spacing: -0.02em;
}
.f-brand .accent {
  color: #c084fc;
}
.f-tag {
  font-family: var(--ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #a78bfa;
}
.f-col p {
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 8px;
  color: #a78bfa;
}
.f-col h5 {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #faf7ff;
  margin-bottom: 16px;
}
.f-col a {
  display: block;
  font-family: var(--ui);
  font-size: 14px;
  color: #d4c8e8;
  text-decoration: none;
  padding: 5px 0;
  transition: color 0.2s ease;
}
.f-col a:hover {
  color: #c084fc;
}
.f-bottom {
  max-width: 1140px;
  margin: 26px auto 0;
  text-align: center;
  font-family: var(--ui);
  font-size: 12.5px;
  color: #a78bfa;
}
.f-quote {
  font-family: var(--body);
  font-style: italic;
  font-size: 14.5px;
  color: #a78bfa;
  margin-top: 10px;
}

/* ============ BACK TO TOP ============ */
#backTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #c026d3);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  z-index: 800;
  font-weight: 900;
}
#backTop.show {
  opacity: 1;
  visibility: visible;
}
#backTop:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 26px rgba(124, 58, 237, 0.6);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .footer-inner {
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 30px;
  }
}
@media (max-width: 720px) {
  .nav-inner {
    padding: 10px 14px;
  }
  .brand-tag {
    display: none;
  }
  .brand-logo {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }
  .brand-name {
    font-size: 18px;
  }
  .nav-links a {
    padding: 6px 10px;
    font-size: 12.5px;
  }
  .hero {
    padding: 48px 18px 60px;
  }
  .section {
    padding: 50px 18px;
  }
  .stats-inner {
    padding: 20px 18px;
    gap: 14px;
  }
  .stat-item {
    border-right: 0;
  }
  .cat-nav {
    padding: 10px 14px;
  }
  .cat-tab {
    padding: 8px 13px;
    font-size: 11.5px;
  }
  .cat-head {
    padding: 20px 22px;
    gap: 16px;
    flex-wrap: wrap;
  }
  .cat-head .ch-ico {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }
  .cat-head .ch-count {
    display: none;
  }
  .chapter-grid {
    grid-template-columns: 1fr;
  }
  .cta-inner {
    padding: 44px 24px;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }
  #backTop {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 520px) {
  body {
    font-size: 16px;
  }
  .nav-links a {
    padding: 5px 9px;
    font-size: 11.5px;
  }
  .cta-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

.nav-links .donate-nav {
  color: #fff;
  background: linear-gradient(135deg, var(--bg-alt), var(--magenta));
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.2);
}
.nav-links .donate-nav:hover {
  color: #fff;
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--card), var(--pink));
}
