/* ==========================================================================
   Field & Hide — site styles
   Design tokens (colours, fonts, spacing) live in site.toml and are emitted to
   assets/css/theme.css at build time. Only structure lives in this file.
   ========================================================================== */

/* --- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p, ul, ol, dl { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

button { font: inherit; color: inherit; cursor: pointer; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

::selection { background: var(--accent); color: var(--accent-contrast); }

/* --- utilities ------------------------------------------------------------ */

.wrap { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: 1.25rem; }
.wrap--narrow { max-width: 42rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 0.5rem; top: -100%;
  z-index: 100; padding: 0.6rem 1rem;
  background: var(--accent); color: var(--accent-contrast);
  border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 0.5rem; color: var(--accent-contrast); }

.dot { margin-inline: 0.4em; color: var(--text-muted); }
.hint { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.empty {
  padding: 2.5rem 1.5rem; text-align: center;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.link-quiet { color: var(--text-muted); text-decoration: none; }
.link-quiet:hover { color: var(--accent); text-decoration: underline; }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9375rem; font-weight: 500;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-contrast); }

/* --- header ---------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.25rem;
}

.brand { text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand__name {
  font-family: var(--font-heading);
  font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.015em;
}
/* Bounded on both axes with auto sizing, so a tall stacked mark and a wide
   wordmark both fit without the stylesheet knowing the aspect ratio. Only the
   max-* values apply, so the image is never distorted or letterboxed. */
.brand__logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 2.25rem;
  max-width: min(13rem, 45vw);
}
/* Only one mark is shown at a time; the theme is set on <html> before first
   paint, so no flash. A single logo without a dark twin is left alone. */
.brand__logo--dark { display: none; }
:root[data-theme="dark"] .brand--has-dark .brand__logo--light { display: none; }
:root[data-theme="dark"] .brand--has-dark .brand__logo--dark { display: block; }
@media (max-width: 480px) { .brand__logo { max-height: 1.875rem; max-width: 9rem; } }

.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav__list { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav__list a {
  display: block; padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.9375rem; text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav__list a:hover { color: var(--text); background: var(--surface-alt); }
.nav__list a[aria-current="page"] { color: var(--accent); font-weight: 500; }

.nav-toggle {
  display: none;
  width: 2.75rem; height: 2.75rem;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 1.5px;
  background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: 999px; font-size: 0.9rem; line-height: 1;
  transition: background-color 0.18s ease;
}
.theme-toggle:hover { background: var(--surface); }
:root[data-theme="light"] .theme-toggle__moon,
:root[data-theme="dark"] .theme-toggle__sun { display: none; }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-flex; order: 3; }
  .nav {
    position: absolute; inset: 100% 0 auto;
    flex-direction: column; align-items: stretch; gap: 0.5rem;
    padding: 1rem 1.25rem 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav[hidden] { display: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list a { padding: 0.7rem 0.5rem; font-size: 1rem; }
  .theme-toggle { align-self: flex-start; }
}

/* --- photos ---------------------------------------------------------------- */

.photo { display: block; position: relative; overflow: hidden; background: var(--backdrop); }
.photo__img {
  width: 100%; height: 100%;
  object-fit: cover;
  background-image: var(--blur);
  background-size: cover;
  background-position: inherit;
}
:root[data-theme="dark"] .photo { background: var(--surface-alt); }

/* --- hero ------------------------------------------------------------------ */

.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem); }
.hero--image, .page-head--image { position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg .photo { height: 100%; }
.hero--image::after, .page-head--image::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, transparent calc(100% - 6rem), var(--bg) 100%),
    linear-gradient(to right,
      color-mix(in srgb, var(--bg) 97%, transparent) 0%,
      color-mix(in srgb, var(--bg) 88%, transparent) 45%,
      color-mix(in srgb, var(--bg) 38%, transparent) 100%);
}
.hero--image .hero__inner, .page-head--image > .wrap { position: relative; z-index: 2; }
.hero--image .hero__title, .hero--image .hero__tagline, .hero--image .hero__prose,
.page-head--image .page-head__title, .page-head--image .page-head__lede, .page-head--image .page-head__prose {
  text-shadow: 0 1px 3px color-mix(in srgb, var(--bg) 85%, transparent);
}
.hero__inner { display: grid; gap: 2rem; }
.hero__title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}
.hero__tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.hero__prose { max-width: 58ch; color: var(--text-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* --- sections -------------------------------------------------------------- */

.section { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--tight { padding-block: 1rem 0; }
.section--alt { background: var(--surface-alt); }
.section--centred { display: grid; place-items: center; text-align: center; min-height: 58vh; }

.section__head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 1.5rem; margin-bottom: 1.75rem;
  padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.section__title { font-size: clamp(1.375rem, 3vw, 1.875rem); margin: 0; }
.section__more { font-size: 0.9375rem; color: var(--text-muted); text-decoration: none; }
.section__more:hover { color: var(--accent); text-decoration: underline; }

/* --- product cards --------------------------------------------------------- */

.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.grid--cards > [hidden] { display: none; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-3px); box-shadow: var(--shadow); }
.card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.card__media { display: block; aspect-ratio: 4 / 5; }
.card__media .photo { height: 100%; }
.card__body { display: flex; flex-direction: column; gap: 0.4rem; padding: 1rem 1.1rem 1.15rem; flex: 1; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }
.card__title { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; }
.card__price { font-variant-numeric: tabular-nums; font-size: 0.9375rem; color: var(--accent); white-space: nowrap; }
.card__summary { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.5; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; padding-top: 0.4rem; }
.card__badges { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; }
.card__category { font-size: 0.8125rem; color: var(--text-muted); }

.card--more {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 2rem 1.1rem;
  border-style: dashed; background: transparent;
  color: var(--accent); text-decoration: none;
  font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 600;
}
.card--more:hover { border-color: var(--accent); background: var(--surface); }
.card__more { display: inline-flex; align-items: center; gap: 0.45rem; }
.card__more-arrow { transition: transform 0.2s ease; }
.card--more:hover .card__more-arrow { transform: translateX(3px); }

.badge {
  display: inline-flex; align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
}
.badge--in-stock { color: #2f6b3f; border-color: color-mix(in srgb, #2f6b3f 35%, transparent); background: color-mix(in srgb, #2f6b3f 10%, transparent); }
.badge--made-to-order { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.badge--bespoke { color: #6b4a86; border-color: color-mix(in srgb, #6b4a86 35%, transparent); background: color-mix(in srgb, #6b4a86 10%, transparent); }
.badge--sold { text-decoration: line-through; }
.badge--lg { padding: 0.3rem 0.8rem; font-size: 0.8125rem; }
.badge--shipping {
  color: #2f6b3f;
  border-color: color-mix(in srgb, #2f6b3f 35%, transparent);
  background: color-mix(in srgb, #2f6b3f 10%, transparent);
}

:root[data-theme="dark"] .badge--in-stock { color: #7fc496; }
:root[data-theme="dark"] .badge--bespoke { color: #b79cd0; }
:root[data-theme="dark"] .badge--shipping { color: #7fc496; }

/* --- product detail -------------------------------------------------------- */

.crumbs {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.875rem; color: var(--text-muted);
  padding-block: 1.5rem;
}
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text); }

.product { padding-bottom: 1rem; }
/* The "you might also like" band is a full-bleed colour change; without a
   matching pad the last line of the listing sits flush against it. */
.product__layout { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 56rem) {
  .product__layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .product__info { position: sticky; top: 5.5rem; }
}

.product__hero {
  margin: 0 0 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--backdrop);
}
.product__hero .photo { height: 100%; }
.product__hero--empty { background: var(--surface-alt); }
.product__thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(0, 6rem)); gap: 0.5rem; }
.product__thumb { margin: 0; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; }
.product__shot {
  display: block; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; cursor: zoom-in;
}

.product__eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.875rem; margin-bottom: 0.6rem; }
.product__title { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.025em; margin-bottom: 0.35rem; }
.product__price { font-size: 1.375rem; color: var(--accent); font-variant-numeric: tabular-nums; margin-bottom: 0.75rem; }
.product__summary { font-size: 1.0625rem; color: var(--text-muted); margin-top: 1rem; }
.product__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.product__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.product__note { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.85rem; }

.spec { margin: 1.5rem 0; border-top: 1px solid var(--border); }
.spec__row { display: flex; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
.spec dt { flex: 0 0 6.5rem; color: var(--text-muted); }
.spec dd { margin: 0; }

/* --- generic page ---------------------------------------------------------- */

.page-head { padding-block: clamp(2rem, 5vw, 3.5rem) 0; }
.page-head--image { padding-block: clamp(3rem, 10vw, 6rem); }
.page-head__title { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; }
.page-head__lede { font-family: var(--font-heading); font-size: 1.1875rem; color: var(--text-muted); max-width: 52ch; }
.page-head__prose { max-width: 62ch; margin-top: 1.25rem; color: var(--text-muted); }

.notfound__code { font-family: var(--font-heading); font-size: 4rem; color: var(--accent); margin: 0; line-height: 1; }
.notfound__title { font-size: clamp(1.5rem, 4vw, 2.25rem); }
.notfound__text { color: var(--text-muted); margin-inline: auto; max-width: 46ch; }

/* --- filters --------------------------------------------------------------- */

.filters { margin-bottom: 2rem; }
.filters__row + .filters__row { margin-top: 1rem; }
.filters__group { border: 0; padding: 0; margin: 0; min-width: 0; }
.filters__legend { padding: 0; margin-bottom: 0.55rem; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text-muted);
  font-size: 0.875rem;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.chip__count { opacity: 0.65; font-variant-numeric: tabular-nums; }
.filters__status { margin: 1.25rem 0 0; font-size: 0.875rem; color: var(--text-muted); }

/* --- markets ---------------------------------------------------------------- */

.markets { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.market {
  display: grid; gap: 0.35rem 1.25rem;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
}
.market--past { border-left-color: var(--border); opacity: 0.75; }
@media (max-width: 34rem) {
  .market { grid-template-columns: 1fr; }
}
.market__date { color: var(--accent); font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 600; }
.market--past .market__date { color: var(--text-muted); }
.market__day { display: block; }
.market__name { font-size: 1.1875rem; margin-bottom: 0.15rem; }
.market__name a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.market__meta { display: flex; flex-wrap: wrap; gap: 0.15rem; font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.market__location { font-size: 0.9375rem; margin-bottom: 0.2rem; }
.market__address { display: block; font-size: 0.875rem; color: var(--text-muted); }
.market__map { color: inherit; text-decoration: none; }
.market__map:hover, .market__map:focus { text-decoration: underline; text-underline-offset: 0.15em; }
.market__map-pin { display: inline-block; vertical-align: -0.125em; margin-right: 0.3rem; }
.market__summary { margin-top: 0.4rem; font-size: 0.9375rem; color: var(--text-muted); }
.market__notes { margin-top: 0.5rem; font-size: 0.9375rem; }
.market--more {
  display: flex;
  border: 1px dashed var(--border); background: transparent;
}
.market--more:hover { border-color: var(--accent); background: var(--surface); }
.market__more {
  display: flex; flex: 1; align-items: center; justify-content: center;
  gap: 0.45rem; padding: 1rem 1.25rem; text-align: center;
  font-family: var(--font-heading); font-weight: 600; font-size: 1.0625rem;
  color: var(--accent); text-decoration: none;
}
.market__more-arrow { transition: transform 0.2s ease; }
.market--more:hover .market__more-arrow { transform: translateX(3px); }
.markets--past { margin-top: 1.25rem; }

.disclosure__summary {
  cursor: pointer; padding: 0.9rem 1.15rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); font-weight: 500;
}
.disclosure[open] .disclosure__summary { border-radius: var(--radius) var(--radius) 0 0; }

/* --- values ------------------------------------------------------------------ */

.values { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
@media (min-width: 46rem) { .values { grid-template-columns: repeat(3, 1fr); } }
.value__title { font-size: 1.1875rem; }
.value p { color: var(--text-muted); font-size: 0.9688rem; }

/* --- gallery ------------------------------------------------------------------ */

.masonry {
  columns: 3 18rem;
  column-gap: clamp(0.75rem, 1.5vw, 1.25rem);
}
.tile {
  display: block; width: 100%;
  margin: 0 0 clamp(0.75rem, 1.5vw, 1.25rem);
  padding: 0; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
  break-inside: avoid;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile__caption {
  display: block; padding: 0.6rem 0.85rem;
  font-size: 0.8125rem; color: var(--text-muted); text-align: left;
}

/* --- lightbox ------------------------------------------------------------------ */

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgb(10 8 6 / 0.9); border: 0; }
.lightbox__figure { position: relative; margin: 0; max-width: min(60rem, 100%); max-height: 100%; display: grid; gap: 0.75rem; }
.lightbox__img {
  max-width: 100%; max-height: calc(100vh - 8rem);
  width: auto; height: auto;
  border-radius: var(--radius-sm);
  background: var(--backdrop);
}
.lightbox__caption { color: #e8e0d5; font-size: 0.9375rem; text-align: center; }
.lightbox__caption:empty { display: none; }

.lightbox__btn {
  position: absolute; z-index: 1;
  display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem;
  background: rgb(20 16 12 / 0.75); color: #f4ede4;
  border: 1px solid rgb(255 255 255 / 0.18); border-radius: 999px;
  font-size: 1.5rem; line-height: 1;
  transition: background-color 0.15s ease;
}
.lightbox__btn:hover { background: rgb(40 32 24 / 0.9); }
.lightbox__btn--close { top: 0.75rem; right: 0.75rem; font-size: 1.75rem; }
.lightbox__btn--prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__btn[hidden] { display: none; }

body.is-locked { overflow: hidden; }

/* --- contact -------------------------------------------------------------------- */

.contact { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 52rem) { .contact--with-card { grid-template-columns: minmax(0, 1fr) 20rem; } }
.contact__card {
  padding: 1.35rem 1.5rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact__heading {
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-muted); margin-bottom: 0.75rem;
}
.contact__list { margin: 0; }
.contact__list div { padding: 0.4rem 0; border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
.contact__list div:last-child { border-bottom: 0; }
.contact__list dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.contact__list dd { margin: 0.1rem 0 0; }
.contact__main { display: grid; gap: 1.75rem; }
.contact-form { display: grid; gap: 1.1rem; max-width: 34rem; }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.field input, .field textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  padding: 0.65rem 0.75rem;
  width: 100%;
}
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 8rem; }
.contact-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { justify-self: start; }

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

.site-footer { margin-top: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--border); background: var(--surface-alt); }
.site-footer__grid { display: grid; gap: 2rem; padding-block: clamp(2rem, 4vw, 3rem); }
@media (min-width: 46rem) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.site-footer__name { font-family: var(--font-heading); font-size: 1.1875rem; font-weight: 600; margin-bottom: 0.35rem; }
.site-footer__blurb { color: var(--text-muted); font-size: 0.9375rem; max-width: 34ch; }
.site-footer__heading {
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-muted); margin-bottom: 0.7rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.9375rem; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem; color: var(--text-muted);
}
.site-footer__base p { margin: 0; }

/* --- prose (rendered markdown) ------------------------------------------------- */

.prose { max-width: 68ch; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { font-size: 1.5rem; margin-top: 2.25em; }
.prose h3 { font-size: 1.1875rem; margin-top: 1.75em; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li + li { margin-top: 0.35rem; }
.prose blockquote {
  margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.15rem;
  border-left: 3px solid var(--accent); color: var(--text-muted); font-style: italic;
}
.prose img { border-radius: var(--radius); margin-block: 1.5rem; }
.prose pre {
  padding: 1rem; overflow-x: auto;
  background: var(--surface-alt); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.875rem; line-height: 1.5;
}
.prose code { background: var(--surface-alt); padding: 0.15em 0.35em; border-radius: 4px; font-size: 0.9em; }
.prose pre code { background: none; padding: 0; }
.prose hr { margin-block: 2.5rem; }
.prose--narrow { max-width: 62ch; }
.prose--wide { max-width: 76ch; }
.table-scroll { overflow-x: auto; margin-block: 1.5rem; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.prose th, .prose td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { color: var(--text-muted); font-weight: 600; }

/* Heading anchors stay out of the way until hovered or focused. */
.prose .anchor, .prose h2 > .anchor, .prose h3 > .anchor {
  float: left; margin-left: -1.1em; padding-right: 0.35em;
  color: var(--text-muted); text-decoration: none;
  opacity: 0; transition: opacity 0.15s ease;
}
.prose h2:hover .anchor, .prose h3:hover .anchor, .prose .anchor:focus { opacity: 1; }
@media (max-width: 44rem) { .prose .anchor { display: none; } }

/* --- print ---------------------------------------------------------------------- */

@media print {
  .site-header, .site-footer, .lightbox, .filters, .product__actions, .hero__actions { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .market { break-inside: avoid; }
}
