/* ==========================================================================
   Trails End Stained Glass

   The look: pages built like a leaded panel. Flat fields of brand colour,
   held together by thick dark lines, with hand-cut Mesa lettering on top.
   ========================================================================== */

/* ------------------------------------------------------------------ fonts */

@font-face {
  font-family: "Mesa";
  src: url("../fonts/mesa-regular.woff2") format("woff2"),
       url("../fonts/mesa-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mesa";
  src: url("../fonts/mesa-bold.woff2") format("woff2"),
       url("../fonts/mesa-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------------- tokens */

:root {
  /* Brand palette (ColorPalette.png) */
  --custard: #FDE9AC;
  --perfume: #F0889F;
  --teal: #027F7C;
  --egg: #8BBAC5;
  --pear: #D12F60;
  --orange: #FD892B;
  --mushroom: #EDA21A;
  --olive: #9E9820;
  --slate: #5B6268;

  /* From the logo */
  --ink: #33535C;          /* the lettering colour: text and lead lines */
  --logo-ground: #FBF1A9;  /* the logo's own background */

  /* Derived. Every colour used anywhere on the site is declared in this
     block; nothing below it may contain a raw colour value. */
  --ink-deep: #2E3A40;     /* text on mid-tone colour panes; shadows */
  --paper: #FFF6D9;        /* custard, lightened, for reading surfaces */
  --cream: #FFF8E7;        /* text on dark panes */
  --pear-deep: #BF2755;    /* pressed/hover state of prickly pear */
  --error: #B01F4C;        /* form error text */
  --field: #FFFCF0;        /* form field background */
  --field-error: #FFF1F0;  /* form field background when invalid */

  --line: 4px;
  --line-thin: 3px;
  --radius: 22px;
  --radius-small: 14px;
  --shadow: 4px 4px 0 var(--ink);

  --font: "Mesa", ui-rounded, "Nunito", "Trebuchet MS", system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* ------------------------------------------------------------------- base */

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

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

body {
  margin: 0;
  background: var(--custard);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  /* Keep the footer at the bottom of the window on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
main { flex: 1; }

/* Lock the page behind the cart drawer while it is open */
body:has(.drawer.is-open) { overflow: hidden; }

img, svg { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.2vw, 4.75rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.35rem; line-height: 1.15; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
a:hover { color: var(--pear); }

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

::selection { background: var(--perfume); color: var(--ink-deep); }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}
.wrap--narrow { --wrap: 820px; }

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

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--ink);
  color: var(--cream);
  font-weight: 700;
  border-radius: 0 0 var(--radius-small) var(--radius-small);
}
.skip-link:focus { top: 0; color: var(--cream); }

.icon { width: 1.15em; height: 1.15em; flex: none; }

/* Sun and butte from the logo, as recolourable marks */
.mark {
  display: inline-block;
  width: 1.5em; height: 1.5em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--mark) center / contain no-repeat;
          mask: var(--mark) center / contain no-repeat;
}
.mark--sun { --mark: url("../img/sun.png"); }
.mark--butte { --mark: url("../img/butte.png"); }
.mark--large { width: 4.5rem; height: 4.5rem; }

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  max-width: 38em;
}

.fine { font-size: 0.9rem; color: var(--slate); }

/* Thin bar across the top while htmx is fetching a page */
.page-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 90;
  height: 5px;
  width: 0;
  background: var(--pear);
  opacity: 0;
}
.page-progress.htmx-request {
  opacity: 1;
  width: 85%;
  transition: width 2.5s cubic-bezier(0.1, 0.8, 0.2, 1);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 700 1.05rem/1.1 var(--font);
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled, .btn.htmx-request { opacity: 0.65; cursor: progress; }

.btn--primary { background: var(--pear); color: var(--cream); }
.btn--primary:hover { color: var(--cream); background: var(--pear-deep); }
.btn--sun { background: var(--mushroom); color: var(--ink-deep); }
.btn--sun:hover { color: var(--ink-deep); }
.btn--small { padding: 0.6rem 1.05rem; font-size: 0.92rem; box-shadow: 3px 3px 0 var(--ink); }
.btn--small:hover { box-shadow: 5px 5px 0 var(--ink); }
.btn--block { width: 100%; }

.text-btn, .text-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 0.92rem/1.2 var(--font);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.text-btn:hover, .text-link:hover { color: var(--pear); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.75rem; height: 2.75rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}
.icon-btn:hover { background: var(--perfume); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  white-space: nowrap;
}
.link-arrow .icon { transition: transform 0.15s ease; }
.link-arrow:hover .icon { transform: translateX(4px); }

.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }
.actions--center { justify-content: center; }

.tag, .badge {
  display: inline-block;
  padding: 0.32rem 0.7rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag--pear { background: var(--pear); color: var(--cream); }
.tag--ink, .badge--sold { background: var(--ink); color: var(--custard); }

.notice {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius-small);
  background: color-mix(in srgb, var(--egg) 55%, var(--paper));
  color: var(--ink-deep);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
}
.notice--error { background: color-mix(in srgb, var(--perfume) 55%, var(--paper)); }

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

/* The header is the dark band of the page: ink ground, custard lettering,
   the same pairing as the footer. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: var(--custard);
  border-bottom: var(--line) solid var(--ink);
}
/* The usual teal focus ring disappears against ink */
.site-header :focus-visible { outline-color: var(--custard); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 78px;
  padding-block: 0.5rem;
}

.brand { flex: none; display: block; border-radius: 8px; }
/* The wordmark file is ink-coloured, which would vanish here. Like the sun
   and butte marks, it is used as a stencil and filled with custard. The
   image itself stays in place, unseen, for its size and its alt text. */
.brand__mark {
  display: block;
  background: var(--custard);
  -webkit-mask: url("../img/wordmark.png") center / contain no-repeat;
          mask: url("../img/wordmark.png") center / contain no-repeat;
  transition: transform 0.2s ease;
}
.brand img { display: block; height: 56px; width: auto; opacity: 0; }
.brand:hover .brand__mark { transform: rotate(-2deg); }

.site-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.site-nav a {
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--custard);
}
.site-nav a:hover { background: var(--egg); color: var(--ink-deep); }
.site-nav a[aria-current="page"] { background: var(--custard); color: var(--ink); }

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem 0.55rem 0.9rem;
  border: var(--line-thin) solid var(--ink-deep);
  border-radius: 999px;
  background: var(--perfume);
  color: var(--ink-deep);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  /* On the ink header the outline and shadow are the deeper ink */
  box-shadow: 3px 3px 0 var(--ink-deep);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.cart-button:hover { color: var(--ink-deep); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink-deep); }
.cart-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink-deep); }

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.7rem;
  height: 1.7rem;
  padding-inline: 0.4rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--custard);
  font-size: 0.9rem;
  letter-spacing: 0;
}
.cart-count.is-empty { background: transparent; color: var(--ink-deep); box-shadow: inset 0 0 0 2px var(--ink); }
/* A little hop when htmx swaps in a new count */
.cart-count.htmx-settling { animation: hop 0.4s ease; }

.nav-toggle {
  display: none;
  place-items: center;
  width: 2.9rem; height: 2.9rem;
  border: var(--line-thin) solid var(--ink-deep);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.15rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .site-header__inner { gap: 0.6rem; }
  .brand { margin-right: auto; }
  .brand img { height: 48px; }
  .nav-toggle { display: inline-grid; }
  .cart-button { order: 2; }
  .nav-toggle { order: 3; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0.5rem var(--gutter) 1rem;
    background: var(--ink);
    border-bottom: var(--line) solid var(--ink-deep);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 1rem; font-size: 1.1rem; }
}

/* ------------------------------------------------- leaded "window" layout */

/* A grid whose gaps show the dark background through, like lead between
   panes. The rounded pane corners leave small dark joints where lines meet,
   the way solder pools at a junction. */
.window {
  display: grid;
  gap: var(--line);
  margin: 0;
  padding: var(--line);
  list-style: none;
  background: var(--ink);
  border-radius: calc(var(--radius) + 8px);
}

.pane {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper);
}

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

.hero { padding-block: clamp(1.25rem, 3vw, 2.25rem) clamp(2rem, 5vw, 4rem); }

.window--hero {
  grid-template-columns: 1.1fr 0.9fr 1fr;
  grid-template-rows: auto minmax(270px, auto);
  grid-template-areas:
    "head head logo"
    "art  note sun";
}

.pane--head {
  grid-area: head;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.75rem, 4.5vw, 4rem);
}
.pane--head > * { position: relative; }
.pane--head h1 { max-width: 9.5em; }
.pane--head .lede { margin-top: 1.25rem; max-width: 30em; }

/* Coloured light on the wall, as if thrown through a piece hanging nearby */
.pane--head .pane__light {
  position: absolute;
  inset: -15% -10% -15% 35%;
  background:
    radial-gradient(22% 26% at 70% 20%, rgb(240 136 159 / 0.6), transparent 100%),
    radial-gradient(18% 22% at 46% 40%, rgb(253 137 43 / 0.42), transparent 100%),
    radial-gradient(22% 26% at 80% 58%, rgb(139 186 197 / 0.7), transparent 100%),
    radial-gradient(16% 20% at 52% 80%, rgb(237 162 26 / 0.45), transparent 100%),
    radial-gradient(14% 18% at 88% 86%, rgb(158 152 32 / 0.35), transparent 100%);
  filter: blur(14px);
  transform: skewX(-14deg);
  animation: drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.pane--logo {
  grid-area: logo;
  background: var(--logo-ground);
}
/* Keeps the pane at least as tall as the logo, so it is never cropped */
.pane--logo::before { content: ""; display: block; padding-top: 129.4%; }
.pane--logo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
}

.pane--art {
  grid-area: art;
  display: block;
  min-height: 270px;
  background: color-mix(in srgb, var(--tint) 55%, var(--paper));
  color: var(--ink-deep);
  text-decoration: none;
}
.pane--art img {
  position: absolute;
  inset: 0 0 0 auto;
  width: 62%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 0;
  transform-origin: 50% 0;
  filter: drop-shadow(0 10px 12px rgb(46 58 64 / 0.2));
}
.pane--art:hover img { animation: sway 1.4s ease-in-out; }
.pane--art:hover { color: var(--ink-deep); }

.pane__caption {
  position: absolute;
  left: 1.25rem; bottom: 1.1rem;
  display: grid;
  gap: 0.15rem;
  max-width: 45%;
  font-size: 0.9rem;
  line-height: 1.25;
}
.pane__caption strong { font-size: 1.2rem; line-height: 1.1; }

.pane--sun { grid-area: sun; }
.pane--sun img { width: 70%; }
.pane--sun .pane__caption { max-width: 38%; }

.pane--note {
  grid-area: note;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: var(--orange);
  color: var(--ink-deep);
}
.pane--note .mark { width: 3.25rem; height: 3.25rem; margin-bottom: auto; }
.pane--note .pane__big {
  margin: 1rem 0 0.4rem;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
}
.pane--note p:last-child { font-size: 0.98rem; line-height: 1.45; }

@media (max-width: 980px) {
  .window--hero {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "head head"
      "logo art"
      "note sun";
  }
  .pane--art img, .pane--sun img { width: 100%; height: calc(100% - 4.9rem); }
  .pane__caption, .pane--sun .pane__caption { max-width: none; right: 1rem; left: 1rem; bottom: 0.9rem; }
  .pane--art { min-height: 300px; }
}

@media (max-width: 560px) {
  .window--hero {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "head head"
      "art  sun"
      "logo note";
  }
  .pane--note { padding: 1.1rem; }
  .pane--note .mark { width: 2.5rem; height: 2.5rem; }
  .pane--art { min-height: 250px; }
  .pane__caption strong { font-size: 1.02rem; }
  .pane--head .pane__light { inset: -10% -30% -10% 20%; opacity: 0.7; }
}

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

.section { padding-block: clamp(2.5rem, 6vw, 5rem); }
.section--tight { padding-block: 0 clamp(3rem, 6vw, 5rem); }
.section--paper {
  background: var(--paper);
  border-block: var(--line) solid var(--ink);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.page-head { padding-block: clamp(2rem, 5vw, 3.75rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { max-width: 13em; }
.page-head .lede { margin-top: 1.1rem; }
.page-head--center { text-align: center; padding-block: clamp(3rem, 9vw, 7rem); }
.page-head--center h1, .page-head--center .lede { margin-inline: auto; }
.page-head--center .mark { margin-bottom: 1rem; }

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 2.25rem 1.5rem;
}
@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 0.9rem; }
}
@media (min-width: 900px) {
  .card-grid--three { grid-template-columns: repeat(3, 1fr); }
  .card-grid--four { grid-template-columns: repeat(4, 1fr); }
}

.card { display: flex; flex-direction: column; min-width: 0; }

.card__art {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--tint) 42%, var(--paper));
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover .card__art { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }

.card__art img {
  width: 100%; height: 100%;
  object-fit: contain;
  transform-origin: 50% 0;
  filter: drop-shadow(0 10px 12px rgb(46 58 64 / 0.2));
}
/* Pieces hang from the top edge, so on hover they swing a little */
.card:hover .card__art img { animation: sway 1.4s ease-in-out; }

.card__art .badge { position: absolute; left: 0.7rem; bottom: 0.7rem; }

.card.is-sold .card__art img { filter: saturate(0.45) opacity(0.75); }

.card__body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto 1fr;
  gap: 0.2rem 0.75rem;
  align-items: baseline;
  padding: 0.9rem 0.2rem 0;
}
.card__name { font-size: 1.25rem; }
.card__name a { text-decoration: none; }
.card__name a:hover { text-decoration: underline; }
.card__price { margin: 0; font-size: 1.15rem; font-weight: 700; }
.card__meta { grid-column: 1 / -1; margin: 0; font-size: 0.92rem; color: var(--slate); }
.card__action { grid-column: 1 / -1; align-self: end; margin-top: 0.7rem; }

@media (max-width: 560px) {
  .card__body { grid-template-columns: 1fr; }
  .card__name { font-size: 1.08rem; }
  .card__art { border-radius: 16px; }
}

/* Stand-in for a listing with no photo yet */
.no-photo {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  color: color-mix(in srgb, var(--ink) 30%, transparent);
}
.no-photo .mark { width: 38%; height: auto; aspect-ratio: 1; }
.pane--art .no-photo { position: absolute; inset: 0 0 0 auto; width: 62%; }
.pane--decor img { width: 100%; }

/* -------------------------------------------------------------- carousel */

/* Gallery pieces on the home page, in a row that scrolls sideways and snaps
   to each piece. Three to a view on wide screens, two on tablets, and one
   with the next peeking in on phones, so it's clear there is more. */
.carousel {
  --per-view: 3;
  --gap: 1.5rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  gap: var(--gap);
  margin: 0;
  /* Room for the hard shadow and focus ring, which overflow would clip */
  padding: 0 0.6rem 1.25rem 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
}
.carousel:focus-visible { outline-offset: 6px; }
/* A mouse can grab the row and pull it along (see home.html). While it is
   held, the row follows the hand exactly; it snaps again on letting go. */
@media (hover: hover) and (pointer: fine) { .carousel { cursor: grab; } }
.carousel.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
@media (max-width: 900px) { .carousel { --per-view: 2; } }
@media (max-width: 560px) { .carousel { --per-view: 1.2; --gap: 1rem; } }

.slide { min-width: 0; scroll-snap-align: start; }
.slide__figure { display: flex; flex-direction: column; height: 100%; margin: 0; }

.slide__art {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--tint) 42%, var(--paper));
  box-shadow: var(--shadow);
}
.slide__art img {
  width: 100%; height: 100%;
  object-fit: contain;
  transform-origin: 50% 0;
  filter: drop-shadow(0 10px 12px rgb(46 58 64 / 0.2));
}
.slide:hover .slide__art img { animation: sway 1.4s ease-in-out; }

.slide__caption { display: grid; gap: 0.15rem; padding: 0.9rem 0.2rem 0; }
.slide__name { font-size: 1.25rem; line-height: 1.15; }
.slide__meta { font-size: 0.92rem; color: var(--slate); }
.slide__note { margin-top: 0.3rem; font-size: 0.98rem; line-height: 1.45; }

.carousel-controls { display: flex; align-items: center; gap: 0.6rem; }
.carousel-controls .link-arrow { margin-left: 0.75rem; }
.carousel-controls .icon-btn { box-shadow: 3px 3px 0 var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.carousel-controls .icon-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.carousel-controls .icon-btn:disabled { opacity: 0.35; cursor: default; background: var(--paper); }
/* When everything fits (or there's no JavaScript), the buttons have nothing to do */
.carousel-controls:has(#carousel-prev:disabled):has(#carousel-next:disabled) .icon-btn { display: none; }
.carousel-controls:has(#carousel-prev:disabled):has(#carousel-next:disabled) .link-arrow { margin-left: 0; }

/* ---------------------------------------------------------------- reviews */

/* Kind words from customers (home page and /reviews). Each one is a tinted
   pane; the colours repeat down the list so nobody has to choose them. */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.review-grid > li { display: flex; }
.review-grid > li:nth-child(4n + 1) { --tint: var(--egg); }
.review-grid > li:nth-child(4n + 2) { --tint: var(--perfume); }
.review-grid > li:nth-child(4n + 3) { --tint: var(--mushroom); }
.review-grid > li:nth-child(4n + 4) { --tint: var(--olive); }

.review {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--tint) 45%, var(--paper));
  color: var(--ink-deep);
}
.review .mark { width: 2.25rem; height: 2.25rem; transform-origin: 50% 50%; }
.review:hover .mark { animation: sway 1.4s ease-in-out; }
.review__words { flex: 1; margin: 0; font-size: 1.12rem; line-height: 1.5; overflow-wrap: anywhere; }
.review__by {
  display: grid;
  gap: 0.1rem;
  padding-top: 0.9rem;
  border-top: var(--line-thin) solid var(--ink);
}
.review__by span { font-size: 0.92rem; }

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

.gallery-grid { margin: 0; padding: 0; list-style: none; }
.card__figure { flex: 1; display: flex; flex-direction: column; margin: 0; }
/* Gallery pieces aren't links, so they sway but don't lift */
.card--gallery:hover .card__art { transform: none; box-shadow: none; }
.card--gallery .card__body { grid-template-columns: 1fr; grid-template-rows: none; align-content: start; }
.card__note { margin-top: 0.35rem; font-size: 0.98rem; line-height: 1.45; }
@media (max-width: 560px) { .card__note { font-size: 0.9rem; } }

/* Numbered circles, used for the sections of admin forms */
.step__number {
  display: inline-grid;
  place-items: center;
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--custard);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1;
}

/* ---------------------------------------------------------------- callout */

.callout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  overflow: hidden;
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: var(--teal);
  color: var(--cream);
}
.callout .eyebrow { color: var(--custard); }
.callout__text h2 { margin-bottom: 0.9rem; }
.callout__text p { max-width: 32em; }
.callout__text .btn { margin-top: 0.75rem; }
.callout__art {
  width: clamp(150px, 22vw, 250px);
  margin-block: calc(-1 * clamp(1.75rem, 5vw, 3.5rem)) -1rem;
  filter: drop-shadow(0 12px 14px rgb(46 58 64 / 0.4));
  transform-origin: 50% 0;
}
/* A photo the studio has uploaded, rather than the drawing */
.callout__art--photo {
  max-height: 340px;
  object-fit: cover;
  border: var(--line) solid var(--ink);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
.callout:hover .callout__art { animation: sway 1.6s ease-in-out; }
@media (max-width: 640px) {
  .callout { grid-template-columns: 1fr; }
  .callout__art { display: none; }
}

/* ------------------------------------------------------------- shop page */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: var(--line) solid var(--ink);
}
.filters__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0; padding: 0; border: 0;
  min-width: 0;
}

.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.chip:hover span { background: color-mix(in srgb, var(--egg) 55%, var(--paper)); }
.chip input:checked + span { background: var(--ink); color: var(--custard); }
.chip input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 3px; }

.chip--check span::before {
  content: "";
  width: 0.95rem; height: 0.95rem;
  border: 2px solid currentColor;
  border-radius: 4px;
}
.chip--check input:checked + span::before { background: var(--custard); box-shadow: inset 0 0 0 2px var(--ink); }

.select select, .field select {
  appearance: none;
  padding: 0.6rem 2.4rem 0.6rem 1rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: 999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2333535C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    right 0.8rem center / 1rem no-repeat,
    var(--paper);
  color: var(--ink);
  font: 700 0.95rem/1.1 var(--font);
  cursor: pointer;
}

.shop-results { transition: opacity 0.12s ease; }
.shop-results.htmx-swapping { opacity: 0; }
.shop-results__count {
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

.empty-state {
  padding: clamp(2rem, 6vw, 4rem);
  border: var(--line) dashed var(--ink);
  border-radius: var(--radius);
  text-align: center;
}
.empty-state .mark { width: 3.5rem; height: 3.5rem; margin-bottom: 0.75rem; }
.empty-state__title { margin-bottom: 0.4rem; font-size: 1.5rem; font-weight: 700; }

/* ----------------------------------------------------------- product page */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-block: 1.5rem 1.25rem;
  font-size: 0.92rem;
  font-weight: 700;
}
.crumbs [aria-current] { color: var(--slate); }

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: start;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.product__art {
  position: sticky;
  top: 104px;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  max-height: calc(100vh - 130px);
  width: 100%;
  overflow: hidden;
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: color-mix(in srgb, var(--tint) 42%, var(--paper));
  padding: 0 6% 5%;
}
.product__art img {
  width: 100%; height: 100%;
  object-fit: contain;
  transform-origin: 50% 0;
  filter: drop-shadow(0 16px 18px rgb(46 58 64 / 0.22));
  animation: settle 1.6s ease-out;
}
.product.is-sold .product__art img { filter: saturate(0.55) opacity(0.85); }

.product__info h1 { font-size: clamp(2.25rem, 4.6vw, 3.6rem); }
.product__price {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin: 1rem 0 1.4rem;
}
.product__price strong { font-size: 2rem; line-height: 1; }
.product__info .lede { margin-bottom: 1em; }

.buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-block: 1.75rem 0.75rem;
}
.buy--sold {
  display: block;
  padding: 1.25rem 1.4rem 1.5rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
}

.specs {
  margin: 2rem 0 0;
  border-top: var(--line) solid var(--ink);
}
.specs > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 35%, transparent);
}
.specs dt { font-weight: 700; }
.specs dd { margin: 0; }

.assurances { margin: 1.5rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.6rem; }
.assurances li { display: flex; align-items: center; gap: 0.7rem; font-size: 0.98rem; line-height: 1.35; }
.assurances .mark { color: var(--orange); width: 1.6rem; height: 1.6rem; }

@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; }
  .product__art { position: static; max-height: 70vh; aspect-ratio: 1; }
}

/* --------------------------------------------------------------- steppers */

.stepper {
  display: inline-flex;
  align-items: center;
  border: var(--line-thin) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  overflow: hidden;
}
.stepper button {
  width: 2.2rem; height: 2.2rem;
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 1.2rem/1 var(--font);
  cursor: pointer;
}
.stepper button:hover:not(:disabled) { background: var(--perfume); color: var(--ink-deep); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper output, .stepper input {
  width: 2.2rem;
  border: 0;
  background: none;
  color: var(--ink);
  font: 700 1rem/1 var(--font);
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.stepper--large button { width: 3rem; height: 3.2rem; font-size: 1.4rem; }
.stepper--large input { width: 2.6rem; font-size: 1.15rem; }

/* ------------------------------------------------------------------- cart */

.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; transition: visibility 0s 0.28s; }
.drawer.is-open { visibility: visible; transition-delay: 0s; }

.drawer__backdrop {
  position: absolute; inset: 0;
  background: rgb(46 58 64 / 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.drawer.is-open .drawer__backdrop { opacity: 1; }

.drawer__panel {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(100%, 440px);
  padding: 1.25rem 1.25rem 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border-left: var(--line) solid var(--ink);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.drawer.is-open .drawer__panel { transform: none; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: var(--line) solid var(--ink);
}
.drawer__head h2 { font-size: 1.9rem; }
.drawer__foot { margin-top: 1rem; text-align: center; font-size: 0.92rem; font-weight: 700; }
.drawer .cart-contents { flex: 1; display: flex; flex-direction: column; }
.drawer .cart-summary { margin-top: auto; }

.cart-lines { margin: 0; padding: 0; list-style: none; }
.cart-line {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 0.9rem;
  padding-block: 1rem;
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 35%, transparent);
}
.cart-line:first-child { padding-top: 0; }
.cart-line__art {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: var(--line-thin) solid var(--ink);
  border-radius: 12px;
  background: color-mix(in srgb, var(--tint) 42%, var(--paper));
}
.cart-line__art img { width: 100%; height: 100%; object-fit: contain; }
.cart-line__name { font-size: 1.12rem; font-weight: 700; line-height: 1.15; text-decoration: none; }
.cart-line__name:hover { text-decoration: underline; }
.cart-line__meta { margin: 0.15rem 0 0.6rem; font-size: 0.88rem; color: var(--slate); }
.cart-line__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; }
.cart-line__price { margin: 0; font-size: 1.1rem; font-weight: 700; }

.cart-summary { padding-top: 1.25rem; }
.cart-summary__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
  font-weight: 700;
}
.cart-summary__row strong { font-size: 1.6rem; }
.cart-summary .fine { margin-bottom: 1.1rem; }

.cart-empty { padding: 2.5rem 1rem; text-align: center; }
.cart-empty .mark { width: 4rem; height: 4rem; color: var(--orange); margin-bottom: 0.5rem; }
.cart-empty__title { margin-bottom: 0.3rem; font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.cart-empty .btn { margin-top: 1rem; }

.cart-page {
  max-width: 760px;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: var(--paper);
}
.cart-page .cart-line { grid-template-columns: 110px 1fr auto; }

/* --------------------------------------------------------------- checkout */

.checkout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.5rem;
  align-items: start;
}
.checkout > div {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: var(--paper);
}
.checkout h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.checkout__next { background: color-mix(in srgb, var(--egg) 55%, var(--paper)) !important; color: var(--ink-deep); }

.summary-lines { margin: 0; padding: 0; list-style: none; }
.summary-lines li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 2px solid color-mix(in srgb, var(--ink) 35%, transparent);
}
.summary-lines__total { border-bottom: 0 !important; font-size: 1.2rem; font-weight: 700; }

/* ------------------------------------------------------------------ forms */

.form { display: grid; gap: 1.2rem; }
.field { display: grid; gap: 0.4rem; min-width: 0; align-content: start; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1.2rem; }
.field label { font-weight: 700; }

.field input, .field textarea, .field select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius-small);
  background-color: var(--field);
  color: var(--ink-deep);
  font: 400 1.05rem/1.4 var(--font);
}
.field select { padding-right: 2.4rem; font-weight: 400; background-color: var(--field); }
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: var(--radius-small);
}
.field.has-error input, .field.has-error textarea { border-color: var(--pear); background-color: var(--field-error); }
.field__error { margin: 0; color: var(--error); font-weight: 700; font-size: 0.93rem; }
.form .btn { justify-self: start; }

.commission {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.commission__form {
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: var(--paper);
}
.commission__aside {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: color-mix(in srgb, var(--perfume) 55%, var(--paper));
  color: var(--ink-deep);
  overflow: hidden;
}
.commission__aside h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.commission__aside img { width: 62%; margin: 1.5rem auto -3.5rem; filter: drop-shadow(0 10px 12px rgb(46 58 64 / 0.2)); }
@media (max-width: 860px) {
  .commission { grid-template-columns: 1fr; }
  .commission__aside img { display: none; }
}

.steps-list { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1rem; }
.steps-list li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  line-height: 1.45;
}
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0.1rem;
  display: grid;
  place-items: center;
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--custard);
  font-weight: 700;
  line-height: 1;
}

.thanks { text-align: center; padding: 2rem 1rem; outline: none; }
.thanks .mark { color: var(--orange); animation: spin-in 0.9s cubic-bezier(0.2, 1.4, 0.4, 1); }
.thanks h2 { margin: 0.75rem 0; }
.thanks .btn { margin-top: 1.25rem; }

/* ------------------------------------------------------------------ about */

.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.about__logo {
  overflow: hidden;
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: var(--logo-ground);
  transform: rotate(-1.5deg);
  box-shadow: 8px 8px 0 var(--ink);
}
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .about__logo { max-width: 320px; }
}

.prose h2 { margin: 2rem 0 0.75rem; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.prose h2:first-child { margin-top: 0; }
.prose p { max-width: 36em; }

.faq { display: grid; gap: 0.75rem; }
.faq details {
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius);
  background: var(--custard);
  overflow: hidden;
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--custard);
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: color-mix(in srgb, var(--mushroom) 35%, var(--custard)); }
.faq details p { padding: 0 1.25rem 1.2rem; max-width: 40em; }

/* --------------------------------------------------------------- policies */

.policy-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
/* Leave room for the sticky header when jumping to a section */
.policy { scroll-margin-top: 5rem; }
.policy .notice { margin-bottom: 1.25rem; }
.policy p + p { margin-top: 1rem; }

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

.site-footer {
  margin-top: clamp(1rem, 4vw, 3rem);
  background: var(--ink);
  color: var(--custard);
}
.section--paper + .site-footer, main > .section--paper:last-child { margin-top: 0; }
main:has(> .section--paper:last-child) + .site-footer { margin-top: 0; }
main > .section--paper:last-child { border-bottom: 0; }

.site-footer__inner {
  display: grid;
  grid-template-columns: 150px repeat(2, minmax(0, 1fr)) minmax(0, 1.3fr);
  gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2.5rem, 5vw, 4rem) 2rem;
}
.site-footer__logo {
  display: block;
  align-self: start;
  overflow: hidden;
  border: var(--line-thin) solid var(--custard);
  border-radius: 18px;
  transform: rotate(-3deg);
  transition: transform 0.2s ease;
}
.site-footer__logo:hover { transform: rotate(0deg); }
.site-footer__title {
  margin-bottom: 0.9rem;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--egg);
}
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--perfume); text-decoration: underline; }
.site-footer__note .mark { width: 3rem; height: 3rem; margin-bottom: 0.6rem; color: var(--mushroom); }
.site-footer__note p { font-size: 1.2rem; font-weight: 700; line-height: 1.3; max-width: 18em; }
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: 1.25rem 1.75rem;
  border-top: 2px solid rgb(253 233 172 / 0.3);
  font-size: 0.9rem;
}
.site-footer__base p { margin: 0; }

@media (max-width: 860px) {
  .site-footer__inner { grid-template-columns: 110px 1fr 1fr; }
  .site-footer__note { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__logo { width: 110px; grid-column: 1 / -1; }
}

/* ==========================================================================
   Studio: the admin panel (/admin)
   Same leaded-panel language as the shop, tuned for getting work done:
   plain lists, big labels, one obvious button per page.
   ========================================================================== */

.studio {
  padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem);
  overflow-x: clip;  /* the save bar's background reaches past both edges */
}
.studio-section { margin-top: clamp(2.5rem, 5vw, 3.5rem); }

.studio-badge {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--custard);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}

/* The admin menu has more entries than the shop's. On a medium-width screen
   it wraps onto a second line rather than running off the edge. */
@media (min-width: 761px) {
  .studio-badge ~ .site-nav { flex-wrap: wrap; justify-content: flex-end; min-width: 0; }
}
.site-nav__form { display: contents; }
.site-nav__form button {
  padding: 0.6rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--custard);
  font: 700 0.95rem/1 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.site-nav__form button:hover { background: var(--perfume); color: var(--ink-deep); }
@media (max-width: 760px) {
  .site-nav__form button { padding: 1rem; font-size: 1.1rem; }
  .studio-badge { margin-right: auto; }
  .studio-badge ~ .nav-toggle { margin-left: 0; }
  .site-header__inner:has(.studio-badge) .brand { margin-right: 0; }
}

.studio-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.studio-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.studio-head .lede { margin-top: 0.75rem; font-size: 1.1rem; }

.studio-footer { border-top: var(--line) solid var(--ink); }
.studio-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: 1.1rem 1.5rem;
  font-size: 0.92rem;
}
.studio-footer p { margin: 0; }
.studio-footer a { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; }

.notice--flash { margin-bottom: 1.5rem; font-size: 1.02rem; }

.hint { margin: 0; font-size: 0.9rem; line-height: 1.4; color: var(--slate); }
.optional { margin-left: 0.3rem; font-size: 0.82rem; font-weight: 400; color: var(--slate); }
.warn { display: block; margin-top: 0.15rem; font-size: 0.9rem; font-weight: 700; color: var(--error); }

/* --- dashboard panes --- */

.window--stats { grid-template-columns: 1fr 1fr 0.7fr; }
@media (max-width: 760px) { .window--stats { grid-template-columns: 1fr; } }

.pane--stat {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 190px;
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  background: color-mix(in srgb, var(--tint) 62%, var(--paper));
  color: var(--ink-deep);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.pane--stat:hover { background: color-mix(in srgb, var(--tint) 85%, var(--paper)); color: var(--ink-deep); }
.pane--stat .mark { width: 3rem; height: 3rem; margin-bottom: 0.5rem; }
.stat__number { font-size: clamp(3.5rem, 7vw, 5rem); font-weight: 700; line-height: 0.9; }
.stat__label { font-size: 1.25rem; font-weight: 700; line-height: 1.15; }
.stat__more { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: auto; padding-top: 0.75rem; font-size: 0.95rem; font-weight: 700; }
@media (max-width: 760px) { .pane--stat { min-height: 0; } }

/* --- lists of listings, orders and people --- */

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: var(--paper);
}

.row {
  position: relative;
  display: grid;
  align-items: center;
  gap: 0.6rem 1.25rem;
  padding: 0.9rem 1.1rem;
  border-bottom: var(--line-thin) solid var(--ink);
}
.row:last-child { border-bottom: 0; }
.row--listing { grid-template-columns: 68px minmax(0, 1fr) auto auto; }
.row--gallery { grid-template-columns: 68px minmax(0, 1fr) auto; }
.row--order { grid-template-columns: 9.5rem minmax(0, 1fr) auto 7.25rem; }
.row--person { grid-template-columns: minmax(0, 1fr) auto auto; }
.row--review { grid-template-columns: minmax(0, 1fr) auto; }
.row--inquiry { grid-template-columns: 11rem minmax(0, 1fr) 7.25rem; }
.row--order:hover, .row--inquiry:hover { background: color-mix(in srgb, var(--egg) 30%, var(--paper)); }

.row__thumb {
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: var(--line-thin) solid var(--ink);
  border-radius: 12px;
  background: color-mix(in srgb, var(--tint) 42%, var(--paper));
}
.row__thumb img { width: 100%; height: 100%; object-fit: contain; }
.row.is-hidden .row__thumb, .row.is-hidden .row__title { opacity: 0.55; }

.row__main { display: grid; gap: 0.2rem; min-width: 0; }
.row__title { font-size: 1.15rem; font-weight: 700; line-height: 1.15; text-decoration: none; }
.row__title:hover { text-decoration: underline; }
.row__who { font-weight: 700; }
.row__meta { font-size: 0.9rem; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.row__tags:empty { display: none; }
.row__figures { display: grid; gap: 0.1rem; text-align: right; }
.row__price { font-size: 1.1rem; font-weight: 700; }
.row__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem 0.9rem; }

/* The whole order row is one link */
.row__link { display: grid; gap: 0.2rem; text-decoration: none; }
.row__link::after { content: ""; position: absolute; inset: 0; }
.row--order .tag, .row--inquiry .tag { justify-self: end; }

@media (max-width: 760px) {
  .row--listing { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .row--listing .row__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .row--gallery { grid-template-columns: 56px minmax(0, 1fr); }
  .row--gallery .row__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .row--order { grid-template-columns: minmax(0, 1fr) auto; }
  .row--order .row__main { grid-column: 1 / -1; grid-row: 2; }
  .row--order .row__price { grid-column: 1; grid-row: 3; }
  .row--order .tag { grid-column: 2; grid-row: 1; }
  .row--inquiry { grid-template-columns: minmax(0, 1fr) auto; }
  .row--inquiry .row__main { grid-column: 1 / -1; grid-row: 2; }
  .row--inquiry .tag { grid-column: 2; grid-row: 1; }
  .row--person { grid-template-columns: minmax(0, 1fr) auto; }
  .row--person .row__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .row--review { grid-template-columns: minmax(0, 1fr); }
  .row--review .row__actions { justify-content: flex-start; }
}

.tag--new { background: var(--perfume); color: var(--ink-deep); }
.tag--paid { background: var(--egg); color: var(--ink-deep); }
.tag--shipped { background: var(--mushroom); color: var(--ink-deep); }
.tag--completed { background: color-mix(in srgb, var(--olive) 60%, var(--paper)); color: var(--ink-deep); }
.tag--cancelled { background: var(--paper); color: var(--slate); border-style: dashed; }
.tag--large { padding: 0.55rem 1.1rem; font-size: 1rem; }

.chip__count { margin-left: 0.3rem; font-style: normal; opacity: 0.7; }

.search input {
  width: min(100%, 16rem);
  padding: 0.6rem 1rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-deep);
  font: 400 0.98rem/1.1 var(--font);
}
.search input::placeholder { color: var(--slate); opacity: 1; }

.pager { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* --- cards and forms --- */

.card-pane {
  padding: clamp(1.1rem, 3vw, 1.9rem);
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: var(--paper);
}
.card-pane > h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  font-size: 1.55rem;
}
.card-pane > h2 .step__number { width: 2.2rem; height: 2.2rem; font-size: 1.05rem; }
.card-pane > * + .field, .card-pane > * + .field-row, .card-pane > * + .check, .card-pane > * + .more-options { margin-top: 1.1rem; }
.card-pane--tint { background: color-mix(in srgb, var(--tint) 50%, var(--paper)); color: var(--ink-deep); }
.card-pane--narrow { max-width: 640px; }

fieldset.field { margin-inline: 0; padding: 0; border: 0; }
fieldset.field legend { padding: 0; margin-bottom: 0.5rem; font-weight: 700; }
fieldset.field .check + .check { margin-top: 0.5rem; }
.form__subhead { margin-top: 0.75rem; font-size: 1.3rem; }

.listing-form { display: grid; gap: 1.25rem; max-width: 1000px; }
.listing-form__split {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
}
@media (max-width: 760px) { .listing-form__split { grid-template-columns: 1fr; } }

.photo-box {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  max-height: 420px;
  width: 100%;
  overflow: hidden;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--tint, var(--egg)) 42%, var(--paper));
}
.photo-box img { width: 100%; height: 100%; object-fit: contain; }
.photo-box__empty { display: grid; justify-items: center; gap: 0.5rem; margin: 0; font-weight: 700; color: var(--slate); }
.photo-box__empty .mark { width: 3.5rem; height: 3.5rem; color: color-mix(in srgb, var(--ink) 35%, transparent); }

/* The photo box takes on whichever background colour is picked further down */
.listing-form:has(input[name="tint"][value="custard"]:checked) .photo-box { --tint: var(--custard); }
.listing-form:has(input[name="tint"][value="perfume"]:checked) .photo-box { --tint: var(--perfume); }
.listing-form:has(input[name="tint"][value="teal"]:checked) .photo-box { --tint: var(--teal); }
.listing-form:has(input[name="tint"][value="egg"]:checked) .photo-box { --tint: var(--egg); }
.listing-form:has(input[name="tint"][value="pear"]:checked) .photo-box { --tint: var(--pear); }
.listing-form:has(input[name="tint"][value="orange"]:checked) .photo-box { --tint: var(--orange); }
.listing-form:has(input[name="tint"][value="mushroom"]:checked) .photo-box { --tint: var(--mushroom); }
.listing-form:has(input[name="tint"][value="olive"]:checked) .photo-box { --tint: var(--olive); }

.field input[type="file"] { padding: 0.5rem; font-size: 0.95rem; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  margin-right: 0.8rem;
  padding: 0.55rem 0.95rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: 999px;
  background: var(--mushroom);
  color: var(--ink-deep);
  font: 700 0.9rem/1 var(--font);
  cursor: pointer;
}

.money-input {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius-small);
  background: var(--field);
}
.money-input span { display: grid; place-items: center; padding-inline: 0.9rem; background: var(--custard); border-right: var(--line-thin) solid var(--ink); font-weight: 700; font-size: 1.15rem; }
.field .money-input input { border: 0; border-radius: 0; }
.field.has-error .money-input { border-color: var(--pear); }

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius-small);
  background: var(--field);
  line-height: 1.4;
  cursor: pointer;
}
.check input { width: 1.35rem; height: 1.35rem; margin: 0.1rem 0 0; accent-color: var(--pear); cursor: pointer; }
.check strong { display: block; }
.check:has(input:checked) { background: color-mix(in srgb, var(--egg) 35%, var(--field)); }

.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; max-width: 34rem; }
.swatch { position: relative; display: grid; gap: 0.35rem; cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch__colour {
  display: block;
  height: 3.25rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius-small);
  background: var(--tint);
}
.swatch__name { font-size: 0.88rem; font-weight: 700; line-height: 1.2; }
.swatch input:checked + .swatch__colour { box-shadow: inset 0 0 0 4px var(--paper), 4px 4px 0 var(--ink); }
.swatch input:checked ~ .swatch__name { text-decoration: underline; text-decoration-thickness: 2px; }
.swatch input:focus-visible + .swatch__colour { outline: 3px solid var(--teal); outline-offset: 3px; }

.more-options summary { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; cursor: pointer; }
.more-options .field { margin-top: 1rem; max-width: 16rem; }

/* Home page wording: a sentence or two needs less room than a description */
.field textarea.wording__long { min-height: 7.5rem; }
.field textarea.wording__paragraphs { min-height: 14rem; }
.wording__picture .photo-box { max-width: 260px; --tint: var(--teal); }
.wording__picture .check { margin-top: 0.75rem; }

/* Save and Cancel stay within reach in a bar along the bottom of the window */
.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  isolation: isolate;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 0.9rem 1.1rem;
}
.form-actions::before {
  content: "";
  position: absolute;
  inset: 0 -100vmax;
  z-index: -1;
  background: var(--custard);
  border-top: var(--line) solid var(--ink);
}
.form-actions--plain { position: static; margin-top: 0.5rem; padding: 0; }
.form-actions--plain::before { content: none; }

/* Deleting takes two deliberate clicks */
.danger { margin-top: 2.25rem; }
.danger__confirm {
  display: none;
  max-width: 640px;
  padding: 1.1rem 1.25rem 1.25rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--perfume) 45%, var(--paper));
  color: var(--ink-deep);
}
.danger__confirm .actions { margin-top: 1rem; }
.danger.is-confirming .danger__confirm { display: block; }
.danger.is-confirming .danger__ask { display: none; }
/* The same two clicks inside a form (Backup), where the first is the form's own button */
.danger--inline { margin-top: 1.5rem; }
.card-pane > p + p { margin-top: 0.75rem; }

/* --- sign in and set-up --- */

.auth-card {
  max-width: 460px;
  margin: clamp(1rem, 5vw, 3.5rem) auto 0;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: var(--line) solid var(--ink);
  border-radius: calc(var(--radius) + 8px);
  background: var(--paper);
  text-align: center;
}
.auth-card--wide { max-width: 620px; }
.auth-card .mark { color: var(--orange); }
.auth-card h1 { margin: 0.5rem 0 0.75rem; font-size: clamp(2rem, 5vw, 2.75rem); }
.auth-card .lede { margin-inline: auto; font-size: 1.08rem; }
.auth-card .form { margin-top: 1.5rem; text-align: left; }
.auth-card > .fine { margin-top: 1.25rem; }

/* --- one order --- */

.order {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.order__main, .order__side { display: grid; gap: 1.25rem; }
@media (max-width: 860px) {
  .order { grid-template-columns: 1fr; }
  .order__side { grid-row: 1; }
}

.status-picker { display: grid; gap: 0.5rem; margin-bottom: 0.9rem; }
.status-picker__option {
  padding: 0.75rem 1rem;
  border: var(--line-thin) solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 700 1rem/1.1 var(--font);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.status-picker__option:hover:not(:disabled) { background: var(--custard); }
.status-picker__option.is-current { background: var(--ink); color: var(--custard); cursor: default; }
.status-picker__option.is-current::after { content: " (now)"; font-weight: 400; }

.facts { margin: 0; display: grid; gap: 0.75rem; }
.facts dt { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); }
.facts dd { margin: 0.1rem 0 0; }
.address, .quote { white-space: pre-line; }
.quote { padding-left: 1rem; border-left: var(--line) solid var(--perfume); }

/* ----------------------------------------------------------------- motion */

@keyframes sway {
  0% { rotate: 0deg; }
  25% { rotate: -3.2deg; }
  50% { rotate: 2.2deg; }
  75% { rotate: -1.1deg; }
  100% { rotate: 0deg; }
}

@keyframes settle {
  0% { rotate: 4deg; }
  30% { rotate: -2.6deg; }
  55% { rotate: 1.6deg; }
  78% { rotate: -0.7deg; }
  100% { rotate: 0deg; }
}

@keyframes drift {
  from { translate: -3% -2%; }
  to { translate: 4% 3%; }
}

@keyframes hop {
  0%, 100% { transform: none; }
  40% { transform: translateY(-5px) scale(1.15); }
}

@keyframes spin-in {
  from { rotate: -120deg; scale: 0.4; opacity: 0; }
  to { rotate: 0deg; scale: 1; opacity: 1; }
}

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