/*
  Color tokens
  --parchment: #F1ECDF; background cream parchment
  --oxblood: #5E1A1A; text, buttons, primary accents
  --dusty-olive: #879180; secondary accent sampled from /assets/divine-lies-cover.jpg vines
*/

:root {
  --parchment: #F1ECDF;
  --oxblood: #5E1A1A;
  --dusty-olive: #879180;
  --measure: 700px;
  --narrow-measure: 640px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

  .skip-link {
    transition: none;
  }
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--oxblood);
  color: var(--parchment);
  font-family: "Alice", Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 16px;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--oxblood);
  font-family: "EB Garamond", Georgia, serif;
  font-size: 20px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body,
button,
input {
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

.site-header,
.site-footer,
main {
  width: min(calc(100% - 40px), var(--measure));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 0 64px;
}

.wordmark {
  display: inline-block;
  font-family: "Alice", Georgia, serif;
  font-size: clamp(1.4rem, 7vw, 2rem);
  line-height: 0.9;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.wordmark img {
  display: block;
  width: 220px;
  max-width: 56vw;
  height: auto;
  mix-blend-mode: darken;
}

.site-footer .wordmark img {
  width: 160px;
}

.wordmark-line {
  display: block;
}

.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;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 20px;
  padding-top: 4px;
  font-family: "Alice", Georgia, serif;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  border-bottom-color: var(--dusty-olive);
}

.hero {
  min-height: 52vh;
  display: flex;
  align-items: center;
  padding: 20px 0 80px;
}

.hero p {
  max-width: var(--narrow-measure);
  margin: 0 0 36px;
  font-family: "Alice", Georgia, serif;
  font-size: clamp(1.6rem, 5.2vw, 2.6rem);
  line-height: 1.22;
}

.section {
  padding: 68px 0;
}

.section-heading,
.book-title,
.about-page h1 {
  margin: 0 0 24px;
  font-family: "Alice", Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
}

.section-heading,
.book-title,
.about-page h1 {
  font-size: clamp(1.8rem, 6vw, 2.6rem);
}

.divider {
  height: 28px;
  margin: 0 auto;
  color: var(--dusty-olive);
}

.divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

.book-cover,
.book-cover-object {
  width: min(100%, 360px);
  margin: 0 0 40px;
  border: 1px solid color-mix(in srgb, var(--dusty-olive) 68%, transparent);
}

.book-cover-object {
  display: block;
  aspect-ratio: 5 / 8;
}

.book-cover-fallback {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  padding: 34px;
  border: 1px solid var(--dusty-olive);
  font-family: "Alice", Georgia, serif;
  text-align: center;
}

.book-cover-fallback strong,
.book-cover-fallback span {
  display: block;
}

.book-cover-fallback strong {
  max-width: 12ch;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.05;
}

.book-cover-fallback span {
  margin-top: 20px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-blurb,
.newsletter-copy,
.essays-copy {
  max-width: var(--narrow-measure);
}

.book-blurb p {
  margin: 0 0 16px;
}

.essays-mark {
  width: min(100%, 140px);
  margin: 0 0 18px;
  mix-blend-mode: darken;
}

.placeholder {
  font-style: italic;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.mailer-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--oxblood);
  background: transparent;
  color: var(--oxblood);
  font-family: "Alice", Georgia, serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.button-primary,
.mailer-form button {
  background: var(--oxblood);
  color: var(--parchment);
}

.button-muted {
  border-color: var(--dusty-olive);
  color: color-mix(in srgb, var(--oxblood) 78%, var(--dusty-olive));
  cursor: default;
}

.button.newsletter-cta,
.mailer-form button.newsletter-cta {
  text-transform: none;
}

.button:hover,
.mailer-form button:hover {
  outline: 1px solid var(--dusty-olive);
  outline-offset: 3px;
}

.button:focus-visible,
.mailer-form button:focus-visible,
.mailer-form input:focus-visible,
.site-nav a:focus-visible,
.footer-links a:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 3px;
}

.newsletter-note {
  margin-top: 24px;
  font-size: 16px;
  font-style: italic;
}

.mailer-form {
  display: flex;
  gap: 12px;
  max-width: 560px;
  margin-top: 28px;
}

.mailer-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mailer-form input {
  flex: 1 1 240px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--oxblood);
  background: transparent;
  color: var(--oxblood);
  font: inherit;
  padding: 12px;
}

.mailer-form input::placeholder {
  color: color-mix(in srgb, var(--oxblood) 80%, var(--parchment));
  opacity: 1;
}

.about-copy {
  max-width: var(--narrow-measure);
}

.about-copy p {
  margin: 0 0 12px;
}

.about-sign {
  margin-top: 24px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 76px 0 36px;
  font-size: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 20px;
}

.copyright {
  margin-top: 8px;
}

@media (max-width: 680px) {
  body {
    font-size: 20px;
  }

  .site-header,
  .site-footer,
  main {
    width: min(calc(100% - 28px), var(--measure));
  }

  .site-header,
  .site-footer {
    flex-direction: column;
  }

  .site-header {
    gap: 24px;
    padding-bottom: 48px;
  }

  .site-nav,
  .footer-links {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding-bottom: 64px;
  }

  .section {
    padding: 56px 0;
  }

  .mailer-form {
    flex-direction: column;
  }

  .mailer-form button {
    width: 100%;
  }
}
