:root {
  --text-light: #f5f5f7;
  --text-muted: rgba(245, 245, 247, 0.75);
  --accent: #e8b04b;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Georgia", "Iowan Old Style", serif;
  color: var(--text-light);
  background: #14141c;
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(8px);
}

.nav-brand {
  color: var(--text-light);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

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

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
}

.series-screen {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 6rem 2rem 3rem;
  background: var(--series-bg);
}

.series-header {
  text-align: center;
  max-width: 700px;
}

.series-header h2 {
  font-size: 2.4rem;
  margin: 0 0 0.75rem;
}

.series-tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0;
}

.buy-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.buy-button:hover {
  background: var(--accent);
  color: #14141c;
}

.book-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1000px;
}

.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  width: 170px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.2s ease;
}

.book-card-active img {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.book-card:hover {
  transform: translateY(-4px);
  color: var(--text-light);
}

.book-card img {
  max-width: 170px;
  max-height: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.site-footer {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 2rem;
  background: #0e0e14;
  text-align: center;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-size: 1.05rem;
}

.site-footer a:hover {
  text-decoration: underline;
}

.book-detail-panel {
  position: relative;
  max-width: 560px;
  width: 100%;
  margin-top: 0.5rem;
  padding: 1.5rem 2rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(232, 176, 75, 0.25);
  border-radius: 10px;
  text-align: left;
}

.book-detail-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  color: var(--text-light);
}

.book-detail-blurb {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  max-height: 40vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.book-detail-blurb p {
  margin: 0 0 1rem;
}

.book-detail-blurb p:last-child {
  margin-bottom: 0;
}

.book-detail-blurb p:first-child {
  color: var(--text-light);
}

.book-detail-buy {
  font-size: 0.85rem;
  padding: 0.5rem 1.1rem;
}

.book-detail-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.book-detail-close:hover {
  color: var(--text-light);
}

.book-card-soon {
  cursor: default;
}

.book-card-soon img {
  opacity: 0.55;
}

.coming-soon-badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--text-muted);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.buy-button.coming-soon-badge {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  cursor: default;
}

.newsletter-popup {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(4px);
}

.newsletter-popup[hidden] {
  display: none;
}

.newsletter-box {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 1rem;
  padding: 2.5rem 2rem 2rem;
  background: #1e1e2b;
  border: 1px solid rgba(232, 176, 75, 0.3);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.newsletter-box h3 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.newsletter-box p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.newsletter-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.newsletter-close:hover {
  color: var(--text-light);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.newsletter-form input[type="email"] {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 245, 247, 0.25);
  background: #14141c;
  color: var(--text-light);
  font-size: 0.95rem;
  font-family: inherit;
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

.newsletter-form button[type="submit"] {
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #14141c;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s ease;
}

.newsletter-form button[type="submit"]:hover {
  opacity: 0.85;
}

.newsletter-dismiss {
  margin-top: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.newsletter-dismiss:hover {
  color: var(--text-light);
}

.newsletter-target-frame {
  display: none;
}

@media (max-width: 720px) {
  .series-header h2 {
    font-size: 1.8rem;
  }

  .book-card {
    width: 130px;
  }

  .book-card img {
    max-width: 130px;
    max-height: 185px;
  }

  .nav-links {
    gap: 1rem;
  }
}
