/* Hallowed Hand print shop — styled after the Flash Binder design. */
:root {
  --night: #0e1512;
  --night-deep: #0a0e0c;
  --night-lift: #16211b;
  --panel: #0f1613;
  --bone: #e8dfc7;
  --bone-soft: rgba(232, 223, 199, .62);
  --bone-faint: rgba(232, 223, 199, .42);
  --bone-line: rgba(232, 223, 199, .16);
  --gold: #c9a44c;
  --gold-light: #e7d6a8;
  --gold-text: #d9b969;
  --gold-line: rgba(201, 164, 76, .55);
  --gold-wash: rgba(201, 164, 76, .16);
  --paper-a: #efe6cf;
  --paper-b: #e4d8bc;
  --paper-c: #dccfae;
  --sepia: #2a2318;
  --sepia-soft: rgba(42, 35, 24, .62);
  --sepia-line: rgba(122, 94, 44, .3);
  --error: #b5452f;

  --heading: "Cormorant Garamond", Georgia, serif;
  --body: "Lora", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--bone);
  background: radial-gradient(120% 80% at 50% -10%, var(--night-lift) 0%, var(--night) 45%, var(--night-deep) 100%) fixed;
  background-color: var(--night);
}
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #e3c583; }
::selection { background: rgba(201, 164, 76, .3); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

@keyframes hh-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes hh-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Masthead ─────────────────────────────────────────────────────────── */
.masthead {
  max-width: 1180px;
  margin: 0 auto;
  padding: 46px 16px 22px;
  text-align: center;
}
.eyebrow {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(232, 223, 199, .45);
}
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.rule span { height: 1px; flex: 1; max-width: 200px; }
.rule span:first-child { background: linear-gradient(90deg, transparent, var(--gold-line)); }
.rule span:last-child { background: linear-gradient(270deg, transparent, var(--gold-line)); }
.rule-diamond { margin-top: 18px; }
.rule-diamond i { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid rgba(201, 164, 76, .8); }
.rule-label { margin-top: 16px; }
.rule-label span { max-width: 150px; opacity: .65; }
.rule-label b {
  font-weight: 400;
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
.wordmark {
  margin: 12px 0 0;
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(42px, 11vw, 68px);
  line-height: .95;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-light);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .7);
}
.sub {
  margin: 6px 0 0;
  font-family: var(--heading);
  font-style: italic;
  font-size: 22px;
  letter-spacing: .28em;
  color: rgba(201, 164, 76, .9);
}

/* ── Filters ──────────────────────────────────────────────────────────── */
.filters {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 16px 20px;
  background: linear-gradient(180deg, #0d1310 72%, rgba(13, 19, 16, 0));
}
.filters[hidden] { display: none; }
.chips {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 640px) {
  .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .chips::-webkit-scrollbar { display: none; }
}
.chip {
  flex: none;
  font-family: var(--heading);
  font-size: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 2px;
  border: 1px solid rgba(232, 223, 199, .18);
  background: transparent;
  color: rgba(232, 223, 199, .6);
  transition: background .18s, color .18s, border-color .18s;
}
.chip:hover { border-color: rgba(201, 164, 76, .85); }
.chip[aria-pressed="true"] { border-color: rgba(201, 164, 76, .85); background: var(--gold-wash); color: var(--gold-light); }
.chip-sep { flex: none; width: 1px; height: 22px; align-self: center; background: var(--bone-line); margin: 0 4px; }
.binder-line {
  max-width: 1180px;
  margin: 12px auto 0;
  text-align: center;
  font-size: 12px;
  font-style: italic;
  letter-spacing: .04em;
  color: var(--bone-faint);
}

.notice {
  max-width: 560px;
  margin: 0 auto 14px;
  padding: 10px 14px;
  border: 1px solid var(--gold-line);
  text-align: center;
  font-size: 14px;
  color: var(--gold-light);
}

/* ── The binder grid ──────────────────────────────────────────────────── */
.binder { max-width: 1180px; margin: 0 auto; padding: 8px 16px 110px; }
@media (min-width: 720px) { .binder, .masthead { padding-left: 32px; padding-right: 32px; } }
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 16px;
}
@media (min-width: 720px) { .grid { grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 38px 30px; } }
.empty { grid-column: 1 / -1; text-align: center; padding: 70px 16px; color: var(--bone-soft); animation: hh-fade .4s ease both; }
.empty h2 { font-family: var(--heading); font-weight: 500; font-size: 28px; letter-spacing: .05em; color: rgba(232, 223, 199, .8); margin: 0 0 10px; }

.card { animation: hh-rise .4s ease both; }
.card-btn {
  all: unset;
  display: block;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
}
.card-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.paper {
  position: relative;
  padding: 10px 10px 9px;
  border: 1px solid var(--gold-line);
  border-radius: 1px;
  background: linear-gradient(160deg, var(--paper-a) 0%, var(--paper-b) 40%, var(--paper-c) 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .35);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .25s ease, box-shadow .25s ease;
}
@media (min-width: 720px) { .paper { padding: 13px 13px 11px; } }
.paper::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(122, 94, 44, .28); pointer-events: none; }
.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .35), transparent 55%), radial-gradient(80% 60% at 90% 100%, rgba(120, 95, 50, .22), transparent 60%);
  mix-blend-mode: multiply;
  opacity: .6;
}
@media (hover: hover) {
  .card-btn:hover .paper { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0, 0, 0, .62), inset 0 0 0 1px rgba(255, 255, 255, .45); }
}
.art { position: relative; aspect-ratio: var(--aspect, .75); overflow: hidden; background: rgba(255, 255, 255, .25); z-index: 1; }
.art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.card-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.card-row.top { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--sepia-line); }
.card-row.bottom { margin-top: 5px; align-items: center; }
.card-title {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--sepia);
  line-height: 1.1;
}
@media (min-width: 720px) { .card-title { font-size: 19px; } }
.card-sheet { font-size: 10px; letter-spacing: .12em; color: rgba(42, 35, 24, .5); white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-sizes { font-size: 11px; font-style: italic; color: var(--sepia-soft); }
.card-price {
  flex: none;
  font-size: 9.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid rgba(122, 94, 44, .7);
  color: #5a4416;
  background: rgba(201, 164, 76, .18);
  white-space: nowrap;
}
@media (max-width: 420px) { .card-sheet { display: none; } }

/* ── Footer ───────────────────────────────────────────────────────────── */
.foot { max-width: 1180px; margin: 0 auto; padding: 0 16px 120px; text-align: center; }
.foot-rule { height: 1px; background: rgba(232, 223, 199, .12); margin-bottom: 18px; }
.foot-line { margin: 0; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: rgba(232, 223, 199, .35); line-height: 1.8; }
.foot-links { margin: 10px 0 0; font-size: 13px; color: var(--bone-faint); }

/* ── Bag button ───────────────────────────────────────────────────────── */
.bag-button {
  position: fixed;
  z-index: 30;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border: 1px solid rgba(201, 164, 76, .85);
  border-radius: 2px;
  background: rgba(15, 22, 19, .94);
  backdrop-filter: blur(6px);
  color: var(--gold-light);
  font-family: var(--heading);
  font-size: 15px;
  letter-spacing: .2em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
  cursor: pointer;
  animation: hh-rise .3s ease both;
}
.bag-button[hidden] { display: none; }
.bag-button:hover { background: #17221d; }
.bag-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--gold-line);
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--gold-text);
}
.bag-total { margin-left: auto; font-family: var(--body); letter-spacing: .04em; text-transform: none; font-variant-numeric: tabular-nums; }

/* ── Dialogs ──────────────────────────────────────────────────────────── */
.sheet {
  padding: 0;
  border: 1px solid rgba(201, 164, 76, .5);
  background: var(--panel);
  color: var(--bone);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
  max-height: 92vh;
  overflow-y: auto;
}
.sheet::backdrop { background: rgba(6, 9, 7, .86); backdrop-filter: blur(4px); }
.sheet[open] { animation: hh-rise .3s ease both; }

.piece { width: min(960px, calc(100% - 24px)); }
@media (min-width: 760px) {
  .piece[open] { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
}
.piece-plate {
  position: relative;
  padding: 18px;
  background: linear-gradient(160deg, var(--paper-a) 0%, #e2d5b7 100%);
}
@media (min-width: 760px) { .piece-plate { padding: 26px; } }
.piece-plate::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--sepia-line); pointer-events: none; }
.piece-art { position: relative; aspect-ratio: var(--aspect, .75); max-height: 52vh; margin: 0 auto; background: rgba(255, 255, 255, .3); }
@media (min-width: 760px) { .piece-art { max-height: none; } }
.piece-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.piece-meta {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(42, 35, 24, .55);
}
.piece-body { padding: 22px 20px 24px; display: flex; flex-direction: column; }
@media (min-width: 760px) { .piece-body { padding: 34px 34px 30px; } }
.piece-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.piece-top form { margin: 0 0 0 auto; }
.pill {
  font-size: 9.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid rgba(201, 164, 76, .7);
  color: var(--gold-light);
  background: rgba(201, 164, 76, .14);
}
.close {
  all: unset;
  cursor: pointer;
  padding: 6px 0 6px 10px;
  font-family: var(--heading);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(232, 223, 199, .55);
}
.close:hover { color: var(--gold-text); }
.close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.piece-title {
  margin: 16px 0 0;
  font-family: var(--heading);
  font-weight: 600;
  font-size: clamp(32px, 8vw, 42px);
  line-height: 1.05;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.piece-note { margin: 12px 0 0; font-size: 14px; line-height: 1.75; color: var(--bone-soft); }
.divider { height: 1px; background: rgba(232, 223, 199, .14); margin: 22px 0; }
.field-label { margin: 0 0 10px; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--bone-faint); }

.sizes { display: flex; flex-direction: column; gap: 8px; }
.size {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--body);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  padding: 11px 14px;
  border-radius: 2px;
  border: 1px solid rgba(232, 223, 199, .2);
  background: transparent;
  color: rgba(232, 223, 199, .7);
  font-variant-numeric: tabular-nums;
  transition: border-color .18s, background .18s, color .18s;
}
.size:hover { border-color: rgba(201, 164, 76, .8); }
.size[aria-checked="true"] { border-color: rgba(201, 164, 76, .85); background: var(--gold-wash); color: var(--gold-light); }
.price-line { margin: 12px 0 0; font-size: 13px; font-style: italic; color: rgba(232, 223, 199, .5); }

.qty-row { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 22px; }
.qty-row .field-label { margin: 0; }
.stepper { display: flex; align-items: center; border: 1px solid rgba(232, 223, 199, .22); border-radius: 2px; }
.stepper button {
  width: 42px;
  height: 40px;
  border: 0;
  background: none;
  color: var(--gold-light);
  font: 400 20px var(--body);
  cursor: pointer;
}
.stepper button:disabled { color: rgba(232, 223, 199, .2); cursor: default; }
.stepper output { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; }

.gold-button {
  width: 100%;
  padding: 15px;
  border-radius: 2px;
  border: 1px solid rgba(201, 164, 76, .8);
  background: transparent;
  color: var(--gold-light);
  font-family: var(--heading);
  font-size: 15px;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.gold-button:hover { background: rgba(201, 164, 76, .14); }
.gold-button:active { background: rgba(201, 164, 76, .24); }
.gold-button:disabled { opacity: .5; cursor: wait; }
.fine { margin: 12px 0 0; font-size: 11.5px; text-align: center; color: rgba(232, 223, 199, .38); }

/* ── Bag ──────────────────────────────────────────────────────────────── */
.bag { width: min(520px, calc(100% - 24px)); padding: 22px 20px 24px; }
@media (min-width: 760px) { .bag { padding: 30px 32px 28px; } }
.bag-title { margin: 0; font-family: var(--heading); font-weight: 600; font-size: 30px; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-light); }
.bag-lines { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--bone-line); }
.bag-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--bone-line);
}
.bag-thumb { padding: 4px; background: linear-gradient(160deg, var(--paper-a), var(--paper-c)); border: 1px solid var(--gold-line); }
.bag-thumb img { display: block; width: 100%; aspect-ratio: var(--aspect, .75); object-fit: contain; }
.bag-line-name { font-family: var(--heading); font-weight: 600; font-size: 17px; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-light); line-height: 1.1; }
.bag-line-size { margin-top: 3px; font-size: 12.5px; font-style: italic; color: rgba(232, 223, 199, .55); }
.remove {
  all: unset;
  cursor: pointer;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(232, 223, 199, .45);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.remove:hover { color: var(--gold-text); }
.remove:focus-visible { outline: 2px solid var(--gold); }
.bag-line-right { text-align: right; font-variant-numeric: tabular-nums; }
.bag-line .stepper { margin-top: 6px; }
.bag-line .stepper button { width: 32px; height: 32px; font-size: 17px; }
.bag-empty { padding: 26px 0; text-align: center; font-style: italic; color: var(--bone-faint); }
.bag-sum { display: flex; justify-content: space-between; margin-top: 16px; font-family: var(--heading); font-size: 20px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-light); }
.bag .price-line { margin: 4px 0 18px; }
.error { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--error); color: #f0c9bd; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .card, .sheet[open], .bag-button, .empty { animation: none; }
  .paper, .card-btn:hover .paper { transition: none; }
}
.bag-sum span:last-child { font-family: var(--body); font-size: 18px; letter-spacing: .02em; font-variant-numeric: tabular-nums lining-nums; }

/* Landscape sheets: one per row on phones, bigger cards elsewhere */
.grid.wide { grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 640px) { .grid.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; } }
@media (min-width: 1100px) { .grid.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid.wide .card-title { font-size: 19px; }
@media (min-width: 760px) {
  .piece.wide { width: min(1120px, calc(100% - 24px)); }
  .piece.wide[open] { grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr); align-items: start; }
  .piece.wide .piece-plate { align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
}
.piece.wide .piece-art { max-height: none; width: 100%; }
