:root {
  --bg: #050509;
  --bg-alt: #0c0f15;
  --surface: #131623;
  --accent: #e5b36a;
  --accent-soft: rgba(229, 179, 106, 0.15);
  --text-main: #f5f5f7;
  --text-muted: #a0a3b1;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 22px 60px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 32px rgba(229, 179, 106, 0.45);
}

* {
  box-sizing: border-box;
}

body.theme-dark {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    sans-serif;
  background: radial-gradient(circle at top, #171b2b 0, #050509 52%, #020308 100%);
  color: var(--text-main);
}

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

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  padding: 4rem 0;
  background: radial-gradient(circle at top left, #1d2234 0, #070811 60%);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.25rem;
}

#series .section-header h2 {
  margin-bottom: 0.5rem;
}

#series .section-header p {
  margin-top: 0;
}

.series-grid {
  margin-top: 1.25rem;
}

.section-header h2 {
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(5, 5, 9, 0.96),
    rgba(5, 5, 9, 0.82),
    transparent
  );
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.logo img {
  height: 42px;
  object-fit: contain;
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a:hover {
  color: var(--text-main);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.4rem;
  border: 1px solid transparent;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease,
    box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #f5ce85, #e5b36a);
  color: #1a1308;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 48px rgba(229, 179, 106, 0.7);
}

.btn-outline {
  border-color: rgba(229, 179, 106, 0.5);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.btn-ghost {
  border-color: transparent;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
}

/* Hero */

.hero {
  position: relative;
  padding: 5rem 0 3rem;
  overflow: hidden;
}

.hero-with-video {
  min-height: 70vh;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05) brightness(0.7);
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(0, 0, 0, 0.4), transparent 50%),
    linear-gradient(to bottom, rgba(5, 5, 9, 0.9), rgba(5, 5, 9, 0.7));
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 5vw, 3.1rem);
  margin: 0.1rem 0 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-tagline {
  margin-top: 0;
}

.hero-text .book-meta {
  margin-bottom: 0.2rem;
}

.hero-tagline {
  margin: 0 0 1.8rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-art {
  position: relative;
}

.book-cover-frame {
  border-radius: 24px;
  padding: 0.4rem;
  background: radial-gradient(circle at top left, #f5ce85 0, #1b1221 42%, #050509 100%);
  box-shadow: var(--shadow-soft);
}

.book-cover-frame img {
  border-radius: 18px;
}

/* Grid utils */

.grid {
  display: grid;
  gap: 1.5rem;
}

.merch-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.series-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.retailer-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Cards */

.card-book .card-image img {
  height: 260px;
}

.card {
  background: linear-gradient(145deg, #181b27, #0d0f18);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-book .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-book .card-actions {
  margin-top: auto;
}

.card-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Allow full-height image on the What is a Paladin page */
.what-is-paladin-hero .card-image img {
  height: auto;
}

.card-body {
  padding: 1.2rem 1.25rem 1.4rem;
}

.card-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.card-body p {
  margin: 0 0 0.9rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card-footer-note {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.book-meta {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin: 0 0 0.35rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.card-retailer {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top, #1d2234, #080910);
}

.card-retailer h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.card-retailer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.card-retailer:hover {
  border-color: rgba(229, 179, 106, 0.8);
  box-shadow: var(--shadow-glow);
}

/* Signup */

.signup-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.2fr);
  gap: 2.5rem;
  align-items: center;
}

.signup-form {
  background: radial-gradient(circle at top left, #252a3e, #11131f);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem 1.6rem;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.signup-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.signup-form input[type="email"],
.signup-form input[type="text"] {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.6rem 0.9rem;
  background: rgba(2, 3, 8, 0.9);
  color: var(--text-main);
  font-size: 0.95rem;
}

.signup-form input[type="email"]:focus,
.signup-form input[type="text"]:focus {
  outline: none;
  border-color: rgba(229, 179, 106, 0.9);
  box-shadow: 0 0 0 1px rgba(229, 179, 106, 0.7);
}

.signup-form button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.form-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
}

/* Blog */

.blog-teaser {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.blog-teaser p {
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}

.blog-list {
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

.blog-card {
  margin-bottom: 1rem;
}

.blog-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 0.35rem;
}

.blog-divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 2.5rem auto;
  max-width: 720px;
}

.blog-post-full {
  max-width: 720px;
  margin: 0 auto;
}

.blog-body {
  color: var(--text-main);
}

.blog-body h3 {
  margin-top: 1.7rem;
  margin-bottom: 0.7rem;
}

.blog-body ul {
  padding-left: 1.2rem;
}

.blog-body li {
  margin-bottom: 0.35rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.7rem 0 2rem;
  background: radial-gradient(circle at bottom, #181b27, #050509 60%);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.footer-sub {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-main);
}

/* Responsive */

@media (max-width: 768px) {
  .hero {
    padding-top: 4rem;
  }

  .hero-grid,
  .signup-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav {
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
  }
}
