:root {
  --accent: #9e1524;
  --navy: #08111d;
  --charcoal: #171717;
  --ink: #efe9df;
  --muted: #bdb3a6;
  --line: rgba(239, 233, 223, 0.16);
  --paper: #f4efe6;
  --paper-ink: #201a18;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  line-height: 1.75;
}

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

a {
  color: inherit;
}

.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.section-pad {
  padding: 104px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(20px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(8, 17, 29, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.site-nav a {
  text-decoration: none;
}

.brand {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.site-nav a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--ink);
}

.hero {
  min-height: calc(100vh - 69px);
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(8, 17, 29, 0.96), rgba(8, 17, 29, 0.78)),
    radial-gradient(circle at 78% 30%, rgba(158, 21, 36, 0.28), transparent 38%),
    var(--navy);
}

.hero-grid,
.two-column,
.about-grid,
.signup-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1.22fr);
  gap: 72px;
  align-items: center;
}

.hero-copy {
  max-width: 560px;
}

.kicker {
  margin: 0 0 14px;
  color: #d8c4b6;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 1.08;
}

h1 {
  max-width: 560px;
  font-size: clamp(3.35rem, 5.7vw, 5.65rem);
}

h2 {
  font-size: clamp(2.35rem, 4vw, 4.15rem);
}

h3 {
  font-size: 2rem;
  margin-bottom: 16px;
}

.prose h2,
.signup h2 {
  margin-bottom: 28px;
}

.lead {
  max-width: 500px;
  margin: 30px 0 0;
  color: #d8d0c6;
  font-size: 1.05rem;
  line-height: 1.8;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

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

.button.secondary {
  border-color: rgba(239, 233, 223, 0.3);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: rgba(239, 233, 223, 0.58);
  background: rgba(255, 255, 255, 0.04);
}

.hero-art {
  margin: 0;
  padding: 0;
  justify-self: center;
  width: min(118%, 760px);
}

.hero-art img {
  width: 100%;
  filter: drop-shadow(0 34px 45px rgba(0, 0, 0, 0.42));
}

.unravelling,
.about,
.signup {
  background: var(--charcoal);
  border-top: 1px solid var(--line);
}

.prose p,
.signup p {
  margin: 0 0 26px;
  color: #d1c8bc;
  font-size: 1.03rem;
  line-height: 1.85;
}

.text-link {
  color: #f0d8c0;
  font-weight: 800;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 54px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.book-card {
  min-height: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.book-image {
  height: 380px;
  min-height: 380px;
  border-bottom: 1px solid var(--line);
  background: #0b0b0b;
}

.book-image.real-cover {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 22px;
}

.book-image.real-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.book-image.unravelling-cover img {
  transform: scale(1.08);
}

.placeholder {
  display: grid;
  place-items: center;
  color: rgba(239, 233, 223, 0.72);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(158, 21, 36, 0.24), transparent 45%),
    repeating-linear-gradient(
      90deg,
      rgba(239, 233, 223, 0.055),
      rgba(239, 233, 223, 0.055) 1px,
      transparent 1px,
      transparent 20px
    ),
    #121820;
}

.book-content {
  padding: 30px;
}

.book-label,
.step {
  color: #d7b6a9;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-content p:not(.book-label),
.start-grid p {
  color: #cfc6ba;
  margin: 0 0 22px;
  line-height: 1.8;
}

.book-link {
  display: inline-block;
  color: #f0d8c0;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration-color: var(--accent);
  text-transform: uppercase;
  text-underline-offset: 5px;
}

.centered-action {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.portrait {
  margin: 0;
  border: 1px solid var(--line);
  background: #07140f;
  padding: 18px;
}

.portrait img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center;
}

.start {
  background: var(--paper);
  color: var(--paper-ink);
}

.start h2,
.start h3 {
  color: var(--paper-ink);
}

.start .kicker,
.start .step {
  color: var(--accent);
}

.start-panel {
  border-top: 3px solid var(--accent);
}

.start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px;
  margin-top: 48px;
}

.start-grid h3 {
  margin-top: 12px;
}

.signup-grid {
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 480px);
}

.embed-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(239, 233, 223, 0.2);
  background: #fff;
}

.embed-wrap iframe {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #070d15;
  font-size: 0.9rem;
}

.footer-inner,
.footer-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links a {
  text-decoration: none;
}

.subscribe-popup {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 24px;
}

.subscribe-popup.is-visible {
  display: grid;
}

.popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.74);
  backdrop-filter: blur(7px);
}

.popup-box {
  isolation: isolate;
  position: relative;
  width: min(100%, 560px);
  padding: 34px;
  border: 1px solid rgba(239, 233, 223, 0.2);
  border-radius: 6px;
  background: #101010;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

.popup-box::before,
.popup-box::after {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border: 2px solid rgba(158, 21, 36, 0.72);
  border-radius: 8px;
  animation: red-wave 1.9s ease-out infinite;
}

.popup-box::after {
  animation-delay: 0.8s;
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(239, 233, 223, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
}

.popup-copy {
  padding-right: 22px;
}

.popup-copy h2 {
  margin-bottom: 26px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.14;
}

.popup-embed {
  max-height: 320px;
}

@keyframes red-wave {
  0% {
    opacity: 0.7;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(158, 21, 36, 0.42);
  }

  100% {
    opacity: 0;
    transform: scale(1.12);
    box-shadow: 0 0 0 26px rgba(158, 21, 36, 0);
  }
}

@media (max-width: 920px) {
  .section-pad {
    padding: 78px 0;
  }

  .hero-grid,
  .two-column,
  .about-grid,
  .signup-grid,
  .book-grid,
  .start-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid,
  .two-column,
  .about-grid,
  .signup-grid {
    gap: 48px;
  }

  .hero {
    min-height: auto;
  }

  .hero-art {
    width: min(100%, 660px);
    margin: 0 auto;
  }

  .book-image.real-cover img {
    object-position: center 38%;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 28px), var(--max));
  }

  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  h1 {
    font-size: 3.4rem;
  }

  h2 {
    font-size: 2.7rem;
  }

  .button {
    width: 100%;
  }

  .book-image,
  .book-image.real-cover img {
    height: 360px;
    min-height: 360px;
  }

  .book-image.real-cover img {
    min-height: 0;
  }

  .portrait img {
    height: 360px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .popup-box {
    padding: 28px 18px 20px;
  }

  .popup-embed iframe {
    height: 300px;
  }
}
