:root {
  --parchment: #f3e6cf;
  --parchment-raised: #f8f0de;
  --ink: #1c140f;
  --ink-soft: #3c2d23;
  --wine: #722333;
  --wine-deep: #4e1622;
  --gold: #8d7040;
  --gold-bright: #c4a35a;
  --gold-text: #6e5422;
  --display: "Cormorant Garamond", "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
  --text: "EB Garamond", "Iowan Old Style", Palatino, "Palatino Linotype", "Times New Roman", serif;
  --header-offset: 4rem;
  --measure: 68ch;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(1100px 480px at 8% -10%, rgba(255, 252, 245, 0.95), transparent 55%),
    radial-gradient(800px 520px at 110% 8%, rgba(114, 35, 51, 0.06), transparent 46%),
    linear-gradient(180deg, rgba(255, 250, 240, 0.35), rgba(206, 180, 136, 0.18));
  font-family: var(--text);
  font-size: 1.2rem;
  line-height: 1.65;
  font-weight: 400;
}

body.admin-bar {
  --header-offset: 7.25rem;
}

main {
  flex: 1 0 auto;
}

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

a {
  color: var(--wine-deep);
}

a:hover {
  color: var(--wine);
}

:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

::selection {
  background: rgba(114, 35, 51, 0.18);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--parchment);
  padding: 0.4rem 0.75rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
}

.wrap {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(243, 230, 207, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(141, 112, 64, 0.55);
}

body.admin-bar .site-header {
  top: 32px;
}

.header-inner,
.footer-inner {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 0.85rem 0;
}

.site-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.7rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.site-name:hover {
  color: var(--wine-deep);
}

.nav,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
}

.nav {
  justify-content: flex-end;
}

.nav a,
.footer-nav a {
  font-family: var(--display);
  font-size: 1.12rem;
  letter-spacing: 0.03em;
  color: var(--wine-deep);
  text-decoration: none;
  padding: 0.15rem 0;
}

.nav a:hover,
.footer-nav a:hover {
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.hero {
  padding: 3.25rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.7fr);
  gap: 2.75rem;
  align-items: stretch;
}

.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3.6rem, 6.4vw, 6rem);
  line-height: 0.82;
  letter-spacing: 0.055em;
  color: var(--ink);
}

.hero h1 span {
  display: block;
}

.hero h1::after {
  content: "";
  display: block;
  width: 4.75rem;
  height: 4px;
  margin-top: 1rem;
  border-top: 1px solid var(--gold-bright);
  border-bottom: 1px solid var(--wine);
}

.byline {
  margin: 1.15rem 0 0;
  max-width: 38rem;
  font-size: 1.32rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-soft);
}

.frame {
  position: relative;
  margin: 0;
  min-height: 0;
  border: 1px solid var(--wine-deep);
  background: var(--gold-bright);
  box-shadow: 0 14px 34px rgba(28, 20, 15, 0.08);
}

.frame img {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: cover;
}

.hero-figure img {
  object-position: center 38%;
}

.section {
  padding: 3rem 0;
  border-top: 1px solid rgba(141, 112, 64, 0.45);
}

h2 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.35rem, 4vw, 3.35rem);
  line-height: 1;
  color: var(--wine-deep);
}

h2::after {
  content: "";
  display: block;
  width: 3.6rem;
  height: 4px;
  margin-top: 0.7rem;
  border-top: 1px solid var(--gold-bright);
  border-bottom: 1px solid var(--wine);
}

.subhead {
  margin: 0.9rem 0 1.15rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.65rem;
  line-height: 1.2;
  color: var(--gold-text);
}

.book-grid,
.about-grid {
  display: grid;
  gap: 2rem 2.4rem;
}

.book-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(230px, 0.72fr);
  align-items: start;
}

.about-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  align-items: stretch;
  margin-top: 1.15rem;
}

.prose p,
.about-copy p,
.synopsis p {
  margin: 0 0 1rem;
}

.prose {
  max-width: var(--measure);
}

.card {
  background: rgba(248, 240, 222, 0.88);
  border: 1px solid var(--gold);
  border-top: 4px solid var(--wine);
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: 0 12px 28px rgba(28, 20, 15, 0.05);
}

.book-card {
  position: sticky;
  top: calc(var(--header-offset) + 0.75rem);
}

.card h3 {
  margin: 1.15rem 0 0.4rem;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--wine-deep);
}

.card h3:first-child {
  margin-top: 0;
}

.card p,
.card li,
.card dd,
.card dt {
  font-size: 1.08rem;
  line-height: 1.45;
}

.card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.card li + li {
  margin-top: 0.28rem;
}

.specs {
  margin: 0;
}

.specs div {
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  padding: 0.32rem 0;
  border-bottom: 1px solid rgba(141, 112, 64, 0.28);
}

.specs dt {
  margin: 0;
  font-family: var(--display);
  color: var(--wine-deep);
}

.specs dd {
  margin: 0;
}

.about-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.credentials {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.credentials li {
  margin: 0.45rem 0;
  padding: 0.35rem 0 0.35rem 0.9rem;
  border-left: 2px solid var(--gold-bright);
  font-family: var(--display);
  font-size: 1.32rem;
  line-height: 1.3;
}

.history-group {
  margin-top: 1.85rem;
}

.history-group h3 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--wine-deep);
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.links li + li {
  margin-top: 0.32rem;
}

.links a {
  text-underline-offset: 0.16em;
}

.lede {
  margin: 0.85rem 0 1.35rem;
  font-size: 1.35rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(200px, 0.8fr);
  grid-template-areas:
    "fields photo"
    "actions caption";
  column-gap: 2rem;
  row-gap: 0.7rem;
  align-items: stretch;
}

.fields {
  grid-area: fields;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.photo-slot {
  grid-area: photo;
}

.photo-slot img {
  object-position: 72% 42%;
}

.caption {
  grid-area: caption;
  margin: 0;
  text-align: center;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.form-actions {
  grid-area: actions;
  margin: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--wine-deep);
}

.field input,
.field textarea,
.gate-form input {
  width: 100%;
  font-family: var(--text);
  font-size: 1.12rem;
  color: var(--ink);
  background: rgba(255, 252, 246, 0.78);
  border: 1px solid rgba(78, 22, 34, 0.38);
  padding: 0.5rem 0.65rem;
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.mailing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
}

.microcopy {
  font-family: var(--text);
  font-size: 0.95rem;
  line-height: 1.45;
  font-weight: 400;
  color: var(--ink-soft);
}

.mailing input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--wine-deep);
}

button,
.button {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  background: var(--wine-deep);
  color: #f7edd9;
  border: 1px solid var(--wine-deep);
  padding: 0.55rem 1.45rem;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--wine);
}

.notice {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 252, 246, 0.9);
  border: 1px solid var(--gold);
}

.notice.error {
  border-color: var(--wine);
  color: var(--wine-deep);
}

.contact-form,
.gate-form {
  position: relative;
}

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

.site-footer {
  margin-top: 1rem;
  background: var(--ink);
  color: #f3e6cf;
  border-top: 3px solid var(--gold-bright);
  padding: 2.1rem 0 1.7rem;
}

.footer-name {
  margin: 0;
  text-align: center;
}

.footer-name a {
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  color: #f3e6cf;
  text-decoration: none;
}

.footer-name a:hover {
  color: var(--gold-bright);
}

.footer-nav {
  justify-content: center;
  margin: 0.85rem 0 1rem;
}

.footer-nav a {
  color: #f3e6cf;
}

.footer-nav a:hover {
  color: var(--gold-bright);
}

.copyright {
  margin: 0;
  text-align: center;
  font-size: 1.02rem;
  color: rgba(243, 230, 207, 0.84);
}

.gate-wrap {
  padding: 3.5rem 0 4.75rem;
}

.gate-form {
  max-width: 28rem;
  margin: 0 auto;
  padding: 1.7rem 1.45rem 1.45rem;
  background: rgba(248, 240, 222, 0.9);
  border: 1px solid var(--gold);
  border-top: 4px solid var(--wine);
}

.gate-form h1,
.synopsis h1,
.missing h1 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 0.95;
  color: var(--wine-deep);
}

.gate-lead,
.by {
  margin: 0 0 1.15rem;
  font-style: italic;
  color: var(--ink-soft);
}

.gate-form button {
  margin-top: 0.9rem;
}

.synopsis {
  width: min(42rem, 100%);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.synopsis .by {
  font-size: 1.25rem;
}

.missing {
  padding: 4rem 0 5rem;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 840px) {
  :root {
    --header-offset: 8.5rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0 0.8rem;
  }

  .nav {
    justify-content: flex-start;
    gap: 0.25rem 0.9rem;
  }

  .hero {
    padding-top: 1.85rem;
  }

  .hero-grid,
  .book-grid,
  .about-grid,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-layout {
    grid-template-areas:
      "fields"
      "photo"
      "caption"
      "actions";
  }

  .hero-figure,
  .photo-slot {
    height: 240px;
  }

  .book-card {
    position: static;
  }

  .hero h1 {
    font-size: clamp(3.15rem, 14vw, 4.4rem);
  }
}

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