/* Shared sumi-ink page transition. An ink disc grows from the click point to
   cover the screen, a kanji mark surfaces, then the next page reveals from the
   same point. Used by both the Workbench (/) and the Wabi-Sabi edition (/jp/). */

.ink {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  background: radial-gradient(60% 60% at var(--x, 50%) var(--y, 50%), #2a2318 0%, #16120b 72%);
  clip-path: circle(0px at var(--x, 50%) var(--y, 50%));
  opacity: 0;
  will-change: clip-path, opacity;
}
.ink.show {
  opacity: 1;
}
.ink.expand {
  transition: clip-path 720ms cubic-bezier(0.78, 0, 0.22, 1), opacity 180ms ease;
  clip-path: circle(var(--r, 160vmax) at var(--x, 50%) var(--y, 50%));
  pointer-events: auto;
}
.ink.full {
  clip-path: circle(var(--r, 160vmax) at var(--x, 50%) var(--y, 50%));
}
.ink.reveal {
  transition: clip-path 780ms cubic-bezier(0.78, 0, 0.22, 1);
  clip-path: circle(0px at var(--x, 50%) var(--y, 50%));
}

.ink-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(0.86);
  font-family: 'Shippori Mincho', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: #efe9dc;
  font-size: clamp(3rem, 11vw, 7rem);
  opacity: 0;
  transition: opacity 0.55s ease, transform 0.95s cubic-bezier(0.2, 0.75, 0.2, 1);
}
.ink.show .ink-mark {
  opacity: 0.95;
  transform: translate(-50%, -50%) scale(1);
}
.ink.reveal .ink-mark {
  opacity: 0;
  transform: translate(-50%, -54%) scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
  .ink,
  .ink-mark {
    transition: none !important;
  }
}
