:root {
  color-scheme: dark;
  --steel: #c7c5bd;
  --muted: rgba(219, 216, 205, .55);
  --rust: #9b4a2c;
  --panel: rgba(8, 9, 9, .74);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: #050606;
  color: var(--steel);
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
}

#background,
.shade,
.grain {
  position: fixed;
  inset: 0;
}

#background {
  background-color: #050606;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  transition: background-image .4s ease, filter .7s ease, transform 1.1s ease;
}

.shade {
  background: rgba(0,0,0,0);
  transition: background .7s ease;
}

.grain {
  opacity: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

#knivesScene { position: relative; min-height: 100vh; z-index: 2; cursor: crosshair; }

.entry {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  transform: translateY(-13vh);
  transition: opacity .45s ease, transform .7s ease;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(211, 207, 194, .58);
  font: 700 10px/1 monospace;
  letter-spacing: .3em;
}

h1 {
  margin: 0;
  color: rgba(225, 222, 212, .9);
  font: 300 clamp(68px, 13vw, 174px)/.8 Georgia, serif;
  letter-spacing: -.055em;
  text-transform: uppercase;
  text-shadow: 0 10px 50px rgba(0,0,0,.8);
}

.entry-hint {
  margin: 32px 0 15px;
  color: rgba(220, 216, 204, .48);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.blade-line {
  width: min(260px, 55vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(211,207,194,.75), var(--rust), transparent);
  box-shadow: 0 0 12px rgba(155,74,44,.3);
}

.catalog {
  position: relative;
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: auto;
  padding: 52px 0 120px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .65s ease;
}

.catalog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 17px;
  border-bottom: 1px solid rgba(205,201,188,.24);
}

.catalog-head .eyebrow { margin: 0; }

.items-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  padding-top: 24px;
}

.knife-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(205,201,188,.2);
  background: linear-gradient(155deg, rgba(16,17,17,.78), rgba(5,6,6,.88));
  box-shadow: 0 18px 48px rgba(0,0,0,.3);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .45s ease, transform .45s ease, border-color .3s ease;
}

.knife-card.show { opacity: 1; transform: translateY(0); }
.knife-card:hover { border-color: rgba(196,126,87,.58); }

.knife-image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255,255,255,.025);
}

.knife-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.knife-card:hover .knife-image img { transform: scale(1.035); }

.knife-placeholder {
  height: 100%;
  display: grid;
  place-content: center;
  text-align: center;
  color: rgba(210,205,191,.3);
  font: 11px/1.8 monospace;
  letter-spacing: .3em;
}

.knife-copy { padding: 13px; }

.knife-title {
  margin: 0 0 8px;
  color: rgba(230,227,216,.92);
  font: 400 17px/1.1 Georgia, serif;
}

.knife-description {
  min-height: 51px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.knife-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(205,201,188,.14);
  font: 700 8px/1 monospace;
  letter-spacing: .1em;
}

.knife-status { color: #69a875; }
.knife-card.reserved .knife-status { color: #c9a45c; }
.knife-card.sold .knife-status { color: #c86858; }

.empty-state {
  grid-column: 1 / -1;
  padding: 50px 20px;
  border: 1px solid rgba(205,201,188,.18);
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hud {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 7;
  display: flex;
  gap: 20px;
  color: rgba(215,211,198,.38);
  font: 8px/1 monospace;
  letter-spacing: .18em;
  pointer-events: none;
}

.hud a { color: rgba(215,211,198,.55); text-decoration: none; pointer-events: auto; }

.audio-toggle {
  position: fixed;
  right: 22px;
  bottom: 18px;
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(205,201,188,.25);
  background: rgba(5,6,6,.68);
  color: rgba(215,211,198,.5);
  font: 700 8px/1 monospace;
  letter-spacing: .14em;
  cursor: pointer;
  backdrop-filter: blur(7px);
}

.audio-toggle:hover,
.audio-toggle[aria-pressed="true"] { color: #ddd8ca; border-color: rgba(155,74,44,.7); }
.audio-glyph { font-size: 14px; }
.audio-toggle[aria-pressed="true"] .audio-glyph { color: #a85d3c; text-shadow: 0 0 10px rgba(168,93,60,.6); animation: spin 8s linear infinite; }

body.open { overflow-y: auto; }
body.open #background { filter: brightness(.52) saturate(.7); }
body.open .shade { background: rgba(0,0,0,.48); }
body.open .grain { opacity: .08; }
body.open .entry { opacity: 0; transform: translateY(-13vh) scale(.96); pointer-events: none; }
body.open .catalog { opacity: 1; pointer-events: auto; transform: translateY(0); }

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

@media (max-width: 1100px) {
  .items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .items-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .catalog { width: calc(100% - 28px); padding-top: 25px; }
  .items-grid { grid-template-columns: 1fr; }
  .entry { transform: translateY(-10vh); }
  body.open .entry { transform: translateY(-10vh) scale(.96); }
  .hud span:nth-child(2) { display: none; }
  .hud { left: 14px; bottom: 14px; gap: 12px; }
  .audio-toggle { right: 14px; bottom: 11px; }
  .entry-hint { font-size: 9px; }
}

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