/* In Development, chapter three: CAMPAIGN LOOK, v5.
   The chapter's own identity, from the 30 Sep chapter page: black, warm white ink, Copperplate Light caps,
   the site's mono, thin frames, white primary button, red focus ring. v5: stills in the step-by-step sections.
   ../assets/site.css is loaded first (unchanged) for the top bar, footer and lightbox, restyled here. */

:root {
  color-scheme: dark;
  --bg: #000; --text: #fff7eb; --ink: #fff7eb; --muted: #9b958b; --dim: #5d5951; --line: #26231f; --red: #c2301f;
  --faint: #3a3731; --bg-raised: #0d0c0b; --soft: #d8d2c7;
  --title: "Copperplate", "Copperplate Gothic Light", "Marcellus SC", Georgia, serif;
  --mono: var(--ui);
  --wide: min(100%, 1240px);
}
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15.5px/1.75 var(--mono); letter-spacing: var(--ui-track); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--dim); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 1px solid var(--red); outline-offset: 4px; }
::selection { background: var(--ink); color: #000; }

/* ── Switches (see the comment at the top of index.html) ─────────────── */
html[data-prices="off"] .price { display: none; }

/* ── The site's top bar and footer, in the chapter's colours ──────────── */
.top { background: #000; }
.top a { text-decoration: none; }
.top > a:first-child { font: 300 calc(var(--s-top) * 0.92)/1 var(--title); letter-spacing: 0.32em; text-transform: uppercase; }
.top nav a { color: var(--muted); }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }

.foot { margin-top: 0; padding: 28px 20px 30px; border-top: 1px solid var(--line); background: #000; color: var(--muted); font: 400 13px/1.4 var(--mono); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .news { border-bottom-color: var(--line); }
.foot .news__label { font: 300 11.5px/1.6 var(--title); letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }
.foot .news input[type="email"] { color: var(--ink); border-bottom-color: var(--faint); }
.foot .news input[type="email"]::placeholder { color: var(--dim); }
.foot .news input[type="email"]:focus { border-color: var(--ink); }
.foot .news button { font: 400 11.5px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 14px; border: 1px solid var(--faint); color: var(--ink); }
.foot .news button:hover, .foot .news button:focus-visible { border-color: var(--ink); }
.foot .news__note { color: var(--dim); }

/* ── Page flow: one centred column ─────────────────────────────────────── */
.ch3 { display: flex; flex-direction: column; align-items: center; padding: calc(var(--bar) + 28px) 20px 120px; }
.frame { border: 1.5px solid var(--ink); background: #000; display: block; }
h2 { margin: 0; font: 300 clamp(17px, 2vw, 22px)/1.4 var(--title); letter-spacing: 0.42em; text-indent: 0.42em; text-transform: uppercase; text-align: center; }

/* buttons: the chapter's own. Before the launch DM is the white one; on Thursday (data-live="on") COLLECT is. */
.btn { display: inline-block; min-width: 168px; text-align: center; font: 400 14px/1 var(--mono); letter-spacing: 0.18em; text-transform: uppercase; padding: 18px 34px; border: 1px solid var(--soft); color: var(--ink); text-decoration: none; transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.btn:hover { border-color: #fff; }
html[data-live="off"] .btn--dm, html[data-live="on"] .btn--collect { background: var(--ink); color: #000; border-color: var(--ink); }
html[data-live="off"] .btn--dm:hover, html[data-live="on"] .btn--collect:hover { background: #fff; border-color: #fff; }
/* the X mark, at the height of the capitals, in the button's colour */
.xlogo { display: inline-block; height: 0.74em; width: auto; margin-left: 0.4em; vertical-align: -0.04em; fill: currentColor; }

/* ── Top: the trailer across the page, then the title, his words and the sales block ── */
.hero { width: var(--wide); display: flex; flex-direction: column; align-items: center; text-align: center; }
.stage { position: relative; width: min(100%, (100svh - var(--bar) - 150px) * 16 / 9); aspect-ratio: 16 / 9; }
.trailer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
/* Unmute and the full-screen icon, together at the bottom right of the trailer */
.vctl { position: absolute; right: 0; bottom: 0; display: flex; align-items: center; gap: 2px; padding: 0 6px 6px 0; }
.vctl button { display: inline-flex; align-items: center; padding: 8px 10px; font: 400 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85); opacity: 0.85; transition: opacity 0.2s; }
.vctl button:hover, .vctl button:focus-visible, .sound[aria-pressed="true"] { opacity: 1; }
/* Unmute back at the top right (his note); the full-screen icon stays at the bottom right */
.stage > .sound { position: absolute; top: 0; right: 0; z-index: 1; padding: 14px 16px; font: 400 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.85); opacity: 0.85; transition: opacity 0.2s; }
.stage > .sound:hover, .stage > .sound:focus-visible, .stage > .sound[aria-pressed="true"] { opacity: 1; }
.full svg { width: auto; height: 0.78em; overflow: visible; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.85)); }
.full .fs-out, .stage.is-full .full .fs-in { display: none; }
.stage.is-full .full .fs-out { display: block; }
.stage:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; background: #000; }
.stage:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; background: #000; }

.hero__text { width: 100%; max-width: 980px; margin-top: 56px; display: flex; flex-direction: column; align-items: center; }
.hero__text > p { max-width: 62ch; }
.hero__text > .hero__desc { max-width: 72ch; }   /* a little wider: a line or two less on desktop */
.kicker { margin: 0 0 18px; font: 300 13px/1.6 var(--title); letter-spacing: 0.5em; text-indent: 0.5em; text-transform: uppercase; color: var(--muted); }
.kicker a { text-decoration: none; }
.kicker a:hover { color: var(--ink); }
.title { margin: 0; font: 300 clamp(26px, 3.6vw, 54px)/1.25 var(--title); letter-spacing: 0.4em; text-indent: 0.4em; text-transform: uppercase; white-space: nowrap; }
.hero__desc { margin: 36px 0 0; color: #e9e3d8; }

/* the sales block: holders and public side by side, each with its button */
.sales { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto auto auto auto 1fr; width: min(100%, 980px); margin-top: 64px; }   /* only the divider between Holders and Public */
/* both columns share the same rows: the first lines level, the second lines level, the buttons on one line at the bottom */
.sales__part { grid-row: 1 / span 5; display: grid; grid-template-rows: subgrid; justify-items: center; align-content: start; padding: 36px clamp(16px, 3vw, 40px) 40px; }
.sales__part + .sales__part { border-left: 1px solid var(--line); }
.sales__part p { margin: 0; color: var(--soft); }
.sales__part .sales__lead { padding-bottom: 10px; font-size: 17px; line-height: 1.55; color: var(--ink); }
.sales__act { grid-row: 5; align-self: end; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 14px; padding-top: 28px; }
.sales__act { flex-wrap: nowrap; justify-self: stretch; }
.sales__act .btn { flex: 0 1 200px; min-width: 0; padding-left: 12px; padding-right: 12px; font-size: 13px; letter-spacing: 0.12em; white-space: nowrap; }   /* DM, Join Discord and Collect on ord.net: one size, side by side */

/* ── Step by step: one heading, one still, his lines ── */
.story { width: 100%; display: flex; flex-direction: column; align-items: center; margin-top: 160px; }
.chapter { width: var(--wide); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 0 150px; }
.chapter__title { margin-bottom: 44px; font-size: clamp(30px, 5.2vw, 72px); line-height: 1.15; letter-spacing: 0.42em; text-indent: 0.42em; }
.chapter__media { position: relative; width: min(100%, (100svh - var(--bar) - 170px) * 16 / 9); aspect-ratio: 16 / 9; overflow: hidden; }
.chapter__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.chapter__text { width: min(100%, 54ch); margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
/* The section texts, set by data-align on <html>:
   "offset"  left-aligned texts (Negatives, Developed) sit one grid column in from the left, the right-aligned one
             (Inscribed) one column in from the right (Unfinished stays centred): the outer edge lines up with the start of the
             second / end of the fifth column of the 18 above and below. Smaller on tablets, centred on phones.
   "center"  everything centred. Both wrap without one- or two-word last lines (text-wrap). */
.chapter__text p { text-wrap: pretty; }
.ch3-tail { white-space: nowrap; }   /* page.js: the last three words of a paragraph stay on one line */
.chapter__text .chapter__line { text-wrap: balance; }
html[data-align="offset"] .chapter__text { width: min(100%, 48ch); }
html[data-align] #unfinished .chapter__text { width: min(100%, 58ch); }   /* the longest text: centred in both modes (his note, 5 Oct), a little wider */
html[data-align="offset"] #negatives .chapter__text, html[data-align="offset"] #developed .chapter__text { text-align: left; }
html[data-align="offset"] #inscribed .chapter__text { text-align: right; }
html[data-align="offset"] #unfinished .chapter__text { text-align: center; }
@media (min-width: 1024px) {
  html[data-align="offset"] #negatives .chapter__text, html[data-align="offset"] #developed .chapter__text { align-self: flex-start; margin-left: calc((100% - 110px) / 6 + 22px); }
  html[data-align="offset"] #inscribed .chapter__text { align-self: flex-end; margin-right: calc((100% - 110px) / 6 + 22px); }
}
@media (min-width: 700px) and (max-width: 1023px) {
  html[data-align="offset"] #negatives .chapter__text, html[data-align="offset"] #developed .chapter__text { align-self: flex-start; margin-left: 8%; }
  html[data-align="offset"] #inscribed .chapter__text { align-self: flex-end; margin-right: 8%; }
}
@media (max-width: 699px) { html[data-align="offset"] .chapter__text { width: min(100%, 54ch); text-align: center !important; } }
html[data-align="center"] .chapter__text { text-align: center; }
.chapter__text p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--soft); }
.chapter__text .chapter__line { font-size: clamp(17px, 1.45vw, 19.5px); line-height: 1.6; color: var(--ink); margin-bottom: 4px; }

.strip { width: 100%; margin: 0; }
.strip__row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.4vw, 20px); }
.strip__cell { position: relative; aspect-ratio: 1440 / 2556; overflow: hidden; border-width: 1px; }
.strip__cell img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.strip__cell img:not([src]) { visibility: hidden; }
.strip__cap { margin-top: 16px; font: 300 14px/1.4 var(--title); letter-spacing: 0.14em; color: var(--muted); }
/* Unfinished: thin arrow caps either side of the six prints step to the previous / next piece */
.strip--prints { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; column-gap: clamp(6px, 1vw, 14px); align-items: center; }
.strip--prints .strip__row, .strip--prints .strip__cap { grid-column: 2; }
.strip--prints .strip__row { touch-action: pan-y; }
.strip--prints:focus { outline: none; }
.strip--prints:focus-visible { outline: 1px solid var(--red); outline-offset: 8px; }
.strip__nav { grid-row: 1; align-self: stretch; display: grid; place-items: center; color: var(--muted); transition: color 0.2s; touch-action: manipulation; }
.strip__nav--prev { grid-column: 1; }
.strip__nav--next { grid-column: 3; }
.strip__nav:hover, .strip__nav:focus-visible { color: var(--ink); }
.strip__nav svg { width: 12px; height: 24px; overflow: visible; }
@media (max-width: 760px) { .strip--prints { grid-template-columns: 22px minmax(0, 1fr) 22px; column-gap: 6px; } .strip__nav svg { width: 9px; height: 18px; } }

.chapter--collect .sales { margin-top: 0; }

/* ── Inscribed: the tree (option C) ── */
.io-tree { width: min(100%, 1240px); margin: 0; }
.io-tree svg { display: block; width: 100%; height: auto; overflow: visible; }
.io-tree .tall { display: none; }
@media (max-width: 760px) { .io-tree .wide { display: none; } .io-tree .tall { display: block; } }
.io-tree text { fill: var(--ink); }
.io-tree .t { font-family: "Copperplate", "Copperplate Gothic Light", "Marcellus SC", Georgia, serif; font-weight: 300; letter-spacing: 0.3em; text-transform: uppercase; }
.io-tree .m { font-family: "Space Mono", ui-monospace, monospace; fill: var(--soft); }
.io-tree tspan.m { text-transform: none; letter-spacing: 0; fill: var(--muted); }   /* "(reinscribed)" stays small and lower case */
/* nodes with a known inscription: a link to ordinals.com, a quiet hover; the others stay plain */
.io-tree .node.is-link { cursor: pointer; }
.io-tree .node.is-link rect { transition: fill 0.2s, stroke 0.2s; }
.io-tree .node.is-link:hover rect, .io-tree .node.is-link:focus-visible rect { fill: #14130f; stroke: #fff; }
.io-tree .node:focus { outline: none; }
.io-tree .node.is-link:focus-visible rect { stroke-width: 1.5; }
.io-tree .satn { pointer-events: none; letter-spacing: 0.04em; }
/* the touch picker (page.js builds it when NEGATIVE / ARTWORK is tapped on a touch screen) */
.pick { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.82); }
.pick__panel { display: flex; flex-direction: column; width: min(100%, 440px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); background: #000; border: 1px solid var(--faint); }
.pick__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 6px 18px; border-bottom: 1px solid var(--line); }
.pick__t { margin: 0; font: 300 14px/1.2 var(--title); letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink); }
.pick__x { width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--ink); font: 300 26px/1 var(--mono); cursor: pointer; }
.pick__list { margin: 0; padding: 0; list-style: none; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pick__list li + li { border-top: 1px solid var(--line); }
.pick__row { display: flex; align-items: center; gap: 16px; min-height: 48px; padding: 8px 18px; color: var(--ink); text-decoration: none; }
.pick__row:active, .pick__row:hover { background: #14130f; }
.pick__row.is-off { color: var(--dim); }
.pick__n { flex: none; width: 2ch; font: 400 12px/1 var(--mono); color: var(--muted); }
.pick__name { font: 400 14px/1.35 var(--mono); }
.pick__note { margin: 0; padding: 10px 18px 12px; border-top: 1px solid var(--line); font: 400 11px/1.4 var(--mono); color: var(--muted); }
.io-tree .k { fill: var(--muted); }
.io-tree .box { fill: #000; stroke: var(--ink); stroke-width: 1; }
.io-tree .box--soft { stroke: var(--line); }
.io-tree .box--sat { fill: #000; stroke: var(--ink); stroke-width: 1.5; }
.io-tree .link { fill: none; stroke: var(--ink); stroke-width: 1; }
.io-tree .rec { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.io-tree .ghost { fill: #000; stroke: var(--line); }
.io-tree .head { fill: var(--ink); }
.io-tree .head--rec { fill: var(--muted); }
.io-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin-top: 18px; font: 400 12px/1.4 var(--mono); color: var(--muted); }
.io-legend span::before { content: ""; display: inline-block; width: 28px; height: 0; margin-right: 8px; vertical-align: middle; border-top: 1px solid var(--ink); }
.io-legend span.rec::before { border-top: 1px dashed var(--muted); }

/* ── The 18: framed prints, six across, three, then two on phones (always complete rows) ── */
.set { margin-top: 140px; width: var(--wide); display: flex; flex-direction: column; align-items: center; gap: 22px; scroll-margin-top: calc(var(--bar) + 16px); }
.set .chapter__title { margin-bottom: 22px; }
.set .chapter__text { margin-top: 18px; }
.prints { width: 100%; display: flex; flex-direction: column; align-items: center; }
.prints .set__grid { margin-top: 0; }
/* Reroll, with the engine's own ↻ */
.reroll { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 30px; padding: 10px 14px; font: 400 13px/1 var(--mono); color: var(--ink); border: 1px solid var(--soft); transition: border-color 0.2s; gap: 8px; }   /* Developed: ↻ Reroll (label); Unfinished: just the ↻ (his note) */
.reroll:hover { border-color: #fff; }
.reroll__ico { display: inline-block; position: relative; top: -2px; font-size: 22px; line-height: 1; letter-spacing: 0; }
.reroll.is-turning .reroll__ico { animation: ch3-turn 0.5s ease; }
@keyframes ch3-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.set__grid { width: 100%; list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 44px 22px; }
.piece { min-width: 0; text-align: center; }
.piece__box { position: relative; display: block; aspect-ratio: 1440 / 2556; overflow: hidden; border-width: 1px; }   /* plain pictures: no link, no enlarging */
.piece__box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.4s ease; }
.piece__box img:not([src]) { visibility: hidden; }
/* titles in Copperplate as written (capitals and small capitals), never forced to upper case */
.piece__cap { margin: 14px 0 0; font: 300 14px/1.45 var(--title); letter-spacing: 0.12em; color: var(--soft); overflow-wrap: normal; }
.piece__ord { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--muted); }
@media (max-width: 1000px) { .set__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 18px; } }
@media (max-width: 560px) { .set__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; } .piece__cap { font-size: 13px; letter-spacing: 0.08em; } }

/* ── Non Finito ────────────────────────────────────────────────────────── */
.nf { width: min(100%, 1040px); display: flex; flex-direction: column; align-items: center; gap: 28px; margin-top: 0; padding-top: 110px; border-top: 1px solid var(--line); text-align: center; }   /* a hairline sets the series apart from the In Development scroll */
.nf picture, .nf img { display: block; width: 100%; height: auto; }
.nf p { margin: 0; max-width: 72ch; color: var(--soft); }
.nf__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; font-size: 13.5px; color: var(--muted); }

/* ── Phones and tall windows: 9:16 trailer and code still, sections stacked ── */
@media (max-aspect-ratio: 4/5) {
  .stage { aspect-ratio: 9 / 16; width: min(100%, (100svh - var(--bar) - 60px) * 9 / 16); }
  .chapter__media { aspect-ratio: 9 / 16; width: min(100%, (100svh - var(--bar) - 150px) * 9 / 16); }
}
@media (max-width: 760px) {
  .ch3 { padding-top: calc(var(--bar) + 16px); }
  .hero__text { margin-top: 40px; }
  .title { font-size: clamp(22px, 6.4vw, 40px); letter-spacing: 0.3em; text-indent: 0.3em; }
  .kicker { letter-spacing: 0.4em; text-indent: 0.4em; }
  .hero__desc { margin-top: 28px; font-size: 15px; }
  .sales { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; margin-top: 48px; }
  .sales__part { grid-row: auto; display: flex; flex-direction: column; align-items: center; padding: 30px 4px 34px; }
  .sales__act { align-self: auto; width: 100%; max-width: 380px; gap: 10px; }
  .sales__act .btn { flex: 0 1 calc(50% - 5px); padding: 16px 8px; font-size: 13px; letter-spacing: 0.14em; }
  .sales__part:last-child .sales__act .btn { flex: 0 0 auto; padding-left: 18px; padding-right: 18px; }   /* "Collect on ord.net" is alone in its row: as wide as its words */
  .sales__part + .sales__part { border-left: 0; border-top: 1px solid var(--line); }
  .sales__part .sales__lead { font-size: 16px; }
  .story { margin-top: 120px; }
  .set { margin-top: 100px; }
  .chapter { padding-bottom: 110px; }
  .chapter__title { margin-bottom: 30px; letter-spacing: 0.3em; text-indent: 0.3em; }
  .chapter__text { margin-top: 26px; gap: 12px; }
  .chapter__text p { font-size: 15px; }
  .chapter__text .chapter__line { font-size: 16.5px; }
  .strip__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nf { padding-top: 80px; }
}
@media (max-width: 400px) {
  .btn { min-width: 150px; padding: 17px 28px; }
}
@media (max-width: 359px) {
  .sales__act { flex-wrap: wrap; }
  .sales__act .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .reroll.is-turning .reroll__ico { animation: none; } }
