:root {
  --ink: #151613;
  --coal: #20221d;
  --bone: #e2e0d8;
  --paper: #b7b7ae;
  --rust: #76654e;
  --rust-dark: #39332b;
  --brass: #b59b70;
  --line: rgba(226, 224, 216, .18);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--bone);
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.03) 0 1px, transparent 2px) 0 0 / 27px 23px,
    radial-gradient(circle at 72% 68%, rgba(0,0,0,.22) 0 1px, transparent 2.5px) 0 0 / 39px 35px,
    repeating-linear-gradient(92deg, rgba(255,255,255,.018) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #202220, #151714);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.wrap { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 10px; color: var(--brass); font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3, .brand { font-family: Georgia, "Times New Roman", serif; line-height: 1.05; }
h1 { margin: 0; font-size: clamp(3rem, 8vw, 6.7rem); letter-spacing: -.045em; }
h2 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { margin: 0; font-size: 1.55rem; }
p { margin: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(21, 22, 19, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-row { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; font-weight: 800; letter-spacing: .05em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { text-decoration: none; font-size: .8rem; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.nav a:hover, .nav a:focus-visible, .nav a.current { color: var(--brass); }

.archive-hero { position: relative; overflow: hidden; padding: clamp(70px, 10vw, 138px) 0 clamp(60px, 8vw, 108px); border-bottom: 1px solid rgba(226,224,216,.12); }
.archive-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, rgba(11,12,10,.97), rgba(24,26,22,.78)), url('/knives/two-paracord-hero.jpg') center 52% / cover; opacity: .82; }
.archive-hero-inner { position: relative; z-index: 1; }
.back-link { display: inline-block; margin-bottom: 36px; color: #c9c8c0; text-decoration: none; font-size: .82rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.back-link:hover, .back-link:focus-visible { color: white; }
.archive-intro { max-width: 690px; margin-top: 24px; color: #c7cbc6; font-size: clamp(1rem, 2vw, 1.18rem); }

.archive-section { min-height: 420px; padding: clamp(54px, 7vw, 92px) 0 100px; }
.archive-status { color: #b5bbb6; text-align: center; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.product-card { overflow: hidden; background: #252824; border: 1px solid rgba(226,224,216,.16); box-shadow: 0 17px 36px rgba(0,0,0,.2); }
.product-photo { position: relative; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; color: inherit; background: #10110f; border: 0; cursor: pointer; }
.product-photo:focus-visible { outline: 3px solid var(--brass); outline-offset: -3px; }
/* Show every archived knife photo in full, regardless of its crop or aspect ratio. */
.product-photo img { width: 100%; height: 100%; padding: 10px; object-fit: contain; object-position: center; background: #10110f; transition: opacity .25s ease; }
.product-photo:hover img { opacity: .94; }
.sold-badge, .gallery-count { position: absolute; z-index: 1; top: 14px; padding: 6px 10px; color: white; background: rgba(17,18,16,.88); font-size: .69rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.sold-badge { left: 14px; }
.gallery-count { right: 14px; }
.product-card-body { padding: 23px; }
.product-card-details { margin-top: 16px; }
.product-card-details[hidden] { display: none; }
.product-gallery-button { width: 100%; margin-top: 18px; padding: 11px 14px; color: var(--bone); background: transparent; border: 1px solid rgba(226,224,216,.35); font: inherit; font-size: .75rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.product-gallery-button:hover, .product-gallery-button:focus-visible { border-color: var(--brass); background: rgba(255,255,255,.04); }
.product-meta { margin-top: 9px; color: #adb4ae; font-size: .92rem; }
.product-specs { margin: 19px 0 0; border-top: 1px solid rgba(226,224,216,.14); }
.product-spec-row { display: grid; grid-template-columns: minmax(105px, .8fr) 1.2fr; gap: 14px; padding: 8px 0; border-bottom: 1px solid rgba(226,224,216,.1); }
.product-spec-row dt { color: #959c96; font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.product-spec-row dd { margin: 0; color: #e3e4df; font-size: .84rem; text-align: right; }
.product-notes { margin-top: 16px; color: #c5c9c4; font-size: .87rem; }
.product-sheath-note { margin-top: 17px; padding-top: 14px; color: #b9bdb8; border-top: 1px solid rgba(226,224,216,.14); font-size: .8rem; font-style: italic; }
.empty-state { padding: 52px 28px; text-align: center; border: 1px solid rgba(226,224,216,.15); background: rgba(255,255,255,.025); }
.empty-state p { margin-top: 12px; color: #b8beb9; }

.gallery-dialog { width: min(960px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; color: var(--bone); background: #171916; border: 1px solid rgba(226,224,216,.25); box-shadow: 0 30px 80px rgba(0,0,0,.7); }
.gallery-dialog::backdrop { background: rgba(5,6,5,.88); backdrop-filter: blur(5px); }
.gallery-shell { padding: 22px; }
.gallery-topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.gallery-position { margin-top: 7px; color: #aeb5af; font-size: .84rem; }
.gallery-close, .gallery-control { min-height: 44px; padding: 10px 16px; color: var(--bone); background: transparent; border: 1px solid rgba(226,224,216,.35); cursor: pointer; }
.gallery-close:hover, .gallery-control:hover, .gallery-close:focus-visible, .gallery-control:focus-visible { border-color: var(--brass); }
.gallery-stage { display: grid; place-items: center; min-height: 280px; max-height: 66vh; overflow: hidden; background: #0e0f0d; }
.gallery-image { display: block; width: auto; height: auto; max-width: 100%; max-height: 66vh; object-fit: contain; }
.gallery-controls { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }

footer { padding: 28px 0; color: #aeb4af; background: #10110f; border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; gap: 22px; font-size: .77rem; }
.footer-row a:hover, .footer-row a:focus-visible { color: white; }

@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; gap: 0; padding-top: 10px; }
  .brand { width: 100%; justify-content: center; }
  .nav { width: 100%; justify-content: space-between; gap: 8px; margin-top: 9px; padding: 9px 0 11px; border-top: 1px solid var(--line); }
  .nav a { white-space: nowrap; font-size: clamp(.55rem, 2.25vw, .72rem); letter-spacing: .035em; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-row { flex-direction: column; }
}

@media (max-width: 560px) {
  .wrap { width: min(calc(100% - 28px), var(--max)); }
  .brand span { max-width: none; font-size: .86rem; white-space: nowrap; }
  .archive-hero { padding-top: 60px; }
  .back-link { margin-bottom: 28px; }
  .product-grid { grid-template-columns: 1fr; gap: 18px; }
  .product-card-body { padding: 20px; }
  .gallery-shell { padding: 15px; }
  .gallery-stage, .gallery-image { max-height: 59vh; }
  .gallery-topbar h2 { font-size: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .product-photo img { transition: none; }
}

/* Keep Netlify's hosting HUD out of the customer-facing Archive page. */
#nl-badge-frame {
  display: none !important;
}
