* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
}

.book-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(22px, 3.4vw, 38px) 20px 52px;
}

.book-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 58px);
  overflow: hidden;
  padding: clamp(18px, 3vw, 32px) 0 clamp(22px, 3.4vw, 36px);
  border-bottom: 1px solid color-mix(in srgb, var(--border-strong) 72%, transparent);
}

.book-banner::before {
  content: "";
  position: absolute;
  inset: -18% -12% auto 46%;
  height: 72%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 42% 48%, rgba(229, 170, 52, 0.09), transparent 0 18%, transparent 46%),
    radial-gradient(circle at 50% 50%, rgba(132, 98, 71, 0.08), transparent 0 34%, transparent 58%);
  pointer-events: none;
}

.book-cover-stack {
  position: relative;
  z-index: 1;
  justify-self: center;
  width: min(100%, 250px);
}

.book-cover-wrap {
  position: relative;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--page-bg) 72%, white 16%);
  box-shadow: 0 18px 44px rgba(63, 47, 36, 0.1);
}

.book-cover-wrap::before {
  content: "";
  position: absolute;
  inset: 14% -7% -5% 8%;
  border-radius: 20px;
  background: rgba(63, 47, 36, 0.12);
  filter: blur(20px);
  z-index: -1;
}

.book-cover {
  display: block;
  width: 100%;
  border-radius: 10px;
  user-select: none;
  -webkit-user-drag: none;
}

.book-cover-caption {
  max-width: 310px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.48;
  text-align: center;
}

.book-copy {
  position: relative;
  z-index: 1;
  max-width: 600px;
}

.book-eyebrow {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.book-copy h1 {
  margin: 0;
  max-width: 510px;
  font-family: Georgia, serif;
  font-size: clamp(34px, 3.9vw, 52px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--text);
}

.book-kicker {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.48;
}

.book-support {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.book-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  max-width: 560px;
}

.book-fields {
  display: grid;
  grid-template-columns: minmax(150px, 0.85fr) minmax(220px, 1.15fr);
  gap: 12px;
}

.book-field-group {
  display: grid;
  gap: 7px;
}

.book-label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}

.book-label span {
  opacity: 0.78;
}

.book-input {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 14px;
  padding: 14px 15px;
  font: inherit;
  background: color-mix(in srgb, var(--page-bg) 78%, white 18%);
  color: var(--text);
  box-shadow: none;
}

.book-input::placeholder {
  color: var(--muted-soft);
}

.book-input:focus {
  outline: 2px solid rgba(185, 131, 36, 0.5);
  outline-offset: 2px;
}

.book-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.book-turnstile {
  max-width: 440px;
  min-height: 70px;
  opacity: 0.92;
}

.book-submit {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text);
  padding: 13px 24px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: background 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.book-submit:hover,
.book-submit:focus-visible {
  background: var(--button-bg-hover);
  transform: translateY(-1px);
}

.book-submit.is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.book-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  width: calc(100% - 32px);
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 1000;
}

.book-toast.is-visible,
.book-toast:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}

.book-toast[data-state="success"] {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.book-toast[data-state="error"] {
  background: #3a2020;
  border-color: rgba(189, 59, 59, 0.3);
  color: #f2d6d6;
}

body[data-theme="dark"] .book-banner::before {
  background:
    radial-gradient(circle at 42% 48%, rgba(229, 170, 52, 0.08), transparent 0 18%, transparent 46%),
    radial-gradient(circle at 50% 50%, rgba(229, 170, 52, 0.06), transparent 0 34%, transparent 58%);
}

body[data-theme="dark"] .book-cover-wrap {
  border-color: rgba(229, 170, 52, 0.18);
  background: rgba(244, 233, 223, 0.075);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .book-input {
  background: rgba(244, 233, 223, 0.065);
}

@media (max-width: 900px) {
  .book-main {
    padding-top: 22px;
  }

  .book-banner {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 28px;
    padding: 18px 0 30px;
  }

  .book-banner::before {
    inset: -10% -28% auto 18%;
    height: 50%;
  }

  .book-cover-stack {
    width: min(48vw, 230px);
  }

  .book-copy {
    max-width: 720px;
  }

  .book-copy h1 {
    max-width: 680px;
    font-size: clamp(34px, 6.6vw, 48px);
  }

  .book-form {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .book-main {
    padding: 18px 18px 42px;
  }

  .book-banner {
    gap: 18px;
    padding: 8px 0 28px;
  }

  .book-cover-stack {
    width: min(52vw, 178px);
  }

  .book-cover-wrap {
    padding: 10px;
    border-radius: 16px;
  }

  .book-eyebrow {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .book-copy h1 {
    font-size: clamp(30px, 8.8vw, 38px);
    line-height: 1.04;
  }

  .book-kicker {
    margin-top: 14px;
    font-size: 16.5px;
  }

  .book-support {
    font-size: 15px;
  }

  .book-cover-caption {
    font-size: 13px;
    line-height: 1.4;
  }

  .book-fields {
    grid-template-columns: 1fr;
  }

  .book-form {
    margin-top: 20px;
    gap: 12px;
  }

  .book-input {
    border-radius: 14px;
    padding: 13px 14px;
  }

  .book-submit {
    width: 100%;
    padding: 14px 18px;
  }

  .book-turnstile {
    max-width: 100%;
    min-height: 78px;
    overflow: hidden;
  }

  .book-toast {
    right: 16px;
    bottom: 16px;
  }

  .site-footer {
    align-items: flex-start;
  }
}
