/* =========================================================
   CORPUS VILE
   A digital zine. Dark paper, bone ink, one wound of red.
   ========================================================= */

:root {
  --paper:      #0b0a0a;
  --paper-2:    #121010;
  --ink:        #e8e2d6;
  --ink-dim:    #9a9287;
  --ink-faint:  #5f5952;
  --blood:      #c1121f;
  --blood-dim:  #7d0d15;
  --rule:       #2a2624;

  --serif:  "EB Garamond", Iowan Old Style, Palatino, Georgia, serif;
  --type:   "Special Elite", "Courier New", Courier, monospace;
  --cond:   "Oswald", "Helvetica Neue", Impact, sans-serif;

  --measure: 34rem;
  --gutter:  clamp(1.25rem, 5vw, 4rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--blood); color: #fff; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blood);
  color: #fff;
  padding: 0.6rem 1rem;
  font-family: var(--type);
  z-index: 100;
}
.skip:focus { left: 0; }

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

/* Holds SVG filter definitions only; nothing here is meant to be seen. */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- Texture: photocopier grain + vignette ---------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  will-change: transform;
  animation: grain 700ms steps(1) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-3%, 2%); }
  50%  { transform: translate(2%, -3%); }
  75%  { transform: translate(-2%, -2%); }
  100% { transform: translate(3%, 1%); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 85% at 50% 30%, transparent 45%, rgba(0,0,0,0.72) 100%);
}

/* ---------- Masthead ---------- */

.masthead {
  position: relative;
  z-index: 3;
  padding: clamp(2.5rem, 7vh, 5rem) var(--gutter) clamp(2rem, 5vh, 3.5rem);
  text-align: center;
  max-width: 68rem;
  margin-inline: auto;
}

.mark {
  display: block;
  /* Source art is 800px wide; 21rem keeps it inside that even at 2x density. */
  width: clamp(12rem, 32vw, 21rem);
  margin: 0 auto clamp(1.4rem, 4vh, 2.4rem);
}

.mark img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---- Torn rules ----
   The same idea as the ring around the author portraits: a straight stroke
   shoved around by turbulence, then bitten into by a second, harder-edged noise
   so the line breaks up the way a dry brush does.

   This is a mask rather than a filter because the ring's filter is declared
   inline in authors.html, and these rules appear on every page. Masking also
   leaves the colour in CSS, so the line still follows --ink and still inverts
   for print. Both bars of the old double rule are drawn inside the mask, since
   a box-shadow would be clipped away by it.

   Two knobs. The displacement `scale` (3) is how far the line wanders: much
   past 3 and a 3px stroke stops reading as a torn edge and starts reading as a
   wave. The feFuncA `intercept` (-5.6) sets how much gets bitten out. Turbulence
   averages 0.5, so with slope 8 the erosion starts at luminance 0.7 and takes
   roughly 8% of the line; raising it toward -4 chews away far more than it
   looks like it should. */
:root {
  --torn-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='10' viewBox='0 0 1200 10' preserveAspectRatio='none'%3E%3Cfilter id='s' x='-3%25' y='-400%25' width='106%25' height='900%25' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.03 0.5' numOctaves='4' seed='11' result='g'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='g' scale='3' xChannelSelector='R' yChannelSelector='G' result='w'/%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.06 0.9' numOctaves='3' seed='5' result='b'/%3E%3CfeColorMatrix in='b' type='luminanceToAlpha' result='ba'/%3E%3CfeComponentTransfer in='ba' result='bh'%3E%3CfeFuncA type='linear' slope='8' intercept='-5.6'/%3E%3C/feComponentTransfer%3E%3CfeComposite in='w' in2='bh' operator='out'/%3E%3C/filter%3E%3Cg fill='%23fff' filter='url(%23s)'%3E%3Crect x='0' y='1' width='1200' height='3'/%3E%3Crect x='0' y='7' width='1200' height='1.2'/%3E%3C/g%3E%3C/svg%3E");
}

.masthead__rule,
.footer__rule {
  height: 10px;
  background: var(--ink);
  -webkit-mask-image: var(--torn-rule);
          mask-image: var(--torn-rule);
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}

.masthead__rule {
  opacity: 0.85;
  margin: 0 auto;
  max-width: 46rem;
}

/* The masthead carries two of these a few lines apart, and an identical tear in
   both reads as a repeat. Flipping the second is enough to break the match. */
.masthead__rule:nth-of-type(2) {
  transform: scaleX(-1);
}

.kicker {
  font-family: var(--type);
  font-size: clamp(0.62rem, 0.55rem + 0.3vw, 0.78rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 1.4rem 0 0.6rem;
}

.logotype {
  /* Source art is 734px wide; capping the display width near that keeps it from
     softening on high-density screens. */
  width: min(100%, 34rem);
  margin: 0.9rem auto 1.7rem;
}

.logotype img {
  display: block;
  width: 100%;
  height: auto;
}

.creed {
  font-family: var(--type);
  font-size: clamp(0.68rem, 0.6rem + 0.35vw, 0.86rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 1.2rem 0 0;
}

/* ---------- Top navigation ---------- */

.topnav {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.1rem, 4vw, 2.4rem);
  padding: 1.4rem var(--gutter) 0;
}

.topnav a {
  font-family: var(--type);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--blood);
}

.topnav a[aria-current="page"] {
  color: var(--ink-dim);
  border-bottom-color: var(--rule);
}

/* Once there is enough room in the left margin that a rail cannot collide with
   the 62rem content column, move the nav there and set it vertically. Below this
   width it stays a horizontal bar at the top. */
@media (min-width: 78rem) {
  .topnav {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 5;
    flex-direction: column;
    align-items: center;
    gap: 2.4rem;
    padding: 2rem 1.1rem;
    border-right: 1px solid var(--rule);
  }

  .topnav a {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 0 0 0 0.35rem;
    border-bottom-color: transparent;
    border-left: 1px solid transparent;
  }

  .topnav a:hover,
  .topnav a:focus-visible {
    border-bottom-color: transparent;
    border-left-color: var(--blood);
  }

  .topnav a[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--rule);
  }
}

/* ---------- Sections ---------- */

main { position: relative; z-index: 3; }

.section {
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(3.5rem, 9vh, 6.5rem) var(--gutter);
}

.section__num {
  font-family: var(--type);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--blood);
  margin: 0 0 0.4rem;
}

.section__title {
  font-family: var(--cond);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3.4rem);
  line-height: 1;
  margin: 0 0 2rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.15em; }
.prose--tight { margin-bottom: 2.6rem; }

.lede {
  font-size: 1.22em;
  line-height: 1.5;
  color: #f2ece1;
}

.prose em { color: var(--ink); font-style: italic; }
.prose strong, .list strong { color: #fff; }

/* ---------- Credo pull-quote ---------- */

.credo {
  margin: 3rem 0 0;
  padding: 1.8rem 0 1.8rem 1.6rem;
  border-left: 4px solid var(--blood);
  font-family: var(--cond);
  font-weight: 200;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 1rem + 2.4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.credo strong {
  font-weight: 600;
  color: var(--blood);
  letter-spacing: 0.04em;
}

/* ---------- Divider ---------- */

.divider {
  border: 0;
  height: 1px;
  background: var(--rule);
  max-width: 62rem;
  margin: 0 auto;
  position: relative;
}

.divider::after {
  content: "✚";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--paper);
  color: var(--blood);
  font-size: 0.8rem;
  padding: 0 0.8rem;
}

/* ---------- Influence grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.card {
  background: var(--paper);
  padding: 1.7rem 1.5rem;
  transition: background 220ms ease, transform 220ms ease;
}

.card:hover { background: var(--paper-2); }

.card__title {
  font-family: var(--type);
  font-weight: 400;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blood);
  margin: 0 0 0.8rem;
}

.card__body {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

/* ---------- Call to arms ---------- */

.call {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  margin-bottom: 3rem;
}

.call__head {
  font-family: var(--cond);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 1.1rem;
  margin: 0 0 1.1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}

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

.list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.85rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-dim);
}

.list li::before {
  content: "✚";
  position: absolute;
  left: 0;
  top: 0.06em;
  color: var(--blood);
  font-size: 0.78rem;
}

.list--no li::before {
  content: "✕";
  color: var(--ink-faint);
}

.list__label {
  display: block;
  font-family: var(--type);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

/* ---------- Fine print ---------- */

.specs {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blood-dim);
  padding: 1.4rem 1.5rem;
  max-width: 44rem;
  background: var(--paper-2);
}

.specs p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

.specs__title {
  font-family: var(--type) !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink) !important;
  margin-bottom: 0.7rem !important;
}

/* ---------- Buttons + submit ---------- */

.btn {
  display: inline-block;
  font-family: var(--type);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn--solid {
  background: var(--blood);
  border-color: var(--blood);
  color: #fff;
  text-transform: none;
  letter-spacing: 0.04em;
}

.btn--solid:hover,
.btn--solid:focus-visible {
  background: #fff;
  border-color: #fff;
  color: var(--paper);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.section--submit { position: relative; }

/* ---------- Submission form ---------- */

.sub {
  max-width: 46rem;
  margin: 0 0 2.5rem;
}

/* The honeypot. Moved off-screen rather than display:none, because some bots
   skip anything they can tell is hidden, and the whole point is that they
   should fill it in. aria-hidden and tabindex keep people away from it. */
.sub__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sub__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.6rem;
}

.sub__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0 0 1.3rem;
}

.sub__field > label {
  font-family: var(--type);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.sub__opt { color: var(--ink-faint); }

.sub__hint {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

.sub input[type="text"],
.sub input[type="email"],
.sub select,
.sub textarea {
  font-family: var(--serif);
  font-size: 1rem;
  width: 100%;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.6rem 0.7rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.sub textarea {
  resize: vertical;
  line-height: 1.6;
}

.sub input:focus,
.sub select:focus,
.sub textarea:focus {
  outline: none;
  border-color: var(--blood);
  box-shadow: inset 0 0 0 1px var(--blood-dim);
}

.sub input[type="file"] {
  font-family: var(--type);
  font-size: 0.78rem;
  color: var(--ink-dim);
  padding: 0.5rem 0;
}

.sub input[type="file"]::file-selector-button {
  font-family: var(--type);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  padding: 0.5rem 0.9rem;
  margin-right: 0.9rem;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.sub input[type="file"]::file-selector-button:hover {
  border-color: var(--blood);
  color: var(--blood);
}

.sub__send { margin: 0.6rem 0 0; }

.sub__send .btn {
  cursor: pointer;
  font: inherit;
  font-family: var(--type);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

@media (max-width: 44rem) {
  .sub__row { grid-template-columns: 1fr; }
}

/* Rubber stamp */
.stamp {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(2rem, 6vh, 4rem);
  font-family: var(--type);
  font-size: clamp(0.8rem, 0.6rem + 0.8vw, 1.15rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blood);
  border: 3px double var(--blood);
  padding: 0.45rem 1rem;
  transform: rotate(-8deg);
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: clamp(3rem, 8vh, 5rem) var(--gutter) 3rem;
  max-width: 62rem;
  margin-inline: auto;
}

.footer__rule {
  opacity: 0.5;
  margin-bottom: 2.2rem;
  /* Mirrored so the footer does not repeat the masthead's tear verbatim. */
  transform: scaleX(-1);
}

.footer__skull {
  display: block;
  width: 5.6rem;
  margin: 0 auto 1.3rem;
  opacity: 0.8;
}

.footer__skull img {
  display: block;
  width: 100%;
  height: auto;
}

.footer__mark {
  display: block;
  width: min(100%, 15rem);
  margin: 0 auto 1.5rem;
  opacity: 0.85;
}

.footer__mark img {
  display: block;
  width: 100%;
  height: auto;
}

.footer__lines {
  font-family: var(--type);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  margin: 0 0 1.8rem;
}

.footer a {
  color: var(--ink-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--blood-dim);
  padding-bottom: 1px;
}

.footer a:hover { color: var(--blood); border-color: var(--blood); }

/* The page you are already on, marked the same way as in the top nav: dimmed,
   with the red underline dropped back to a plain rule so it does not invite a
   click that goes nowhere. */
.footer__lines a[aria-current="page"] {
  color: var(--ink-faint);
  border-bottom-color: var(--rule);
}

.colophon {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink-faint);
  margin: 0;
}

.year { font-style: normal; }

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Small screens ---------- */

@media (max-width: 34rem) {
  .stamp {
    position: static;
    display: inline-block;
    transform: rotate(-4deg);
    margin-top: 1rem;
  }
  .credo { padding-left: 1.1rem; }
}

/* =========================================================
   SHORT STORIES PAGE
   ========================================================= */

.page-head {
  position: relative;
  z-index: 3;
  max-width: 62rem;
  margin-inline: auto;
  padding: clamp(2rem, 6vh, 3.5rem) var(--gutter) 0;
  text-align: center;
}

.page-head__home {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 1.6rem;
}

.page-head__skull {
  display: block;
  width: clamp(8rem, 21vw, 12.5rem);
  margin: 0 auto;
  opacity: 0.85;
  transition: opacity 200ms ease;
}

.page-head__home:hover .page-head__skull { opacity: 1; }

.page-head__skull img {
  display: block;
  width: 100%;
  height: auto;
}

.page-title {
  font-family: var(--cond);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.6rem);
  line-height: 1;
  margin: 1.6rem 0 1.2rem;
}

.page-lede {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--ink-dim);
  font-size: 1.05rem;
}

.section--catalogue { padding-top: clamp(2.5rem, 6vh, 4rem); }

/* ---------- Filters ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1.2rem;
  padding-bottom: 1.4rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px solid var(--rule);
}

.filters__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 12rem;
}

.filters__label {
  font-family: var(--type);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blood);
}

.filters__select {
  font-family: var(--type);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.6rem 2.2rem 0.6rem 0.8rem;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  /* Chevron drawn inline so the control keeps its own look on every platform. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239a9287' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  transition: border-color 180ms ease, color 180ms ease;
}

.filters__select:hover { border-color: var(--ink-faint); }

.filters__select:focus-visible {
  outline: 2px solid var(--blood);
  outline-offset: 2px;
}

.filters__clear {
  padding: 0.55rem 1.1rem;
  font-size: 0.74rem;
}

.filters__count {
  font-family: var(--type);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.5rem auto;
}

/* ---------- Story grid ---------- */

.stories {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.story {
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--rule);
}

.story:first-child {
  border-top: 0;
  padding-top: 0;
}

/* One per row: a large cover beside the text, like a listing in a catalogue. */
.story__frame {
  display: grid;
  /* Sized so the taller 2:3 cover still sits below the height of its blurb.
     Wider than about 13rem and the cover starts to outweigh the text beside it. */
  grid-template-columns: clamp(9rem, 18vw, 13rem) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  height: 100%;
}

.story__cover {
  position: relative;
  /* Book proportions, and the shape tools/optimize-images.sh crops covers to.
     Change both together or the browser re-crops what the script produced. */
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}

.story__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

/* Typographic stand-in when a story has no artwork yet. */
.story__cover--blank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  text-align: center;
  background-color: var(--paper-2);
  background-image: url("assets/mark-small.png");
  background-repeat: no-repeat;
  background-position: center 22%;
  background-size: 42% auto;
}

.story__initial {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 4.4rem;
  line-height: 1;
  color: var(--blood);
  opacity: 0.22;
  margin-top: 22%;
}

.story__coverline {
  font-family: var(--type);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 0.4rem;
}

.story__body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.story__genre {
  font-family: var(--type);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blood);
  margin: 0 0 0.4rem;
}

.story__title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
  line-height: 1.2;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.story__author {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-dim);
  margin: 0 0 0.6rem;
}

.story__blurb {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-dim);
  margin: 0 0 1.1rem;
  max-width: 44rem;
}

.story__date {
  font-family: var(--type);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule);
}

/* Sits at the foot of the card, under the date, so the eye finishes on the way
   in. align-self stops the flex column stretching it to the full width. */
.story__read {
  align-self: flex-start;
  margin-top: 0.9rem;
  padding: 0.6rem 1.15rem;
  font-size: 0.76rem;
  border-color: var(--blood-dim);
  color: var(--blood);
}

.story__read::after {
  content: "\2192";
  margin-left: 0.55rem;
}

.story__read:hover,
.story__read:focus-visible {
  background: var(--blood);
  border-color: var(--blood);
  color: #fff;
}

.stories__empty {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-dim);
  padding: 2.5rem 0;
  margin: 0;
}

.stories__empty[hidden] { display: none; }

/* On phones the cover moves above the text rather than beside it. */
@media (max-width: 34rem) {
  .story__frame {
    grid-template-columns: minmax(0, 1fr);
  }
  .story__cover {
    width: 9.5rem;
  }
}

.footer__dot { color: var(--ink-faint); padding: 0 0.5rem; }

/* =========================================================
   AUTHORS PAGE
   ========================================================= */

.authors {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* One author per row, separated by rules like entries in a printed index. */
.author {
  display: grid;
  grid-template-columns: clamp(13rem, 26vw, 17rem) 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  padding: clamp(1.8rem, 4vw, 2.6rem) 0;
  border-top: 1px solid var(--rule);
}

.author:first-child {
  border-top: 0;
  padding-top: 0;
}

.author__body {
  max-width: 44rem;
}

.author__portrait {
  position: relative;
  aspect-ratio: 1 / 1;
  /* Room for the ring, which is drawn outside the photo. */
  margin: 3.5%;
}

.author__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ---- The hand-inked ring ----
   Three things together get close to the drawn circle around the skull:
   a deliberately lopsided border-radius so it is not a true circle, an uneven
   stroke width so one side is heavier, and a turbulence displacement filter
   that makes the line wander and break the way a dry brush does. */
.author__portrait::after {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 49% 51% 52% 48% / 51% 48% 52% 49%;
  border: 1.5px solid var(--ink);
  border-left-width: 2.5px;
  border-bottom-width: 2px;
  opacity: 0.8;
  filter: url("#inkring");
  pointer-events: none;
}

/* A second, fainter pass, rotated and displaced differently, so the stroke
   looks gone over twice rather than drawn once by a machine. */
.author__portrait::before {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 52% 48% 49% 51% / 48% 52% 49% 51%;
  border: 1px solid var(--ink);
  opacity: 0.3;
  transform: rotate(14deg);
  filter: url("#inkring");
  pointer-events: none;
  z-index: 1;
}

/* Stand-in until a real portrait exists. */
.author__portrait--blank {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: var(--paper-2);
  background-image: url("assets/mark-small.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 62% auto;
}

.author__initials {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 2.1rem;
  letter-spacing: 0.08em;
  color: var(--blood);
  background: rgba(11, 10, 10, 0.72);
  padding: 0.15rem 0.5rem;
}

.author__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.7rem);
  line-height: 1.2;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.author__meta {
  font-family: var(--type);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blood);
  margin: 0 0 0.7rem;
}

.author__bio {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-dim);
  margin: 0 0 0.9rem;
}

.author__link {
  display: inline-block;
  font-family: var(--type);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--blood-dim);
  transition: color 180ms ease, border-color 180ms ease;
}

.author__link::after {
  content: " \2192";
}

.author__link:hover,
.author__link:focus-visible {
  color: var(--blood);
  border-bottom-color: var(--blood);
}

@media (max-width: 34rem) {
  .author {
    grid-template-columns: 1fr;
  }
  .author__portrait {
    width: 13rem;
  }
}

/* ---------- Print: it should photocopy well ---------- */

@media print {
  .grain, .vignette, .topnav { display: none; }
  body { background: #fff; color: #000; }
  .section__title, .card__title, .section__num { color: #000; }
  /* Skull and wordmark are pale art, invisible on white paper. */
  .mark img, .footer__skull img, .logotype img, .footer__mark img,
  .page-head__skull img {
    filter: invert(1);
  }
  /* A bone-coloured ring would vanish on white; ink it instead. */
  .author__portrait::before,
  .author__portrait::after {
    border-color: #000;
    filter: none;
  }
  /* Same problem for the rules, which are painted in bone and masked to shape. */
  .masthead__rule,
  .footer__rule {
    background: #000;
    opacity: 1;
  }
}
