@import url('https://fonts.googleapis.com/css2?family=Anton&family=DM+Mono:wght@400;500&family=Noto+Serif+JP:wght@600;900&family=Shippori+Mincho:wght@400;500&display=swap');

:root {
  color-scheme: dark;
  --ground: #090909;
  --paper: #f4eee7;
  --muted: #bdb1ad;
  --rule: #66504b;
  --red: #ed241b;
  --serif: 'Shippori Mincho', 'Times New Roman', serif;
  --display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --mono: 'DM Mono', monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--ground); color: var(--paper); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid currentColor; outline-offset: 6px; }
::selection { background: var(--paper); color: var(--ground); }
.skip-link { position: fixed; left: 20px; top: -100px; padding: 16px; background: var(--paper); color: var(--ground); z-index: 10; }
.skip-link:focus { top: 12px; }
.masthead { background: var(--red); color: var(--ground); padding: 0 4%; min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 4px solid var(--ground); font: 14px var(--mono); }
.identity { display: flex; gap: 28px; align-items: center; padding: 14px 0; }
.identity span { font: 600 15px 'Noto Serif JP', serif; }
.record-link { display: flex; align-items: center; gap: 25px; min-height: 44px; }
.record-link span { font-size: 30px; }
.opening { position: relative; isolation: isolate; background: var(--red); color: var(--ground); padding: 24px 4% 0; overflow: clip; }
.opening-meta { display: flex; justify-content: space-between; gap: 20px; font: 14px var(--mono); }
.title-composition { position: relative; padding: 34px 0 16px; }
h1 { position: relative; z-index: 2; margin: 0; font: 400 clamp(100px, 18.7vw, 300px)/.98 var(--display); letter-spacing: -.045em; }
.title-second { display: block; margin-left: 22%; white-space: nowrap; }
h1 i { font: 900 .43em 'Noto Serif JP', serif; letter-spacing: -.08em; vertical-align: .15em; }
.punctuation { color: var(--paper); }
.edition { position: absolute; right: -3%; top: -15px; font: 900 clamp(110px, 22vw, 330px)/1 'Noto Serif JP', serif; writing-mode: vertical-rl; color: var(--paper); opacity: .18; z-index: -1; }
.vertical-note { position: absolute; left: 0; bottom: 45px; padding: 8px 12px; color: var(--red); background: var(--ground); font: 600 17px 'Noto Serif JP', serif; letter-spacing: .12em; transform: rotate(-6deg); }
.image-composition { position: relative; display: grid; grid-template-columns: 16% minmax(0, 1fr) 8%; margin: 10px -4.35% 0; }
.red-register { position: relative; overflow: hidden; margin-bottom: 38px; color: var(--red); background: var(--ground); display: flex; align-items: center; justify-content: space-evenly; flex-direction: column; font: 900 clamp(80px, 11vw, 180px)/.8 'Noto Serif JP', serif; }
.red-register span { transform: translateX(-12%); }
.architecture { position: relative; background: var(--red); margin: 0; min-width: 0; overflow: hidden; }
.architecture img { display: block; width: 100%; height: clamp(280px, 34vw, 550px); object-fit: cover; object-position: 50% 34%; filter: grayscale(1) contrast(2.4); mix-blend-mode: multiply; transform: scale(1.17) rotate(-4deg); }
/* The interruption changes framing at long intervals; it never strobes luminance. */
body[data-moving='true'] .architecture img { animation: dislocation 14s steps(1, end) infinite; }
.architecture::after { content: ''; position: absolute; top: 28%; right: 0; width: 29%; height: 8px; background: var(--paper); transform: rotate(-16deg); pointer-events: none; }
.architecture figcaption { position: relative; z-index: 2; display: flex; justify-content: space-between; gap: 12px; align-items: center; height: 38px; background: var(--ground); color: var(--paper); padding: 0 12px; font: 12px var(--mono); }
.image-margin { padding: 18px 0 50px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 20px; }
.image-margin span:first-child { writing-mode: vertical-rl; font: 900 clamp(28px, 4vw, 60px) 'Noto Serif JP', serif; letter-spacing: .08em; }
.image-margin span:last-child { writing-mode: vertical-rl; font: 12px var(--mono); }
.opening-footer { display: flex; align-items: center; gap: 36px; padding: 27px 0 32px; font: 14px var(--mono); }
.opening-footer p { margin: 0 auto 0 0; }
.opening-footer a { min-height: 48px; display: flex; align-items: center; gap: 22px; background: var(--ground); color: var(--paper); padding: 0 18px; }
.opening-footer a span { font-size: 25px; }
#motion-toggle { min-height: 44px; background: none; color: var(--ground); border: 0; border-bottom: 2px solid currentColor; padding: 10px 0; font: 12px var(--mono); }
#motion-toggle:disabled { cursor: default; }
.record { position: relative; background: var(--ground); color: var(--paper); padding: 40px 6% 64px; border-top: 20px solid var(--ground); }
.record::before { content: ''; position: absolute; top: -13px; right: 0; width: 38%; height: 13px; background: var(--paper); }
.section-label { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); font: 12px var(--mono); }
.section-label h2 { font: 14px var(--mono); margin: 0; }
.entry { max-width: 1340px; margin: auto; display: grid; grid-template-columns: 29% minmax(0, 1fr); gap: 6%; padding: 64px 0 70px; }
.entry-margin { display: flex; flex-direction: column; gap: 22px; font: 14px/1.8 var(--mono); }
.entry-number { color: var(--red); font: 400 clamp(130px, 24vw, 360px)/.86 var(--display); letter-spacing: -.06em; }
.entry-margin > span:last-child { border-left: 8px solid var(--red); padding-left: 18px; }
.entry-type { margin: 0 0 25px; color: var(--muted); font: 12px var(--mono); }
.entry-body { min-width: 0; }
.entry-body h3 { margin: 0 0 38px; font: 400 clamp(55px, 8vw, 120px)/1 var(--display); letter-spacing: -.02em; }
blockquote { margin: 0; max-width: 31ch; font: 400 clamp(23px, 2.6vw, 36px)/1.6 var(--serif); letter-spacing: -.02em; }
.entry-end { display: flex; align-items: center; gap: 22px; margin-top: 30px; }
.entry-end > span { color: var(--red); font-size: 48px; }
.entry-end p { font: 12px var(--mono); }
.earlier-note { border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 28px; }
.earlier-note summary { cursor: pointer; font: 14px/1.6 var(--mono); padding: 14px 0; }
.earlier-note blockquote { font-size: 24px; margin-top: 16px; }
.earlier-note > p { font: 12px/1.7 var(--mono); color: var(--muted); margin-top: 20px; }
.unwritten { display: flex; align-items: center; gap: 38px; border-top: 9px solid var(--red); padding-top: 26px; }
.next-number { font: 64px/1 var(--display); color: var(--red); }
.unwritten p { font: 14px/1.6 var(--mono); margin: 0; }
.unwritten p span { display: block; color: var(--muted); font-size: 12px; margin-top: 5px; }
.colophon { background: var(--red); color: var(--ground); display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 4%; font: 12px var(--mono); }
.colophon a { padding: 14px 0; }
@keyframes dislocation {
  0%, 100% { transform: scale(1.17) rotate(-4deg); }
  43% { transform: scale(1.35) translate(-3%, 2%) rotate(-7deg); }
  76% { transform: scale(1.22) translate(2%, -3%) rotate(2deg); }
}
@media (hover: hover) {
  .masthead a:hover, .colophon a:hover { text-decoration: line-through; text-decoration-thickness: 2px; }
  .opening-footer a:hover { background: var(--paper); color: var(--ground); }
  .earlier-note summary:hover { color: var(--red); }
}
@media (max-width: 700px) {
  .masthead { min-height: 68px; padding-inline: 5%; font-size: 12px; }
  .identity span { display: none; }
  .record-link { gap: 10px; }
  .opening { padding: 22px 5% 0; }
  .opening-meta { font-size: 12px; gap: 12px; }
  .title-composition { padding: 40px 0 24px; }
  h1 { font-size: clamp(82px, 21vw, 148px); line-height: 1.08; }
  .title-second { margin-left: 9%; }
  .vertical-note { bottom: 8px; left: auto; right: -3%; font-size: 12px; padding: 5px; transform: rotate(-6deg); }
  .edition { top: 20px; right: -6%; font-size: 150px; }
  .image-composition { margin: 18px -5.56% 0; grid-template-columns: 12% minmax(0, 1fr) 10%; }
  .architecture img { height: 300px; }
  .red-register { font-size: 75px; }
  .image-margin { padding: 14px 0 48px; }
  .image-margin span:first-child { font-size: 25px; }
  .image-margin span:last-child, .image-credit { display: none; }
  .opening-footer { flex-wrap: wrap; gap: 16px; padding: 20px 0 26px; font-size: 12px; }
  .opening-footer p { width: 100%; }
  #motion-toggle { margin-left: auto; }
  .record { padding: 28px 6% 40px; }
  .entry { grid-template-columns: 1fr; gap: 36px; padding-block: 40px; }
  .entry-margin { flex-direction: row; align-items: center; gap: 25px; font-size: 12px; }
  .entry-number { font-size: 150px; }
  .entry-body h3 { font-size: clamp(54px, 14vw, 90px); }
  blockquote { font-size: 24px; line-height: 1.65; }
  .colophon { padding: 22px 6%; flex-wrap: wrap; column-gap: 12px; }
  .colophon > span:nth-child(2) { margin-left: auto; }
  .colophon a { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { body[data-moving='true'] .architecture img { animation: none; } }

/* Repeated views of one place interrupt each other before the reading settles. */
.title-composition { z-index: 3; padding-bottom: 0; pointer-events: none; }
.title-second { color: var(--paper); background: var(--ground); width: max-content; max-width: 100%; padding: 0 .04em .07em; transform: rotate(-3deg); }
.punctuation { color: var(--red); }
.image-composition { margin-top: -52px; padding-top: 28px; }
.edition { z-index: 0; opacity: .35; right: -6%; }
.architecture { isolation: isolate; }
.architecture > img { position: relative; z-index: 0; }
.image-fracture { position: absolute; z-index: 1; overflow: hidden; pointer-events: none; background: var(--paper); border: 5px solid var(--ground); }
.image-fracture img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; filter: grayscale(1) contrast(2.2); }
.image-fracture--upper { top: 3%; right: -4%; width: 42%; height: 49%; transform: rotate(7deg); }
.image-fracture--upper img { object-position: 82% 8%; transform: scale(1.8) rotate(180deg); }
.image-fracture--lower { bottom: 11%; left: 4%; width: 43%; height: 24%; transform: rotate(-9deg); background: var(--red); }
.image-fracture--lower img { object-position: 10% 80%; transform: scale(2.1); }
body[data-moving='true'] .image-fracture img { animation: none; }
body[data-moving='true'] .image-fracture--upper { animation: fracture-shift 17s steps(1, end) infinite; }
body[data-moving='true'] .image-fracture--lower { animation: fracture-shift 19s steps(1, end) infinite reverse; }
.interruption { position: relative; min-height: 230px; overflow: hidden; display: grid; place-items: center; background: var(--ground); color: var(--red); border-top: 8px solid var(--ground); }
.interruption-type { position: absolute; left: -8%; top: -32px; white-space: nowrap; font: 900 clamp(150px, 20vw, 340px)/1.1 'Noto Serif JP', serif; letter-spacing: -.09em; opacity: .22; }
.interruption-age { position: relative; background: var(--ground); padding: 30px 58px; color: var(--paper); font: 14px var(--mono); }
.record { border-top: 0; }
.record::before { display: none; }
.entry-body h3 { background: var(--paper); color: var(--ground); padding: 12px 16px 20px; margin-left: -16px; width: fit-content; max-width: calc(100% + 16px); }
.earlier-note[open] { background: var(--paper); color: var(--ground); padding: 18px 24px 24px; margin-left: -24px; }
.earlier-note[open] > p { color: #5e4d49; }
@keyframes fracture-shift {
  0%, 100% { translate: 0 0; }
  48% { translate: -12% 7%; }
  81% { translate: 4% -5%; }
}
@media (max-width: 700px) {
  .title-second { margin-left: 3%; }
  .image-composition { margin-top: -4px; padding-top: 0; }
  .vertical-note { bottom: -32px; right: 0; z-index: 4; }
  .image-fracture--upper { width: 48%; height: 44%; }
  .image-fracture--lower { width: 60%; height: 24%; }
  .interruption { min-height: 170px; }
  .interruption-type { top: -5px; }
  .entry-body h3 { margin-left: -8px; padding-left: 8px; max-width: calc(100% + 8px); }
  .earlier-note[open] { margin-left: 0; padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-moving='true'] .image-fracture--upper,
  body[data-moving='true'] .image-fracture--lower { animation: none; }
}
