/* =====================================================================
   Manual Library — stylesheet
   ===================================================================== */

/* --- Reset & base ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:          #f7f8fa;
  --color-surface:     #ffffff;
  --color-border:      #e2e5ea;
  --color-text:        #1c2333;
  --color-text-muted:  #6b7585;
  --color-primary:     #2563eb;
  --color-primary-dk:  #1d4ed8;
  --color-accent:      #dbeafe;
  --color-hero-bg:     #111827;
  --color-hero-text:   #f9fafb;
  --color-hero-muted:  #9ca3af;
  --color-stat-bg:     #1e3a5f;
  --color-stat-text:   #ffffff;
  --radius:            8px;
  --radius-lg:         14px;
  --shadow-sm:         0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow:            0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
  --font-sans:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                       Helvetica, Arial, sans-serif;
  --font-mono:         "SF Mono", "Fira Code", Menlo, monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; }


/* --- Layout ------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}


/* --- Header ------------------------------------------------------------- */

.site-header {
  background: var(--color-hero-bg);
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--color-hero-text);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
}

.site-logo:hover { text-decoration: none; opacity: .9; }

.logo-icon {
  width: 22px;
  height: 22px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.site-nav { display: flex; gap: 1.5rem; }

.nav-link {
  color: var(--color-hero-muted);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-hero-text);
  text-decoration: none;
}


/* --- Hero --------------------------------------------------------------- */

.hero {
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
  padding: 5rem 0 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.hero-heading {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 1rem;
  color: #ffffff;
}

.hero-subheading {
  font-size: 1.1rem;
  color: var(--color-hero-muted);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }


/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.2rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}

.btn-large { padding: .75rem 1.6rem; font-size: 1rem; }

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover:not([aria-disabled]) {
  background: var(--color-primary-dk);
  text-decoration: none;
  color: #fff;
}

.btn-primary[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-badge {
  font-size: .7rem;
  font-weight: 600;
  background: rgba(255,255,255,.2);
  padding: .15rem .45rem;
  border-radius: 20px;
  letter-spacing: .02em;
  text-transform: uppercase;
}


/* --- Hero graphic (decorative book stack) ------------------------------- */

.hero-graphic {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: .5rem;
}

.book-stack {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  align-items: flex-end;
}

.book {
  border-radius: 3px 6px 6px 3px;
  height: 22px;
  position: relative;
}

.book::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: rgba(0,0,0,.25);
  border-radius: 3px 0 0 3px;
}

.book-1 { width: 160px; background: #2563eb; }
.book-2 { width: 130px; background: #3b82f6; }
.book-3 { width: 145px; background: #1d4ed8; }


/* --- Stats -------------------------------------------------------------- */

.stats-section {
  background: var(--color-stat-bg);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: 1.75rem 1rem;
  background: var(--color-stat-bg);
  text-align: center;
}

.stat-number {
  font-size: 2.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -.03em;
  line-height: 1;
}

.stat-label {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}


/* --- Features section --------------------------------------------------- */

.features-section {
  padding: 5rem 0;
}

.section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--color-text);
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.feature-icon {
  width: 36px;
  height: 36px;
  color: var(--color-primary);
  margin-bottom: .25rem;
}

.feature-icon svg { width: 100%; height: 100%; }

.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.feature-desc {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
}

.feature-status {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-accent);
  padding: .2rem .55rem;
  border-radius: 20px;
  margin-top: .25rem;
  align-self: flex-start;
}


/* --- Footer ------------------------------------------------------------- */

.site-footer {
  background: var(--color-hero-bg);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 1.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-text {
  font-size: .82rem;
  color: var(--color-hero-muted);
  text-align: center;
}


/* --- Responsive --------------------------------------------------------- */

@media (max-width: 700px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-graphic { display: none; }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .stat-card { padding: 1.25rem 1rem; }

  .hero { padding: 3.5rem 0 3rem; }
  .features-section { padding: 3rem 0; }
}
