:root {
  --paper: #efefeb;
  --ink: #10110f;
  --quiet: #676960;
  --line: rgba(16, 17, 15, 0.28);
  --accent: #d7ff3f;
  --white: #fbfbf8;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
}
a { color: inherit; }
button, select { font: inherit; }

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(calc(100% - 48px), 1560px);
  min-height: 68px;
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}
.site-header a { text-decoration: none; }
.site-header p { margin: 0; }

.viewer {
  display: grid;
  grid-template-columns: minmax(330px, 0.68fr) minmax(620px, 1.32fr);
  gap: clamp(42px, 6vw, 104px);
  width: min(calc(100% - 48px), 1560px);
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: clamp(46px, 7vh, 92px) 0 clamp(54px, 8vh, 110px);
}

.viewer-intro {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  justify-content: space-between;
  min-width: 0;
}
.series-label {
  width: max-content;
  margin: 0;
  padding: 7px 9px;
  background: var(--accent);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}
h1 {
  margin: clamp(54px, 9vh, 120px) 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 6rem;
  font-weight: 400;
  line-height: 0.76;
  letter-spacing: 0;
}
h1 span {
  display: block;
  margin-top: 0.18em;
  margin-left: clamp(24px, 5vw, 92px);
  font-style: italic;
}
.viewer-intro blockquote {
  max-width: 510px;
  margin: 72px 0 26px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.1rem;
  line-height: 1.16;
}
.intro-copy {
  max-width: 460px;
  margin: 0;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.65;
}

.viewer-workspace { min-width: 0; }
.selection-frame {
  width: min(100%, calc(min(72vh, 820px) * var(--artwork-ratio-number, 1.4545)));
  margin-inline: auto;
  padding: 8px;
  background:
    linear-gradient(90deg, var(--ink) 50%, transparent 50%) repeat-x top left / 10px 1px,
    linear-gradient(90deg, var(--ink) 50%, transparent 50%) repeat-x bottom right / 10px 1px,
    linear-gradient(0deg, var(--ink) 50%, transparent 50%) repeat-y top right / 1px 10px,
    linear-gradient(0deg, var(--ink) 50%, transparent 50%) repeat-y bottom left / 1px 10px;
  animation: marching-border 0.65s linear infinite;
}
.viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
  aspect-ratio: var(--artwork-ratio, 16 / 11);
  overflow: hidden;
  background: #dadad5;
}
.viewer-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.12);
}
.viewer-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#media-status {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 8px;
  background: rgba(239, 239, 235, 0.9);
  color: var(--ink);
  font: 700 9px/1.15 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}
.viewer-stage.is-playing #media-status { background: var(--accent); }

.work-info {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(280px, 1.28fr);
  gap: 32px;
  padding: 25px 0 29px;
  border-bottom: 1px solid var(--line);
}
.token-id {
  margin: 0 0 9px;
  color: var(--quiet);
  font: 700 9px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}
.work-info h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4rem;
  font-weight: 400;
  line-height: 0.95;
}
.token-description {
  align-self: end;
  max-width: 540px;
  margin: 0;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.6;
}

.viewer-controls {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 7px;
  margin-top: 16px;
}
.viewer-controls button,
.viewer-controls select {
  height: 46px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}
.viewer-controls button {
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}
.viewer-controls button:hover,
.viewer-controls button:focus-visible { background: var(--accent); }
.viewer-controls svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.5;
}
.viewer-controls select {
  min-width: 0;
  padding: 0 14px;
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}

.filmstrip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.filmstrip button {
  position: relative;
  height: 76px;
  padding: 5px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  opacity: 0.42;
}
.filmstrip button::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
}
.filmstrip button.is-active {
  opacity: 1;
  background:
    linear-gradient(90deg, var(--ink) 50%, transparent 50%) repeat-x top / 8px 1px,
    linear-gradient(90deg, var(--ink) 50%, transparent 50%) repeat-x bottom / 8px 1px,
    linear-gradient(0deg, var(--ink) 50%, transparent 50%) repeat-y right / 1px 8px,
    linear-gradient(0deg, var(--ink) 50%, transparent 50%) repeat-y left / 1px 8px;
  animation: marching-border-small 0.55s linear infinite;
}
.filmstrip img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit:contain;
  filter: grayscale(1);
}
.filmstrip button.is-active img { filter: none; }

.token-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: 28px;
  font: 700 9px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}
.token-links a {
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
}
.token-links a:hover,
.token-links a:focus-visible { background: var(--accent); }

.statement {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 0.86fr);
  gap: clamp(70px, 12vw, 200px);
  padding: clamp(110px, 15vw, 220px) max(24px, calc((100vw - 1560px) / 2));
  border-top: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.statement-lead {
  max-width: 850px;
  margin: 0;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 7rem;
  line-height: 0.94;
}
.statement-body {
  align-self: end;
  max-width: 620px;
}
.statement-body p {
  margin: 0 0 24px;
  color: #c8c9c1;
  font-size: 15px;
  line-height: 1.75;
}
.statement-body p:last-child { margin-bottom: 0; }

footer {
  display: flex;
  justify-content: space-between;
  width: min(calc(100% - 48px), 1560px);
  margin: 0 auto;
  padding: 30px 0 40px;
  font: 700 9px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}
footer p { margin: 0; }

@keyframes marching-border {
  to { background-position: 10px 0, -10px 100%, 100% 10px, 0 -10px; }
}
@keyframes marching-border-small {
  to { background-position: 8px 0, -8px 100%, 100% 8px, 0 -8px; }
}

@media (max-width: 1050px) {
  .viewer { grid-template-columns: 1fr; }
  .viewer-intro { min-height: 560px; }
  h1 { font-size: 8rem; }
  .selection-frame { width: min(100%, calc(min(78vh, 820px) * var(--artwork-ratio-number, 1.4545))); }
  .statement { grid-template-columns: 1fr; }
  .statement-lead { font-size: 5.5rem; }
  .statement-body { max-width: 700px; }
}

@media (max-width: 640px) {
  .site-header,
  .viewer,
  footer { width: calc(100% - 24px); }
  .site-header { min-height: 60px; }
  .site-header p { max-width: 52vw; text-align: right; }
  .viewer { gap: 46px; min-height: auto; padding: 42px 0 70px; }
  .viewer-intro { min-height: 520px; }
  h1 { margin-top: 76px; font-size: 4.6rem; }
  h1 span { margin-left: 18px; }
  .viewer-intro blockquote { margin-top: 64px; font-size: 1.65rem; }
  .selection-frame { padding: 6px; }
  .selection-frame { width: 100%; }
  .work-info { grid-template-columns: 1fr; gap: 22px; }
  .work-info h2 { font-size: 3rem; }
  .token-description { min-height: 45px; }
  .filmstrip { overflow-x: auto; grid-template-columns: repeat(5, minmax(82px, 1fr)); padding-bottom: 4px; }
  .filmstrip button { height: 68px; }
  .statement { grid-template-columns: 1fr; gap: 70px; padding: 100px 12px; }
  .statement-lead { font-size: 3.7rem; }
  footer { flex-direction: column; gap: 7px; }
}

@media (max-width: 370px) {
  h1 { font-size: 4.2rem; }
  .statement-lead { font-size: 3.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .selection-frame,
  .filmstrip button.is-active { animation: none; }
}
