:root {
  color-scheme: light;
  --color-bg: #f4f1e8;
  --color-bg-deep: #efe9dd;
  --color-surface: rgba(255, 251, 242, 0.5);
  --color-surface-strong: rgba(255, 249, 238, 0.78);
  --color-text: #2c2926;
  --color-text-muted: #6e675f;
  --color-border: rgba(72, 57, 42, 0.12);
  --color-button: #0e2a28;
  --color-button-hover: #173633;
  --color-accent: #a8823b;
  --color-shadow: rgba(32, 24, 16, 0.08);
  --container-width: 1200px;
  --radius-large: 28px;
  --radius-medium: 22px;
  --radius-pill: 999px;
  --transition-base: 220ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", sans-serif;
  color: var(--color-text);
  background:
    radial-gradient(circle at top, rgba(168, 130, 59, 0.1), transparent 32%),
    linear-gradient(180deg, #f8f4ea 0%, var(--color-bg) 28%, var(--color-bg-deep) 100%);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--color-button);
  color: #f6f0e6;
  transform: translateY(-200%);
  transition: transform var(--transition-base);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.section {
  padding: 6rem 1.5rem;
}

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

.narrow {
  width: min(100%, 760px);
}

.centered {
  text-align: center;
}

.hero {
  padding-top: 5.5rem;
  padding-bottom: 3.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
  gap: 3.75rem;
  align-items: center;
}

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

.hero-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-copy .eyebrow {
  margin: 0 0 1.2rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(3rem, 6.1vw, 4.75rem);
  line-height: 0.9;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.15rem, 3.8vw, 3.15rem);
  line-height: 0.98;
  text-wrap: balance;
}

h3 {
  font-size: 1.7rem;
  margin-bottom: 0.6rem;
  line-height: 1;
}

.subheadline {
  margin: 1rem 0 0;
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.75vw, 1.24rem);
  line-height: 1.65;
  color: var(--color-text);
}

.hero-copy .subheadline {
  margin-top: 1.7rem;
}

.hero-copy .supporting-line {
  margin-top: 0.85rem;
}

.supporting-line {
  margin: 0.7rem 0 0;
  max-width: 34rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 0.9rem;
  margin-top: 1.6rem;
}

.hero-actions .button-primary {
  box-shadow: 0 16px 32px -20px rgba(14, 42, 40, 0.82);
}

.hero-actions .button-secondary {
  min-height: 3.25rem;
  padding: 0.95rem 1.55rem;
}

.release-note {
  margin: 0.95rem 0 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.hero-media-release-note {
  width: min(100%, 22rem);
  margin: 0.85rem auto 0;
  text-align: center;
}

@media (min-width: 961px) {
  .hero-book-cover-frame {
    width: min(100%, 21.5rem);
  }
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  min-height: 3.25rem;
  padding: 0.95rem 1.7rem;
  border-radius: var(--radius-pill);
  background: var(--color-button);
  color: #f6f0e6;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
  box-shadow: 0 14px 28px -22px rgba(14, 42, 40, 0.75);
}

.button-icon {
  font-size: 0.9em;
  line-height: 1;
  opacity: 0.78;
  transform: translateY(-0.08em);
}

.button-primary:hover {
  background: var(--color-button-hover);
  transform: translateY(-1px);
}

.button-primary:focus-visible,
.text-link:focus-visible {
  outline: 3px solid rgba(168, 130, 59, 0.8);
  outline-offset: 4px;
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  min-height: 3.25rem;
  padding: 0.95rem 1.7rem;
  border: 1px solid rgba(168, 130, 59, 0.34);
  border-radius: var(--radius-pill);
  background: rgba(255, 250, 241, 0.58);
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-base),
    box-shadow var(--transition-base);
  box-shadow: 0 12px 24px -26px rgba(58, 43, 26, 0.34);
}

.button-secondary:hover {
  background: rgba(255, 250, 241, 0.82);
  border-color: rgba(168, 130, 59, 0.48);
  transform: translateY(-1px);
}

.button-secondary:focus-visible {
  outline: 3px solid rgba(168, 130, 59, 0.8);
  outline-offset: 4px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  text-underline-offset: 0.2em;
  transition: color var(--transition-base), text-decoration-color var(--transition-base);
}

.text-link:hover {
  color: var(--color-text);
}

.text-link:hover span:first-child {
  text-decoration: underline;
  text-decoration-color: rgba(168, 130, 59, 0.9);
  text-underline-offset: 0.2em;
}

.text-link-icon {
  font-size: 0.84em;
  line-height: 1;
  opacity: 0.74;
  transform: translateY(-0.08em);
}

.hero-image-frame {
  position: relative;
  overflow: hidden;
  margin: 0;
  min-height: 560px;
  border: 1px solid rgba(53, 41, 31, 0.12);
  border-radius: var(--radius-large);
  background:
    linear-gradient(180deg, rgba(31, 22, 16, 0.08), rgba(31, 22, 16, 0.28)),
    #d5c5a8;
  box-shadow:
    0 24px 48px -34px rgba(45, 33, 20, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.hero-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 20, 12, 0.05), rgba(28, 20, 12, 0.24)),
    linear-gradient(90deg, rgba(28, 20, 12, 0.08), transparent 28%, transparent 72%, rgba(28, 20, 12, 0.12));
  pointer-events: none;
}

.hero-book-cover-frame {
  width: min(100%, 28rem);
  min-height: 0;
  aspect-ratio: 1600 / 2560;
  margin-inline: auto;
  padding: 0.85rem;
  background:
    linear-gradient(180deg, rgba(31, 22, 16, 0.04), rgba(31, 22, 16, 0.18)),
    #1e1717;
}

.hero-book-cover-frame picture {
  display: block;
  height: 100%;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.9) contrast(1.02);
}

.hero-book-cover-frame img {
  min-height: 0;
  object-fit: contain;
  filter: saturate(0.96) contrast(1.02);
}

.details-section {
  padding-top: 3.6rem;
  padding-bottom: 4.3rem;
}

.section-heading {
  max-width: 860px;
  margin: 0 auto 3rem;
}

.centered-heading {
  text-align: center;
}

.centered-heading .eyebrow {
  margin-bottom: 1.55rem;
}

.section-heading h2 {
  margin-top: 0.35rem;
}

.section-lead {
  margin: 1.05rem auto 0;
  max-width: 34rem;
  font-size: clamp(1.02rem, 1.55vw, 1.18rem);
  line-height: 1.6;
  color: var(--color-text-muted);
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.45rem;
  align-items: stretch;
}

.editorial-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding: 1.65rem 1.15rem 1.2rem;
  border: 1px solid rgba(168, 130, 59, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 251, 243, 0.42), rgba(255, 251, 243, 0.16));
  box-shadow: none;
  text-align: center;
}

.editorial-panel p {
  margin: 0;
  max-width: 26ch;
  margin-inline: auto;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.final-cta {
  padding-top: 3.7rem;
  padding-bottom: 4rem;
}

.final-cta h2 {
  margin-bottom: 1.35rem;
}

.cta-note,
.footer-line {
  color: var(--color-text-muted);
}

.cta-note {
  margin: 1rem 0 0;
}

.final-cta-supporting {
  margin-top: 1rem;
}

.final-cta-supporting .cta-note {
  margin: 0;
  max-width: 36rem;
  margin-inline: auto;
  line-height: 1.65;
}

.final-preorder-link {
  display: inline-flex;
  margin-top: 0.55rem;
}

.footer-line {
  margin: 1.85rem 0 0;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  opacity: 0.92;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --color-bg: #171410;
    --color-bg-deep: #0f0d0a;
    --color-surface: rgba(39, 32, 25, 0.48);
    --color-surface-strong: rgba(48, 40, 31, 0.7);
    --color-text: #efe4d1;
    --color-text-muted: #c3b29b;
    --color-border: rgba(210, 185, 142, 0.14);
    --color-button: #d7b170;
    --color-button-hover: #e0bd82;
    --color-accent: #d0a75f;
    --color-shadow: rgba(0, 0, 0, 0.42);
  }

  body {
    background:
      radial-gradient(circle at top, rgba(208, 167, 95, 0.08), transparent 34%),
      linear-gradient(180deg, #1c1813 0%, var(--color-bg) 30%, var(--color-bg-deep) 100%);
  }

  .skip-link {
    color: #171410;
  }

  .button-primary {
    color: #171410;
    box-shadow: 0 16px 30px -24px rgba(215, 177, 112, 0.55);
  }

  .button-secondary {
    background: rgba(39, 32, 25, 0.5);
    border-color: rgba(210, 185, 142, 0.22);
    color: var(--color-text);
    box-shadow: 0 16px 30px -26px rgba(0, 0, 0, 0.45);
  }

  .button-secondary:hover {
    background: rgba(48, 40, 31, 0.76);
    border-color: rgba(215, 177, 112, 0.34);
  }

  .text-link:hover {
    color: var(--color-text);
  }

  .hero-image-frame {
    border-color: rgba(215, 193, 157, 0.12);
    background:
      linear-gradient(180deg, rgba(12, 10, 8, 0.14), rgba(12, 10, 8, 0.34)),
      #3b3025;
    box-shadow:
      0 28px 52px -38px rgba(0, 0, 0, 0.68),
      inset 0 1px 0 rgba(255, 247, 234, 0.06);
  }

  .hero-image-frame::after {
    background:
      linear-gradient(180deg, rgba(8, 7, 6, 0.12), rgba(8, 7, 6, 0.38)),
      linear-gradient(90deg, rgba(8, 7, 6, 0.16), transparent 28%, transparent 72%, rgba(8, 7, 6, 0.18));
  }

  .editorial-panel {
    background:
      linear-gradient(180deg, rgba(48, 40, 31, 0.28), rgba(32, 27, 21, 0.14)),
      var(--color-surface);
    border-color: rgba(210, 185, 142, 0.08);
  }

  .button-primary:focus-visible,
  .button-secondary:focus-visible,
  .text-link:focus-visible {
    outline-color: rgba(215, 177, 112, 0.88);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: fade-up 900ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.reveal-delay {
  animation-delay: 140ms;
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .hero-grid,
  .editorial-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 2.35rem;
    align-items: start;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-actions {
    margin-top: 1.55rem;
  }

  .hero-book-cover-frame {
    width: min(100%, 22rem);
  }

  .details-section {
    padding-top: 2.75rem;
  }

  .hero-image-frame,
  .hero-image-frame img {
    min-height: 460px;
  }

  .hero-book-cover-frame img {
    min-height: 0;
  }

  .editorial-grid {
    gap: 0.75rem;
  }

  .editorial-panel p {
    max-width: none;
  }

}

@media (max-width: 640px) {
  .section {
    padding: 2.5rem 1rem;
  }

  .hero {
    padding-top: 3rem;
    padding-bottom: 2.3rem;
  }

  h1 {
    font-size: clamp(2.75rem, 12.5vw, 3.85rem);
  }

  .subheadline {
    margin-top: 0.9rem;
    font-size: 1.02rem;
  }

  .hero-copy .subheadline {
    margin-top: 1.35rem;
  }

  .hero-copy .supporting-line {
    margin-top: 0.8rem;
  }

  .supporting-line {
    margin-top: 0.65rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    margin-top: 1.5rem;
    gap: 0.7rem;
  }

  .hero-actions .button-primary,
  .hero-actions .button-secondary {
    width: 100%;
    justify-content: center;
  }

  .release-note {
    margin-top: 0.85rem;
  }

  .hero-media-release-note {
    width: min(100%, 24rem);
  }

  .button-primary {
    width: auto;
  }

  .text-link {
    width: auto;
    text-align: center;
  }

  .hero-image-frame,
  .hero-image-frame img {
    min-height: 320px;
  }

  .hero-book-cover-frame {
    width: min(100%, 21rem);
    padding: 0.65rem;
  }

  .hero-book-cover-frame img {
    min-height: 0;
  }

  .hero-media-release-note {
    width: min(100%, 21rem);
  }

  .details-section {
    padding-top: 2.35rem;
    padding-bottom: 3.15rem;
  }

  .section-heading {
    margin-bottom: 1.9rem;
  }

  .editorial-panel {
    padding: 1.1rem 0.55rem 0.95rem;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    background: transparent;
  }

  h3 {
    font-size: 1.5rem;
  }

  .final-cta {
    padding-top: 3rem;
    padding-bottom: 3.25rem;
  }
}
