/* =========================
   THEME
========================= */
:root {
  --bg: #0b0f16;
  --panel: #101725;
  --panel-2: #0f1623;
  --ink: #e5e7eb;
  --muted: #99a1b3;
  --brand: #f59e0b;
  --brand-2: #f8af2e;
  --accent: #7dd3fc;
  --shadow: rgba(0,0,0,.35);
}

/* =========================
   RESET / BASE
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg), #0a1321);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px);
}

/* =========================
   HEADER
========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 22, .75);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0b0f16;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.titles h1 {
  margin: 0;
  font-size: 1.2rem;
}

.subtitle {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
}

.nav a {
  margin-left: 16px;
  color: var(--ink);
  opacity: .9;
}

.nav a:hover {
  opacity: 1;
}

/* =========================
   HERO
========================= */
.hero {
  background:
    radial-gradient(80% 60% at 10% 10%, rgba(125,211,252,.15), transparent 50%),
    radial-gradient(90% 70% at 90% 20%, rgba(245,158,11,.15), transparent 50%);
}

.hero .container {
  min-height: 48vh;
  display: grid;
  gap: 28px;
  align-content: center;
}

.hero-copy h2 {
  margin: 0;
  font-family: Merriweather, Georgia, serif;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
}

.hero-copy p {
  max-width: 56ch;
  color: var(--muted);
}

/* =========================
   BUTTONS
========================= */
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #111827;
  box-shadow: 0 8px 20px var(--shadow);
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,.15);
  color: var(--ink);
}

/* =========================
   SECTIONS
========================= */
.section {
  padding: 56px 0;
}

.section.alt {
  background: var(--panel-2);
  border-block: 1px solid rgba(255,255,255,.06);
}

/* =========================
   BOOK GRID
========================= */
.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.book-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Cover is visual only — never captures clicks */
.book-cover {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #0b1320;
  border: 1px solid rgba(255,255,255,.10);
  pointer-events: none;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.book-card h4 {
  margin: 4px 0 0;
}

.book-card p {
  font-size: .95rem;
  color: var(--muted);
}

/* Button always wins */
.book-card .btn {
  margin-top: auto;
  pointer-events: auto;
}

/* =========================
   FOOTER
========================= */
.site-footer {
  background: var(--bg);
  border-top: 1px solid rgba(255,255,255,.06);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

/* =========================
   FLOATING SIGILS
========================= */
.page-sigil {
  position: fixed;
  bottom: 24px;
  width: min(12vw, 120px);
  opacity: .35;
  pointer-events: none;
  z-index: 200;
}

.page-sigil.left { left: 24px; }
.page-sigil.right { right: 24px; transform: scaleX(-1); }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1000px) {
  .book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .book-grid {
    grid-template-columns: 1fr;
  }
  .nav {
    display: none;
  }
  .page-sigil {
    display: none;
  }
}

/* =========================
   ACCESSIBILITY
========================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
