@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f8f6f0;
  --surface: #fffdf8;
  --ink: #222826;
  --muted: #555b55;
  --line: #d9d6ca;
  --accent: #9a3e2c;
  --accent-dark: #773020;
  --display: "Instrument Serif", Georgia, serif;
  --body: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--body);
}
main { min-height: 62vh; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, .product-card h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: .99;
}
h1 { font-size: clamp(3.1rem, 6.4vw, 5.9rem); letter-spacing: -.025em; }
h2 { font-size: clamp(2.25rem, 4vw, 3.15rem); }
.shell { width: min(100% - 3rem, 75rem); margin-inline: auto; }
.skip {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: .6rem 1rem;
  border-radius: .3rem;
  background: var(--surface);
  transform: translateY(-150%);
}
.skip:focus { transform: translateY(0); }

.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav { min-height: 5rem; display: flex; align-items: center; gap: clamp(1.1rem, 4vw, 3.5rem); }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
  text-decoration: none;
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -.015em;
}
.mark {
  display: grid;
  place-items: center;
  border-radius: .45rem;
  background: var(--ink);
  color: var(--surface);
  width: 2.55rem;
  height: 2.55rem;
  font: 400 1.2rem var(--display);
  letter-spacing: .035em;
}
.nav nav { display: flex; align-items: center; gap: clamp(.8rem, 3vw, 2rem); flex: 1; }
.nav nav a { text-decoration: none; font-size: .91rem; font-weight: 600; color: var(--muted); }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: .32rem; }
.preview-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  padding: .45rem 1rem;
  background: #eae5da;
  color: #453e32;
  font-size: .84rem;
  font-weight: 650;
  text-align: center;
}
.preview-note span { width: .43rem; height: .43rem; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .6rem;
  min-height: 2.9rem;
  padding: .63rem 1rem;
  border-radius: .46rem;
  border: 1px solid transparent;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}
.button.primary { background: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-dark); }
.button.outline, .button.quiet { border-color: var(--line); background: var(--surface); color: var(--ink); }
.button.outline:hover, .button.quiet:hover { border-color: var(--ink); background: var(--paper); }
.button.quiet { min-height: 2.65rem; white-space: nowrap; }
.arrow-out {
  position: relative;
  display: inline-block;
  width: .7em;
  height: .7em;
  margin-inline-start: .15em;
}
.arrow-out::before, .arrow-out::after { content: ""; position: absolute; }
.arrow-out::before {
  width: .48em;
  height: .48em;
  top: 0;
  right: 0;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}
.arrow-out::after {
  width: .8em;
  height: 1.5px;
  top: .34em;
  right: -.05em;
  background: currentColor;
  transform: rotate(-45deg);
}


.hero {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  align-items: center;
  gap: clamp(1.8rem, 6vw, 5rem);
  padding-block: clamp(2.2rem, 6vw, 5.2rem);
}
.hero-copy { display: grid; gap: 1.25rem; justify-items: start; }
.hero-copy p, .lede { max-width: 36rem; font-size: clamp(1rem, 1.5vw, 1.16rem); color: var(--muted); }
.hero-showcase {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .8rem;
  box-shadow: 0 1.2rem 2.5rem -2rem #31271990;
  background: var(--surface);
  text-decoration: none;
}
.hero-showcase img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.hero-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1rem;
  font-weight: 700;
}
.hero-caption > span + span { font-size: .86rem; color: var(--accent-dark); }
.hero-showcase:hover .hero-caption > span + span { text-decoration: underline; }
.catalog { border-top: 1px solid var(--line); padding-block: 2rem 4.2rem; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.filters { display: flex; flex-wrap: wrap; gap: .35rem; }
.filters a {
  min-height: 2.6rem;
  padding: .55rem .85rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
  text-decoration: none;
}
.filters a:hover { border-color: var(--ink); }
.filters a[aria-current] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .72rem;
  background: var(--surface);
  text-decoration: none;
}
.product-card:hover { border-color: #9d9387; box-shadow: 0 .75rem 1.7rem -1.45rem #312719a0; }
.card-image { background: #e9e2d6; overflow: hidden; }
.card-image img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.card-body { display: grid; gap: .45rem; padding: 1.05rem; flex: 1; grid-template-rows: auto auto 1fr auto; }
.category { font-weight: 750; font-size: .78rem; color: var(--accent-dark); }
.product-card h3 { font-size: 2.12rem; }
.card-body p:not(.category) { font-size: .92rem; color: var(--muted); }
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: .4rem;
  margin-top: .55rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
  font-size: .85rem;
}
.card-meta span { color: var(--muted); }
.card-meta strong { white-space: nowrap; }

.page-header { padding-block: 1.65rem 1rem; }
.back { color: var(--muted); font-weight: 700; font-size: .91rem; text-decoration: none; }
.back:hover { text-decoration: underline; }
.product-detail { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.4rem, 5vw, 4rem); align-items: start; }
.product-detail h1 { margin-block: .25rem .7rem; font-size: clamp(3.1rem, 5vw, 5rem); }
.product-detail .lede { margin-bottom: 1rem; }
.product-media { overflow: hidden; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); }
.product-media img { width: 100%; height: auto; }
.purchase-form { display: grid; justify-items: start; gap: .75rem; margin-top: 1.2rem; }
.purchase-form fieldset { margin: 0; padding: 0; width: 100%; border: 0; }
.purchase-form legend { padding: 0; margin-bottom: .45rem; font-weight: 700; }
.license-summary-list { width: 100%; }
.license.license-summary { grid-template-columns: minmax(0, 1fr) auto; }
.license-agreement { display: flex; align-items: baseline; gap: .55rem; font-size: .9rem; }
.license-agreement input { align-self: center; flex: none; }
.license-agreement a { text-decoration: underline; text-underline-offset: .2rem; }
.license {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .65rem;
  padding: .7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .45rem;
  margin-bottom: .4rem;
  cursor: pointer;
}
.license:has(input:checked) { border-color: var(--accent); }
.license small { display: block; color: var(--muted); }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; margin: 0; }
.contents { margin-block: 2rem 4rem; border-top: 1px solid var(--line); padding-top: 1.55rem; }
.contents ul { color: var(--muted); padding-left: 1.2rem; }

.panel { border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); padding: clamp(1.25rem, 4vw, 2.4rem); }
.auth-panel, .checkout-panel { width: min(100%, 34rem); margin: 2.6rem auto 4.4rem; }
.auth-panel h1, .checkout-panel h1 { font-size: clamp(2.7rem, 6vw, 4.25rem); margin-block: .5rem .6rem; }
.auth-panel .lede, .checkout-panel .lede { margin-bottom: 1.1rem; }
.stack { display: grid; gap: .8rem; }
.stack label { display: grid; gap: .2rem; font-weight: 700; }
.stack input:not([type=checkbox]), .stack select {
  min-width: 0;
  width: 100%;
  min-height: 2.75rem;
  padding: .45rem .65rem;
  border: 1px solid #8a8a80;
  border-radius: .35rem;
  background: #fff;
  color: var(--ink);
}
.stack .button { justify-self: start; margin-top: .25rem; }
.field-hint, .form-footer { color: var(--muted); font-size: .9rem; }
.field-hint { margin-top: -.65rem; }
.form-footer { margin-top: 1rem; }
.form-footer a, td a { color: var(--accent-dark); font-weight: 700; }
.notice { padding: .7rem .85rem; margin-block: .9rem; border-radius: .4rem; background: #ede9df; color: var(--ink); }
.notice.error { background: #f8e5e0; color: #762a23; }
.notice.success { background: #e3ebe2; color: #30472f; }
.order-summary { margin: 1.25rem 0; }
.order-summary div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); padding: .65rem 0; }
.order-summary dd { margin: 0; text-align: end; font-weight: 750; }

.account-page { padding-block: 2.5rem 4rem; }
.account-page h1 { font-size: clamp(3rem, 6vw, 4.8rem); }
.empty { margin-top: 1.25rem; }
.empty p { margin-block: .7rem 1rem; }
.order-list { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: .65rem; }
.order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(10rem, auto);
  align-items: center;
  gap: .75rem;
  background: var(--surface);
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
}
.order-row h2 { font-size: 2rem; }
.order-row p { color: var(--muted); font-size: .9rem; }
.order-row .button { justify-self: end; }
.status { display: inline-block; width: fit-content; padding: .27rem .65rem; border-radius: 1rem; background: #eee9dc; font-size: .84rem; font-weight: 700; }
.status.paid { background: #e3ebe2; color: #30472f; }
.status.refunded { background: #f5e5df; color: #6b362a; }

.admin-section { margin-top: 1.65rem; }
.admin-section h2 { margin-bottom: .65rem; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: .5rem; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: start; padding: .55rem .8rem; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: .88rem; }
tr:last-child td { border-bottom: none; }
th { background: #ede9df; }
.market-form { width: min(100%, 36rem); margin-top: 1rem; }
.market-permissions, .market-dates { display: flex; flex-wrap: wrap; gap: .65rem 1rem; }
.stack .check-label { display: inline-flex; align-items: center; font-size: .89rem; gap: .45rem; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.35rem; }
.footer a { text-underline-offset: .2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.15rem; }
.policy-panel { max-width: 44rem; margin: 2.6rem auto 4.4rem; }
.policy-panel h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 1rem; }
.policy-panel h2 { font-size: 1.5rem; margin-top: 1.35rem; }
.policy-panel p { margin-block: .7rem; }
.policy-panel a { text-decoration: underline; text-underline-offset: .2rem; }

@media (max-width: 920px) {
  .hero { gap: 1.75rem; }
  .product-grid { gap: .8rem; }
  .card-body { padding: .8rem; }
}

@media (max-width: 720px) {
  .shell { width: calc(100% - 2rem); }
  .hero, .product-detail { grid-template-columns: 1fr; }
  .hero-copy { max-width: 34rem; gap: .95rem; }
  .hero h1 { font-size: clamp(3.3rem, 9vw, 5rem); }
  .hero { padding-block: 2rem 2.5rem; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-detail .product-media { order: 1; }
  .order-row { grid-template-columns: 1fr; }
  .order-row .button { justify-self: start; }
}

@media (max-width: 460px) {
  .nav { flex-wrap: wrap; justify-content: space-between; gap: 0; padding-top: .55rem; }
  .nav nav { flex: 1 0 100%; order: 2; gap: 1.6rem; min-height: 2.8rem; }
  .mark { width: 2.25rem; height: 2.25rem; }
  .button.quiet { min-height: 2.5rem; }
  .product-grid { grid-template-columns: 1fr; gap: 1rem; }
  .hero-caption { padding: .66rem .75rem; }
  .card-body { padding: .92rem; }
  .catalog { padding-block: 1.35rem 2.7rem; }
  .account-page { padding-block: 1.9rem 2.8rem; }
  .auth-panel, .checkout-panel { margin-block: 1.5rem 2.6rem; }
}
