/* Cinnabar Glass — "light through leaded glass".
   Dark lead-came surfaces, jewel-tone glass, warm parchment type. */

/* Licensed web font, used only for the company name. */
@font-face {
  font-family: 'Cheddar Gothic Serif';
  src:
    url('/fonts/cheddargothic-serif-webfont.woff2') format('woff2'),
    url('/fonts/cheddargothic-serif-webfont.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --lead: #121013;
  --lead-raised: #1a171b;
  --lead-high: #252026;
  --came: #060506;
  --came-edge: #3b3337;
  --parchment: #f3eadb;
  --parchment-dim: #c6b9a6;
  --parchment-faint: #8f8375;

  --cinnabar: #e34234;
  --cinnabar-bright: #ff6b4f;
  --cinnabar-deep: #9b2317;
  --amber: #f2a93b;
  --gold: #dcb75e;
  --cobalt: #3a6bd8;
  --emerald: #25a273;
  --amethyst: #9159cc;
  --rose: #d94a80;

  --ok: #53c891;
  --danger: #ff6b4f;

  --font-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Mulish', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Cheddar Gothic Serif', 'Cinzel', Georgia, serif;

  --radius: 5px;
  --max: 1180px;
  --frame: 0 0 0 1px var(--came-edge), 0 22px 44px -24px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

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

/* Keep the hidden attribute working on elements that set their own display. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--lead);
  color: var(--parchment);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Faint pools of coloured light, as if cast through windows. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 88% -12%, rgba(227, 66, 52, 0.13), transparent 62%),
    radial-gradient(900px 520px at -12% 18%, rgba(58, 107, 216, 0.1), transparent 62%),
    radial-gradient(900px 640px at 50% 118%, rgba(242, 169, 59, 0.08), transparent 62%);
}

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

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--cinnabar-bright);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

.container {
  width: min(var(--max), 100% - 2rem);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--cinnabar);
  color: #fff;
  border-radius: var(--radius);
}

.skip-link:focus {
  left: 0.5rem;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.9rem;
}

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.45;
  color: var(--parchment-dim);
  max-width: 38ch;
}

.muted {
  color: var(--parchment-dim);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.75rem 1.35rem;
  border: 2px solid var(--came);
  border-radius: var(--radius);
  font: 700 0.82rem/1 var(--font-body);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, var(--cinnabar-bright), var(--cinnabar) 48%, var(--cinnabar-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25),
    0 0 0 1px var(--came-edge),
    0 10px 26px -12px rgba(227, 66, 52, 0.8);
  transition: filter 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn:hover {
  color: #fff;
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.25),
    0 0 0 1px var(--came-edge),
    0 12px 32px -10px rgba(255, 107, 79, 0.95);
}

.btn:active {
  transform: translateY(1px);
}

/* Switched off: a disabled button, or a button-styled link with nowhere to go
   (the commission button while commissions are closed, or whenever its
   address couldn't be loaded). */
.btn[disabled],
.btn[disabled]:hover,
a.btn:not([href]),
a.btn:not([href]):hover {
  cursor: not-allowed;
  filter: grayscale(1) brightness(0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 0 1px var(--came-edge);
  transform: none;
}

.btn-ghost {
  color: var(--parchment);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(243, 234, 219, 0.28);
  box-shadow: none;
}

.btn-ghost:hover {
  color: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 0 22px -8px rgba(242, 169, 59, 0.7);
}

.btn-block {
  width: 100%;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(14, 12, 15, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--came);
  box-shadow: 0 1px 0 var(--came-edge);
}

.transom {
  height: 14px;
  overflow: hidden;
  border-bottom: 2px solid var(--came);
}

.transom svg {
  width: 100%;
  height: 100%;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--parchment);
  text-decoration: none;
  margin-right: auto;
}

.brand:hover {
  color: var(--parchment);
}

.brand-mark {
  width: auto;
  height: 56px;
  filter: drop-shadow(0 0 10px rgba(227, 66, 52, 0.45));
}

.brand-name {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: 0.03em;
}

/* The company name used as a heading. */
.wordmark {
  font-family: var(--font-brand);
  font-weight: 400;
  font-size: clamp(2.3rem, 4.8vw, 3.4rem);
  letter-spacing: 0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.84rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current='page'] {
  color: var(--parchment);
  border-bottom-color: var(--cinnabar);
}

.cart-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(243, 234, 219, 0.25);
  border-radius: var(--radius);
  background: transparent;
  color: var(--parchment);
  font: 600 0.8rem var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.cart-button:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--cinnabar);
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.cart-count[data-empty='true'] {
  background: var(--lead-high);
  color: var(--parchment-faint);
}

.nav-toggle {
  display: none;
  min-height: 42px;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(243, 234, 219, 0.25);
  border-radius: var(--radius);
  background: transparent;
  color: var(--parchment);
  font: 600 0.8rem var(--font-body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  /* Logo and name, then Menu and Cart, with the links opening in a row below.
     When the row is tight (a narrow window, larger text, or a wider stand-in
     font while the brand font loads), the name wraps to two lines and nothing
     else moves. */
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: minmax(60px, auto);
    gap: 0 0.6rem;
    min-height: 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }

  .brand-mark {
    height: 44px;
  }

  .brand-name {
    font-size: 1.3rem;
  }

  .nav-links {
    display: none;
    order: 3;
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 0.75rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.8rem 0.25rem;
    border-bottom: 1px solid rgba(243, 234, 219, 0.08);
  }
}

/* Phones: tighter spacing keeps the name on one line. Below about 384px wide the
   logo, name and button padding also shrink with the screen, smallest at 320px. */
@media (max-width: 410px) {
  .nav {
    column-gap: 0.45rem;
  }

  .nav .brand {
    gap: 0.5rem;
  }

  .nav .brand-mark {
    height: clamp(32px, 20vw - 32px, 44px);
  }

  .nav .brand-name {
    font-size: clamp(0.9rem, 10vw - 17.6px, 1.3rem);
  }

  .nav-toggle,
  .cart-button {
    padding-inline: clamp(0.5rem, 2.5vw, 0.6rem);
    letter-spacing: 0.06em;
  }

  .cart-button {
    gap: 0.35rem;
  }
}

/* ---------- Sections & dividers ---------- */

main {
  flex: 1;
}

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 2.2rem;
}

.section-head h2 {
  margin: 0;
}

.jewel-divider {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0.4rem 0 1.4rem;
  color: var(--cinnabar);
}

.jewel-divider::before,
.jewel-divider::after {
  content: '';
  flex: 0 0 70px;
  height: 3px;
  background: var(--came-edge);
  border-radius: 2px;
}

.jewel-divider span {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: currentColor;
  border: 2px solid var(--came);
  box-shadow: 0 0 12px currentColor;
}

.page-intro {
  padding: clamp(3rem, 7vw, 5rem) 0 1.5rem;
}

.page-intro .lede {
  max-width: 52ch;
}

/* The words at the top of the Shop and Gallery pages, formatted on the admin's
   Pages tab (and shown the same way in its editor). */
.page-copy ul,
.page-copy ol {
  color: inherit;
}

.page-copy h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  margin-top: 1.4em;
}

.page-copy h3 {
  font-size: 1.05rem;
  margin-top: 1.2em;
}

.page-copy blockquote {
  font-style: italic;
}

/* ---------- Hero ---------- */

.hero {
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
  /* The window's glow spills sideways; without this it adds a horizontal
     scrollbar on screens around 1000px wide. */
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--cinnabar-bright);
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.lancet-wrap {
  position: relative;
  justify-self: center;
  width: min(100%, 400px);
}

.lancet-glow {
  position: absolute;
  inset: 8% -18% -6%;
  z-index: -1;
  background:
    radial-gradient(closest-side, rgba(242, 169, 59, 0.42), transparent),
    radial-gradient(closest-side at 30% 70%, rgba(227, 66, 52, 0.4), transparent),
    radial-gradient(closest-side at 70% 40%, rgba(58, 107, 216, 0.35), transparent);
  filter: blur(36px);
  animation: breathe 9s ease-in-out infinite alternate;
}

.lancet-floor {
  height: 46px;
  margin: 10px 6% 0;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(58, 107, 216, 0.35), rgba(242, 169, 59, 0.45), rgba(227, 66, 52, 0.4));
  filter: blur(18px);
  opacity: 0.8;
}

.lancet svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.75));
}

/* A photo from the admin in place of the generated window. The mask and the
   lead frame trace the same pointed arch (see archPath in js/glass.js). */
.lancet.has-photo {
  position: relative;
  aspect-ratio: 400 / 660;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.75));
}

.lancet.has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-mask: url('/img/lancet-mask.svg') center / 100% 100% no-repeat;
  mask: url('/img/lancet-mask.svg') center / 100% 100% no-repeat;
}

.lancet.has-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/img/lancet-frame.svg') center / 100% 100% no-repeat;
  pointer-events: none;
}

@keyframes breathe {
  from {
    opacity: 0.7;
    transform: scale(0.97) translateX(-2%);
  }
  to {
    opacity: 1;
    transform: scale(1.04) translateX(2%);
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .lancet-wrap {
    width: min(78%, 320px);
    order: -1;
  }
}

/* ---------- Cards & grids ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(1.1rem, 2.4vw, 1.8rem);
}

.card {
  --accent: var(--cinnabar);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--lead-raised);
  border: 3px solid var(--came);
  border-radius: 7px;
  box-shadow: var(--frame);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

a.card:hover,
.card:focus-within {
  color: inherit;
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px var(--came-edge),
    0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent),
    0 26px 50px -22px color-mix(in srgb, var(--accent) 70%, transparent);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #0b0a0c;
  border-bottom: 3px solid var(--came);
  overflow: hidden;
}

.card-media > img,
.card-media > video,
.card-media > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.6s ease,
    filter 0.4s ease;
}

a.card:hover .card-media > img {
  transform: scale(1.03);
  filter: brightness(1.08) saturate(1.08);
}

.card-body {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 1.15rem 1.2rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  margin: 0;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.card-delivery {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--parchment-dim);
}

.price {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--amber);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.6rem;
  border-radius: 99px;
  border: 1px solid currentColor;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ok);
  white-space: nowrap;
}

.pill-sold {
  color: var(--parchment-faint);
}

.pill-order {
  color: var(--cobalt);
  filter: brightness(1.35);
}

.ribbon {
  position: absolute;
  top: 18px;
  left: -44px;
  z-index: 2;
  width: 160px;
  padding: 0.3rem 0;
  transform: rotate(-38deg);
  background: var(--cinnabar-deep);
  border-block: 2px solid var(--came);
  color: #fff;
  text-align: center;
  font: 700 0.72rem var(--font-body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.card.is-sold .card-media > img {
  filter: grayscale(0.35) brightness(0.8);
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  border: 2px dashed var(--came-edge);
  border-radius: 8px;
  color: var(--parchment-dim);
}

/* ---------- Shop toolbar ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  min-height: 38px;
  padding: 0.4rem 0.95rem;
  border: 1px solid rgba(243, 234, 219, 0.22);
  border-radius: 99px;
  background: transparent;
  color: var(--parchment-dim);
  font: 600 0.8rem var(--font-body);
  letter-spacing: 0.06em;
  cursor: pointer;
}

.chip[aria-pressed='true'] {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
  color: #fff;
}

.select {
  min-height: 40px;
  padding: 0.4rem 2rem 0.4rem 0.8rem;
  border: 1px solid rgba(243, 234, 219, 0.22);
  border-radius: var(--radius);
  background: var(--lead-raised);
  color: var(--parchment);
  font: 500 0.88rem var(--font-body);
}

/* ---------- Product page ---------- */

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
  padding: clamp(2rem, 5vw, 3.5rem) 0 4rem;
}

.viewer {
  display: grid;
  gap: 0.8rem;
}

.viewer-stage {
  position: relative;
  aspect-ratio: 4 / 5;
  /* A softly lit light table behind photos that don't fill the frame. */
  background: radial-gradient(120% 90% at 50% 45%, #29232b, #0b0a0c 72%);
  border: 4px solid var(--came);
  border-radius: 8px;
  box-shadow: var(--frame);
  overflow: hidden;
}

.viewer-stage img,
.viewer-stage video,
.viewer-stage svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.thumbs {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
}

.thumb {
  position: relative;
  flex: 0 0 74px;
  height: 74px;
  padding: 0;
  border: 3px solid var(--came);
  border-radius: 5px;
  background: #0b0a0c;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.65;
}

.thumb[aria-current='true'] {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--amber);
}

.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb .play-badge {
  width: 26px;
  height: 26px;
}

.product-info h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.product-info .price {
  font-size: 2rem;
}

.delivery-note {
  max-width: 46ch;
  margin: 1.1rem 0 0;
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--emerald);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: rgba(255, 255, 255, 0.03);
  color: var(--parchment-dim);
  font-size: 0.92rem;
}

.delivery-note strong {
  color: var(--parchment);
}

.delivery-note[data-delivery='pickup'] {
  border-left-color: var(--amber);
}

.buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin: 1.4rem 0;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(243, 234, 219, 0.25);
  border-radius: var(--radius);
}

.qty button {
  width: 42px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--parchment);
  font-size: 1.2rem;
  cursor: pointer;
}

.qty output {
  min-width: 2.2rem;
  text-align: center;
  font-weight: 700;
}

.details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.2rem;
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(243, 234, 219, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}

.details dt {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment-faint);
  padding-top: 0.15rem;
}

.details dd {
  margin: 0;
}

.prose p {
  color: var(--parchment-dim);
}

/* Text the admin writes in an editor, such as the terms of service. */
.prose h2 {
  margin-top: 2.2rem;
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
}

.prose h3 {
  margin-top: 1.6rem;
}

.prose > :first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.4rem;
  color: var(--parchment-dim);
}

.prose li {
  margin-bottom: 0.4em;
}

.prose li::marker {
  color: var(--amber);
}

.prose strong {
  color: var(--parchment);
}

.prose blockquote {
  margin: 0 0 1em;
  padding: 0.3rem 0 0.3rem 1.1rem;
  border-left: 3px solid var(--cinnabar);
}

.prose hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid rgba(243, 234, 219, 0.15);
}

.container.narrow {
  width: min(780px, 100% - 2rem);
}

.terms {
  font-size: 1.04rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.journey-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border: 2px solid var(--came);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(58, 107, 216, 0.16), rgba(227, 66, 52, 0.14));
  text-decoration: none;
  color: var(--parchment);
}

.journey-link strong {
  font-family: var(--font-display);
  font-weight: 600;
}

@media (max-width: 860px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Gallery journeys ---------- */

.journey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(1.2rem, 2.6vw, 2rem);
}

.journey-card {
  --accent: var(--amber);
}

.journey-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #0b0a0c;
  border-bottom: 3px solid var(--came);
  overflow: hidden;
  touch-action: pan-y;
  cursor: zoom-in;
}

.journey-stage > img,
.journey-stage > video,
.journey-stage > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.journey-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 3.2rem 1rem 0.8rem;
  background: linear-gradient(rgba(6, 5, 6, 0), rgba(6, 5, 6, 0.74) 45%, rgba(6, 5, 6, 0.95));
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  font-size: 0.92rem;
  pointer-events: none;
}

.journey-step {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
}

.stage-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(6, 5, 6, 0.62);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.stage-nav:hover {
  background: var(--cinnabar);
}

.stage-nav.prev {
  left: 0.6rem;
}

.stage-nav.next {
  right: 0.6rem;
}

.journey-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.55rem 0.8rem 0;
}

.journey-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.journey-dot::before {
  content: '';
  width: 11px;
  height: 11px;
  transform: rotate(45deg);
  border: 2px solid var(--came);
  background: var(--dot, var(--amber));
  opacity: 0.4;
  transition:
    opacity 0.2s,
    box-shadow 0.2s;
}

.journey-dot[aria-current='true']::before {
  opacity: 1;
  box-shadow: 0 0 12px var(--dot, var(--amber));
}

.journey-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  font-size: 0.8rem;
  color: var(--parchment-faint);
  letter-spacing: 0.04em;
}

.journey-card .card-body {
  gap: 0.5rem;
}

.journey-card .card-body p {
  margin: 0;
  color: var(--parchment-dim);
  font-size: 0.95rem;
}

.text-button {
  justify-self: start;
  padding: 0.3rem 0;
  border: 0;
  border-bottom: 1px solid var(--came-edge);
  background: none;
  color: var(--amber);
  font: 700 0.78rem var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.text-button:hover {
  color: var(--cinnabar-bright);
  border-color: currentColor;
}

.play-badge {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(6, 5, 6, 0.65);
  border: 2px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.play-badge::before {
  content: '';
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 7, 8, 0.97);
  color: var(--parchment);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.lightbox-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  height: 100%;
}

.lightbox-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 0;
  padding: 1rem;
  gap: 0.7rem;
}

.lightbox-stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  touch-action: pan-y;
}

.lightbox-stage img,
.lightbox-stage video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 4px solid var(--came);
  border-radius: 6px;
  box-shadow: 0 0 0 1px var(--came-edge);
}

.lightbox-caption {
  text-align: center;
  min-height: 2.6em;
}

.lightbox-caption p {
  margin: 0.2rem 0 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

.lightbox-panel {
  overflow-y: auto;
  padding: 3.6rem 1.6rem 2rem;
  border-left: 3px solid var(--came);
  background: var(--lead-raised);
}

.lightbox-panel h2 {
  font-size: 1.7rem;
}

.lightbox-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(6, 5, 6, 0.75);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.filmstrip {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.2rem;
}

.filmstrip .thumb {
  flex-basis: 64px;
  height: 64px;
}

@media (max-width: 900px) {
  .lightbox-inner {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(52dvh, 1fr) auto;
    overflow-y: auto;
  }

  .lightbox-panel {
    border-left: 0;
    border-top: 3px solid var(--came);
    padding-top: 1.6rem;
    overflow: visible;
  }
}

/* ---------- Cart drawer ---------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.cart-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 61;
  display: flex;
  flex-direction: column;
  width: min(420px, 100vw);
  background: var(--lead-raised);
  border-left: 3px solid var(--came);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
  transform: translateX(105%);
  transition: transform 0.3s ease;
}

body.cart-open .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

body.cart-open .cart-drawer {
  transform: none;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.3rem;
  border-bottom: 3px solid var(--came);
}

.drawer-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(243, 234, 219, 0.2);
  border-radius: 50%;
  background: transparent;
  color: var(--parchment);
  font-size: 1.2rem;
  cursor: pointer;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.3rem;
}

.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(243, 234, 219, 0.08);
}

.cart-line .thumb-box {
  width: 64px;
  height: 64px;
  border: 2px solid var(--came);
  border-radius: 4px;
  overflow: hidden;
  background: #0b0a0c;
}

.cart-line .thumb-box img,
.cart-line .thumb-box svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-line-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.cart-line-meta {
  font-size: 0.82rem;
  color: var(--parchment-faint);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--parchment-faint);
  font: 600 0.75rem var(--font-body);
  letter-spacing: 0.06em;
  text-decoration: underline;
  cursor: pointer;
}

.drawer-foot {
  padding: 1.1rem 1.3rem 1.4rem;
  border-top: 3px solid var(--came);
  display: grid;
  gap: 0.7rem;
}

.subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--parchment-dim);
}

.drawer-foot p {
  margin: 0;
}

/* Checkout details, the cart's second step */
.buyer-form {
  display: grid;
  gap: 0.85rem;
}

.buyer-form h3 {
  margin: 0.4rem 0 0;
}

.buyer-form p {
  margin: 0;
}

.buyer-form .link-button {
  justify-self: start;
}

.buyer-field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.buyer-field input {
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(243, 234, 219, 0.22);
  border-radius: var(--radius);
  background: var(--lead);
  color: var(--parchment);
  font: 500 1rem var(--font-body);
}

.buyer-field input:focus-visible {
  border-color: var(--amber);
  outline-offset: 1px;
}

.optional {
  font-weight: 400;
  color: var(--parchment-faint);
}

.delivery-box {
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(243, 234, 219, 0.12);
  border-left: 3px solid var(--emerald);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.88rem;
  color: var(--parchment-dim);
}

.delivery-box strong {
  color: var(--parchment);
}

.buyer-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  cursor: pointer;
}

.buyer-check input {
  flex: none;
  width: 20px;
  height: 20px;
  accent-color: var(--cinnabar);
}

.small {
  font-size: 0.8rem;
  color: var(--parchment-faint);
}

.notice {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(242, 169, 59, 0.5);
  background: rgba(242, 169, 59, 0.08);
  color: var(--parchment);
  font-size: 0.88rem;
}

.notice-error {
  border-color: rgba(255, 107, 79, 0.6);
  background: rgba(255, 107, 79, 0.1);
}

/* ---------- Order page ---------- */

.order-page h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.order-page .lede {
  max-width: 46ch;
}

.order-page[data-status='canceled'] h1 {
  color: var(--parchment-dim);
}

/* Progress along the leading, one jewel per step */
.order-steps {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.order-steps li {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.55rem;
  padding: 0 0.25rem;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--parchment-faint);
}

.order-steps li::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 50%;
  width: 100%;
  height: 3px;
  background: var(--came-edge);
}

.order-steps li:first-child::before {
  display: none;
}

.order-steps li.is-done,
.order-steps li.is-current {
  color: var(--parchment);
}

.order-steps li.is-done::before,
.order-steps li.is-current::before {
  background: var(--amber);
}

.step-dot {
  position: relative;
  width: 23px;
  height: 23px;
  border: 3px solid var(--came);
  border-radius: 50%;
  background: var(--lead-high);
  box-shadow: 0 0 0 1px var(--came-edge);
}

.is-done .step-dot {
  background: var(--amber);
}

.is-current .step-dot {
  background: var(--cinnabar);
  box-shadow: 0 0 0 1px var(--came-edge), 0 0 16px rgba(227, 66, 52, 0.75);
}

.tracking-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(58, 107, 216, 0.55);
  border-radius: var(--radius);
  background: rgba(58, 107, 216, 0.1);
}

.tracking-box p {
  margin: 0;
}

.tracking-number {
  font-size: 1.05rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  align-items: start;
  margin-top: 1.5rem;
}

.order-card {
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(243, 234, 219, 0.12);
  border-radius: var(--radius);
  background: var(--lead-raised);
}

.order-card h2 {
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.order-card > :last-child {
  margin-bottom: 0;
}

.timeline {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding-left: 1.3rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
}

.timeline li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1.05rem;
  bottom: -1rem;
  width: 1px;
  background: var(--came-edge);
}

.timeline time {
  display: block;
  font-size: 0.78rem;
  color: var(--parchment-faint);
}

.timeline strong {
  display: block;
}

.timeline-message {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--parchment-dim);
  overflow-wrap: break-word;
}

.timeline-message p {
  margin: 0 0 0.5em;
}

.timeline-message p:last-child {
  margin: 0;
}

.order-items {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.order-items li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(243, 234, 219, 0.08);
}

.order-totals {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
}

.order-totals div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--parchment-dim);
}

.order-totals dd {
  margin: 0;
}

.order-totals .order-total {
  margin-top: 0.2rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(243, 234, 219, 0.15);
  font-size: 1rem;
  font-weight: 700;
  color: var(--parchment);
}

.order-contact {
  margin-top: 2.5rem;
}

/* ---------- About / commissions ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.framed-glass {
  border: 4px solid var(--came);
  border-radius: 8px;
  box-shadow: var(--frame);
  overflow: hidden;
  aspect-ratio: 5 / 4;
}

.framed-glass svg {
  width: 100%;
  height: 100%;
}

.framed-glass img,
.commission-bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.commission {
  position: relative;
  padding: clamp(2rem, 5vw, 3.5rem);
  border: 4px solid var(--came);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--frame);
  isolation: isolate;
}

.commission-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.32;
}

.commission-bg svg {
  width: 100%;
  height: 100%;
}

.commission::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(18, 16, 19, 0.96) 30%, rgba(18, 16, 19, 0.55));
}

.commission .lede {
  max-width: 46ch;
}

/* The admin's note about commission availability, with a light that shows
   whether commissions are open. */
.commission-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: fit-content;
  max-width: 46ch;
  margin: 0;
  padding: 0.6rem 0.95rem;
  border: 1px solid rgba(242, 169, 59, 0.45);
  border-radius: var(--radius);
  background: rgba(18, 16, 19, 0.65);
  color: var(--parchment);
  font-size: 0.95rem;
  line-height: 1.5;
}

.commission-notice::before {
  content: '';
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  margin-top: 0.45em;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(242, 169, 59, 0.8);
}

.commission.is-open .commission-notice::before {
  background: #25a273;
  box-shadow: 0 0 10px rgba(37, 162, 115, 0.85);
}

.commission.is-closed .commission-notice::before {
  background: var(--parchment-faint);
  box-shadow: none;
}

.commission-notice:empty {
  display: none;
}

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

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 3rem;
  border-top: 3px solid var(--came);
  background: #0d0b0e;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding: 2.6rem 0 1.4rem;
}

.footer-grid h3 {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--parchment-faint);
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.footer-grid a {
  color: var(--parchment-dim);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--amber);
}

.footer-base {
  padding: 1rem 0 1.6rem;
  border-top: 1px solid rgba(243, 234, 219, 0.07);
  font-size: 0.8rem;
  color: var(--parchment-faint);
}

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

/* ---------- Toasts & loading ---------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  z-index: 100;
  display: grid;
  gap: 0.5rem;
  width: min(440px, calc(100vw - 2rem));
  transform: translateX(-50%);
}

.toast {
  padding: 0.85rem 1.1rem;
  border: 2px solid var(--came);
  border-left: 6px solid var(--ok);
  border-radius: var(--radius);
  background: var(--lead-high);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  font-size: 0.92rem;
  animation: toast-in 0.25s ease;
}

.toast-error {
  border-left-color: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.skeleton {
  min-height: 340px;
  border: 3px solid var(--came);
  border-radius: 7px;
  background: linear-gradient(100deg, var(--lead-raised) 40%, var(--lead-high) 50%, var(--lead-raised) 60%) 0 0 / 300% 100%;
  animation: shimmer 1.6s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -150% 0;
  }
}

/* ---------- Cropped videos ---------- */

/* A video framed in the admin's crop editor keeps its whole file; pages show
   it through the frame (cropAttrs in js/site.js). Covers and thumbnails keep
   the frame's position. Where a whole picture shows (a piece's page, the
   gallery lightbox), the video takes the frame's shape too. */
video.is-cropped {
  object-fit: cover;
  object-position: var(--crop-x, 50%) var(--crop-y, 50%);
}

.viewer-stage:has(> video.is-cropped),
.lightbox-stage:has(> video.is-cropped) {
  container-type: size;
}

.viewer-stage > video.is-cropped,
.lightbox-stage > video.is-cropped {
  width: min(100cqw, 100cqh * var(--crop-aspect));
  height: min(100cqh, 100cqw / var(--crop-aspect));
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.viewer-stage > video.is-cropped {
  position: absolute;
  inset: 0;
  margin: auto;
}

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