/* Bone Pixels — skeleton art, rebuilt one pixel at a time */

:root {
  --ink: #111111;
  --ink-2: #181818;
  --ink-3: #222222;
  --line: #2c2c2c;
  --bone: #f0ece4;
  --bone-dim: #a9a49b;
  --red: #d7261e;
  --red-hot: #ef3a30;
  --pixel: "Silkscreen", "Courier New", monospace;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --step: 4px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink) url("../img/pattern.svg") repeat;
  background-size: 240px 240px;
  color: var(--bone);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--red); color: var(--bone); padding: 8px 14px; z-index: 100;
  font-family: var(--pixel); text-decoration: none;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--red-hot); outline-offset: 3px; }

/* ---------- pixel art via masks (colour = currentColor) ---------- */
.px {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
  image-rendering: pixelated;
}
.px-word  { --src: url("../img/wordmark.svg");   aspect-ratio: 65 / 7; }
.px-bone  { --src: url("../img/bone.svg");       aspect-ratio: 16 / 6; }
.px-skull { --src: url("../img/skull.svg");      aspect-ratio: 16 / 15; }
.px-peace { --src: url("../img/peace.svg");      aspect-ratio: 30 / 42; }
.px-rib   { --src: url("../img/ribcage.svg");    aspect-ratio: 37 / 50; }
.px-spine { --src: url("../img/spine.svg");      aspect-ratio: 9 / 35; }
.px-cross { --src: url("../img/crossbones.svg"); aspect-ratio: 24 / 15; }
.px-sock  { --src: url("../img/sock.svg");       aspect-ratio: 26 / 20; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(17, 17, 17, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--bone);
}
.brand .px-bone { width: 30px; color: var(--red); }
.brand .px-word { width: 168px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-family: var(--pixel); font-size: 14px; letter-spacing: 0.06em;
  text-decoration: none; color: var(--bone-dim); text-transform: uppercase;
  padding: 6px 0; border-bottom: 3px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--red); }
.nav .nav-etsy { color: var(--bone); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--pixel); font-size: 15px; letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  padding: 14px 22px; border: 0;
  color: var(--bone); background: var(--red);
  box-shadow: var(--step) var(--step) 0 #000;
  transition: transform 0.08s steps(2), box-shadow 0.08s steps(2), background 0.15s;
}
.btn:hover { background: var(--red-hot); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.btn:active { transform: translate(var(--step), var(--step)); box-shadow: 0 0 0 #000; }
.btn-ghost { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 2px var(--bone); }
.btn-ghost:hover { background: var(--bone); color: var(--ink); box-shadow: inset 0 0 0 2px var(--bone); transform: none; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 72px; border-bottom: 2px solid var(--line); background: linear-gradient(180deg, rgba(17,17,17,.85), rgba(17,17,17,.6)); }
.hero .wrap { display: grid; grid-template-columns: 1.25fr 0.75fr; align-items: center; gap: 48px; }
.hero-eyebrow {
  font-family: var(--pixel); color: var(--red); letter-spacing: 0.12em; text-transform: uppercase;
  font-size: 14px; margin: 0 0 22px; display: flex; align-items: center; gap: 12px;
}
.hero-eyebrow .px-bone { width: 34px; }
.hero h1 { margin: 0; }
.hero h1 .px-word { width: 100%; max-width: 620px; color: var(--bone); }
.hero .lead { font-size: 21px; color: var(--bone-dim); max-width: 34ch; margin: 26px 0 34px; }
.hero .lead strong { color: var(--bone); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-art { display: flex; justify-content: center; align-items: flex-end; gap: 18px; }
.hero-art .px-peace { width: min(240px, 60%); color: var(--red); animation: wave 2.4s steps(1) infinite; }
.hero-art .px-skull { width: 90px; color: var(--bone); margin-bottom: 8px; }
@keyframes wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- strip ---------- */
.strip { border-bottom: 2px solid var(--line); background: var(--ink); }
.strip ul {
  list-style: none; margin: 0 auto; padding: 18px 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px;
}
.strip li {
  font-family: var(--pixel); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--bone-dim); display: flex; align-items: center; gap: 10px;
}
.strip li::before { content: ""; width: 8px; height: 8px; background: var(--red); }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.section-head h2, .page-head h1 {
  font-family: var(--pixel); font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.04em; line-height: 1.15; margin: 0;
}
.section-head h2 { font-size: clamp(26px, 4vw, 38px); }
.section-head a { font-family: var(--pixel); font-size: 14px; color: var(--bone-dim); text-transform: uppercase; }
.section-head a:hover { color: var(--red-hot); }
.kicker { font-family: var(--pixel); color: var(--red); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 10px; }

/* ---------- category tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 230px; padding: 22px; text-decoration: none; color: var(--bone);
  background: var(--ink-2); box-shadow: inset 0 0 0 2px var(--line);
  overflow: hidden; transition: box-shadow 0.12s steps(2), transform 0.12s steps(2);
}
.tile .px { color: var(--bone); align-self: center; transition: color 0.12s; }
.tile .px-peace { width: 74px; }
.tile .px-rib   { width: 92px; }
.tile .px-skull { width: 96px; }
.tile .px-bone  { width: 120px; margin: 34px 0; }
.tile .px-sock  { width: 120px; }
.tile span:not(.px) { font-family: var(--pixel); font-size: 20px; text-transform: uppercase; letter-spacing: 0.05em; display: flex; justify-content: space-between; align-items: center; }
.tile span:not(.px)::after { content: "→"; color: var(--red); }
.tile:hover { box-shadow: inset 0 0 0 3px var(--red); transform: translate(-2px, -2px); }
.tile:hover .px { color: var(--red); }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px 20px; }
.card {
  display: flex; flex-direction: column; text-align: left;
  background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer;
}
.card-media {
  position: relative; aspect-ratio: 1; overflow: hidden; background: var(--ink-3);
  box-shadow: inset 0 0 0 2px var(--line);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s; }
.card-media .alt { position: absolute; inset: 0; opacity: 0; }
.card:hover .card-media .alt, .card:focus-visible .card-media .alt { opacity: 1; }
.card-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--red); transition: box-shadow 0.1s steps(2);
}
.card:hover .card-media::after, .card:focus-visible .card-media::after { box-shadow: inset 0 0 0 4px var(--red); }
.card-tag {
  position: absolute; left: 10px; top: 10px; z-index: 1;
  font-family: var(--pixel); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--ink); color: var(--bone); padding: 4px 8px;
}
.card-body { padding: 14px 2px 0; display: grid; gap: 4px; }
.card-title { font-weight: 600; font-size: 16px; line-height: 1.35; }
.card-price { font-family: var(--pixel); color: var(--red-hot); font-size: 16px; }
.card-cta { font-family: var(--pixel); font-size: 12px; color: var(--bone-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.card:hover .card-cta { color: var(--bone); }

.skeleton .card-media { animation: blink 1.2s steps(2) infinite; }
.skeleton .card-body i { display: block; height: 14px; background: var(--ink-3); margin-top: 6px; }
.skeleton .card-body i:last-child { width: 40%; }
@keyframes blink { 50% { background: #1c1c1c; } }

.notice {
  grid-column: 1 / -1; text-align: center; padding: 48px 20px;
  background: var(--ink-2); box-shadow: inset 0 0 0 2px var(--line);
}
.notice .px-skull { width: 64px; color: var(--red); margin: 0 auto 18px; }
.notice p { color: var(--bone-dim); margin: 0 0 22px; }

/* ---------- shop page ---------- */
.page-head { padding: 64px 0 28px; }
.page-head h1 { font-size: clamp(34px, 6vw, 60px); }
.page-head p { color: var(--bone-dim); max-width: 56ch; margin: 14px 0 0; font-size: 19px; }
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; margin-bottom: 30px; border-block: 2px solid var(--line);
}
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: var(--pixel); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--bone-dim); background: transparent; border: 0; cursor: pointer;
  padding: 9px 14px; box-shadow: inset 0 0 0 2px var(--line);
}
.chip:hover { color: var(--bone); box-shadow: inset 0 0 0 2px var(--bone-dim); }
.chip[aria-pressed="true"] { color: var(--bone); background: var(--red); box-shadow: none; }
.sort { display: flex; align-items: center; gap: 10px; font-family: var(--pixel); font-size: 13px; color: var(--bone-dim); text-transform: uppercase; }
.sort select {
  font: 15px var(--body); color: var(--bone); background: var(--ink-2);
  border: 2px solid var(--line); padding: 8px 10px; border-radius: 0;
}
.count { font-family: var(--pixel); font-size: 13px; color: var(--bone-dim); text-transform: uppercase; margin: -14px 0 22px; }

/* ---------- quick view ---------- */
.qv {
  width: min(980px, 100% - 24px); max-height: calc(100vh - 32px);
  padding: 0; border: 0; color: var(--bone); background: var(--ink);
  box-shadow: 0 0 0 2px var(--line), 10px 10px 0 #000;
}
.qv::backdrop { background: rgba(0, 0, 0, 0.75); }
.qv-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; }
.qv-gallery { background: var(--ink-3); }
.qv-main { aspect-ratio: 1; width: 100%; object-fit: cover; }
.qv-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.qv-thumbs button { flex: 0 0 64px; height: 64px; padding: 0; border: 0; cursor: pointer; background: none; opacity: 0.6; box-shadow: inset 0 0 0 2px transparent; }
.qv-thumbs button[aria-current="true"] { opacity: 1; outline: 3px solid var(--red); outline-offset: -3px; }
.qv-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.qv-info { padding: 34px 30px 30px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.qv-info h2 { margin: 0; font-size: 26px; line-height: 1.25; }
.qv-price { font-family: var(--pixel); color: var(--red-hot); font-size: 26px; }
.qv-blurb { color: var(--bone-dim); margin: 0; }
.qv-note { font-size: 14px; color: var(--bone-dim); margin: 0; }
.qv-close {
  position: absolute; right: 10px; top: 10px; z-index: 2;
  width: 40px; height: 40px; border: 0; cursor: pointer;
  font-family: var(--pixel); font-size: 18px; color: var(--bone); background: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
}
.qv-close:hover { background: var(--red); }

/* ---------- about ---------- */
.story { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.story-art { display: flex; justify-content: center; gap: 26px; align-items: flex-end; position: sticky; top: 110px; }
.story-art .px-rib { width: 200px; color: var(--bone); }
.story-art .px-spine { width: 34px; color: var(--red); }
.story-copy p { font-size: 19px; margin: 0 0 22px; }
.story-copy p:first-child { font-size: 24px; line-height: 1.45; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 64px; }
.pillar { padding: 26px; background: var(--ink-2); box-shadow: inset 0 0 0 2px var(--line); }
.pillar h3 { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; font-size: 17px; margin: 14px 0 8px; letter-spacing: 0.04em; }
.pillar p { margin: 0; color: var(--bone-dim); font-size: 16px; }
.pillar .px { color: var(--red); }
.pillar .px-skull { width: 34px; }
.pillar .px-bone { width: 44px; margin: 9px 0; }
.pillar .px-cross { width: 44px; }

/* ---------- footer ---------- */
.site-footer { border-top: 2px solid var(--line); background: var(--ink); padding: 56px 0 36px; margin-top: 40px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 34px; }
.foot-brand .px-word { width: 200px; display: block; }
.foot-brand p { color: var(--bone-dim); margin: 14px 0 0; max-width: 32ch; font-size: 15px; }
.foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-cols h4 { font-family: var(--pixel); font-weight: 400; text-transform: uppercase; font-size: 13px; color: var(--red); letter-spacing: 0.1em; margin: 0 0 12px; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-cols a { color: var(--bone-dim); text-decoration: none; font-size: 15px; }
.foot-cols a:hover { color: var(--bone); }
.foot-bottom { margin-top: 44px; padding-top: 20px; border-top: 2px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: #77736c; }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: 120px 0; }
.lost .px-skull { width: 120px; color: var(--red); margin: 0 auto 30px; }
.lost h1 { font-family: var(--pixel); font-weight: 400; font-size: 40px; margin: 0 0 12px; text-transform: uppercase; }
.lost p { color: var(--bone-dim); margin: 0 0 28px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; justify-content: flex-start; }
  .hero-art .px-peace { width: 120px; }
  .hero-art .px-skull { width: 56px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles .tile:last-child { grid-column: 1 / -1; }
  .qv-inner { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .story-art { position: static; }
  .story-art .px-rib { width: 140px; }
  .pillars { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .brand .px-word { width: 128px; }
  .nav { gap: 16px; }
  .nav a { font-size: 12px; }
  .nav .hide-sm { display: none; }
  .hero { padding: 48px 0; }
  .hero .lead { font-size: 18px; }
  .tile { min-height: 180px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
  .card-title { font-size: 14px; }
  .strip ul { justify-content: flex-start; }
}

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

/* page-head labels keep the red kicker style */
.page-head .kicker { color: var(--red); font-size: 13px; margin: 0 0 10px; }
@media (max-width: 620px) {
  .section-head { flex-wrap: wrap; align-items: flex-start; }
}

/* ---------- product page ---------- */
.product-page { padding-top: 36px; }
.crumbs { font-family: var(--pixel); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bone-dim); margin: 0 0 22px; }
.crumbs a { color: var(--bone-dim); text-decoration: none; }
.crumbs a:hover { color: var(--red-hot); }
.product { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: start; }
.product-gallery { background: var(--ink-3); box-shadow: inset 0 0 0 2px var(--line); }
.product-main { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-info { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 100px; }
.product-info h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; }
.product-info .btn { align-self: flex-start; }
.product-desc { color: var(--bone-dim); font-size: 16px; border-top: 2px solid var(--line); padding-top: 18px; margin-top: 6px; }
.qv-link { font-family: var(--pixel); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bone-dim); }
.qv-link:hover { color: var(--bone); }
@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; }
  .product-info { position: static; }
}
