/* One stylesheet for the whole shop.
   A warm white ground and ink text, so that the only colors on a page are those of the prints.
   One accent: the Prussian blue of Hokusai's Fuji series, kept for what can be clicked to buy.
   Type: Libre Caslon for titles and reading text, Libre Franklin for everything functional
   (both under the SIL Open Font License, files and licenses in ../fonts/). */

@font-face { font-family: "Libre Caslon Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/libre-caslon-display-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Caslon Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/libre-caslon-display-400-latin.woff2") format("woff2"); 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: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/libre-caslon-text-italic-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/libre-caslon-text-italic-400-latin.woff2") format("woff2"); 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: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/libre-caslon-text-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/libre-caslon-text-400-latin.woff2") format("woff2"); 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: "Libre Franklin"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/libre-franklin-400-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/libre-franklin-400-700-latin.woff2") format("woff2"); 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; }

:root {
  --ground: #fcfbf8;
  --ink: #18181b;
  --soft: #6c6a65;
  --rule: #e4e1da;
  --wash: #f3f1ec;
  --blue: #1d4775;
  --blue-deep: #143457;
  --display: "Libre Caslon Display", "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --serif: "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ja: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --wrap: 1240px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --split: clamp(1.6rem, 4.5vw, 4.5rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.68 var(--serif);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: #b3b0a8; }
a:hover { color: var(--blue); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
[lang="ja"] { font-family: var(--ja); }

.skip { position: absolute; left: -200vw; top: 0; background: var(--ink); color: var(--ground); padding: 0.6rem 1rem; font: 0.9rem var(--sans); }
.skip:focus { left: 0; z-index: 2; }

main, .foot { padding-left: var(--gutter); padding-right: var(--gutter); }
main > *, .foot > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }

/* ---------- masthead: the name, then the sections, centered like a gallery's letterhead */

.top { padding: clamp(1.4rem, 3vw, 2.2rem) var(--gutter) 0; text-align: center; }
.name { display: inline-block; font: 400 clamp(1.55rem, 2.6vw, 2rem)/1 var(--display); color: var(--ink); text-decoration: none; }
.name:hover { color: var(--ink); }
.top nav {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.15rem clamp(1.1rem, 2.6vw, 2.2rem);
  max-width: var(--wrap); margin: clamp(0.9rem, 1.8vw, 1.3rem) auto 0; padding-bottom: clamp(0.8rem, 1.6vw, 1.1rem);
  border-bottom: 1px solid var(--rule); font: 500 0.875rem var(--sans);
}
.top nav a { color: var(--ink); text-decoration: none; padding: 0.3rem 0; border-bottom: 1px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { border-bottom-color: var(--ink); }

/* ---------- reading text */

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.1em; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin: 2.2em 0 0.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font: 400 1.22rem/1.3 var(--serif); margin: 0 0 0.35em; padding-top: 1.3em; border-top: 1px solid var(--rule); }
.prose h3:first-child { padding-top: 0; border-top: 0; }
.prose h3 + p { margin-bottom: 1.4em; }
.prose ul { list-style: disc; padding-left: 1.2em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.35em; }
.lede { font-size: 1.16rem; line-height: 1.6; }
.fine, .note, .count, .soon { font: 0.84rem/1.55 var(--sans); color: var(--soft); }
.table { overflow-x: auto; margin: 1.4rem 0; }
.prose table { border-collapse: collapse; width: 100%; font: 0.92rem/1.45 var(--sans); }
.prose th, .prose td { text-align: left; font-weight: 400; padding: 0.6rem 1.2rem 0.6rem 0; border-top: 1px solid var(--rule); vertical-align: top; }
.prose thead th { border-top: 0; color: var(--soft); font-size: 0.84rem; padding-top: 0; }
.prose tbody th { font-weight: 600; white-space: nowrap; }
.prose tbody tr:last-child > * { border-bottom: 1px solid var(--rule); }
.page-head .fine { margin: 0.9rem 0 0; }
.todo { background: #fff3c4; padding: 0 0.25em; font-family: var(--sans); font-size: 0.86em; }

.crumbs { font: 0.8rem var(--sans); color: var(--soft); margin-top: 1.4rem; margin-bottom: clamp(1.6rem, 4vw, 2.8rem); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs i { font-style: normal; padding: 0 0.4em; color: #b3b0a8; }

/* A section: its title in the left margin, its text beside it, anything wider underneath. */
.band { margin-top: clamp(3.5rem, 8vw, 6.5rem); padding-top: clamp(1.4rem, 3vw, 2.2rem); border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.2rem var(--split); }
.band > h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.band > .prose:empty { display: none; }
.band > .wide { grid-column: 1 / -1; margin-top: clamp(0.8rem, 2vw, 1.6rem); }
.band > h2:only-child, .band > h2.alone { grid-column: 1 / -1; }

.page-head { margin-bottom: clamp(2.4rem, 6vw, 4.2rem); }
.page-head h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); line-height: 1; letter-spacing: -0.008em; margin-bottom: 1.4rem; max-width: 18ch; }
.count { margin: 0 0 1.4rem; }

/* ---------- pictures
   A print is never boxed or cropped: it is shown whole, at the width its cell allows, and capped in height
   so that tall narrow sheets do not tower over their neighbors. --r is the picture's width / height,
   --box the proportions of the tallest picture the cell accepts. */
.fit { box-sizing: content-box; display: block; flex: none; aspect-ratio: var(--r);
  width: min(var(--w, 100%), calc(var(--w, 100%) * var(--r) / var(--box, 1))); }
.fit img { width: 100%; height: 100%; box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.07); }

/* The classic frame, drawn in CSS: a flat molding, and the border of the print in the tone of its own sheet
   (--sheet, set on each picture by the build). */
.frame { --w: 76%; border: clamp(5px, 0.8vw, 10px) solid var(--frame, #1d1c1a); padding: 5.5%; background: var(--sheet, #f1ead8);
  box-shadow: 0 1px 0 rgba(24, 24, 27, 0.12); }
.frame img { box-shadow: none; }
.frame-black { --frame: #1d1c1a; }
.frame-natural { --frame: #c9a878; }
.frame-white { --frame: #f1efe9; box-shadow: 0 0 0 1px var(--rule); }
.frame-brown { --frame: #5a3d2b; }

/* ---------- the wall of prints
   Four columns. An upright print takes one, a horizontal one takes two: an oban sheet turned on its side is
   about twice as wide as it was, so the two come out the same height and every row hangs on one line. */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: clamp(2.2rem, 4.5vw, 3.6rem) clamp(1rem, 2.4vw, 2rem); }
.grid > li { display: grid; grid-template-rows: 1fr auto; --box: 0.66; }
.grid > li.wide { grid-column: span 2; --box: 1.36; }
.grid.row > li.wide { grid-column: auto; --box: 0.66; }
.tile { display: grid; grid-template-rows: 1fr auto; color: var(--ink); text-decoration: none; }
@supports (grid-template-rows: subgrid) {
  .grid > li { grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  .tile { grid-row: 1 / -1; grid-template-rows: subgrid; row-gap: 0; }
}
.tile-text { display: block; }
.tile-art { display: flex; align-items: flex-end; margin-bottom: 0.85rem; }
.tile-title { display: block; font-size: 1.02rem; line-height: 1.35; }
.tile:hover { color: var(--ink); }
.tile:hover .tile-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.tile-meta { display: block; font: 0.82rem/1.5 var(--sans); color: var(--soft); margin-top: 0.2rem; }

/* ---------- links to artists, series, collections */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2.2rem, 4.5vw, 3.4rem) clamp(1rem, 2.4vw, 2rem); }
.cards:has(> li:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards > li { display: grid; --box: 1.12; }
.card { display: grid; grid-template-rows: 1fr auto; color: var(--ink); text-decoration: none; }
@supports (grid-template-rows: subgrid) {
  .cards > li { grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  .card { grid-row: 1 / -1; grid-template-rows: subgrid; row-gap: 0; }
}
.card-body { display: block; }
.card-art { display: flex; align-items: flex-end; margin-bottom: 1rem; }
.card-title { display: block; font: 400 1.55rem/1.15 var(--display); }
.card:hover { color: var(--ink); }
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.card-text { display: block; color: var(--soft); margin-top: 0.4rem; font-size: 0.96rem; line-height: 1.5; max-width: 38ch; }

/* ---------- home */

.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem var(--split); align-items: end;
  margin-top: clamp(2rem, 5vw, 4rem); }
.hero h1 { font-size: clamp(3rem, 7.4vw, 6rem); line-height: 0.96; letter-spacing: -0.012em; margin-bottom: clamp(1.2rem, 2.4vw, 2rem); }
.hero .lede { max-width: 34ch; }
.hero-more { font: 500 0.9rem var(--sans); margin: 1.6rem 0 0; }
.hero-art { margin: 0; }
.hero-art a { display: block; }
.hero-art img { width: 100%; box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.07); }
.hero-art figcaption { display: flex; justify-content: space-between; gap: 1rem; font: 0.82rem/1.5 var(--sans); color: var(--soft); margin-top: 0.8rem; }
.hero-art figcaption em { font: italic 0.98rem/1.4 var(--serif); color: var(--ink); }

/* ---------- series list */

.series { columns: 2; column-gap: clamp(2rem, 5vw, 4.5rem); }
.series li { display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 0.4rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); break-inside: avoid; color: var(--soft); }
.series li:has(a) { color: var(--ink); }
.series .n { font: 0.84rem/1.9 var(--sans); color: var(--soft); font-variant-numeric: tabular-nums; }
.series .t { line-height: 1.4; }
.series .t small { color: var(--soft); font: 0.8rem var(--sans); }
.series .j { grid-column: 2; color: var(--soft); font-size: 0.86rem; }

/* ---------- product page */

/* Two independent columns: the picture and its story on the left, the order box and the facts on the right.
   On a narrow screen the columns dissolve and the four pieces follow each other: picture, order box, story, facts. */
.product { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0 var(--split); align-items: start; }
.product-col { display: grid; gap: clamp(2.4rem, 5vw, 4rem); min-width: 0; }
.product-art { --box: 1.02; display: flex; justify-content: center; align-items: flex-start; gap: clamp(0.8rem, 1.6vw, 1.4rem); }
.product-art.landscape { justify-content: flex-start; }
.product-art:has(.tate) .fit { --w: calc(100% - 2.6rem); }
.product-art .frame, .product-art:has(.tate) .frame { --w: 80%; }
.tate { writing-mode: vertical-rl; font: 0.95rem/1 var(--ja); letter-spacing: 0.18em; color: var(--soft); white-space: nowrap; padding-top: 0.1rem; }
.product-info h1 { font-size: clamp(2.1rem, 3.8vw, 3.2rem); line-height: 1.04; letter-spacing: -0.006em; margin-bottom: 0.9rem; }
.byline { margin: 0; font-size: 1.08rem; }
.where { margin: 0.15rem 0 0; color: var(--soft); font-size: 0.98rem; }
.product-text h2, .product-facts h2 { font-size: 1.7rem; margin-bottom: 1rem; }
.product-text, .product-facts { padding-top: clamp(1.4rem, 3vw, 2.2rem); border-top: 1px solid var(--rule); }

.buybox { margin-top: 2rem; font-family: var(--sans); }
.buybox fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0; }
.buybox legend { font-size: 0.8rem; font-weight: 500; color: var(--soft); padding: 0; margin-bottom: 0.55rem; }
.opts { display: grid; gap: 0.5rem; }
.opts-2 { grid-template-columns: 1fr 1fr; }
.opt { display: block; cursor: pointer; }
.opt input, .swatch input { position: absolute; opacity: 0; pointer-events: none; }
.opt > span { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0.1rem 1rem; padding: 0.75rem 0.9rem; font-size: 0.94rem;
  box-shadow: inset 0 0 0 1px var(--rule); background: #fff; }
.opt b { font-weight: 500; }
.opt small { color: var(--soft); font-size: 0.82rem; }
.opt i { font-style: normal; font-variant-numeric: tabular-nums; }
.opts-2 .opt > span { grid-template-columns: 1fr; }
.opt:hover > span { box-shadow: inset 0 0 0 1px #b3b0a8; }
.opt input:checked + span { box-shadow: inset 0 0 0 1.5px var(--ink); }
.opt input:focus-visible + span, .swatch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.sizes .opt > span { grid-template-columns: 6.2rem 1fr auto; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; }
.swatch { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.88rem; }
.swatch span { width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
.swatch input:checked + span { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18), 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink); }
.price { font: 400 2.2rem/1 var(--display); margin: 0.4rem 0 1.1rem; font-variant-numeric: lining-nums; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.9rem; }
.price small { font: 0.84rem/1.55 var(--sans); color: var(--soft); }
.buy { width: 100%; border: 0; border-radius: 0; background: var(--blue); color: #fff; font: 500 1rem var(--sans); padding: 1.05rem 1rem; cursor: pointer; }
.buy:hover { background: var(--blue-deep); }
.buy[disabled] { background: var(--wash); color: var(--soft); cursor: not-allowed; }
.soon { margin: 0.65rem 0 0; }
.buybox .fine { margin: 1.1rem 0 0; }

.facts { margin: 0; }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--rule); }
.facts div:first-child { padding-top: 0; }
.facts dt { font: 0.82rem/2 var(--sans); color: var(--soft); }
.facts dd { margin: 0; }
.product-facts .fine { margin: 1.1rem 0 0; }

/* ---------- text pages (how the prints are made, shipping, returns, privacy, terms) */

main.textpage > * { max-width: 44rem; }
.textpage .page-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); max-width: none; }
.textpage .page-head .prose { max-width: none; }
main.textpage > .prose { max-width: 44rem; }

/* ---------- footer */

.foot { margin-top: clamp(4.5rem, 10vw, 8rem); padding-bottom: 2.6rem; font-family: var(--sans); font-size: 0.88rem; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem 1.5rem; border-top: 1px solid var(--rule); padding-top: 2.6rem; }
.foot h2 { font: 500 0.8rem var(--sans); color: var(--soft); margin-bottom: 0.8rem; }
.foot li { margin-bottom: 0.45rem; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 2rem; margin-top: 3rem; color: var(--soft); font-size: 0.82rem; }
.foot-base p { margin: 0; max-width: 62ch; }
.foot-base nav { display: flex; gap: 1.4rem; }

/* ---------- narrower screens */

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid.row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; align-items: start; margin-top: var(--gutter); }
  .hero-art { order: -1; }
  .hero .lede { max-width: 46ch; }
  .product { display: flex; flex-direction: column; gap: clamp(2.2rem, 7vw, 3rem); }
  .product-col { display: contents; }
  .product-art { order: 1; } .product-info { order: 2; } .product-text { order: 3; } .product-facts { order: 4; }
  .product-art { --box: 0.9; }
  .band { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .series { columns: 1; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .grid, .grid.row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .cards:has(> li:nth-child(2):last-child) { grid-template-columns: 1fr; }
  .cards > li { --box: 1.3; }
  .facts div { grid-template-columns: 1fr; gap: 0; }
  .facts dt { line-height: 1.5; }
  .tate { display: none; }
  .hero-art figcaption { display: block; }
  .hero-art figcaption em { display: block; }
  .top nav { flex-wrap: nowrap; justify-content: space-between; gap: 0; font-size: 0.78rem; }
  .product-art:has(.tate) .fit { --w: 100%; }
  .sizes .opt > span { grid-template-columns: 5.6rem 1fr auto; }
}
@media (max-width: 359px) {
  .top nav { flex-wrap: wrap; justify-content: center; gap: 0.15rem 0.9rem; }
}
