/* Shared structure for the public site. Colours and type come from theme_inventory.css / theme_slab.css. */
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; transition: opacity .25s ease-out; }
img[data-pending] { opacity: 0; } /* set by fade_in.js on photos still loading */
h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }
dl { margin: 0; } dd { margin: 0; }
p { margin: 0 0 1em; }
.label { font-family: var(--ui); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); font-weight: 500; }
.meta { font-family: var(--ui); font-size: 12px; letter-spacing: .04em; color: var(--ink-2); }
.fine { font-size: 13px; color: var(--ink-2); }
.flash { font-family: var(--ui); font-size: 13px; padding: 10px 14px; border: 1px solid var(--ink); margin: 16px 0; }
.no-photo { width: 100%; aspect-ratio: 3 / 4; background: var(--tile); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.btn { display: inline-block; font-family: var(--ui); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 500; padding: 14px 22px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; text-align: center; }
.btn.ghost { background: transparent; color: var(--ink); }
form.button_to { display: inline; }
input, textarea, select { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 0; background: var(--field); color: var(--ink); width: 100%; }
textarea { min-height: 120px; resize: vertical; }
.form { display: grid; gap: 14px; }
.f { display: grid; gap: 6px; }
.f label { font-family: var(--ui); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; }

/* header (Inventory) / mobile bar (Slab) */
.site-hdr { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.site-hdr .name { font-size: 20px; }
.site-hdr nav { display: flex; gap: 22px; align-items: baseline; }
.site-hdr nav a { font-family: var(--ui); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.site-hdr .ct { display: inline-block; min-width: 18px; text-align: center; border: 1px solid var(--ink); border-radius: 999px; font-size: 10px; padding: 1px 5px; margin-left: 6px; }
.langs { display: inline-flex; }
.langs a { font-family: var(--ui); font-size: 11px; letter-spacing: .1em; color: var(--ink-2); padding: 0 5px; text-transform: uppercase; }
.langs a.on { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* sidebar (Slab only) */
.site-side { display: none; }

/* bio */
.bio h1 { font-size: 30px; line-height: 1.2; }
.bio .facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-family: var(--ui); font-size: 12px; margin-top: 22px; color: var(--ink-2); }
.bio .facts dd { color: var(--ink); }
.bio .studio { margin: 28px 0 0; max-width: 320px; }
.bio figcaption { font-family: var(--ui); font-size: 11px; color: var(--ink-2); margin-top: 6px; letter-spacing: .04em; }
.bio-text p { max-width: 62ch; }
.bio-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 62ch; margin-top: 28px; }
.bio-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.bio-photos a:first-child:nth-last-child(odd) { grid-column: 1 / -1; } /* an odd count: the first one goes full width */
.bio-photos a:first-child:nth-last-child(odd) img { aspect-ratio: 16 / 9; }
.cv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 14px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rule); max-width: 66ch; }
.cv dt { font-family: var(--ui); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding-top: 3px; }

/* gallery */
.gal-head { display: flex; justify-content: space-between; align-items: baseline; padding-block: 26px 14px; }
.tile { display: block; }
.tile img, .tile .no-photo { width: 100%; background: var(--tile); }
.tile .cap { display: flex; justify-content: space-between; gap: 12px; padding-top: 10px; align-items: baseline; }
.tile .cap .t { font-size: 17px; }
.tile .cap .t i { color: var(--ink-2); font-style: italic; font-size: 14px; margin-left: 8px; }
.tile .cap .p { font-family: var(--ui); font-size: 12px; white-space: nowrap; }
.tile .cap em { color: var(--ink-2); }

/* work */
.work { display: grid; grid-template-columns: 3fr 2fr; gap: 48px; padding-block: 36px 60px; }
.work-photos img { width: 100%; background: var(--tile); }
.work .thumbs { display: flex; gap: 10px; margin-top: 10px; }
.work .thumbs img { width: 72px; aspect-ratio: 1; object-fit: cover; }
.work-info { display: grid; align-content: start; gap: 12px; }
.work h1 { font-size: 30px; }
.spec { display: grid; grid-template-columns: max-content 1fr; gap: 7px 22px; font-size: 15px; margin: 10px 0; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.spec dt { font-family: var(--ui); color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; padding-top: 3px; }
.price { font-size: 22px; font-variant-numeric: tabular-nums; margin: 0 0 6px; }
.how { font-size: 14px; color: var(--ink-2); max-width: 46ch; margin-top: 10px; }
/* Previous / all works / next: made for people who do not hunt for small grey links. */
.pn { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.pn .btn.ghost { font-size: 15px; letter-spacing: .06em; padding: 15px 22px; min-height: 52px; display: flex; align-items: center; justify-content: center; }
.pn .btn:first-child { justify-self: start; }
.pn .btn:last-child { justify-self: end; }
.pn .btn:hover, .pn .btn:focus-visible { background: var(--ink); color: var(--bg); }
.pn.top { view-transition-name: work-nav; }
.pn.bottom { display: none; }

/* inquiry */
.inq { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-block: 36px 60px; }
.inq h1 { font-size: 30px; margin-bottom: 10px; }
.inq .lead { color: var(--ink-2); max-width: 48ch; font-size: 15px; }
.cart { border-top: 1px solid var(--ink); }
.cart .row { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.cart img, .cart .no-photo { width: 64px; aspect-ratio: 1; object-fit: cover; }
.cart .t { font-size: 16px; }
.cart .d { font-family: var(--ui); font-size: 11px; color: var(--ink-2); }
.cart .p { font-family: var(--ui); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.cart .x { font: inherit; font-family: var(--ui); font-size: 11px; color: var(--ink-2); cursor: pointer; text-decoration: underline; background: none; border: 0; padding: 0; width: auto; float: right; }
.cart .sum { display: flex; justify-content: space-between; padding: 14px 0; font-family: var(--ui); font-size: 12px; }
.cart .sum .n { color: var(--ink-2); }
.done { padding: 40px 0; max-width: 52ch; }
.done h1 { font-size: 26px; margin-bottom: 12px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .bio h1 { font-size: 24px; }
  .work, .inq { grid-template-columns: 1fr; gap: 24px; }
  /* previous and next side by side, all works full width under them; the same bar again below the work */
  .pn, .pn.bottom { display: grid; grid-template-columns: 1fr 1fr; }
  .pn .btn.ghost { justify-self: stretch; padding-inline: 10px; }
  .pn .btn.ghost:nth-child(2) { grid-column: 1 / -1; order: 3; }
  .f2 { grid-template-columns: 1fr; }
  .site-hdr nav { gap: 14px; }
}

/* approximate foreign prices */
.price small, .tile .cap small, .cart .p small { display: block; font-family: var(--ui); font-size: 11px; letter-spacing: .04em; color: var(--ink-2); font-weight: 400; text-transform: none; }
.price small { margin-top: 2px; }

/* view transitions (Turbo): the page cross-fades, the header and the side column stand still, and the
   photo of a clicked tile flies to its place on the work page; see transitions.js */
.site-hdr { view-transition-name: site-hdr; }
.site-side { view-transition-name: site-side; }
.work-photos .hero { view-transition-name: work-photo; }
::view-transition-group(work-photo) { animation-duration: .4s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
/* A tile can be cropped and the work photo is not: fill the moving box instead of stretching. */
::view-transition-old(work-photo), ::view-transition-new(work-photo) { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) {
  img { transition: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
