@font-face { font-family: "Fraunces"; src: url(assets/fraunces.woff2) format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(assets/fraunces-italic.woff2) format("woff2"); font-weight: 300 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url(assets/instrument-sans.woff2) format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }

:root {
  --paper: #F4F2EE;
  --sweep: #E9E7E3;
  --card: #FBFAF8;
  --ink: #231B16;
  --muted: #6E655D;
  --line: #D9D4CD;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --zh: "LXGW WenKai", "Songti SC", "STSong", serif;
  --pad: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans); }
img { display: block; width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* announcement bar */
.bar { background: var(--ink); color: var(--paper); text-align: center; font-size: 13px; letter-spacing: .03em; padding: 10px var(--pad); }

/* header */
.shop, .about, .help { scroll-margin-top: 72px; }
.top { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px var(--pad); background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.is-stuck { border-bottom-color: var(--line); }
.top__nav { display: flex; gap: 18px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.top__nav a { text-decoration: none; padding: 14px 0; }
.top__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mark { font-family: var(--serif); font-size: clamp(30px, 7vw, 44px); line-height: 1; font-weight: 640; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; text-decoration: none; letter-spacing: -.01em; display: inline-flex; }
.mark span { display: inline-block; transform: rotate(var(--r)); transform-origin: 50% 80%; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.mark:hover span { transform: rotate(0deg); }
.top__ig { justify-self: end; width: 44px; height: 44px; display: grid; place-items: center; }
.top__ig svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.top__ig .dot { fill: currentColor; stroke: none; }
.top__social { justify-self: end; min-height: 44px; display: flex; align-items: center; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-decoration: none; }
.top__social:hover { text-decoration: underline; text-underline-offset: 4px; }

/* hero */
.hero { display: grid; }
.hero__media { background: var(--sweep); aspect-ratio: 4 / 5; overflow: hidden; }
.hero__media img { height: 100%; object-fit: cover; }
.hero__text { padding: 28px var(--pad) 44px; display: grid; gap: 16px; justify-items: start; }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.hero h1 { font-family: var(--serif); font-style: italic; font-size: clamp(34px, 9vw, 72px); line-height: 1.02; letter-spacing: -.02em; font-variation-settings: "opsz" 144, "SOFT" 50; max-width: 13ch; }
.hero__note { color: var(--muted); max-width: 34ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: .02em; cursor: pointer; }
.btn:hover { background: transparent; color: var(--ink); }

/* shop */
.shop { padding: 0 0 56px; }
.shop__head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--pad) 16px; border-top: 1px solid var(--line); padding-top: 28px; }
.shop__head h2 { font-family: var(--serif); font-size: clamp(26px, 6vw, 40px); font-variation-settings: "opsz" 144; }
.shop__head p { font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.grid { list-style: none; margin: 0; padding: 0 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.card { background: var(--card); display: flex; flex-direction: column; }
.card__open { all: unset; cursor: pointer; display: block; }
.card__open:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.card__media { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--sweep); overflow: hidden; }
.card__media img { height: 100%; object-fit: cover; transition: transform .6s ease; }
.card__open:hover img { transform: scale(1.03); }
.is-out .card__media img { opacity: .55; }
.nophoto { position: absolute; inset: 0; background: var(--tone); display: grid; place-items: center; padding: 14px; text-align: center; }
.nophoto span { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 6vw, 34px); line-height: 1.05; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; }
.tag { position: absolute; top: 10px; left: 10px; font-family: var(--serif); font-style: italic; font-size: 14px; padding: 3px 11px 4px; border-radius: 999px; background: rgba(255, 255, 255, .75); backdrop-filter: blur(4px); }
.tag--out { background: var(--ink); color: var(--paper); font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: .04em; }
.card__body { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 12px 12px 16px; flex: 1; }
.card__text { min-width: 0; display: grid; gap: 4px; }
.card__name { font-family: var(--serif); font-size: 17px; line-height: 1.2; font-variation-settings: "opsz" 24; }
.card__blurb { font-family: var(--serif); font-style: italic; font-size: 14px; line-height: 1.3; color: var(--muted); }
.card__price { font-weight: 600; font-size: 15px; margin-top: 4px; }
.add { flex: none; width: 44px; height: 44px; border: 1.5px solid var(--ink); display: grid; place-items: center; text-decoration: none; color: var(--ink); background: transparent; }
.add svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.add:hover { background: var(--ink); color: var(--paper); }
.add--ask { font-size: 13px; font-weight: 600; }
.add--out { width: auto; border: 0; height: auto; font-size: 12px; color: var(--muted); letter-spacing: .04em; padding-top: 2px; }
.add--out:hover { background: none; color: var(--muted); }

/* about */
.about { padding: 56px var(--pad); background: var(--sweep); display: grid; gap: 18px; }
.about h2 { font-family: var(--serif); font-size: clamp(30px, 8vw, 64px); line-height: 1.04; letter-spacing: -.02em; font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; max-width: 16ch; }
.about__body { display: grid; gap: 14px; max-width: 52ch; font-size: 17px; }

/* help */
.help { padding: 52px var(--pad); }
.help h2 { font-family: var(--serif); font-size: clamp(24px, 6vw, 36px); margin-bottom: 18px; }
.help dl { margin: 0; display: grid; }
.help dl div { display: grid; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); }
.help dt { font-weight: 600; }
.help dd { margin: 0; color: var(--muted); }

/* footer */
.foot { background: var(--sweep); padding: 36px var(--pad) calc(36px + env(safe-area-inset-bottom)); text-align: center; display: grid; gap: 14px; font-size: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; font-size: 17px; }
.foot a { text-underline-offset: 4px; display: inline-block; padding: 12px 2px; }
.foot p { color: var(--muted); font-size: 13px; }

/* product sheet */
.sheet { border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92dvh; background: var(--card); color: var(--ink); overflow: auto; }
.sheet::backdrop { background: rgba(35, 27, 22, .45); }
.sheet[open] { animation: up .32s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet__close { position: absolute; right: 10px; top: 10px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); font-size: 26px; line-height: 1; cursor: pointer; color: var(--ink); }
.sheet__media { background: var(--sweep); }
.sheet__media .nophoto { position: relative; aspect-ratio: 4 / 3; }
.sheet__body { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 8px; }
.sheet h3 { font-family: var(--serif); font-size: 28px; line-height: 1.1; font-variation-settings: "opsz" 72; }
.sheet__blurb { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 17px; }
.sheet__price { font-weight: 600; font-size: 18px; margin-bottom: 8px; }
.btn--full { width: 100%; }
.btn[aria-disabled="true"] { background: var(--line); border-color: var(--line); color: var(--muted); pointer-events: none; }
.sheet__secure { font-size: 13px; color: var(--muted); text-align: center; }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 20; background: var(--ink); color: var(--paper); padding: 12px 18px; font-size: 14px; max-width: calc(100% - 32px); text-align: center; }

@media (max-width: 599px) {
  .top { grid-template-columns: 64px 1fr 64px; }
  .top__nav { display: none; }
  .mark { grid-column: 2; justify-self: center; }
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 7fr 5fr; align-items: end; }
  .hero__media { aspect-ratio: auto; height: min(88vh, 900px); }
  .hero__text { padding: 48px var(--pad) 64px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0 var(--pad); gap: 14px; }
  .about { grid-template-columns: 1.3fr 1fr; column-gap: 64px; align-items: end; padding: 96px var(--pad); }
  .about .eyebrow { grid-column: 1 / -1; }
  .about__body { grid-column: 2; grid-row: 2; }
  .help { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; padding: 72px var(--pad); }
  .help dl { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .sheet { margin: auto; display: none; }
  .sheet[open] { display: grid; grid-template-columns: 1fr 1fr; max-width: 900px; }
  .sheet__body { align-content: center; padding: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Chinese pages: WenKai for headings and product words, upright (CJK has no italic), looser leading */
:lang(zh-CN) .hero h1, :lang(zh-CN) .about h2, :lang(zh-CN) .shop__head h2, :lang(zh-CN) .help h2,
:lang(zh-CN) .card__name, :lang(zh-CN) .card__blurb, :lang(zh-CN) .nophoto span, :lang(zh-CN) .sheet h3,
:lang(zh-CN) .sheet__blurb, :lang(zh-CN) .tag { font-family: var(--zh); font-style: normal; letter-spacing: 0; }
:lang(zh-CN) .hero h1 { font-size: clamp(30px, 8vw, 64px); line-height: 1.22; max-width: none; }
:lang(zh-CN) .about h2 { line-height: 1.25; max-width: 11em; }
:lang(zh-CN) .card__name { font-size: 17px; line-height: 1.35; }
:lang(zh-CN) .card__blurb { font-size: 14px; line-height: 1.5; }
:lang(zh-CN) .tag--out { font-family: var(--sans); }
:lang(zh-CN) .eyebrow { letter-spacing: .16em; }
:lang(zh-CN) body { line-height: 1.7; }

.sheet .toast { top: 16px; bottom: auto; }

/* Chinese headlines: break only at punctuation or the copy's \n; on wide screens the text column is narrow, so size to it */
:lang(zh-CN) .hero h1, :lang(zh-CN) .about h2 { word-break: keep-all; overflow-wrap: anywhere; }
@media (min-width: 900px) { :lang(zh-CN) .hero:not(.hero--type) h1 { font-size: clamp(36px, 3.3vw, 56px); } }

/* the close button's form must not take a cell in the desktop two-column sheet */
.sheet > form { position: absolute; top: 0; right: 0; z-index: 3; }
