/* Jen's Stash website. Same type as the studio and the posts: Satoshi for display, DM Sans for reading,
   DM Mono for small labels. Clean images first: details appear on hover (or under the picture on touch). */
@font-face { font-family: 'Satoshi'; src: url('fonts/Satoshi-Variable.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('fonts/DMSans.ttf') format('truetype'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('fonts/DMMono-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }

:root {
  /* the studio's palette (mersostudio.com): stone and ink; every word is ink */
  --bg: #f4f4f2; --paper: #eeece7; --ink: #121211; --mute: #121211; --soft: #e2e1dc;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: 'Satoshi', -apple-system, sans-serif; --sans: 'DM Sans', -apple-system, sans-serif; --mono: 'DM Mono', ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 2.6vw, 40px); --gap: 8px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }   /* the footer sits at the bottom on short pages */
body > main { flex: 1 0 auto; } body > .top, body > .foot { flex: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; } .skip:focus { left: var(--gutter); top: 8px; background: var(--bg); padding: 8px 12px; z-index: 10; }

/* small labels: one mono size, one tracking, everywhere */
.nav a, .kicker, .more, .filters button, .count, .read, .jumps a, .foot .last, .t .mk, .t .row, .card .cn { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }

/* header: navigation either side of the wordmark */
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(var(--gutter) * .85) var(--gutter); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.wordmark { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: -.02em; justify-self: start; }
.nav { display: flex; gap: 24px; } .top .nav.mid { justify-self: center; } .nav.end { justify-content: flex-end; }
.nav a { color: var(--ink); transition: color .2s; }
.mbtn { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 4px; margin: -4px; }
.nav.icons { gap: 18px; align-items: center; } .nav.icons a { display: flex; padding: 4px; margin: -4px; }
.nav.icons a:hover, .nav.icons a[aria-current] { text-decoration: none; opacity: .6; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* page heads: the same on every page. The title, then one row (jump links or filters) at the same distance */
.head { padding: clamp(48px, 7vw, 120px) var(--gutter) clamp(36px, 4.5vw, 72px); }
.head h1 { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 6.1vw, 132px); line-height: .95; letter-spacing: -.055em; }
@media (min-width: 761px) { .head h1 { white-space: nowrap; } }
.bandhead h2 .n { text-transform: uppercase; }
.head h1 .n, .bandhead h2 .n { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; font-weight: 400; vertical-align: top; position: relative; top: .5em; margin-left: .5em; line-height: 1; }
.head .jumps, .head .filters { margin-top: clamp(24px, 2.6vw, 40px); }
.head .intro { color: var(--ink); font-size: 18px; line-height: 1.45; max-width: 44ch; }

/* home */
.band { padding: 0 var(--gutter); margin-top: clamp(16px, 2vw, 32px); }
.band + .band { margin-top: clamp(88px, 10vw, 152px); }
.bandhead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.bandhead h2 { font-family: var(--display); font-weight: 500; font-size: clamp(32px, 3.4vw, 52px); line-height: 1; letter-spacing: -.04em; }
.bandhead .when { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-top: 10px; }
.more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* the grid of things: images only; the details slide up on hover or focus */
.grid { list-style: none; display: grid; gap: var(--gap); padding: 0 var(--gutter); }
.band .grid { padding: 0; }
.g4 { grid-template-columns: repeat(4, 1fr); } .g6 { grid-template-columns: repeat(6, 1fr); }
.grid > .t { position: relative; overflow: hidden; }
.t img { background: var(--paper); }
.t a { display: block; }
.t img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .6s var(--ease); }
.t.photo img { object-fit: cover; }   /* a styled photo, where there's no plain product shot yet */
.t .over { position: absolute; left: 10px; right: 10px; bottom: 10px; background: rgba(251, 250, 247, .96); padding: 12px 14px; display: grid; gap: 2px;
  opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .25s cubic-bezier(.2, .7, .2, 1); }
.t .mk { color: var(--mute); font-size: 11px; }
.t .nm { font-size: 15px; line-height: 1.3; }
.t .row { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; }
.t a:hover .over, .t a:focus-visible .over { opacity: 1; transform: none; }
.t a:hover img { transform: scale(1.02); }
@media (hover: none) {   /* touch: the details sit under the picture instead */
  .t .over { position: static; opacity: 1; transform: none; background: var(--bg); padding: 10px 2px 4px; }
  .t .row .go { display: none; }
}
@media (prefers-reduced-motion: reduce) { .t img, .t .over { transition: none; } }

/* collection cards: four tiles and a name */
.cards { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 24px; }
.card a { display: block; }
.card .mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.card .mosaic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper); }
.card .cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0 0; }
.card .ct { font-family: var(--display); font-weight: 500; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.card .cn { color: var(--mute); white-space: nowrap; }
.card a:hover .ct { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* filters on The Stash */
.filters { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.filters .f { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.filters button { background: none; border: 0; color: var(--mute); padding: 4px 0; cursor: pointer; transition: color .2s; }
.filters button:hover, .filters button[aria-pressed=true] { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.count { color: var(--mute); padding: 18px var(--gutter) 14px; }

/* search: opens under the header from the icon; just grey words to type over, no box */
.sbtn { background: none; border: 0; color: var(--ink); cursor: pointer; display: flex; padding: 4px; margin: -4px; }
.sbtn:hover, .sbtn[aria-expanded=true] { opacity: .6; }
.sform { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); padding: 6px var(--gutter) clamp(18px, 2vw, 28px); display: flex; align-items: center; gap: 14px; }
.sform::before { content: ''; flex: none; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M15.5 15.5 21 21' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat; opacity: .35; }
/* closed, it's still there, just invisible and out of reach (inert); it eases down on open and back up on close */
.sform { opacity: 0; visibility: hidden; transform: translateY(-10px); clip-path: inset(0 0 100% 0);
  transition: opacity .3s var(--ease), transform .45s var(--ease), clip-path .45s var(--ease), visibility 0s linear .45s; }
.sform.open { opacity: 1; visibility: visible; transform: none; clip-path: inset(0 0 0 0);
  transition: opacity .35s var(--ease), transform .45s var(--ease), clip-path .45s var(--ease), visibility 0s; }
.sform input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; font: inherit; font-family: var(--display); font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -.02em; color: var(--ink); padding: 4px 0; -webkit-appearance: none; appearance: none; }
.sform input::placeholder { color: var(--ink); opacity: .35; }
.sform input::-webkit-search-cancel-button, .sform input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.sform input:focus { outline: none; }
.read { padding: 0 var(--gutter) 14px; }
.read .clearwk { background: none; border: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 0; } .read:empty { display: none; }

/* motion: pages fade in (and cross-fade between pages where the browser can), pictures fade in as they load,
   the hamburger turns into a close, search drops in. All of it off for reduced motion. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; animation-timing-function: ease; }
main { animation: rise .6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
html.js .t img, html.js .card img { opacity: 0; transition: opacity .5s ease, transform .6s var(--ease); }
html.js .t img.in, html.js .card img.in { opacity: 1; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.mbtn path { transition: transform .35s var(--ease); transform-origin: 12px 12px; }
.mbtn[aria-expanded=true] .l1 { transform: translateY(4px) rotate(45deg); } .mbtn[aria-expanded=true] .l2 { transform: translateY(-4px) rotate(-45deg); }
.more .short { display: none; }
@media (prefers-reduced-motion: reduce) {
  main { animation: none; } .sform, .sform.open, html.js .t img, html.js .card img, .mbtn path, .top .nav.mid, .top .nav.mid a { transition: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* the update log under the home title: one line, this week's count and the collections that grew */
.log { margin-top: clamp(20px, 2.2vw, 32px); }
.logline { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.8; }
.logline a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.logline a:hover { text-decoration: none; }

/* jump links under a page title */
.jumps { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.jumps a { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.jumps a:hover { text-decoration: none; }
[id] { scroll-margin-top: 90px; }
html { scroll-behavior: smooth; } @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* the phone's filters: two dropdowns, styled like the labels */
.pick { display: none; gap: 12px; }
.pick select { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink); background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23121211' stroke-width='1.3'/%3E%3C/svg%3E") right 12px center / 10px no-repeat;
  border: 0; border-radius: 0; padding: 12px 32px 12px 12px; cursor: pointer; }

/* about */
.prose { padding: 0 var(--gutter); max-width: calc(36em + 2 * var(--gutter)); }
.prose p { font-size: 20px; line-height: 1.5; margin-bottom: 1em; }
.prose a { text-decoration: underline; text-underline-offset: 4px; }

/* not found: a random find instead of a dead end */
.lost { padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.lost .pic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--paper); display: block; }
.lost .says { display: grid; gap: 14px; align-content: end; }
.lost .mk, .lost .acts button, .lost .acts a, .lost .but { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.lost .nm { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 2.6vw, 40px); letter-spacing: -.03em; line-height: 1.05; }
.lost .acts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 6px; }
.lost .acts button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
.lost .acts button, .lost .acts a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.lost .acts button:hover, .lost .acts a:hover { text-decoration: none; }
@media (max-width: 760px) { .lost { grid-template-columns: 1fr; } }

/* footer */
.foot { margin-top: clamp(96px, 12vw, 200px); padding: 0 var(--gutter) calc(var(--gutter) * 1.2); display: grid; grid-template-columns: 2fr 1.2fr 1fr; gap: 32px; align-items: end; }
.foot .last { justify-self: end; }
.foot .keep { font-family: var(--display); font-weight: 500; font-size: clamp(48px, 6vw, 96px); letter-spacing: -.05em; line-height: .9; }
.foot .fine { max-width: 34ch; }

.foot .nav { flex-direction: column; gap: 6px; } .foot .nav a { align-self: flex-start; }
.foot .fine { color: var(--mute); font-size: 12px; line-height: 1.5; }

@media (max-width: 1100px) { .g6 { grid-template-columns: repeat(4, 1fr); } .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  :root { --gutter: 16px; --gap: 6px; }
  /* header: the wordmark and the two icons on one line, the three links under them */
  /* header: the menu on the left, the wordmark in the middle, search and Instagram on the right */
  .top { grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px var(--gutter); position: relative; }
  .mbtn { display: flex; justify-self: start; } .wordmark { justify-self: center; font-size: 22px; }
  .top { z-index: 20; } .mbtn, .wordmark, .nav.end { position: relative; z-index: 2; }
  /* the menu takes the whole screen; the header stays on top with the close */
  .top .nav.mid { position: fixed; inset: 0; justify-self: stretch; align-self: stretch; z-index: 1; background: var(--bg); flex-direction: column; justify-content: flex-start; gap: 4px;
    padding: 104px var(--gutter) 40px; visibility: hidden; opacity: 0; transition: opacity .3s var(--ease), visibility 0s linear .3s; }
  .top .nav.mid a { font-family: var(--display); font-size: 44px; font-weight: 500; letter-spacing: -.04em; text-transform: none; line-height: 1.15;
    align-self: flex-start; opacity: 0; transform: translateY(14px); transition: opacity .35s var(--ease), transform .5s var(--ease); }
  .top .nav.mid.open { visibility: visible; opacity: 1; transition: opacity .3s var(--ease); }
  .top .nav.mid.open a { opacity: 1; transform: none; }
  .top .nav.mid.open a:nth-child(2) { transition-delay: .05s; } .top .nav.mid.open a:nth-child(3) { transition-delay: .1s; }
  body.menu-open { overflow: hidden; }
  .more .long { display: none; } .more .short { display: inline; }
  .sform input { font-size: 19px; }
  /* page heads: the jump links stack, one to a line */
  .head { padding: 28px var(--gutter) 32px; }
  .head .jumps { display: none; }
  .logline { line-height: 1.7; }   /* on a phone the page is short enough to scroll */
  .head .filters { display: none; } .pick { display: flex; margin-top: 20px; }
  /* titles: the page title clearly bigger than the section titles under it */
  .head h1 { font-size: 44px; } .head { padding-bottom: 40px; }
  .bandhead h2 { font-size: 28px; } .card .ct { font-size: 20px; }
  .bandhead { margin-bottom: 16px; }
  .band + .band { margin-top: 80px; } .cards { row-gap: 40px; }
  .g4, .g6 { grid-template-columns: repeat(2, 1fr); } .cards { grid-template-columns: 1fr; }
  /* footer: one column, one left edge, even steps */
  .foot { grid-template-columns: 1fr; gap: 16px; margin-top: 72px; }
  .foot .keep { font-size: 44px; } .foot .last { justify-self: start; margin-top: 8px; }
}
}
