/* Shared design tokens — Liquid Glass × German Rigor (no transform, no backdrop-filter on sticky) */

:root {
  /* Per-book palette: override per site */
  --bg: #0c0a09;
  --bg-2: #161412;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-solid: #161412;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #a16207;
  --accent-2: #d4a843;
  --accent-3: #e8c97a;
  --text: #f4f2ef;
  --text-soft: #a9a6a1;
  --muted: #6e6a63;
  --input: #1a1815;

  --radius: 16px;
  --radius-lg: 22px;
  --container: 1200px;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.30);
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Background depth: radial gradients directly on body (no ::before — pitfall #3 in searxng-ux-pitfalls avoids that pattern even on static sites to stay consistent) */
body {
  background-image:
    radial-gradient(ellipse 80% 55% at 18% -8%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 45% at 82% 10%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 65%),
    radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--surface-solid) 35%, transparent), var(--bg));
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  min-height: 100vh;
}

a { color: var(--accent-3); text-decoration: none; transition: border-color .25s ease, color .25s ease; }
a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }
a.cta, button.cta {
  display: inline-block;
  background: var(--accent);
  color: #0c0a09 !important;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border: none !important;
  box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 30%, transparent);
  transition: box-shadow .25s ease, background-color .25s ease;
}
a.cta:hover, button.cta:hover {
  background: var(--accent-2);
  color: #0c0a09 !important;
  box-shadow: 0 10px 40px color-mix(in srgb, var(--accent) 50%, transparent);
}

/* Container */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; margin: 0 0 0.5em; line-height: 1.18; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.45rem); }
.kicker {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--accent-3);
  font-weight: 500;
  margin: 0 0 18px;
}
.lede { color: var(--text-soft); font-size: 1.125rem; max-width: 640px; margin: 0 auto 32px; }

/* Sticky top bar — solid background (no backdrop-filter, no transform — pitfall from liquid-glass-implementation) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(22, 20, 18, 0.96);
  border-bottom: 1px solid var(--border);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.topbar .brand { font-family: var(--font-display); font-size: 1.15rem; color: var(--text); border: none !important; }
.topbar nav { display: flex; gap: 28px; }
.topbar nav a { color: var(--text-soft); font-size: 0.95rem; border-bottom: 2px solid transparent; }
.topbar nav a:hover, .topbar nav a.active { color: var(--text); border-bottom-color: var(--accent); }
@media (max-width: 720px) { .topbar nav { gap: 14px; } .topbar nav a { font-size: 0.85rem; } }

/* Hero */
.hero { padding: 96px 0 64px; text-align: center; }
.hero .cover-art {
  width: 220px; aspect-ratio: 2/3;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft), 0 0 0 1px var(--border);
  margin: 0 auto 32px;
  display: block;
  animation: hero-float 6s ease-in-out infinite;
}
@keyframes hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.hero h1 { margin-top: 0; }
.hero .meta {
  display: inline-flex;
  gap: 16px;
  color: var(--text-soft);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.hero .actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .actions .ghost {
  border: 1px solid var(--border-strong);
  color: var(--text) !important;
  padding: 14px 28px;
  border-radius: 999px;
}

/* Sections */
.section { padding: 80px 0; border-top: 1px solid var(--border); }
.section h2 { text-align: center; }
.section h2 + .lede { margin-bottom: 64px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  /* hover: border-color + box-shadow only — pitfall §2 from liquid-glass-implementation */
  transition: border-color .25s ease, box-shadow .25s ease;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 32px color-mix(in srgb, var(--accent) 18%, transparent);
}
.card h3 { margin-top: 0; color: var(--accent-3); }
.card p { color: var(--text-soft); margin: 8px 0 0; }

/* Quote block */
.quote {
  border-left: 3px solid var(--accent);
  padding: 32px 28px;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.4;
  color: var(--text);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.quote cite { display: block; font-family: var(--font-body); font-style: normal; font-size: 0.85rem; color: var(--text-soft); margin-top: 16px; letter-spacing: 2px; text-transform: uppercase; }

/* Long-form prose */
.prose { max-width: 720px; margin: 0 auto; }
.prose p { color: var(--text-soft); }
.prose strong { color: var(--text); }

/* Chapter list */
.chapters { list-style: none; padding: 0; margin: 0; }
.chapters li {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 24px;
  align-items: baseline;
}
.chapters li .num {
  flex: 0 0 40px;
  font-family: var(--font-display);
  color: var(--accent-3);
  font-size: 1.4rem;
}
.chapters li .title { flex: 1; color: var(--text); }
.chapters li .title small { display: block; color: var(--text-soft); font-size: 0.85rem; margin-top: 4px; }

/* Footer */
footer.site {
  background: #050505;
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
  margin-top: 80px;
}
footer.site .container { display: grid; gap: 32px; }
footer.site .links { display: flex; gap: 24px; flex-wrap: wrap; color: var(--text-soft); font-size: 0.9rem; }
footer.site .links a { color: var(--text-soft); border-bottom: 1px solid transparent; }
footer.site .links a:hover { color: var(--text); border-bottom-color: var(--accent); }
footer.site .copy { color: var(--muted); font-size: 0.85rem; }
footer.site .disclaimer { color: var(--muted); font-size: 0.78rem; line-height: 1.5; max-width: 720px; }

/* Responsive */
@media (max-width: 600px) {
  .hero { padding: 64px 0 32px; }
  .section { padding: 56px 0; }
  .hero .cover-art { width: 180px; }
  .topbar nav { gap: 8px; }
  .topbar nav a { font-size: 0.78rem; letter-spacing: 0; }
}

/* SEO / accessibility */
:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 4px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
