:root {
  --ink: #e8dcc8;
  --paper: #17130f;
  --heat: #c45c26;
  --heat-soft: rgba(196, 92, 38, 0.34);
  --rule: rgba(232, 220, 200, 0.22);
  --mute: #8a7d6b;
  /* Pantone-adjacent Cloud Dancer for the gallery plane */
  --cloud: #f0eee9;
  --cloud-ink: #2a2420;
  --clay: #a56b4e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 2;
  background: var(--heat);
  color: var(--paper);
  padding: 0.4rem 0.7rem;
  text-decoration: none;
}

.skip-gallery:focus {
  top: 3.2rem;
}

.print {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 3vw, 2rem);
}

.drawing {
  width: min(92vw, 92vh, 920px);
  height: auto;
  aspect-ratio: 1;
  display: block;
}

.paper {
  fill: #1a1612;
}

.stain ellipse {
  fill: var(--heat-soft);
}

.rules line,
.marks path {
  stroke: var(--rule);
  stroke-width: 1.5;
}

.slash {
  stroke: rgba(196, 92, 38, 0.45) !important;
  stroke-width: 2 !important;
}

.ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.75;
  opacity: 0.72;
}

.dot {
  fill: var(--heat);
  stroke: none;
}

.marks circle {
  fill: var(--ink);
}

.plate {
  fill: var(--mute);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.caption {
  position: absolute;
  left: clamp(1rem, 4vw, 2.5rem);
  bottom: clamp(1rem, 4vw, 2.5rem);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand {
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.meta {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}

.to-gallery {
  margin-top: 0.55rem;
  width: fit-content;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--heat);
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 92, 38, 0.45);
}

.to-gallery:hover,
.to-gallery:focus {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.gallery {
  background: var(--cloud);
  color: var(--cloud-ink);
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1.25rem, 5vw, 3.5rem)
    clamp(3rem, 10vw, 6rem);
}

.gallery-head {
  max-width: 36rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.gallery-kicker {
  margin: 0 0 0.75rem;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
}

.gallery h2 {
  margin: 0 0 0.75rem;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.gallery-lede {
  margin: 0;
  max-width: 28rem;
  color: rgba(42, 36, 32, 0.72);
  font-size: 1.05rem;
}

.gallery-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.gallery-list li {
  display: grid;
  gap: 0.75rem;
}

.gallery-list a {
  color: inherit;
  text-decoration: none;
}

.gallery-list figure {
  margin: 0;
}

.gallery-list img {
  display: block;
  width: 100%;
  height: auto;
  background: #d9d4cb;
  border: 0;
}

.gallery-list figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-list .n {
  color: var(--clay);
}

.gallery-list .change {
  flex: 1 1 12rem;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  font-size: 0.98rem;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(42, 36, 32, 0.78);
}

@media (min-width: 900px) {
  .gallery-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ring {
    transform-origin: 380px 520px;
    animation: drift 28s linear infinite;
  }

  .r2 {
    animation-duration: 41s;
    animation-direction: reverse;
  }

  .r3 {
    animation-duration: 19s;
  }

  .stain {
    transform-origin: 700px 340px;
    animation: breathe 16s ease-in-out infinite;
  }
}

@keyframes drift {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

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

  .ring,
  .stain {
    animation: none !important;
  }
}
