@font-face {
  font-family: "Vesper Gothic";
  src: url("assets/vesper-fraktur.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --soot: #100d0b;
  --black: #0c0a09;
  --panel: #1b1410;
  --ivory: #eedec8;
  --muted: #d1ba9f;
  --copper: #b39276;
  --rule: #8d705b;
  --wine: #51090c;
  --gothic: "Vesper Gothic", Georgia, serif;
  --serif: Baskerville, "Baskerville Old Face", Georgia, serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --grain: url("assets/paper-grain.png");
  background: var(--soot);
  color: var(--ivory);
  color-scheme: dark;
  font: 100%/1.52 var(--body);
  scroll-padding-top: 5.9rem;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { display: block; max-width: 100%; }
a, button { color: inherit; }
button { font: inherit; }
button:not(:disabled) { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: #682229; color: #fff3e2; }
:focus-visible { outline: 2px solid #e2ba92; outline-offset: 4px; }
.dialog-open { overflow: hidden; }

.admin-forbidden { min-height: 100vh; padding-block: 4rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.65rem 0.95rem;
  transform: translateY(-180%);
  background: var(--ivory);
  color: var(--black);
}

.skip-link:focus { transform: none; }
.shell { width: min(calc(100% - 2 * clamp(1rem, 5vw, 5rem)), 73rem); margin-inline: auto; }
h2, h3 { font-family: var(--serif); font-weight: 400; }

.masthead {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--rule);
  background: var(--black);
  background-image: var(--grain);
}

.masthead__inner {
  display: grid;
  min-height: clamp(3.8rem, 5.7vw, 5.2rem);
  grid-template-areas: "nav brand bag";
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem 0.95rem;
  padding-inline: clamp(1.05rem, 3.55vw, 4.4rem);
}

.masthead__nav {
  display: flex;
  grid-area: nav;
  align-items: center;
  gap: clamp(0.8rem, 4.35vw, 3.15rem);
}

.masthead__nav a, .bag-toggle, .site-footer nav a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font: 400 clamp(1.08rem, 2.1vw, 1.54rem)/1.1 var(--serif);
  white-space: nowrap;
  text-decoration: none;
  text-underline-offset: 0.23em;
}

.masthead__nav a:hover, .bag-toggle:hover, .site-footer nav a:hover { text-decoration: underline; }
.wordmark {
  display: inline-flex;
  grid-area: brand;
  min-height: 2.75rem;
  align-items: center;
  justify-self: center;
  gap: clamp(0.5rem, 1.2vw, 1rem);
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark { flex: none; width: clamp(1.65rem, 4.2vw, 3.25rem); height: auto; }
.wordmark__type {
  margin-inline: -0.49em;
  transform: scaleX(0.85);
  font: 400 clamp(1.85rem, 4.3vw, 3.45rem)/0.93 var(--gothic);
  letter-spacing: 0.012em;
  text-transform: uppercase;
}

.bag-toggle {
  grid-area: bag;
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}

.hero {
  --hero-height: clamp(31rem, min(72vw, 92svh), 66rem);
  position: relative;
  display: grid;
  min-height: var(--hero-height);
  isolation: isolate;
  overflow: clip;
  background: var(--black);
}

.hero__scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
}

.hero__portrait {
  position: absolute;
  top: 7%;
  left: 50%;
  width: min(80%, calc(var(--hero-height) * 0.58));
  transform: translateX(-50%);
}

.hero__portrait img {
  width: 100%;
  height: auto;
}

.hero__portrait::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--black), transparent 16%, transparent 84%, var(--black)),
    linear-gradient(180deg, var(--black), transparent 13%, transparent 85%, var(--black));
  pointer-events: none;
  content: "";
}

.hero__copy {
  position: absolute;
  right: 17%;
  bottom: 5.8%;
  left: 17%;
  text-align: center;
  text-shadow: 0 2px 14px #060403;
}

.hero h1 {
  font: 400 clamp(2.2rem, 5.15vw, 5.55rem)/1.02 var(--serif);
  letter-spacing: -0.042em;
  text-wrap: balance;
}

.hero__copy p {
  margin-top: clamp(0.4rem, 0.85vw, 0.8rem);
  font: 400 clamp(1.05rem, 2.48vw, 2.25rem)/1.1 var(--serif);
  letter-spacing: 0.018em;
}

.button {
  display: inline-flex;
  min-height: 2.95rem;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.3rem;
  border: 1px solid #b76861;
  background: var(--wine);
  color: #f4e4d1;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.button:hover { border-color: #dd9a83; background: #6a1518; }
.hero__button {
  min-height: clamp(2.95rem, 5vw, 4.85rem);
  margin-top: clamp(0.9rem, 1.9vw, 1.75rem);
  padding-inline: clamp(1.25rem, 3.15vw, 3rem);
  font-size: clamp(1.25rem, 2.48vw, 2.3rem);
}

.engraved-rule { display: flex; align-items: center; gap: 0.55rem; }
.engraved-rule::before, .engraved-rule::after {
  flex: 1;
  height: 0.3rem;
  border-block: 1px solid var(--copper);
  content: "";
}

.engraved-rule .brand-mark { width: clamp(1.25rem, 2.8vw, 2.25rem); }
.engraved-rule--hero {
  position: absolute;
  top: 0;
  right: 0.22rem;
  left: 0.22rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.engraved-rule--hero::before { border-right: 1px solid var(--copper); transform: skewX(50deg); }
.engraved-rule--hero::after { border-left: 1px solid var(--copper); transform: skewX(-50deg); }

.collection {
  position: relative;
  background: var(--black);
  background-image: var(--grain);
  padding-block: clamp(1.75rem, 3.3vw, 3rem) clamp(3.1rem, 6.2vw, 6rem);
}

.collection > .shell { width: min(calc(100% - 2 * clamp(0.65rem, 1.02vw, 1.2rem)), 99rem); }
.collection__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.65rem, 2.5vw, 2.25rem);
  margin-inline: clamp(0.2rem, 1.3vw, 1.15rem);
}

.collection__heading::before, .collection__heading::after {
  height: 1px;
  background: var(--copper);
  content: "";
}

.collection h2 {
  font: 400 clamp(2.05rem, 4.7vw, 4.45rem)/1 var(--gothic);
  letter-spacing: -0.026em;
  text-align: center;
}

.collection-index {
  display: flex;
  min-height: 2.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.1rem 1.3rem;
  margin: 0.38rem clamp(0.1rem, 0.85vw, 0.85rem) 0.55rem;
}

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.05rem clamp(0.75rem, 2.1vw, 1.9rem); }
.filter-control {
  min-height: 2.75rem;
  padding: 0.33rem 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.25;
  text-decoration: underline;
  text-decoration-color: #9c7e66;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.38em;
}

.filter-control:is(:hover, [aria-pressed="true"]) { color: var(--ivory); text-decoration-color: currentColor; }
.filter-control[aria-pressed="true"] { font-weight: 700; text-decoration-thickness: 2px; }
.preview-label { color: var(--muted); font-size: 0.875rem; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.9rem clamp(0.48rem, 0.74vw, 0.89rem); }
.product { min-width: 0; border-bottom: 1px solid #6e5443; }
@media (min-width: 681px) {
  .product-grid[data-category="all"] > .product:last-child:nth-child(3n + 1) { grid-column: 2; }
}

.product__photo {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 0.88;
  padding: 0;
  overflow: hidden;
  border: 1px solid #c0a78e;
  background: var(--panel);
}

.product__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 46%; transition: transform 230ms ease; }
.product__view {
  position: absolute;
  right: 0.52rem;
  bottom: 0.52rem;
  border: 1px solid var(--copper);
  padding: 0.26rem 0.52rem;
  background: #100d0cee;
  color: var(--ivory);
  font-size: 0.82rem;
}

@media (hover: hover) {
  .product__photo:not(:hover):not(:focus-visible) .product__view { opacity: 0; }
  .product__photo:hover img, .product__photo:focus-visible img { transform: scale(1.025); }
}

.product__caption {
  display: grid;
  grid-template: "name name" "category price" "add add" / minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.3rem 0.7rem;
  padding: 0.85rem 0.25rem 0;
}

.product__caption h3 {
  grid-area: name;
  font-size: clamp(1.55rem, 2.55vw, 2.55rem);
  line-height: 1.04;
  letter-spacing: -0.027em;
}

.caption-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.072em;
  text-transform: uppercase;
}

.product__caption .caption-meta { grid-area: category; }
.product__price { grid-area: price; color: var(--ivory); font-variant-numeric: tabular-nums; }
.product__add { grid-area: add; justify-self: start; }
.product__caption:has(.product__size:not([hidden])) {
  grid-template-areas: "name name" "category price" "size size" "add add";
}
.product__size { grid-area: size; color: var(--muted); font-size: 0.9rem; }

.text-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ivory);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--copper);
  text-underline-offset: 0.31em;
}

.text-button:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }

.placement {
  padding-block: clamp(3.25rem, 6.65vw, 6.1rem);
  border-block: 4px double var(--rule);
  background: #261215;
  background-image: var(--grain);
}

.placement__layout {
  display: grid;
  grid-template: "photo heading" 1fr "photo choices" auto "photo details" 1fr / minmax(0, 0.87fr) minmax(0, 1.13fr);
  gap: 0.68rem clamp(2.05rem, 6.6vw, 6.25rem);
}

.placement__heading { grid-area: heading; align-self: end; }
.engraving--moth { width: 4.75rem; height: auto; margin-bottom: 0.35rem; }
.placement h2 { font-size: clamp(2.6rem, 5.1vw, 5rem); line-height: 1; letter-spacing: -0.04em; }
.placement__options { grid-area: choices; }
.placement__photo {
  grid-area: photo;
  align-self: center;
  aspect-ratio: 1.02;
  margin: 0.31rem;
  padding: 0.33rem;
  border: 1px solid var(--copper);
  outline: 1px solid #81634e;
  outline-offset: 0.26rem;
  background: var(--black);
}

.placement__photo img { width: 100%; height: 100%; object-fit: contain; }
.placement__details {
  grid-area: details;
  align-self: start;
  padding-top: 0.88rem;
  border-top: 1px solid var(--rule);
}

.placement__details h3 { margin-block: 0.3rem 0.4rem; font-size: clamp(1.8rem, 3.3vw, 2.95rem); line-height: 1.08; }
.placement__tip { max-width: 38ch; color: var(--muted); }
.placement__details .text-button { margin-top: 0.55rem; }

.site-footer { padding-block: 1.25rem 1.5rem; background: var(--black); background-image: var(--grain); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.35rem 1rem; margin-top: 0.6rem; }
.site-footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.95rem; }
.site-footer nav a { font-size: 1.13rem; }
.wordmark--footer .brand-mark { width: 1.35rem; }
.wordmark--footer .wordmark__type { font-size: 1.55rem; }

dialog {
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--copper);
  background: var(--panel);
  background-image: var(--grain);
  box-shadow: inset 0 0 0 3px var(--panel), inset 0 0 0 4px #6b503f;
  color: var(--ivory);
}

dialog::backdrop { background: #090706d6; }
.design-dialog { width: min(53rem, calc(100% - 2rem)); }
.design-dialog__layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.91fr); }
.icon-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rule);
  background: var(--soot);
  color: var(--ivory);
}

.icon-button:hover { background: #432223; }
.close-button::before, .close-button::after { grid-area: 1 / 1; width: 0.96rem; height: 1px; background: currentColor; content: ""; }
.close-button::before { transform: rotate(45deg); }
.close-button::after { transform: rotate(-45deg); }
.design-dialog .close-button { position: absolute; z-index: 1; top: 0.75rem; right: 0.75rem; }

.design-dialog__media { position: relative; min-width: 0; min-height: 22rem; overflow: hidden; background: var(--black); }
.design-dialog__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform 210ms ease; }
.design-dialog__image--zoomed { transform: scale(1.75); }
.zoom-toggle {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid var(--copper);
  background: #130e0bee;
  color: var(--ivory);
  font-size: 0.875rem;
}

.zoom-toggle:is(:hover, [aria-pressed="true"]) { background: var(--wine); }
.design-dialog__copy { align-self: center; padding: 4.15rem 1.7rem 1.65rem; }
.design-dialog h2, .cart-dialog h2 { font-size: clamp(2.45rem, 5.1vw, 3.75rem); line-height: 0.99; letter-spacing: -0.041em; }
.design-dialog h2 { margin-block: 0.3rem 0.66rem; }
.design-dialog__price { margin-bottom: 0.7rem; font-weight: 600; }
[data-design-description] { color: var(--muted); }
.design-gallery {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  gap: 0;
  border: 1px solid var(--copper);
  background: #130e0bee;
}
.design-gallery .filter-control { min-height: 2.75rem; padding-inline: 0.72rem; }
.design-specs { display: grid; gap: 0.28rem; margin-block: 0.95rem; padding-block: 0.55rem; border-block: 1px solid var(--rule); }
.design-specs div { display: flex; flex-wrap: wrap; gap: 0.15rem 0.55rem; }
.design-specs dt { font-weight: 600; }
.design-specs dd { color: var(--muted); }
.design-dialog .button { width: 100%; }
.preview-note { margin-top: 0.55rem; color: var(--muted); font-size: 0.875rem; }

.cart-dialog {
  inset: 0 0 0 auto;
  width: min(29.5rem, 100%);
  height: 100dvh;
  max-width: 100%;
  max-height: 100dvh;
  margin: 0;
}

.cart-dialog__body { display: flex; height: 100%; flex-direction: column; }
.cart-dialog__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-inline: 1.15rem;
  padding-block: 1.25rem;
  border-bottom: 4px double var(--rule);
}

.cart-dialog__empty { align-self: center; margin-block: auto; padding: 1.35rem; text-align: center; }
.cart-dialog__empty p { font-size: 1.13rem; }
.cart-items { overflow: auto; margin: 0; padding: 0 1.15rem; list-style-type: none; }
.cart-line {
  display: grid;
  grid-template-columns: 4.35rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.55rem 0.75rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid #705545;
}

.cart-line img { width: 100%; height: 5rem; object-fit: cover; border: 1px solid var(--rule); }
.cart-line h3 { font-size: 1.55rem; line-height: 1.06; }
.cart-line__price { font-variant-numeric: tabular-nums; }
.cart-line__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.16rem 0.67rem; margin-top: 0.45rem; }
.cart-line__tools .text-button { font-size: 0.85rem; }
.quantity { display: inline-flex; align-items: center; border: 1px solid var(--rule); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.quantity button { min-width: 2.75rem; min-height: 2.75rem; padding: 0; border: 0; background: transparent; }
.quantity button:hover:not(:disabled) { background: #49242a; }
.quantity button:disabled { opacity: 0.47; }
.quantity span { min-width: 1.2rem; text-align: center; }
.cart-dialog__footer { margin: auto 1.15rem 0; padding-block: 1rem 1.2rem; border-top: 4px double var(--rule); }
.subtotal { display: flex; justify-content: space-between; gap: 0.9rem; margin-bottom: 0.75rem; }
.subtotal strong { font-variant-numeric: tabular-nums; }
.launch-note { border: 1px solid #9e605d; padding: 0.67rem; background: #421a1c; text-align: center; }

@media (max-width: 860px) {
  .masthead__nav { gap: 1.05rem; }
  .masthead__nav a, .bag-toggle { font-size: 1.18rem; }
}

@media (max-width: 680px) {
  :root { scroll-padding-top: 6.45rem; }
  .masthead__inner { grid-template: "brand bag" auto "nav nav" auto / minmax(0, 1fr) auto; gap: 0; padding-top: 0.35rem; }
  .wordmark { justify-self: start; }
  .wordmark__type { font-size: clamp(1.6rem, 5.75vw, 2.65rem); }
  .masthead__nav { border-top: 1px solid #604b3a; }

  .hero { min-height: 0; }
  .hero__copy { position: relative; inset: auto; padding: 1.55rem 1.05rem 1.05rem; }
  .hero h1 { font-size: clamp(1.96rem, 8.86vw, 3.55rem); }
  .hero__copy p { margin-top: 0.45rem; font-size: clamp(1.11rem, 4.45vw, 1.4rem); }
  .hero__button { margin-top: 0.7rem; padding-inline: 1.35rem; }
  .hero__scene { --portrait-height: min(100vw, 34rem); position: relative; height: var(--portrait-height); }
  .hero__portrait { top: 0; width: calc(var(--portrait-height) * 0.8); }

  .collection-index { gap: 0.12rem; margin-bottom: 0.8rem; }
  .collection-index .preview-label { flex-basis: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem 0.65rem; }
  .product__caption { padding-top: 0.63rem; }
  .product__caption h3 { font-size: clamp(1.36rem, 4.95vw, 1.85rem); }
  .product__caption .caption-meta { font-size: 0.76rem; }

  .placement__layout { grid-template: "heading" "choices" "photo" "details" / minmax(0, 1fr); gap: 0.85rem; }
  .placement__heading, .placement__details { align-self: auto; }
  .placement__photo { max-width: 32rem; margin-inline: auto; width: calc(100% - 0.7rem); }
}

@media (max-width: 530px) {
  .design-dialog__layout { grid-template-columns: minmax(0, 1fr); }
  .design-dialog__media { height: min(45dvh, 20rem); min-height: 0; }
  .design-dialog__copy { padding: 1.04rem 1.15rem 1.3rem; }
  .cart-line { grid-template-columns: 3.35rem minmax(0, 1fr) auto; gap: 0.42rem; }
  .cart-line img { height: 4.1rem; }
  .cart-dialog__heading, .cart-dialog__footer { margin-inline: 0.8rem; }
  .cart-items { padding-inline: 0.8rem; }
}

@media (max-width: 355px) {
  .collection-index .filters { gap: 0.05rem 0.65rem; }
  .collection-index .filter-control { font-size: 0.86rem; }
  .product__caption h3 { font-size: 1.33rem; }
}

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

