:root {
  --leather-dark: #2a1a0e;
  --leather: #4a2f1a;
  --leather-mid: #6b4226;
  --cream: #f1e2c4;
  --parchment: #e8d2a8;
  --ink: #1a1108;
  --copper: #b87333;
  --copper-bright: #d4924a;
  --brass: #c9a227;
  --brass-bright: #e6c85a;
  --silver: #c5c8cc;
  --silver-bright: #eceef0;
  --shadow: rgba(12, 6, 2, 0.55);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--cream);
  font-family: "Spectral", "Palatino Linotype", Palatino, serif;
  background-color: var(--leather-dark);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(201, 162, 39, 0.08), transparent 28%),
    radial-gradient(circle at 88% 92%, rgba(184, 115, 51, 0.12), transparent 32%),
    url("/images/leather-texture.png");
  background-size: auto, auto, 640px 640px;
  background-attachment: fixed;
  line-height: 1.55;
}

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

a {
  color: var(--brass-bright);
  text-decoration: none;
}

a:hover {
  color: var(--cream);
}

.cog {
  position: fixed;
  width: 220px;
  height: 220px;
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
  background: conic-gradient(from 0deg, var(--brass), var(--copper), var(--silver), var(--brass));
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path fill='white' d='M40 4h20l3 12 12-4 10 17-10 8 8 10-17 10-8-10-8 10-17-10 8-10-10-8 10-17 12 4z'/><circle cx='50' cy='50' r='14' fill='black'/></svg>") center / contain no-repeat;
  animation: spin 48s linear infinite;
}

.cog.tl { top: -60px; left: -50px; }
.cog.tr { top: 80px; right: -70px; animation-duration: 62s; animation-direction: reverse; }
.cog.bl { bottom: -80px; left: 8%; animation-duration: 70s; }
.cog.br { bottom: -40px; right: -40px; animation-duration: 54s; animation-direction: reverse; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.frame {
  --rivet-border: 24px;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  margin: 14px;
  padding: 22px 22px 32px;
  background:
    linear-gradient(180deg, rgba(26, 17, 8, 0.28), rgba(26, 17, 8, 0.18));
  border: var(--rivet-border) solid #3a2412;
  box-shadow:
    inset 0 0 0 2px var(--copper),
    inset 0 0 0 8px #24160c,
    0 18px 40px var(--shadow);
}

.rivets {
  position: absolute;
  top: calc(var(--rivet-border) * -1);
  left: calc(var(--rivet-border) * -1);
  width: calc(100% + var(--rivet-border) * 2);
  height: calc(100% + var(--rivet-border) * 2);
  display: block;
  pointer-events: none;
  overflow: visible;
}

.rivets svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 10px 18px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand img.header-logo {
  width: min(340px, 72vw);
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}

.stamp {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--copper);
  object-fit: cover;
  box-shadow: 0 0 0 3px #24160c;
}

.cart-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--copper);
  background: linear-gradient(#5a3b16, #2d1b0b);
  color: var(--cream);
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: rgba(18, 10, 4, 0.55);
  border: 1px solid var(--copper);
  box-shadow: inset 0 0 0 1px rgba(197, 200, 204, 0.18);
}

.nav a {
  font-family: "Cinzel", serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--parchment);
  padding: 8px 12px;
  border: 1px solid transparent;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
  background: linear-gradient(180deg, var(--brass-bright), var(--brass));
  border-color: var(--copper);
}

main {
  position: relative;
  padding: 8px 18px 24px;
}

h1,
h2,
h3 {
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brass-bright);
  text-shadow: 0 2px 0 #1a0f06;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin: 0 0 8px;
}

.lede {
  max-width: 62ch;
  font-size: 1.12rem;
  color: var(--parchment);
}

.panel {
  background: linear-gradient(180deg, rgba(61, 38, 18, 0.86), rgba(28, 16, 8, 0.86));
  border: 2px solid var(--copper);
  box-shadow:
    inset 0 0 0 1px rgba(197, 200, 204, 0.25),
    0 10px 24px var(--shadow);
  padding: 22px;
  margin: 18px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: rgba(18, 10, 4, 0.72);
  border: 2px solid var(--copper);
  box-shadow: inset 0 0 0 1px rgba(197, 200, 204, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  background: #1a1108;
}

.card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--cream);
}

.price {
  font-family: "Cinzel", serif;
  color: var(--silver-bright);
}

.btn {
  appearance: none;
  cursor: pointer;
  border: 1px solid #8a6a1a;
  color: var(--ink);
  font-family: "Cinzel", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 10px 14px;
  background: linear-gradient(180deg, var(--brass-bright), #9a7a18 55%, #6e5610);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 0 #3a2a08;
}

.btn:hover {
  filter: brightness(1.08);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.silver {
  background: linear-gradient(180deg, var(--silver-bright), #8d9298);
  border-color: #6d7278;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 0 #3c3f44;
}

.notice {
  border: 1px dashed var(--silver);
  color: var(--parchment);
  padding: 12px 14px;
  font-size: 0.95rem;
}

form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

label {
  display: grid;
  gap: 6px;
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

input,
textarea {
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--copper);
  padding: 10px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(184, 115, 51, 0.45);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 8px;
  color: var(--parchment);
  font-size: 0.92rem;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 5;
  background: #1a1108;
  color: var(--cream);
  border: 1px solid var(--brass);
  padding: 10px 14px;
  display: none;
}

.toast.show { display: block; }

@media (max-width: 720px) {
  .frame { margin: 6px; padding: 10px; }
  .site-header { grid-template-columns: 1fr; }
  .stamp { display: none; }
  .cart-link { justify-self: start; }
}
