/* Hallmark · macrostructure: cover and actions · tone: editorial · anchor hues: navy and gold */
/* Hallmark · pre-emit critique: P5 H5 E4 S4 R5 V4 */
@font-face {
  font-family: 'Z003';
  src: url('fonts/Z003-MediumItalic.otf') format('opentype');
  font-display: swap;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font: var(--text-body)/1.5 var(--font-body);
  color-scheme: dark;
}
h1, h2, p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 4px; }
.wrap { width: min(100% - 2 * var(--space-xl), 74rem); margin-inline: auto; }

.landing {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}
.feature {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-lg);
  padding-block: clamp(var(--space-lg), 5vh, var(--space-2xl));
}
.zine-title {
  color: var(--color-gold);
  font: normal var(--text-title)/1.08 var(--font-display);
  text-align: center;
  text-wrap: balance;
}
.zine-spread {
  display: grid;
  grid-template-columns: minmax(0, 2.05fr) minmax(7.75rem, 1fr);
  grid-template-areas:
    "cover credits"
    "actions actions";
  gap: var(--space-lg) clamp(var(--space-sm), 3vw, 1.25rem);
  width: min(100%, 32rem);
}
.zine-actions { grid-area: actions; display: grid; justify-items: center; gap: var(--space-xs); }
.zine-credits {
  grid-area: credits;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: var(--space-sm);
  font-size: .875rem;
  line-height: 1.35;
}
.zine-credits section {
  display: flex;
  flex-direction: column;
  border: var(--rule-thin) solid var(--color-rule);
  background: var(--color-matte);
  padding: var(--space-sm);
}
.zine-credits h2 {
  margin-bottom: var(--space-xs);
  color: var(--color-gold);
  font-size: var(--text-small);
  font-weight: 650;
  letter-spacing: .025em;
}
.credit-list {
  display: grid;
  flex: 1;
  align-content: space-between;
  gap: .125rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-wrap: anywhere;
}
.zine-credits a[href] { text-underline-offset: .25em; }
.zine-credits a[href]:hover { color: var(--color-gold); }
.cover {
  grid-area: cover;
  display: block;
  align-self: center;
  min-width: 0;
}
.cover img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--rule-thin) solid var(--color-rule);
  box-shadow: 0 .5rem 1.75rem var(--color-shadow);
}
.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  width: min(100%, 26rem);
}
.action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 2.75rem;
  padding: var(--space-xs) var(--space-md);
  border: var(--rule-thin) solid var(--color-gold);
  background: var(--color-control);
  color: var(--color-gold);
  font-size: var(--text-small);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.action:hover:not(:disabled) { background: var(--color-control-hover); }
.action-read { background: var(--color-gold); color: var(--color-paper); }
.action-read:hover:not(:disabled) { background: var(--color-gold-hover); }
.action:active:not(:disabled), .reader-button:active:not(:disabled) {
  box-shadow: inset 0 0 0 1px var(--color-gold);
}
.action:disabled { opacity: .65; cursor: wait; }
.actions .action { min-height: 3.5rem; font-size: clamp(.8125rem, 2.65vw, .9375rem); }
.details { color: var(--color-muted); font-size: var(--text-small); text-align: center; }
.details:empty { display: none; }
.error { color: var(--color-error); }
.colophon {
  border-top: var(--rule-thin) solid var(--color-rule);
  padding-block: var(--space-md) var(--space-lg);
  color: var(--color-muted);
  text-align: center;
  font-size: var(--text-small);
}
.colophon p { text-wrap: balance; }
.colophon p + p { margin-top: var(--space-xs); }

.reader-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: var(--space-xs);
  border-bottom: var(--rule-thin) solid var(--color-rule);
}
.reader-head + .details { margin-top: var(--space-xs); }
.reader-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding-block: var(--space-sm);
}
.reader-button {
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: var(--space-xs) var(--space-sm);
  border: var(--rule-thin) solid var(--color-rule);
  background: var(--color-control);
}
.reader-button:hover:not(:disabled) { background: var(--color-control-hover); }
.reader-button:disabled { cursor: default; opacity: .5; }
.reader-controls form { display: flex; gap: var(--space-xs); align-items: center; }
.reader-controls input {
  width: 3.5rem;
  min-height: 2.75rem;
  text-align: center;
  background: var(--color-control);
  border: var(--rule-thin) solid var(--color-rule);
  appearance: textfield;
}
.reader-controls input::-webkit-inner-spin-button { appearance: none; }
.reader-page {
  --reader-gutter: 2rem;
  --edge-size: 1.25rem;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: var(--space-md) var(--reader-gutter);
  background: var(--color-matte);
  min-height: 60vh;
  overflow: clip;
}
.reader-sheet { position: relative; min-width: 0; max-width: 100%; }
.reader-sheet[aria-busy="true"] img { visibility: hidden; }
.reader-page img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: max(30rem, calc(100svh - 10.25rem));
  box-shadow: 0 .15rem .75rem var(--color-shadow);
}
.page-edge {
  position: absolute;
  inset-block: 0;
  width: 20%;
  min-width: 44px;
  border: 0;
  padding: 0;
  color: var(--color-paper);
  background: transparent;
  touch-action: pan-y pinch-zoom;
}
.page-edge:not(:disabled) { cursor: pointer; }
.page-edge:disabled { pointer-events: none; }
.page-edge-prev { left: 0; }
.page-edge-next { right: 0; }
/* Extend each target into the gutter without covering more of the comic. */
.page-edge::before { content: ""; position: absolute; inset-block: 0; width: 50vw; }
.page-edge-prev::before { right: 100%; }
.page-edge-next::before { left: 100%; }
.page-edge span {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: var(--edge-size);
  height: var(--edge-size);
  border-radius: 50%;
  background: var(--color-gold);
  opacity: 0;
  pointer-events: none;
}
.page-edge-prev span { right: calc(100% + (var(--reader-gutter) - var(--edge-size)) / 2); }
.page-edge-next span { left: calc(100% + (var(--reader-gutter) - var(--edge-size)) / 2); }
.page-edge svg {
  display: block;
  width: .875rem;
  height: .875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-edge:focus-visible { outline: none; }
.page-edge:focus-visible span { outline: 2px solid var(--color-gold); outline-offset: 2px; }
.page-edge:focus-visible span, .page-edge:active span { opacity: 1; }
@media (hover: hover) {
  .page-edge:hover span { opacity: 1; }
}
.reader-message { text-align: center; padding: var(--space-xl); }
.reader-message button { display: block; margin: var(--space-sm) auto 0; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 44rem) {
  .wrap { width: calc(100% - 2 * var(--space-md)); }
  .reader-page { --reader-gutter: 1.75rem; padding-block: var(--space-xs); }
  .reader-page img { max-height: none; }
}
@media (max-width: 40rem) {
  .zine-spread {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "cover" "actions" "credits";
    width: min(100%, 27rem);
  }
  .cover { justify-self: center; width: min(100%, 18rem); }
  .zine-credits { text-align: center; }
  .credit-list {
    display: block;
    font-size: .78125rem;
    line-height: 1.75;
    text-wrap: balance;
  }
  .credit-list li { display: inline-block; margin-inline: .1rem; }
}
@media (max-width: 29rem) {
  .zine-credits { font-size: var(--text-small); gap: var(--space-xs); }
  .zine-credits section { padding: var(--space-xs); }
}
@media (max-width: 23rem) {
  .actions .action { padding-inline: var(--space-xs); }
  .reader-controls { gap: var(--space-xs); }
}
