:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  background: #f4efe8;
  color: #211d19;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid #286d61; outline-offset: 4px; }
[hidden] { display: none !important; }

.book-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: max(650px, 100svh);
  padding: clamp(18px, 2.3vw, 32px) clamp(18px, 3.2vw, 52px) 22px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: radial-gradient(ellipse at 50% 49%, #fbfaf5 9%, #f8f4ec 41%, #ede5d9 100%);
}
.book-field, .headline-overlap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.headline-overlap { z-index: 2; }
.site-header {
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 58px;
  padding: 7px 9px 7px 19px;
  border: 1px solid #fff9;
  border-radius: 24px;
  background: #fffcf7ed;
  font-size: 0.9rem;
}
.wordmark { justify-self: start; font-family: Georgia, serif; font-size: 1.13rem; font-weight: bold; }
.site-header a { text-decoration: none; }
.site-header a:hover, .more-menu summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.site-nav > a, .more-menu summary { display: flex; align-items: center; min-height: 44px; }
.more-menu { position: relative; }
.more-menu summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin: 0 0 3px 7px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}
.more-links {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: grid;
  min-width: 156px;
  padding: 6px;
  border: 1px solid #dfd3c4;
  border-radius: 14px;
  background: #fffaf4;
  box-shadow: 0 8px 26px #392c2220;
}
.more-links a { display: block; padding: 12px; }
.more-links a:nth-child(-n+2) { display: none; }
.contact-link, .ebook-form button {
  border: 0;
  border-radius: 50px;
  background: #254b41;
  color: #fff;
}
.contact-link { justify-self: end; padding: 12px 17px; }
.ebook-form button:hover, .contact-link:hover { background: #18372e; }

.hero-title {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin: clamp(28px, 6vh, 68px) 10px 0;
  pointer-events: none;
  font-size: clamp(35px, 5vw, 90px);
  font-family: Newsreader, Georgia, serif;
  font-weight: 600;
  line-height: 1.02;
}
.title-block { min-width: 0; }
.title-block:last-child { text-align: right; }
.title-line { display: block; white-space: nowrap; }
.baseline { display: inline-block; width: 0; height: 0; vertical-align: baseline; }

.hero-footer {
  z-index: 3;
  grid-row: 4;
  display: grid;
  grid-template-columns: 1fr minmax(285px, 380px) 1fr;
  align-items: end;
  gap: 18px;
}
.hero-intro {
  justify-self: start;
  max-width: 235px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #faf5ebea;
  font-size: 0.88rem;
  line-height: 1.4;
}
.ebook { min-width: 0; text-align: center; }
.ebook-form, .ebook-status:not(:empty) {
  min-width: 0;
  min-height: 54px;
  padding: 4px;
  border: 1px solid #fff;
  border-radius: 28px;
  background: #fffaf4;
  box-shadow: 0 3px 16px #392c2217;
}
.ebook-form { display: flex; align-items: center; gap: 4px; }
.ebook-form input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 20px;
  background: transparent;
}
.ebook-form button { min-height: 44px; padding: 8px 14px; white-space: nowrap; font-size: 0.88rem; }
.ebook-form button:disabled { opacity: 0.72; cursor: wait; }
#ebook-note { margin: 6px 0 0; padding: 3px 7px; display: inline-block; border-radius: 8px; background: #faf5ebea; font-size: 0.74rem; }
.ebook-status { margin: 0; }
.ebook-status:not(:empty) { padding: 12px 15px; font-size: 0.85rem; }
.ebook-status a { display: inline-block; margin-top: 5px; }
.ebook-status:not(:empty):not([data-complete]) { margin-top: 8px; }
.motion-toggle {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 5px 11px;
  border: 1px solid #dfd3c4;
  border-radius: 25px;
  background: #fffbf4;
  color: inherit;
  font-size: 0.75rem;
  white-space: nowrap;
}
.motion-icon::before {
  display: block;
  content: '';
  width: 8px;
  height: 10px;
  border-inline: 2px solid currentColor;
}
.motion-toggle[data-paused="true"] .motion-icon::before {
  width: 0;
  height: 0;
  border: 0;
  border-block: 5px solid transparent;
  border-left: 8px solid currentColor;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .book-hero { min-height: max(650px, 100svh); }
  .site-header { display: flex; justify-content: space-between; gap: 9px; padding-left: 12px; }
  .wordmark { margin-right: auto; font-size: 1rem; }
  .site-nav > a { display: none; }
  .more-links a:nth-child(-n+2) { display: block; }
  .contact-link { padding-inline: 10px; white-space: nowrap; }
  .hero-title {
    flex-direction: column;
    align-self: start;
    margin: clamp(24px, 5svh, 43px) 0 0;
    gap: .18em;
    font-size: clamp(24px, 7.35vw, 46px);
    line-height: 1.04;
  }

  .title-block,
  .title-block:last-child {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: .21em;
    text-align: center;
  }

  .title-line { display: inline-block; }
  .hero-footer { grid-template-columns: 1fr auto; gap: 8px; }
  .ebook { grid-column: 1 / -1; grid-row: 2; width: min(100%, 380px); justify-self: center; }
  .hero-intro { grid-row: 1; font-size: 0.78rem; align-self: center; }
  .motion-toggle { grid-row: 1; grid-column: 2; }
}
