:root {
  --page-padding: clamp(1.25rem, 2.5vw, 2.5rem);
  --book-hint-offset: clamp(1.25rem, 5vh, 3.25rem);
  --excerpt-size: 1.18rem;
  --excerpt-line-height: 1.72;
  --ink: #121212;
  --muted: #5b5b5b;
  --line: #d9d9d9;
  --paper: #f0f0ee;
  --field: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.45;
}

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

button,
input,
select {
  font: inherit;
}

.page {
  min-height: 100vh;
}

.hero-screen {
  position: relative;
  display: grid;
  grid-template-columns: minmax(24rem, 1.1fr) minmax(22rem, 0.9fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 100svh;
  align-items: center;
  padding: var(--page-padding);
  padding-bottom: max(var(--page-padding), 5rem);
}

.book-panel {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.book-panel-inner {
  position: relative;
  width: min(100%, 46rem);
  min-height: min(80vh, 52rem);
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  align-content: center;
}

.book-canvas {
  width: min(44rem, 100%);
  height: min(80vh, 48rem);
  min-height: 31rem;
  cursor: grab;
  touch-action: none;
}

.book-hint-label {
  margin-top: calc(var(--book-hint-offset) * -1);
  color: rgba(0, 0, 0, 0.68);
  font-size: 0.88rem;
  font-style: italic;
  letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity 900ms ease, transform 900ms ease;
  transform: translateY(0);
  animation: hint-fade 4.8s ease-in-out infinite;
}

.book-panel-inner.is-book-hint-fading .book-hint-label,
.book-panel-inner.is-book-interacted .book-hint-label {
  opacity: 0;
  transform: translateY(0.35rem);
}

.book-panel-inner.is-book-interacted .book-hint-label {
  animation: none;
}

.book-canvas:active {
  cursor: grabbing;
}

.book-error {
  position: absolute;
  max-width: 18rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.excerpt-panel {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(72vh, 42rem);
}

.excerpt-panel p {
  margin: 0;
  color: #242424;
  font-size: var(--excerpt-size);
  line-height: var(--excerpt-line-height);
  white-space: pre-line;
  transition: opacity 900ms ease;
}

.excerpt-panel.is-excerpt-fading p {
  opacity: 0;
}

.fog-canvas {
  position: absolute;
  inset: -1rem;
  width: calc(100% + 2rem);
  height: calc(100% + 2rem);
  pointer-events: none;
  mix-blend-mode: lighten;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.35rem;
  width: 1.05rem;
  height: 1.05rem;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: translateX(-50%) rotate(45deg);
  opacity: 0.85;
  animation: cue-drift 1.8s ease-in-out infinite;
}

@keyframes cue-drift {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 0.35rem;
  }
}

.details-screen {
  min-height: 100svh;
  padding: clamp(4rem, 8vw, 7rem) var(--page-padding);
}

.details-inner {
  width: min(100%, 52rem);
  margin: 0 auto;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4.5rem);
}

.pull-quote {
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4rem);
  border-block: 1px solid rgba(0, 0, 0, 0.18);
}

.pull-quote p {
  margin: 0;
  color: #1f1f1f;
  font-size: 1.42rem;
  font-style: italic;
  line-height: 1.62;
}

.pull-quote footer {
  margin-top: 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-style: normal;
}

.quote-roman {
  font-style: normal;
}

.announcement {
  width: min(100%, 44rem);
  margin: 0 auto;
}

.announcement h1 {
  margin: 0 0 1.1rem;
  font-size: 4.5rem;
  font-weight: 400;
  line-height: 0.95;
}

.announcement p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.58;
}

.signup-form {
  width: min(100%, 44rem);
  margin: 0 auto;
  display: grid;
  gap: 0.65rem;
  justify-items: start;
  text-align: left;
}

.hero-signup-form {
  grid-column: 2;
  grid-row: 2;
  width: min(100%, 28rem);
  margin: 0;
  gap: 0.5rem;
  justify-self: start;
  justify-items: stretch;
  align-self: start;
  z-index: 3;
}

.hero-signup-form .signup-note {
  color: rgba(18, 18, 18, 0.72);
  font-size: 0.9rem;
  white-space: normal;
}

.hero-signup-form .signup-row {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
}

.hero-signup-form .signup-row input {
  border-color: rgba(18, 18, 18, 0.22);
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 0.45rem 1.4rem rgba(18, 18, 18, 0.04);
}

.hero-signup-form .signup-row button {
  border-color: rgba(18, 18, 18, 0.58);
  padding: 0.7rem 1rem;
  background: transparent;
  color: var(--ink);
}

.hero-signup-form .signup-row button:hover,
.hero-signup-form .signup-row button:focus-visible {
  background: rgba(255, 255, 255, 0.38);
  color: var(--ink);
  transform: none;
}

.hero-signup-form .form-status {
  min-height: 1.2rem;
  font-size: 0.86rem;
}

.signup-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.signup-row {
  width: min(100%, 44rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem;
}

.signup-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.9rem 1.1rem;
  background: var(--field);
}

.signup-row input:focus,
.copies-followup select:focus {
  outline: none;
  border-color: #8d8d8d;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.signup-row input::placeholder {
  font-style: italic;
}

.signup-row button {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.9rem 1.25rem;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.signup-row button:hover,
.signup-row button:focus-visible {
  background: #2b2b2b;
  transform: translateY(-1px);
}

.form-status,
.copies-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.signup-note {
  max-width: 44rem;
  margin: 0;
  color: #565656;
  font-size: 0.92rem;
  white-space: nowrap;
}

.copies-followup {
  width: min(100%, 44rem);
  display: grid;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.copies-followup[hidden] {
  display: none;
}

.copies-followup p {
  margin: 0;
}

.copies-followup label {
  color: #2f2f2f;
  font-size: 0.98rem;
}

.copies-followup select {
  width: min(100%, 12rem);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: var(--field);
  color: var(--ink);
}

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.logo-block {
  display: grid;
  justify-items: center;
}

.logo-block a {
  display: block;
}

.logo-block img {
  width: min(12rem, 45vw);
}

.tuning-panel {
  position: fixed;
  z-index: 20;
  top: 1rem;
  left: 1rem;
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

.tuning-toggle,
.tuning-save {
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}

.tuning-body {
  width: 17rem;
  max-height: calc(100vh - 5rem);
  overflow: auto;
  margin-top: 0.6rem;
  padding: 1rem;
  background: rgba(240, 240, 238, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.16);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
}

.tuning-body h2 {
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
  font-weight: 400;
}

.tuning-body label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.55rem;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  color: #333;
  font-size: 0.84rem;
}

.tuning-body input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
}

.setting-value {
  color: rgba(18, 18, 18, 0.62);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  line-height: 1;
  text-align: right;
  user-select: all;
}

.tuning-body select {
  grid-column: 1 / -1;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 999px;
  padding: 0.45rem 0.6rem;
  background: #fff;
  color: var(--ink);
}

.tuning-status {
  min-height: 1.2rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

@keyframes hint-fade {
  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .hero-signup-form {
    display: none;
  }

  .book-panel {
    grid-row: auto;
  }

  .hero-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: auto;
    gap: 1rem;
    padding-top: 1.25rem;
    padding-bottom: var(--page-padding);
  }

  .book-panel-inner {
    min-height: auto;
  }

  .book-canvas {
    width: min(38rem, 100%);
    height: min(68vh, 39rem);
    min-height: 24rem;
  }

  .excerpt-panel {
    min-height: auto;
    padding-bottom: 2rem;
  }

  .excerpt-panel p {
    line-height: 1.65;
  }

  .details-screen {
    padding-top: 3.5rem;
  }

  .pull-quote p {
    font-size: 1.2rem;
  }

  .announcement h1 {
    font-size: 3.4rem;
  }
}

@media (min-width: 961px) {
  .excerpt-panel {
    align-self: end;
    min-height: min(62vh, 36rem);
    padding-bottom: 1rem;
  }
}

@media (max-width: 620px) {
  .hero-screen {
    gap: 0.25rem;
    min-height: 100svh;
    overflow: hidden;
    padding-inline: 0.85rem;
  }

  .signup-row {
    grid-template-columns: 1fr;
  }

  .signup-row button {
    width: 100%;
  }

  .book-panel {
    margin-left: -45vw;
    margin-right: -35vw;
  }

  .book-panel-inner {
    width: 180vw;
  }

  .book-canvas {
    width: 180vw;
    height: 66svh;
    min-height: 35rem;
  }

  .excerpt-panel {
    min-height: 0;
    padding-bottom: 3.5rem;
  }

  .excerpt-panel p {
    width: max-content;
    max-width: 100%;
    justify-self: center;
    font-size: var(--mobile-excerpt-size, 0.72rem);
    line-height: 1.38;
    text-align: left;
    white-space: pre-line;
  }

  .signup-note {
    white-space: normal;
  }
}
