/* S Cult — the site is one concrete building.
   Three materials: CAST (words pressed into the wall), CUT (photographs as openings in the wall),
   PAINT (the pale-blue mark, the only colour the site owns, never used for text or controls).
   Palette: beton (wall), joint (formwork lines), ink (everything that must be read), paint (the mark). */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-vietnamese-wdth-normal.woff2") format("woff2-variations");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

:root {
  --beton: #9a9b95;
  --joint-dark: rgba(0, 0, 0, .3);
  --joint-light: rgba(255, 255, 255, .16);
  --ink: #000;
  --paint: #cfe0ff;
  --pad: clamp(20px, 5.2vw, 64px);
  --bar: 52px;
  --face: "Archivo", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", "Noto Sans CJK JP", system-ui, sans-serif;
  /* four sizes, no more: cast words (set per word), statement, text, small */
  --say: clamp(1.25rem, 4.9vw, 1.625rem);
  --text: 1.0625rem;
  --small: .8125rem;
  /* the concrete: soft patches over fine grain, both baked by tools/wall.py (a filter drawn live is slow on phones) */
  --wall: url("/img/wall-mottle.webp"), url("/img/wall-grain.webp");
  --wall-size: 1024px 1024px, 128px 128px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* After dark the wall goes two tones down and the paint keeps its brightness: from 20:00 to 6:00 on the visitor's
   clock, or whenever their device is set to dark. The class is put on <html> in <head>, before anything is drawn. */
html.is-dim {
  --beton: #7b7c77;
  --joint-light: rgba(255, 255, 255, .11);
  --wall: url("/img/wall-mottle.webp"), url("/img/wall-grain-dim.webp");
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--bar); }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--beton);
  background-image: var(--wall);
  background-size: var(--wall-size);
  font-family: var(--face);
  font-size: var(--text);
  line-height: 1.5;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

/* Japanese sets a little smaller and looser than Latin; Vietnamese needs room for stacked accents. */
:lang(ja) { --text: .9688rem; --say: clamp(1.125rem, 4.5vw, 1.5rem); line-break: strict; word-break: auto-phrase; }
html:lang(ja) body { line-height: 1.75; }
html:lang(vi) body { line-height: 1.6; }

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h2, .lede { text-wrap: balance; }
p { text-wrap: pretty; }
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

h2 { font-size: var(--text); font-weight: 800; font-stretch: 112%; line-height: 1.3; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--paint); color: var(--ink); }

.skip { position: absolute; left: -200vw; top: 0; z-index: 50; padding: 12px 16px; background: var(--ink); color: #fff; }
.skip:focus { left: 0; }
.say { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.lede { font-size: var(--say); line-height: 1.25; font-weight: 650; max-width: 22em; }
html:lang(ja) .lede { line-height: 1.5; }
html:lang(vi) .lede { line-height: 1.35; }
.note { max-width: 32em; }
.kicker { font-size: var(--small); font-weight: 650; line-height: 1.4; }

.link { font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .22em; }
.link:active { text-underline-offset: .12em; }

/* a plain button, cut square. Pressed, it darkens, sinks and springs back (.m-press, at the end of this file). */
.tool {
  appearance: none;
  min-height: 44px;
  padding: 9px 16px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: none;
  font-size: var(--small);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.tool:active { background: rgba(0, 0, 0, .08); }
.tool--quiet { border-color: transparent; text-decoration: underline; text-underline-offset: .22em; padding-inline: 0; font-weight: 600; justify-self: start; }
.tool[hidden] { display: none; }

/* ---------- CAST: words pressed into the wall. An image, not text to read: each has an ink twin nearby. ---------- */

.cast {
  display: block;
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-stretch: 125%;
  text-transform: uppercase;
  letter-spacing: -.015em;
  line-height: .84;
  color: rgba(0, 0, 0, .2);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .34), 0 2px 0 rgba(255, 255, 255, .2);
  white-space: nowrap;
  margin-left: -.035em;
}
.cast--name { font-size: clamp(3.6rem, 19.4vw, 21rem); }

/* The four chapter words share one size and one measure: each fills the width of its slab exactly.
   The width of the letters absorbs the difference (MIND is the narrowest word, so it gets the widest letters).
   .289 = 1 / 3.453, the width of MIND in ems at full width; the other three numbers were measured the same way. */
.cast--chapter, .cast--door { font-size: 24vw; }
.cast--mind { font-stretch: 125%; }
.cast--soul { font-stretch: 118.8%; }
.cast--mask { font-stretch: 107.4%; }
.cast--flesh { font-stretch: 97.6%; }
.chapter, .door, .next, .hero { container-type: inline-size; }
@supports (font-size: 1cqi) {
  /* 100cqi is the width inside the slab's padding */
  .cast--chapter, .cast--door { font-size: calc(100cqi * .2885); }
  .cast--name { font-size: calc(100cqi * .2205); }
}

/* ---------- CUT: a photograph is an opening in the wall ---------- */

.cut {
  position: relative;
  overflow: hidden;
  background: var(--tone, #5d6068) var(--ph, none) center / cover no-repeat;
  isolation: isolate;
}
.cut picture, .cut img { display: block; width: 100%; height: 100%; }
.cut img { object-fit: cover; object-position: var(--pos, 50% 50%); }
/* the depth of the opening: dark where the wall overhangs, a thin light edge where it catches the sky */
.cut::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 9px 16px -6px rgba(0, 0, 0, .6), inset 7px 0 12px -8px rgba(0, 0, 0, .4), inset 0 -2px 0 rgba(255, 255, 255, .2);
}

/* ---------- PAINT: the mark ---------- */

.mark {
  appearance: none;
  position: absolute;
  width: var(--size, 72px);
  height: var(--size, 72px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--paint);
  cursor: pointer;
  touch-action: manipulation;
}
.mark[hidden] { display: none; }
.mark svg, .stamp svg, .face__under svg, .place__mark svg, .own__mark svg,
.five__one svg, .kind__mark svg, .piece__mark svg, .where__mark svg, .grin svg { width: 100%; height: 100%; overflow: visible; }
.mark:focus-visible { outline-offset: 8px; }
/* a mark painted onto a photograph */
.mark--on { left: var(--mx, 62%); top: var(--my, 58%); z-index: 2; }

/* ---------- top bar ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: var(--bar);
  padding: 0 var(--pad);
  background-color: var(--beton);
  background-image: var(--wall);
  background-size: var(--wall-size);
  border-bottom: 2px solid var(--joint-dark);
  box-shadow: 0 2px 0 var(--joint-light);
  transition: transform .32s var(--ease);
}
.bar.is-away { transform: translateY(calc(-100% - 4px)); }
/* a menu hanging from the bar keeps it in place, above the menu's own wall */
.bar:has([aria-expanded="true"]) { z-index: 46; transform: none; }

.bar__name { font-weight: 800; font-stretch: 125%; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; padding: 12px 0; }
.bar__links { display: none; }
.bar__side { display: flex; align-items: center; }

/* the two buttons of the bar, the globe and ☰ (its turn into ✕: css/motion.css), side by side: 44px targets that touch.
   ☰ hangs into the page margin, so its bars end where the page's content ends. */
.bar__icon {
  appearance: none;
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.bar__icon svg, .lang__link svg { fill: none; stroke: currentColor; stroke-width: 2; }
.bar__icon svg { width: 22px; height: 22px; }
.m-burger { --m-bar: 2px; margin-right: -10px; }
/* Until a script takes the two buttons over they are links to their menus, which :target then shows in the page. */
.js .bar__plain, html:not(.js) button.bar__icon, .shut { display: none; }
html:not(.js) .shut { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--small); font-weight: 650; }
html:not(.js) #lang-panel:target { display: block; }
html:not(.js) #menu:target { display: block; position: static; }
html:not(.js) #menu:target .menu__sheet { height: auto; overflow: visible; }

/* the languages: a small slab that lowers from under the bar, at the page's content edge. The window around it
   (.lang__panel, js/motion/menu.js) reaches past it on three sides, so its shadow comes down with it. */
.lang { display: flex; }
.lang__panel { position: absolute; top: calc(100% + 6px); right: calc(var(--pad) - 16px); padding: 0 16px 4rem; pointer-events: none; }
.lang__sheet {
  width: min(16rem, calc(100vw - 2 * var(--pad)));
  max-height: calc(100vh - 6rem);
  max-height: calc(100dvh - 6rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 2px solid var(--ink);
  background-color: var(--beton);
  background-image: var(--wall);
  background-size: var(--wall-size);
  box-shadow: 0 16px 28px -14px rgba(0, 0, 0, .55);
  pointer-events: auto;
}
.lang__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; line-height: 1.4; }
.lang__link svg { flex: none; width: 18px; height: 18px; }
@media (hover: hover) { .lang__link:hover { background: rgba(0, 0, 0, .08); } }
.lang__sheet .shut { padding: 0 12px; }

/* the row of holes: one fills with paint for every mark found. Found ones also get an ink ring, so colour is never the only sign. */
.holes { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; text-decoration: none; }
.holes i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .44);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .22), inset 0 1px 1px rgba(0, 0, 0, .5);
}
.holes i.is-found { background: var(--paint); box-shadow: 0 0 0 1.5px var(--ink); }
.holes i.is-fresh { animation: fill .7s var(--ease) both; }
@keyframes fill { from { transform: scale(2.4); opacity: 0; } }
@media (max-width: 359.98px) { .holes { gap: 4px; padding: 0 6px; } }

/* ---------- menu: a wall of doors that lowers from under the bar (js/nav.js) ---------- */

/* The window the wall comes down in. Its lower edge is a joint like any other on the site (a dark line with a light
   lip) and throws the shade of a slab hanging in front of the wall: the door is wall on wall, so without them nothing
   would be seen to move. They travel with the door and are under the screen once it is down. */
.menu {
  position: fixed;
  z-index: 45;
  top: var(--bar);
  right: 0;
  bottom: 0;
  left: 0;
  box-shadow: 0 2px 0 var(--joint-dark), 0 4px 0 var(--joint-light), 0 22px 30px -14px rgba(0, 0, 0, .5);
}
.menu__sheet {
  display: grid;
  grid-template-rows: 1fr auto;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--beton);
  background-image: var(--wall);
  background-size: var(--wall-size);
  box-shadow: inset 0 2px 0 var(--joint-light);
}
.menu__list { display: grid; align-content: center; gap: 2px; padding: 12px var(--pad); }
.menu__chapter {
  font-family: "Archivo", sans-serif;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(3rem, 17.5vw, 7.5rem);
  line-height: .95;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-decoration: none;
  margin-left: -.03em;
}
.menu__chapter[aria-current="page"] { color: rgba(0, 0, 0, .2); text-shadow: 0 -1px 0 rgba(0, 0, 0, .34), 0 2px 0 rgba(255, 255, 255, .2); }
.menu__foot { display: grid; gap: 14px; justify-items: start; padding: 18px var(--pad) calc(22px + env(safe-area-inset-bottom)); border-top: 2px solid var(--joint-dark); box-shadow: inset 0 2px 0 var(--joint-light); }
.menu__more, .menu__langs { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.menu__more a { font-weight: 750; font-stretch: 112%; text-decoration: none; padding: 8px 0; }
.menu__more a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; }
.menu__lang, .foot__lang, .lang__link { font-size: .9375rem; text-decoration: none; font-family: system-ui, "Hiragino Sans", "Noto Sans JP", sans-serif; }
.menu__lang, .foot__lang { padding: 8px 0; border-bottom: 2px solid transparent; }
.menu__lang[aria-current], .foot__lang[aria-current] { border-bottom-color: var(--ink); }
.menu__lang[aria-current], .foot__lang[aria-current], .lang__link[aria-current] { font-weight: 650; }

/* ---------- slabs: a formwork joint along the top edge, tie holes in the corners ---------- */

.slab {
  position: relative;
  padding: calc(var(--pad) + 30px) var(--pad) calc(var(--pad) + 26px);
  border-top: 2px solid var(--joint-dark);
  box-shadow: inset 0 2px 0 var(--joint-light);
  --holes:
    radial-gradient(circle at 26px 26px, rgba(0, 0, 0, .46) 0 5px, rgba(255, 255, 255, .2) 5.6px 6.8px, transparent 7.4px),
    radial-gradient(circle at calc(100% - 26px) 26px, rgba(0, 0, 0, .46) 0 5px, rgba(255, 255, 255, .2) 5.6px 6.8px, transparent 7.4px);
  background-image: var(--holes);
}
.slab > h2 + p, .story__text h2 + p, .lead h2 + p { margin-top: 10px; }

.lead { padding: clamp(56px, 14vw, 128px) var(--pad) clamp(22px, 5vw, 40px); max-width: 44rem; }

/* ---------- front wall ---------- */

.hero {
  display: grid;
  grid-template-rows: 1fr auto auto;
  min-height: calc(84svh - var(--bar));
  padding: 0 var(--pad) clamp(18px, 4vw, 36px);
}
.hero__wall { position: relative; min-height: 30svh; }
.hero__text { display: grid; gap: 12px; margin-top: clamp(18px, 4vw, 36px); }
.hero__tease {
  position: absolute;
  left: 0;
  bottom: 10px;
  font-size: var(--small);
  font-weight: 650;
  opacity: 0;
}
.hero__tease.is-on { animation: tease 2.6s ease-out both; }
@keyframes tease { 0% { opacity: 0; translate: 0 6px; } 12%, 70% { opacity: 1; translate: 0 0; } 100% { opacity: 0; } }

.hero--lost { min-height: calc(100svh - var(--bar)); }
.hero__text--lost { gap: 6px; }
.hero__text--lost .lede { margin-top: 14px; }
.lost__lang { font-size: var(--small); opacity: .7; margin-left: 8px; }

/* ---------- the scroll story: an opening that starts as a slit and widens as the page moves ----------
   What is written here is the END of the story. The @keyframes below are driven by the scroll position
   (css/motion.css: .m-scrub is the tall track, .m-pin stays on screen, .m-key follows the track), so they run
   off the main thread where the browser can do that, and through js/motion/scroll.js where it cannot. */

.scrub { --m-len: 270svh; }
.scrub--long { --m-len: 400svh; }
.scrub__pin { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.scrub__frame { position: relative; min-height: 0; overflow: clip; }
.scrub__cut { position: absolute; inset: 0; }
.scrub__cut img { transform-origin: var(--origin, 50% 20%); will-change: transform; }
/* Three pieces of wall cover the photograph and slide off it. Only their position changes (transform),
   so the phone moves ready-made pictures around instead of redrawing anything. */
.scrub__cover {
  position: absolute;
  z-index: 1;
  background-color: var(--beton);
  background-image: var(--wall);
  background-size: var(--wall-size);
  will-change: transform;
}
.scrub__cover--left { top: 0; bottom: 0; left: 0; width: var(--pad); transform: translateX(-104%); box-shadow: 7px 0 12px -6px rgba(0, 0, 0, .45); }
.scrub__cover--right { top: 0; bottom: 0; right: 0; width: var(--pad); transform: translateX(104%); }
.scrub__cover--bottom { inset: 0; z-index: 2; border-top: 2px solid rgba(255, 255, 255, .2); transform: translateY(100%); }
.scrub__lines {
  position: relative;
  display: grid;
  align-items: start;
  min-height: 8.6rem;
  padding: 18px var(--pad) calc(20px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--joint-dark);
}
.scrub__line { grid-area: 1 / 1; font-size: var(--say); font-weight: 650; line-height: 1.25; max-width: 21em; }
.scrub__line { pointer-events: none; }
.scrub__line .link { display: inline-block; margin-top: 10px; font-size: var(--text); pointer-events: auto; }
/* what can be tapped at the end of a story (its link, the mark on the jacket) only answers once the story is there;
   js/app.js sets the two classes as the scroll passes those points */
.js .scrub:not(.is-late) .scrub__line .link,
.js .scrub:not(.is-last) .mark--take { visibility: hidden; }
html:lang(ja) .scrub__line { line-height: 1.5; }

/* the slit: its height, how far the picture is pushed up behind it and how much it is enlarged (set per photograph) */
@keyframes cover-down {
  0% { transform: translateY(calc(100% - var(--slit, 76%))); }
  42%, 100% { transform: translateY(100%); }
}
@keyframes cover-left {
  0% { transform: translateX(0); }
  42%, 100% { transform: translateX(-104%); }
}
@keyframes cover-right {
  0% { transform: translateX(0); }
  42%, 100% { transform: translateX(104%); }
}
@keyframes scrub-zoom {
  0% { transform: translateY(var(--lift, -22%)) scale(var(--zoom, 1.3)); }
  42%, 100% { transform: none; }
}
/* the sentences take turns: three of them on the front wall, four on the jacket's page */
@keyframes line-1of3 {
  0%, 3% { opacity: 0; transform: translateY(12px); }
  9%, 30% { opacity: 1; transform: none; }
  36%, 100% { opacity: 0; transform: none; }
}
@keyframes line-2of3 {
  0%, 34% { opacity: 0; transform: translateY(12px); }
  40%, 62% { opacity: 1; transform: none; }
  68%, 100% { opacity: 0; transform: none; }
}
@keyframes line-3of3 {
  0%, 66% { opacity: 0; transform: translateY(12px); }
  72%, 100% { opacity: 1; transform: none; }
}
@keyframes line-1of4 {
  0%, 2% { opacity: 0; transform: translateY(12px); }
  7%, 22% { opacity: 1; transform: none; }
  27%, 100% { opacity: 0; transform: none; }
}
@keyframes line-2of4 {
  0%, 25% { opacity: 0; transform: translateY(12px); }
  30%, 47% { opacity: 1; transform: none; }
  52%, 100% { opacity: 0; transform: none; }
}
@keyframes line-3of4 {
  0%, 50% { opacity: 0; transform: translateY(12px); }
  55%, 72% { opacity: 1; transform: none; }
  77%, 100% { opacity: 0; transform: none; }
}
@keyframes line-4of4 {
  0%, 75% { opacity: 0; transform: translateY(12px); }
  80%, 100% { opacity: 1; transform: none; }
}
/* the mark painted on the jacket at the end of its story */
.mark--take { --size: clamp(44px, 13vw, 76px); }
@keyframes mark-on {
  0%, 77% { opacity: 0; }
  82%, 100% { opacity: 1; }
}

/* a cast word sets as it comes onto the screen; a photograph drifts a little inside its opening */
@keyframes cast-set {
  0% { opacity: 0; transform: translateY(.09em) scale(.985); }
  14%, 100% { opacity: 1; transform: none; }
}
@keyframes cut-drift {
  from { transform: translateY(-3.5%) scale(1.08); }
  to { transform: translateY(3.5%) scale(1.08); }
}

/* ---------- four doors ---------- */

.slabs { display: grid; grid-template-columns: 1fr; }

.door {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 24px;
  min-height: 70svh;
  text-decoration: none;
  background-color: var(--beton);
  background-image:
    radial-gradient(circle at 26px 26px, rgba(0, 0, 0, .46) 0 5px, rgba(255, 255, 255, .2) 5.6px 6.8px, transparent 7.4px),
    radial-gradient(circle at calc(100% - 26px) 26px, rgba(0, 0, 0, .46) 0 5px, rgba(255, 255, 255, .2) 5.6px 6.8px, transparent 7.4px),
    var(--wall);
  background-size: auto, auto, var(--wall-size);
  box-shadow: inset 0 2px 0 var(--joint-light), 0 -16px 28px -18px rgba(0, 0, 0, .5);
}
.door .cast { align-self: start; }
.door__text { align-self: end; max-width: 26em; padding-right: 4.2em; }
.door__no { position: absolute; right: var(--pad); bottom: calc(var(--pad) + 26px); }
.door__text b { display: block; font-size: var(--small); font-weight: 650; margin-bottom: 2px; }

/* ---------- a closing line ---------- */

.closing { display: grid; gap: 10px; padding-top: clamp(64px, 16vw, 140px); padding-bottom: clamp(64px, 16vw, 140px); }
.closing h2 { font-size: var(--say); font-weight: 650; font-stretch: 100%; line-height: 1.25; max-width: 20em; }
html:lang(ja) .closing h2 { line-height: 1.5; }
.closing p { max-width: 30em; }

/* ---------- the door at the end of a page ---------- */

.next {
  position: relative;
  display: grid;
  gap: 14px;
  padding: clamp(40px, 10vw, 96px) var(--pad) clamp(36px, 9vw, 80px);
  border-top: 2px solid var(--joint-dark);
  box-shadow: inset 0 2px 0 var(--joint-light);
  text-decoration: none;
  overflow: clip;
}
.next__label { font-size: var(--small); font-weight: 650; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; justify-self: start; }
.next__name { font-weight: 900; font-stretch: 125%; font-size: clamp(2rem, 10.5vw, 4.5rem); line-height: 1.02; letter-spacing: -.02em; justify-self: start; }
.next--plain .next__label { text-decoration: none; }
.next--plain .next__name { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; }
html:lang(vi) .next__name { line-height: 1.2; }

/* ---------- top of a chapter ---------- */

.chapter {
  display: grid;
  align-content: end;
  gap: 14px;
  min-height: calc(70svh - var(--bar));
  padding: clamp(28px, 8vw, 72px) var(--pad) clamp(30px, 8vw, 64px);
}
.chapter .lede { margin-top: 8px; }

/* top of the other pages: an ink title */
.top { display: grid; gap: 12px; padding: clamp(56px, 15vw, 132px) var(--pad) clamp(30px, 8vw, 64px); }
.title { font-weight: 900; font-stretch: 125%; font-size: clamp(2.25rem, 11.5vw, 5rem); line-height: 1; letter-spacing: -.02em; margin-left: -.03em; justify-self: start; }
html:lang(vi) .title { line-height: 1.18; }
html:lang(ja) .title { line-height: 1.2; letter-spacing: 0; }
.count { font-size: var(--small); font-weight: 650; }
.count b { font-size: var(--say); font-weight: 900; font-stretch: 125%; margin-right: 4px; }

/* ---------- the gesture of each chapter ---------- */

.play { display: grid; gap: 22px; }
.play__line { font-size: var(--say); font-weight: 650; line-height: 1.25; max-width: 20em; }
html:lang(ja) .play__line { line-height: 1.5; }

/* MIND: tap the wall */
.play--stamp { min-height: 86svh; align-content: space-between; cursor: crosshair; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.play__ask h2 { font-size: var(--say); font-weight: 650; font-stretch: 100%; line-height: 1.25; }
.play__ask p { margin-top: 8px; max-width: 24em; }
.play__tools { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 3; }
.tool--after { }
.is-used .tool--after { }
.stamp { position: absolute; z-index: 1; color: var(--paint); pointer-events: none; }
.stamp.is-kept { z-index: 2; outline: 2px solid var(--ink); outline-offset: 6px; }

/* SOUL: do nothing */
.wait { position: relative; width: min(100%, 34rem); }
.wait__veil {
  position: absolute;
  inset: -1px;
  z-index: 3;
  background-color: var(--beton);
  background-image: var(--wall);
  background-size: var(--wall-size);
  will-change: opacity;
}
.wait.is-open .wait__veil { opacity: 0; transition: opacity .8s ease-out; pointer-events: none; }
.wait .mark--on { --mx: 68%; --my: 70%; }

/* MASK: the straight face */
.face {
  appearance: none;
  position: relative;
  display: block;
  width: min(76vw, 26rem);
  aspect-ratio: 1;
  margin: clamp(8px, 4vw, 40px) auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.face__mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: 5.5;
  stroke-linecap: round;
  transition: opacity .3s ease-out, transform .5s var(--ease);
}
/* cast into the wall like the words: a dark edge above, a light edge below, the body in between */
.face__dark { stroke: rgba(0, 0, 0, .34); }
.face__lit { stroke: rgba(255, 255, 255, .22); }
.face__body { stroke: rgba(0, 0, 0, .24); }
.face.is-lifted .face__mask { opacity: .1; transform: translateY(-9%) scale(1.04); }
.face__under { position: absolute; inset: 9%; color: var(--paint); opacity: 0; transition: opacity .25s; }
.face.is-lifted .face__under { opacity: 1; transition-duration: 0s; }

/* FLESH: a shutter over a photograph. --shown runs 0 to 1. */
.slide { position: relative; width: min(100%, 34rem); touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
/* the shutter is a piece of wall that slides off to the right; its window keeps it from showing beyond the photograph */
.slide__mask { position: absolute; inset: -1px; z-index: 3; overflow: hidden; pointer-events: none; }
.slide__cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center end;
  padding-right: 7%;
  transform: translateX(calc(var(--shown) * 100%));
  background-color: var(--beton);
  background-image: var(--wall);
  background-size: var(--wall-size);
  will-change: transform;
}
.slide__word { font-weight: 900; font-stretch: 125%; font-size: clamp(1.125rem, 5.2vw, 2.25rem); color: rgba(0, 0, 0, .2); text-shadow: 0 -1px 0 rgba(0, 0, 0, .34), 0 2px 0 rgba(255, 255, 255, .2); white-space: nowrap; }
.slide__edge {
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: calc(var(--shown) * 100%);
  z-index: 4;
  width: 4px;
  margin-left: -2px;
  background: var(--ink);
}
.slide__edge::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px; border: 2px solid var(--ink); border-radius: 50%; background: var(--beton); }
.slide__range { position: absolute; left: 0; right: 0; bottom: -34px; width: 100%; height: 24px; margin: 0; opacity: 0; }
.slide__range:focus-visible { opacity: 1; }
.slide .mark--on { --mx: 72%; --my: 14%; z-index: 2; }
.play--slide { padding-bottom: calc(var(--pad) + 56px); }

/* ---------- words beside a photograph ---------- */

.story { display: grid; gap: 28px; }
.story__text { max-width: 30em; }
.story__cut { width: min(100%, 30rem); }
.story--flip .story__cut { justify-self: end; }

.alone { display: grid; gap: 26px; }
.alone__cut { width: min(86%, 26rem); justify-self: end; }
.alone__line { font-size: var(--say); font-weight: 650; line-height: 1.25; max-width: 18em; }
html:lang(ja) .alone__line { line-height: 1.5; }

/* ---------- a chapter as clothes: two openings in the same wall, the second smaller and off to the right ---------- */

.wears { display: grid; gap: 38px; }
.wears__text h2 + p { margin-top: 10px; font-size: var(--say); font-weight: 650; line-height: 1.25; max-width: 16em; }
html:lang(ja) .wears__text h2 + p { line-height: 1.5; }
html:lang(vi) .wears__text h2 + p { line-height: 1.35; }
.wear { position: relative; display: grid; gap: 16px; width: min(100%, 30rem); }
.wear + .wear { width: min(76%, 23rem); justify-self: end; }
.wear__text { display: grid; gap: 6px; justify-items: start; }
.wear__text h3, .rack__top h2 { font-size: var(--say); font-weight: 900; font-stretch: 125%; line-height: 1.1; letter-spacing: -.01em; }
html:lang(ja) .wear__text h3, html:lang(vi) .wear__text h3 { line-height: 1.3; }
/* the link under a piece covers the whole piece, photograph included */
.wear__link::after, .hang__link::after { content: ""; position: absolute; inset: 0; }

/* ---------- SOUL: the wall over the lead piece is zipped shut (js/zip.js moves and shears the strips) ---------- */

.wear__photo { position: relative; }
.wear__say { font-weight: 750; font-stretch: 112%; }
.wear__text .tool { position: relative; z-index: 1; }
.zipdoor { position: absolute; inset: 0; z-index: 3; overflow: hidden; }
html:not(.js) .zipdoor { display: none; }
.zipdoor__flap { position: absolute; top: 0; bottom: 0; width: 50%; transition: transform .6s var(--ease); }
.zipdoor__flap--l { left: 0; }
.zipdoor__flap--r { right: 0; }
.zipdoor.is-open .zipdoor__flap--l { transform: translateX(-106%); }
.zipdoor.is-open .zipdoor__flap--r { transform: translateX(106%); }
/* one strip of wall; it reaches past the outer edge so that shearing it never uncovers the picture there */
.zipdoor__flap i {
  position: absolute;
  top: calc(var(--i) * 6.25%);
  left: -40%;
  right: 0;
  height: calc(6.25% + .6px);
  background-color: var(--beton);
  background-image: var(--wall);
  background-size: var(--wall-size);
  transform-origin: 50% 100%;
  will-change: transform;
}
.zipdoor__flap--r i { left: 0; right: -40%; }
/* the tape and the teeth along the edge that opens */
.zipdoor__flap i::before, .zipdoor__flap i::after { content: ""; position: absolute; top: 0; bottom: 0; }
.zipdoor__flap i::before { width: 13px; background: rgba(0, 0, 0, .2); }
.zipdoor__flap i::after { width: 5px; background: repeating-linear-gradient(to bottom, #161716 0 3px, transparent 3px 6px); }
.zipdoor__flap--l i::before, .zipdoor__flap--l i::after { right: 0; }
.zipdoor__flap--r i::before, .zipdoor__flap--r i::after { left: 0; }
.zipdoor__flap--r i::after { background-position: 0 3px; }
/* the pull: a slider with a tab hanging from it */
.zipdoor__pull {
  appearance: none;
  position: absolute;
  z-index: 2;
  left: 50%;
  top: -4px;
  width: 48px;
  height: 68px;
  padding: 0;
  border: 0;
  background: none;
  transform: translate(-50%, 0);
  touch-action: none;
  cursor: grab;
  transition: opacity .3s;
}
.zipdoor__pull::before, .zipdoor__pull::after { content: ""; position: absolute; left: 50%; translate: -50% 0; }
.zipdoor__pull::before { top: 4px; width: 17px; height: 21px; border-radius: 3px 3px 6px 6px; background: #151615; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 2px 3px rgba(0, 0, 0, .45); }
.zipdoor__pull::after { top: 21px; width: 13px; height: 36px; border: 3px solid #151615; border-radius: 4px 4px 8px 8px; box-shadow: 0 2px 3px rgba(0, 0, 0, .4); }
.zipdoor.is-held .zipdoor__pull { cursor: grabbing; }
.zipdoor.is-open .zipdoor__pull { opacity: 0; pointer-events: none; }
.zipdoor.is-open { pointer-events: none; }

/* ---------- CLOTH: a thin layer that wears through. Sub-conscious only; the cloth itself is drawn by js/tear.js ---------- */

.under { display: grid; gap: 22px; }
.sheet { position: relative; width: min(100%, 30rem); aspect-ratio: 4 / 5; user-select: none; -webkit-user-select: none; }
/* two nails hold it up */
.sheet::before, .sheet::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #1f2020;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .28);
  pointer-events: none;
}
.sheet::before { left: 12px; }
.sheet::after { right: 12px; }
/* what is behind the cloth: a dark recess. Hidden until the cloth is up, so it is never seen bare by accident. */
.sheet__inner {
  position: absolute;
  inset: 12px 10px 22px;
  overflow: hidden;
  background: #232526;
  box-shadow: inset 0 10px 18px -6px rgba(0, 0, 0, .7), inset 0 -2px 0 rgba(255, 255, 255, .1);
  container-type: inline-size;
}
.js .sheet:not(.is-ready) .sheet__inner { visibility: hidden; }
.sheet__word {
  position: absolute;
  left: 6%;
  bottom: 6%;
  font-weight: 900;
  font-stretch: 125%;
  font-size: 11.4cqi;
  line-height: .86;
  letter-spacing: -.015em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .055);
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .6), 0 1px 0 rgba(255, 255, 255, .1);
}
.sheet__doodles img { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); translate: -50% -50%; rotate: var(--r); }
.tear__shade, .tear__outer { position: absolute; inset: 0; width: 100%; height: 100%; }
/* a sideways rub tears; an up-and-down swipe still scrolls the page */
.tear__outer { touch-action: pan-y; cursor: grab; }
.under__text { display: grid; gap: 8px; justify-items: start; max-width: 30em; }
.under__text h2 { font-size: var(--say); font-weight: 900; font-stretch: 125%; line-height: 1.1; letter-spacing: -.01em; }
.under__line { min-height: 2.5em; font-size: var(--say); font-weight: 650; line-height: 1.25; }
html:lang(ja) .under__line { min-height: 3em; line-height: 1.5; }
.under__kept { font-size: var(--small); font-weight: 600; }
.under__text .tool { margin-top: 10px; }
.worn { position: relative; width: min(100%, 30rem); user-select: none; -webkit-user-select: none; }
.worn .cut { width: 100%; }
/* the inner layer is only shown once the outer one lies over it */
.js .worn:not(.is-ready) .cut img { visibility: hidden; }
.worn .tear__shade, .worn .tear__outer { z-index: 2; }

/* ---------- a reel drawn in 3D: one frame of a long image shows through the opening ---------- */

.reelbox { display: grid; gap: 18px; }
.reelbox__text { max-width: 30em; }
.reelbox__text h2 + p { margin-top: 10px; }
.reel { position: relative; overflow: hidden; width: min(100%, 30rem); background: var(--beton); touch-action: pan-y; cursor: ew-resize; box-shadow: inset 0 9px 16px -6px rgba(0, 0, 0, .6); }
.reel__strip { position: absolute; left: 0; top: 0; max-width: none; will-change: transform; pointer-events: none; }
.reel__range { width: min(100%, 30rem); accent-color: var(--ink); }

/* ---------- clothes: every piece hung under its chapter, two to a wall ---------- */

.rack { display: grid; gap: 24px; align-content: start; scroll-margin-top: var(--bar); }
.rack__top { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 16px; }
.rack__top h2 a { text-decoration-thickness: .07em; text-underline-offset: .14em; }
.rack__top p { grid-column: 1 / -1; max-width: 26em; }
/* the chapter's lead piece comes first and gets the wider opening */
.rack__row { display: grid; grid-template-columns: 1.22fr 1fr; gap: 14px; align-items: start; }
.hang { position: relative; display: grid; gap: 4px; scroll-margin-top: calc(var(--bar) + 14px); }
.hang + .hang { margin-top: 30px; }
.hang__photo { margin-bottom: 8px; }
.hang h3 { font-size: var(--text); font-weight: 800; font-stretch: 112%; line-height: 1.3; }

/* ---------- denim jacket ---------- */

.plate dl { display: grid; max-width: 34rem; border-bottom: 2px solid var(--joint-dark); }
.plate dl > div { display: grid; grid-template-columns: 6.5em 1fr; gap: 14px; padding: 12px 0; border-top: 2px solid var(--joint-dark); }
.plate dt { font-size: var(--small); font-weight: 650; padding-top: .2em; }
.plate dd { font-weight: 750; font-stretch: 112%; }

.closer { display: grid; gap: 22px; }
.closer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.with { display: grid; gap: 12px; }
.with ul { display: grid; gap: 8px; justify-items: start; }

/* ---------- about ---------- */

.rules { display: grid; gap: 10px; }
.rules__how { font-size: var(--small); font-weight: 650; }
.rules__list { display: grid; gap: clamp(30px, 8vw, 56px); margin-top: 22px; counter-reset: rule; }
.rule { display: grid; gap: 10px; max-width: 32em; counter-increment: rule; }
.rule::before { content: counter(rule); font-size: var(--small); font-weight: 650; }
.refuse {
  appearance: none;
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: var(--say);
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
}
/* the refusal is struck with paint, line by line, when tapped */
.refuse span {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M0 6 C12 3 22 8 36 5 S62 3 78 6 92 4 100 5' fill='none' stroke='%23cfe0ff' stroke-width='4.2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 0% .5em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size .5s var(--ease);
}
.refuse[aria-pressed="true"] span { background-size: 100% .5em; }

.egg {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 44px;
  margin: -12px -8px -12px -12px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 800;
  vertical-align: middle;
  cursor: pointer;
  position: static;
  color: inherit;
  filter: none;
}
.egg.is-found { color: var(--paint); animation: upright .6s var(--ease) both; }
.egg svg { width: 34px; height: 34px; overflow: visible; }
@keyframes upright { from { rotate: 90deg; } }

/* ---------- marks ---------- */

.places__list { display: grid; max-width: 34rem; border-bottom: 2px solid var(--joint-dark); }
.place a { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; padding: 12px 0; border-top: 2px solid var(--joint-dark); text-decoration: none; }
.place__mark {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  color: var(--paint);
  background: radial-gradient(circle, rgba(0, 0, 0, .44) 0 5px, rgba(255, 255, 255, .2) 5.6px 6.8px, transparent 7.4px);
}
.place.is-found .place__mark { background: none; }
.place__name { font-weight: 800; font-stretch: 112%; align-self: end; }
.place__hint { font-size: var(--small); font-weight: 600; align-self: start; }
.place.is-found .place__hint { text-decoration: line-through; text-decoration-thickness: 1.5px; opacity: .6; }

.own { display: grid; gap: 26px; justify-items: start; }
.own[hidden], .locked[hidden] { display: none; }
.own__mark { display: block; width: min(64vw, 20rem); aspect-ratio: 1; color: var(--paint); }
.own__text { display: grid; justify-items: start; }
.own__text .tool { margin-top: 18px; }
.locked p { font-size: var(--say); font-weight: 650; }
.small { display: grid; gap: 6px; justify-items: start; font-size: var(--small); }

/* a line that slides up once every mark is found */
.toast {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 30rem;
  padding: 14px 16px;
  background: var(--ink);
  color: #fff;
  font-size: .9375rem;
  text-decoration: none;
  animation: rise .5s var(--ease) both;
}
.toast b { text-decoration: underline; text-underline-offset: .2em; white-space: nowrap; }
@keyframes rise { from { transform: translateY(140%); } }

/* ---------- foot ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 20px;
  border-top: 2px solid var(--joint-dark);
  box-shadow: inset 0 2px 0 var(--joint-light);
  padding: 18px var(--pad) calc(18px + env(safe-area-inset-bottom));
  font-size: .9375rem;
}
.foot__langs { display: flex; gap: 6px 18px; flex-wrap: wrap; }

/* ---------- small things several pages share ---------- */

/* a chapter's place among the four */
.kicker--row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.kicker__no, .door__no { font-size: var(--small); font-weight: 650; font-stretch: 112%; letter-spacing: .05em; white-space: nowrap; }

/* the same filled hole as in the top bar, beside a door whose mark has been found */
.state { display: none; }
.state.is-found { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--paint); box-shadow: 0 0 0 1.5px var(--ink); }

/* a button that stays pressed */
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* the wall grins back: the hole in a slab's top right corner is one eye, the other eye and a smile are painted beside it */
.grin {
  --g: 62px;
  position: absolute;
  top: calc(26px - var(--g) * .388);
  right: calc(26px - var(--g) * .318);
  width: var(--g);
  height: var(--g);
  color: var(--paint);
  pointer-events: none;
  transform: scaleX(-1);
}

/* ---------- front wall: five marks painted for this visit ---------- */

.five { display: grid; gap: 28px; }
.five__text { max-width: 30em; }
.five__row { display: flex; align-items: flex-start; gap: clamp(8px, 3.4vw, 30px); min-height: clamp(84px, 24vw, 130px); }
.five__one {
  appearance: none;
  flex: 0 0 auto;
  width: clamp(46px, 15vw, 88px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paint);
  cursor: pointer;
  touch-action: manipulation;
}
/* nothing about them lines up */
.five__one:nth-child(2) { margin-top: 24px; }
.five__one:nth-child(3) { margin-top: 5px; }
.five__one:nth-child(4) { margin-top: 30px; }
.five__one:nth-child(5) { margin-top: 13px; }
/* a mark that was pestered goes to the far end of the row */
.five__one.is-cross { order: 9; }
.five__note { font-size: var(--small); font-weight: 650; }

/* ---------- MIND: three kinds of mark; a patch of wall to paint on ---------- */

.kinds { display: grid; gap: 26px; }
.kinds__list { display: grid; gap: 20px; }
.kind { display: grid; grid-template-columns: clamp(64px, 20vw, 100px) 1fr; gap: 20px; align-items: center; }
.kind__mark { display: block; aspect-ratio: 1; color: var(--paint); }
.kind__label { font-size: var(--say); font-weight: 650; line-height: 1.25; }
html:lang(ja) .kind__label { line-height: 1.5; }
.kinds__after { max-width: 30em; }

.own-wall { display: grid; gap: 22px; }
.own-wall__text { max-width: 30em; }
.own-wall__text h2 + p { margin-top: 10px; }
/* the patch: a panel set a little into the wall. A finger that starts on it paints; start beside it to scroll. */
.pad {
  position: relative;
  width: 100%;
  max-width: 34rem;
  aspect-ratio: 4 / 5;
  max-height: 66svh;
  color: var(--paint);
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 0 0 2px var(--joint-dark), inset 0 4px 0 rgba(0, 0, 0, .1);
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.pad svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.own-wall__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; min-height: 44px; }
.own-wall__kept { font-size: var(--small); font-weight: 600; }

/* ---------- SOUL: three stretches of wall, each poured a little darker, one line apiece ---------- */

.hush { display: grid; align-content: end; min-height: 72svh; padding-bottom: clamp(72px, 20svh, 190px); overflow: clip; }
.hush--1 { background-image: var(--holes), linear-gradient(rgba(0, 0, 0, .06), rgba(0, 0, 0, .06)); }
.hush--2 { background-image: var(--holes), linear-gradient(rgba(0, 0, 0, .13), rgba(0, 0, 0, .13)); }
.hush--3 { background-image: var(--holes), linear-gradient(rgba(0, 0, 0, .21), rgba(0, 0, 0, .21)); }
.hush__line { position: relative; font-size: var(--say); font-weight: 650; line-height: 1.25; max-width: 16em; transition: opacity 1.6s ease-out; }
html:lang(ja) .hush__line { line-height: 1.5; }
/* the first line is simply there; the next two are only said once the page has been left alone for a moment (js/pages/soul.js) */
.js .hush:not(.is-said):not(.hush--1) .hush__line { opacity: 0; }
/* on the darkest stretch a soft patch of light warms up after its line */
.hush__light {
  position: absolute;
  left: 50%;
  top: 6%;
  width: 150vw;
  height: 58svh;
  margin-left: -75vw;
  background: radial-gradient(closest-side, rgba(255, 250, 236, .24), rgba(255, 250, 236, 0));
  opacity: 0;
  transition: opacity 5s ease-out 1s;
  pointer-events: none;
}
.hush.is-said .hush__light { opacity: 1; }

/* ---------- MASK: the same face in four rooms ---------- */

.face__mouth { opacity: 0; transition: opacity .28s ease-out; }
.face[data-mouth="0"] .face__mouth[data-m="0"],
.face[data-mouth="1"] .face__mouth[data-m="1"],
.face[data-mouth="2"] .face__mouth[data-m="2"],
.face[data-mouth="3"] .face__mouth[data-m="3"] { opacity: 1; }
.rooms { display: grid; gap: 14px; }
.rooms__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 30rem; }
.rooms__list .tool { text-align: left; }
.rooms__line { min-height: 1.3em; font-size: var(--say); font-weight: 650; line-height: 1.25; }
html:lang(ja) .rooms__line { min-height: 1.6em; line-height: 1.5; }

/* a wall of eyes: pairs cast into the concrete, each with pupils that look away from wherever the visitor taps */
.watch { display: grid; gap: 22px; }
.watch__eyes { width: 100%; max-width: 34rem; height: auto; overflow: visible; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.watch__eyes use { fill: none; stroke-width: 2.4; }
.watch__look { fill: rgba(0, 0, 0, .58); transition: transform .3s var(--ease); }

/* ---------- FLESH: a control that will not stay; a crack left as it is (it does not move: it was there first) ---------- */

.retouch { display: grid; gap: 14px; }
.retouch__row { display: grid; grid-template-columns: 1fr 3.4em; gap: 16px; align-items: center; max-width: 30rem; }
.retouch__range { appearance: none; -webkit-appearance: none; width: 100%; height: 44px; margin: 0; background: none; cursor: ew-resize; touch-action: pan-y; }
.retouch__range::-webkit-slider-runnable-track { height: 4px; background: var(--ink); }
.retouch__range::-moz-range-track { height: 4px; background: var(--ink); }
.retouch__range::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -14px; border: 2px solid var(--ink); border-radius: 50%; background: var(--beton); }
.retouch__range::-moz-range-thumb { width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%; background: var(--beton); }
.retouch__out { font-size: var(--say); font-weight: 900; font-stretch: 125%; text-align: right; }
.retouch__line { min-height: 1.3em; font-size: var(--say); font-weight: 650; line-height: 1.25; }
html:lang(ja) .retouch__line { min-height: 1.6em; line-height: 1.5; }

.crack { display: grid; gap: 20px; }
.crack__text { max-width: 30em; }
.crack__text h2 + p { margin-top: 10px; }
/* a hairline from one edge of the slab to the other: a dark line with a thin light lip, like every joint on the site */
.crack__line { display: block; width: calc(100% + 2 * var(--pad)); height: clamp(84px, 25vw, 170px); margin: 0 calc(-1 * var(--pad)); fill: none; overflow: visible; }
.crack__line path { vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.crack__dark { stroke: rgba(0, 0, 0, .6); stroke-width: 1.4; }
.crack__lit { stroke: rgba(255, 255, 255, .3); stroke-width: 1.2; }

/* ---------- clothes: each piece wears a mark; any two go together ---------- */

.piece__mark, .where__mark {
  position: absolute;
  z-index: 2;
  aspect-ratio: 1;
  translate: -50% -50%;
  color: var(--paint);
  pointer-events: none;
}
.piece__mark { left: var(--mx); top: var(--my); width: clamp(34px, 13%, 58px); }
/* a layer of its own: while a mark is being painted, only its own small square is drawn again, not the photograph
   under it (measured on the Clothes page, eight marks: a third less raster work) */
.piece__mark { will-change: transform; }

.mix { display: grid; gap: 18px; }
.mix__text { max-width: 30em; }
.mix__text h2 + p { margin-top: 10px; }
.mix__list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 30rem; }
.mix__list .tool { text-align: left; }
.mix__answer { min-height: 1.1em; font-weight: 900; font-stretch: 125%; font-size: clamp(2rem, 10.5vw, 4.5rem); line-height: 1.05; letter-spacing: -.02em; }
html:lang(ja) .mix__answer, html:lang(vi) .mix__answer { min-height: 1.3em; font-size: clamp(1.6rem, 8vw, 3.4rem); line-height: 1.3; letter-spacing: 0; }
.mix__answer.is-new { animation: press .3s var(--ease) both; }

/* ---------- denim jacket: where would the mark go ---------- */

.where { display: grid; gap: 22px; }
.where__text { display: grid; justify-items: start; max-width: 30em; }
.where__text h2 + p { margin-top: 10px; }
.where__text .tool { margin-top: 18px; }
.where__zone { width: min(100%, 30rem); cursor: crosshair; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.where__mark { width: clamp(40px, 15%, 72px); opacity: 0; }
.where__mark.is-on { opacity: 1; }
.where__line { min-height: 2.6em; font-size: var(--say); font-weight: 650; line-height: 1.25; max-width: 20em; }
html:lang(ja) .where__line { min-height: 3.1em; line-height: 1.5; }

/* ---------- about: what the site does without ---------- */

.nots { display: grid; gap: 16px; }
.nots__list { display: grid; gap: 4px; }
.nots__list s { font-size: var(--say); font-weight: 650; line-height: 1.3; text-decoration-thickness: 2px; }
html:lang(ja) .nots__list s { line-height: 1.55; }
.nots > p { max-width: 30em; font-size: var(--small); font-weight: 600; }
.plate h2 { margin-bottom: 18px; }

/* ---------- marks: the one painted by finger ---------- */

.hand { display: grid; gap: 22px; justify-items: start; }
.hand[hidden] { display: none; }
.hand__slot { display: block; width: min(100%, 24rem); color: var(--paint); background: rgba(255, 255, 255, .055); box-shadow: inset 0 0 0 2px var(--joint-dark); }
.hand__slot svg { display: block; width: 100%; height: auto; }
.hand__text h2 + p { margin-top: 10px; }

/* ---------- wider screens ---------- */

@media (min-width: 860px) {
  :root { --bar: 56px; }
  .bar__links { display: flex; gap: 22px; margin-right: auto; margin-left: 30px; }
  .bar__links a { font-size: .9375rem; font-weight: 600; text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
  .bar__links a[aria-current="page"] { border-bottom-color: var(--ink); }
  /* the bar's links are the menu here; the globe, last in the row, hangs into the margin as ☰ does on a phone */
  .bar .m-burger { display: none; }
  .lang .bar__icon { margin-right: -10px; }

  .hero__text { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: start; }

  .scrub__pin { grid-template-rows: none; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .scrub__lines { border-top: 0; border-left: 2px solid var(--joint-dark); align-items: center; padding: var(--pad); }

  .slabs { grid-template-columns: 1fr 1fr; }
  .door { position: relative; min-height: 34rem; box-shadow: inset 0 2px 0 var(--joint-light); }
  .door:nth-child(even) { border-left: 2px solid var(--joint-dark); }

  .story, .alone { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
  .wears { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr); gap: 56px; align-items: start; }
  .wear, .wear + .wear { width: auto; justify-self: stretch; }
  .wear + .wear { margin-top: 96px; }
  .under { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 56px; align-items: center; }
  .under > .kicker { grid-column: 1 / -1; }
  .racks { display: grid; grid-template-columns: 1fr 1fr; }
  .rack:nth-child(even) { border-left: 2px solid var(--joint-dark); }
  .rack__row { gap: 24px; }
  .story--flip .story__text { order: 2; }
  .story--flip .story__cut { justify-self: start; }
  .alone__cut { justify-self: start; width: min(100%, 30rem); }
  .play--wait, .play--slide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
  .play--wait .tool, .play--slide .slide { grid-column: 2; }
  .closer__grid { grid-template-columns: repeat(4, 1fr); }
  .rules__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .five, .own-wall, .where { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
  .five__note { grid-column: 2; }
  .kinds__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
  .kind { grid-template-columns: 1fr; justify-items: start; gap: 12px; }
  .kind__mark { width: 112px; }
  .own-wall .pad { grid-column: 2; grid-row: 1 / 3; aspect-ratio: 3 / 2; }
  .where__zone { grid-column: 2; grid-row: 1 / 3; }
  .where__line { grid-column: 1; }
  .hush { min-height: 64svh; }
}

/* ---------- page change ----------
   The next page pushes in over the one left, and the bar stands still (css/motion.css; <html data-vt="push">).
   One word travels: the word on the door that was tapped becomes the title of the next page (view-transition-name,
   set in the page). */

@keyframes press { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- what is pressed answers (the numbers: css/motion.css) ----------
   A button sinks and springs back (.m-press, .m-tap in the page). A block that is tapped but is not a button takes
   the plain press: the word of a door sinks into the wall, a row of the menu or of the marks list sinks towards
   its left edge. A spring there would wobble every time a scroll starts with a finger resting on a door. */

@media (prefers-reduced-motion: no-preference) {
  .door .cast, .next .cast, .next__name, .menu__chapter, .place a > span { transition: scale var(--motion-base) var(--motion-ease); }
  .door:active .cast, .next:active .cast, .next:active .next__name, .menu__chapter:active, .place a:active > span { scale: var(--motion-controls-press-scale); }
  .next__name, .menu__chapter, .place__name, .place__hint { transform-origin: 0 50%; }
  /* a button eases its colours as well (the whole list again: `transition` replaces the one of .m-press) */
  .tool.m-press {
    transition:
      scale var(--press-time) var(--press-ease),
      translate var(--motion-base) var(--motion-ease),
      background-color var(--motion-fast) var(--motion-ease),
      color var(--motion-fast) var(--motion-ease),
      border-color var(--motion-fast) var(--motion-ease);
  }
  /* a mark hidden in a page is a button too: it springs like one */
  .mark { --press-time: var(--motion-press-out-fallback); --press-ease: var(--motion-press-fallback); transition: scale var(--press-time) var(--press-ease); -webkit-tap-highlight-color: transparent; }
  @supports (transition-timing-function: linear(0, 1)) { .mark { --press-time: var(--motion-press-out); --press-ease: var(--motion-press-spring); } }
  .mark:active { scale: var(--motion-press-scale); --press-time: var(--motion-press-in); --press-ease: var(--motion-ease); }
  .retouch__range::-webkit-slider-thumb { transition: transform var(--motion-fast) var(--motion-ease); }
  .retouch__range:active::-webkit-slider-thumb { transform: scale(1.1); }
}
/* words in a line never jump: a text button is pressed, it does not rise under a mouse */
.tool--quiet.m-press:hover { translate: none; }

/* ---------- less motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .scrub__frame { aspect-ratio: 4 / 5; }
  .scrub__lines { display: block; }
  .scrub__line { margin-bottom: 12px; }
  .door { position: relative; }
  .hero__tease.is-on { animation: none; opacity: 1; }
  .js .hush:not(.is-said):not(.hush--1) .hush__line { opacity: 1; }
  .hush__line, .hush__light, .face__mouth, .watch__look, .zipdoor__flap, .zipdoor__pull { transition: none; }
}
