/* ============================================================
   ichi — a print, not a page.
   Paper ground, ink type, one pink. Generous air, because the
   register is a woodblock and the subject is restraint.
   ============================================================ */

:root {
  --step--2: clamp(0.69rem, 0.67rem + 0.09vw, 0.75rem);
  --step--1: clamp(0.81rem, 0.78rem + 0.14vw, 0.91rem);
  --step-0:  clamp(0.98rem, 0.95rem + 0.19vw, 1.10rem);
  --step-1:  clamp(1.18rem, 1.10rem + 0.34vw, 1.42rem);
  --step-2:  clamp(1.46rem, 1.31rem + 0.62vw, 1.90rem);
  --step-3:  clamp(1.84rem, 1.55rem + 1.22vw, 2.76rem);
  --display: clamp(2.5rem, 1.0rem + 6.2vw, 5.8rem);

  --space-3xs: .25rem; --space-2xs: .5rem; --space-xs: .75rem;
  --space-s: 1rem;  --space-m: 1.5rem; --space-l: 2.5rem;
  --space-xl: 4rem; --space-2xl: 6rem;
  --space-3xl: clamp(5rem, 12vh, 9rem);

  --gutter: clamp(1.15rem, .6rem + 2.1vw, 3rem);
  --page: min(100% - var(--gutter) * 2, 1180px);

  --paper:   oklch(93.5% 0.014 40);
  --paper-2: oklch(90% 0.018 36);
  --ink:     oklch(19% 0.020 320);
  --ink-2:   oklch(43% 0.020 340);
  --ink-3:   oklch(56% 0.022 350);
  --rule:    oklch(80% 0.020 30);
  --sakura:  oklch(58% 0.135 5);
  --focus:   oklch(45% 0.14 260);

  --dur-fast: .18s; --dur-base: .4s;
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body, h1, h2, p, dl, dd { margin: 0; padding: 0; }
a { color: inherit; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--sakura); color: var(--paper); }

.skip {
  position: absolute; left: var(--space-s); top: -4rem; z-index: 60;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.1rem; font-family: var(--mono); font-size: var(--step--1);
  text-decoration: none; transition: top var(--dur-fast) var(--ease-out);
}
.skip:focus-visible { top: var(--space-s); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

#stage {
  position: fixed; inset: 0; z-index: 0;
  display: block; width: 100%; height: 100%;
  background: var(--paper);
}
header, main, footer, .hud { position: relative; z-index: 2; }

.head {
  width: var(--page); margin-inline: auto;
  padding-block: var(--space-m);
  display: flex; flex-wrap: wrap; gap: var(--space-s);
  align-items: baseline; justify-content: space-between;
  font-family: var(--mono); font-size: var(--step--1);
}
.head__back { text-decoration: none; }
.head__back:hover { color: var(--sakura); }
.dim { color: var(--ink-3); }
.head__meta {
  font-size: var(--step--2); color: var(--ink-3);
  letter-spacing: .10em; text-transform: uppercase;
}

/* ---- the stage readout: one word and a rule ---- */
.hud {
  position: fixed; right: var(--gutter); bottom: var(--space-l); z-index: 3;
  width: min(30vw, 12rem);
  font-family: var(--mono); text-align: right;
  opacity: 0; transition: opacity var(--dur-base) var(--ease-out);
}
.hud.is-live { opacity: 1; }
.hud__stage {
  font-size: var(--step-0); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2);
}
.hud__rule {
  margin-top: var(--space-2xs);
  height: 1px; background: var(--rule);
}
.hud__rule i { display: block; height: 100%; width: 0; background: var(--sakura); }
@media (max-width: 56rem) { .hud { bottom: auto; top: 4.4rem; } }

/* ---- panels down the descent ---- */
.scene { position: relative; }
.panel {
  min-height: 100svh;
  width: 100%;
  padding-block: var(--space-2xl);
  padding-inline: max(var(--gutter), calc(50% - var(--page) / 2));
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
/* the figure holds the middle of frame, so the copy takes a side and
   carries its own paper rather than relying on where it happens to stand */
.panel::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to right,
    oklch(93.5% 0.014 40 / .93) 0%,
    oklch(93.5% 0.014 40 / .80) 30%,
    transparent 56%);
}
.panel > * { position: relative; z-index: 1; max-width: 33rem; }
@media (max-width: 56rem) {
  .panel::before { background: oklch(93.5% 0.014 40 / .86); }
}

.eyebrow, .mark {
  font-family: var(--mono); font-size: var(--step--2);
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.mark { color: var(--sakura); letter-spacing: .12em; }
.title {
  font-size: var(--display); line-height: 1.0;
  letter-spacing: -.035em; font-weight: 300;
  margin-block: var(--space-s) var(--space-m);
  text-wrap: balance;
}
.beat {
  font-size: var(--step-3); line-height: 1.15; letter-spacing: -.02em;
  font-weight: 400; margin-block: var(--space-2xs) var(--space-s);
  max-width: 18ch; text-wrap: balance;
}
.lede { font-size: var(--step-1); max-width: 40ch; color: var(--ink-2); line-height: 1.55; }
.body { max-width: 42ch; color: var(--ink-2); }
.cue {
  margin-top: var(--space-xl);
  font-family: var(--mono); font-size: var(--step--2);
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3);
  transition: opacity var(--dur-base) var(--ease-out);
}
.cue.is-done { opacity: 0; }

/* ---- reading ---- */
.section {
  width: var(--page); margin-inline: auto;
  padding-block: var(--space-3xl);
  border-top: 1px solid var(--rule);
  background: var(--paper);
}
.section__head { margin-bottom: var(--space-l); }
.section__title {
  font-size: var(--step-3); line-height: 1.12; letter-spacing: -.025em;
  font-weight: 400; margin-block: var(--space-2xs) var(--space-s);
  max-width: 20ch; text-wrap: balance;
}
.section__sub { max-width: 50ch; color: var(--ink-2); }
.cols { display: grid; gap: var(--space-l); }
.col p { max-width: 46ch; color: var(--ink-2); }
.col p + p { margin-top: var(--space-s); }
.col i { color: var(--ink); font-style: italic; }
@media (min-width: 54rem) { .cols { grid-template-columns: 1fr 1fr; column-gap: var(--space-2xl); } }

.counts {
  display: grid; gap: 1px; background: var(--rule);
  border: 1px solid var(--rule);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 46rem) { .counts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.counts > div { background: var(--paper); padding: var(--space-m); display: grid; gap: var(--space-3xs); }
.counts dt {
  font-family: var(--mono); font-size: var(--step--2);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.counts dd {
  font-family: var(--mono); font-size: var(--step-2);
  font-variant-numeric: tabular-nums; color: var(--sakura);
}
.note {
  margin-top: var(--space-m); max-width: 58ch;
  font-size: var(--step--1); color: var(--ink-2); line-height: 1.65;
  padding-left: var(--space-s); border-left: 2px solid var(--rule);
}
code {
  font-family: var(--mono); font-size: .92em;
  background: var(--paper-2); padding: .1em .35em; border-radius: 2px;
}

.colophon__grid { display: grid; gap: var(--space-l); }
.creds > div {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--space-s); padding-block: var(--space-2xs);
  border-bottom: 1px solid var(--rule);
}
.creds dt {
  font-family: var(--mono); font-size: var(--step--2);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.creds dd { font-size: var(--step--1); color: var(--ink-2); }
.creds b { color: var(--ink); }
.colophon__note p { max-width: 46ch; color: var(--ink-2); font-size: var(--step--1); line-height: 1.65; }
.cta {
  display: inline-block; margin-top: var(--space-m);
  font-family: var(--mono); font-size: var(--step--1);
  text-decoration: none; border-bottom: 2px solid var(--sakura); padding-bottom: 2px;
}
.cta:hover { color: var(--sakura); }
@media (min-width: 56rem) {
  .colophon__grid { grid-template-columns: 1fr 1fr; column-gap: var(--space-2xl); }
}

.foot {
  width: var(--page); margin-inline: auto;
  padding-block: var(--space-l) var(--space-2xl);
  border-top: 1px solid var(--rule);
  background: var(--paper);
  display: flex; flex-wrap: wrap; gap: var(--space-s); justify-content: space-between;
  font-family: var(--mono); font-size: var(--step--2); color: var(--ink-3);
}

@media (prefers-reduced-motion: reduce) {
  .cue { display: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
