/* ============================================================
   COLD BLUE — the collector's gun room
   Aesthetic: oil-blued steel, color-case-hardening, brass,
   aged ivory. Engraved-catalog display + stamped-ledger data.
   ============================================================ */

:root {
  /* Subject-derived palette */
  --void:     #0A0C10;   /* oil-blued steel in shadow (base) */
  --void-2:   #0D1016;
  --steel:    #161B22;   /* raised panel */
  --steel-2:  #1F2630;   /* hover / elevated */
  --line:     #2A323D;   /* hairlines */
  --blue:     #20406B;   /* deep cold blue */
  --sheen:    #6FA0D6;   /* cold raking highlight */
  --sheen-hi: #AFCBEC;   /* brightest specular */
  --brass:    #B68A4E;   /* cartridge brass / engraving gold */
  --brass-hi: #D8B173;
  --bone:     #ECE6D8;   /* aged ivory text */
  --ash:      #8A93A0;   /* muted slate (secondary text) */
  --ash-dim:  #5C6573;

  /* Signature: color-case-hardening iridescence */
  --casehardened: linear-gradient(100deg,
      #3E6FA3 0%, #4E5FA0 22%, #6E5C9E 40%,
      #8C7E63 58%, #C9A24B 74%, #7C7A6A 88%, #5A6470 100%);

  --display: "Bodoni Moda", "Times New Roman", serif;
  --body:    "Hanken Grotesk", system-ui, sans-serif;
  --mono:    "Space Mono", ui-monospace, monospace;

  --maxw: 1600px;
  --pad: clamp(20px, 5vw, 76px);
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(32,64,107,0.28), transparent 60%),
    radial-gradient(900px 600px at 0% 0%, rgba(111,160,214,0.06), transparent 55%),
    var(--void);
  color: var(--bone);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(111,160,214,0.3); color: var(--bone); }

/* ---------- Shared type primitives ---------- */
.display {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.stamp {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ash);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.stamp::before {
  content: "";
  width: 14px; height: 1px;
  background: var(--brass);
}
.stamp--lg { font-size: 0.72rem; color: var(--brass-hi); }
.stamp--lg::before { width: 22px; }

/* Cold-blue raking sheen across the wordmark */
.sheen {
  background: linear-gradient(100deg,
    var(--bone) 0%, var(--bone) 38%,
    var(--sheen-hi) 47%, #ffffff 50%, var(--sheen) 54%,
    var(--bone) 64%, var(--bone) 100%);
  background-size: 280% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rake 7s ease-in-out infinite;
}
@keyframes rake {
  0%, 18% { background-position: 120% 0; }
  60%, 100% { background-position: -40% 0; }
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 0.85em 1.5em;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--steel);
  color: var(--bone);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  transition: border-color .25s, background .25s, transform .25s, color .25s;
}
.btn:hover { border-color: var(--sheen); background: var(--steel-2); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--sheen); outline-offset: 3px; }
.btn--brass {
  background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  color: #1a140a;
  border-color: transparent;
}
.btn--brass:hover { color: #120d05; filter: brightness(1.06); }
.btn--ghost { background: transparent; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem var(--pad);
  background: rgba(10,12,16,0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand__mark { color: var(--sheen); display: inline-flex; }
.brand__word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.32rem;
  letter-spacing: 0.01em;
}
.nav__links { display: flex; gap: 1.8rem; font-size: 0.95rem; }
.nav__links a {
  color: var(--ash);
  position: relative;
  padding: 0.2rem 0;
  transition: color .2s;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--bone); }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--casehardened); background-size: 200% 100%;
}

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: clamp(48px, 8vw, 104px); }
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}
.section__title { font-family: var(--display); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section__link { color: var(--ash); font-size: 0.9rem; transition: color .2s; }
.section__link:hover { color: var(--sheen); }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 11vw, 150px); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.hero__eyebrow { margin-bottom: 2rem; }
.hero__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  margin: 0;
}
.hero__title .amp { color: var(--ash-dim); font-weight: 400; font-style: italic; }
.hero__lede {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  color: var(--bone);
  margin: 1.6rem 0 0;
  max-width: 30ch;
  line-height: 1.3;
}
.hero__sub { color: var(--ash); margin: 1.1rem 0 2.2rem; max-width: 42ch; }
.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }

/* faint engraved scroll motif behind hero */
.hero__engraving {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background:
    repeating-linear-gradient(125deg, transparent 0 38px, rgba(111,160,214,0.025) 38px 39px);
  mask-image: radial-gradient(80% 80% at 70% 30%, #000 30%, transparent 75%);
}

/* the featured "museum object" */
.hero__feature { perspective: 1200px; }

/* ============================================================
   PLATE — generated "object in a display case" placeholder
   A blued-steel panel with maker monogram, case-hardened
   hairline, proof-mark corner, and a sweeping cold-blue sheen.
   ============================================================ */
.plate {
  --hue: 212;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 80% at 50% 0%, hsla(var(--hue), 38%, 26%, 0.55), transparent 60%),
    linear-gradient(155deg, #0e1218 0%, #1a2128 46%, #0c0f14 100%);
  isolation: isolate;
}
.plate::before { /* specular raking band — the cold blue sheen */
  content: "";
  position: absolute;
  top: -20%; bottom: -20%;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, hsla(var(--hue),60%,78%,0.34), transparent);
  transform: skewX(-14deg);
  transition: left .9s cubic-bezier(.2,.7,.2,1);
  z-index: 2;
}
.plate::after { /* fine engraving hairlines */
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, transparent 0 7px, rgba(255,255,255,0.012) 7px 8px);
  z-index: 1;
}
.plate__monogram {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3rem, 12vw, 5.5rem);
  color: hsla(var(--hue), 30%, 70%, 0.14);
  letter-spacing: 0.04em;
  z-index: 1;
}
/* real photo fills the case; dark scrim keeps the stamps legible */
.plate__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
  filter: saturate(0.92) contrast(1.02);
}
.plate--photo::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(0deg, rgba(8,10,14,0.9) 0%, rgba(8,10,14,0.1) 34%, rgba(8,10,14,0) 56%),
    linear-gradient(180deg, rgba(8,10,14,0.45), rgba(8,10,14,0) 30%);
}
.plate__chip { /* case-hardened iridescent top hairline */
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--casehardened); background-size: 220% 100%;
  z-index: 3;
}
.plate__proof { /* proof-mark stamp, bottom corner */
  position: absolute; left: 12px; bottom: 11px; z-index: 3;
  font-family: var(--mono);
  font-size: 0.6rem; letter-spacing: 0.18em;
  color: hsla(var(--hue), 35%, 80%, 0.62);
}
.plate__year {
  position: absolute; right: 12px; bottom: 11px; z-index: 3;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em;
  color: var(--ash-dim);
}

/* ============================================================
   PIECE CARDS / GALLERY GRID
   ============================================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}
.card {
  display: block;
  background: var(--steel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.card:hover {
  border-color: rgba(111,160,214,0.5);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(0,0,0,0.9), 0 0 0 1px rgba(111,160,214,0.08);
}
.card:hover .plate::before { left: 130%; }      /* sweep the sheen */
.card:focus-visible { outline: 2px solid var(--sheen); outline-offset: 2px; }
.card__body { padding: 1.1rem 1.15rem 1.25rem; }
.card__maker { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); }
.card__name { font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1.08; margin: 0.35rem 0 0.7rem; }
.card__meta { display: flex; flex-wrap: wrap; gap: 0.45rem 0.9rem; font-family: var(--mono); font-size: 0.72rem; color: var(--ash); }
.card__meta b { color: var(--bone); font-weight: 400; }

/* proof-mark badges */
.badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.badge {
  font-family: var(--mono);
  font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.32em 0.6em;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ash);
}
.badge--grade { color: var(--bone); border-color: var(--brass); }
.badge--queen { color: #1a140a; background: linear-gradient(180deg,var(--brass-hi),var(--brass)); border-color: transparent; }
.badge--cr { color: var(--sheen); border-color: rgba(111,160,214,0.4); }

/* ============================================================
   THREE TENETS
   ============================================================ */
.tenets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tenet { background: var(--void-2); padding: clamp(1.6rem,3vw,2.6rem); }
.tenet__no { font-family: var(--mono); font-size: 0.72rem; color: var(--brass); letter-spacing: 0.2em; }
.tenet__title { font-family: var(--display); font-size: 1.7rem; font-weight: 600; margin: 0.7rem 0 0.5rem; }
.tenet__body { color: var(--ash); font-size: 0.95rem; margin: 0; }

/* ============================================================
   COLLECTIONS INDEX
   ============================================================ */
.collections-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px,1fr)); gap: 1.2rem; }
.coll-card {
  display: flex; gap: 1.1rem; align-items: center;
  padding: 1.2rem; background: var(--steel); border: 1px solid var(--line);
  border-radius: var(--radius); transition: border-color .3s, transform .3s;
}
.coll-card:hover { border-color: rgba(111,160,214,0.45); transform: translateY(-2px); }
.crest {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 1.5rem; color: var(--bone);
  background:
    radial-gradient(circle at 35% 30%, hsla(var(--hue,212),45%,40%,0.9), #0c0f14 75%);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,0.35);
}
.coll-card__name { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.coll-card__focus { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; color: var(--brass); text-transform: uppercase; }
.coll-card__count { color: var(--ash); font-size: 0.85rem; margin-top: 0.2rem; }

/* ============================================================
   COLLECTION PROFILE (a member's gun room)
   ============================================================ */
.profile-head {
  display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap;
  padding-block: clamp(2rem, 5vw, 3.6rem);
}
.profile-head .crest { width: 92px; height: 92px; font-size: 2.1rem; }
.profile-head__name { font-family: var(--display); font-size: clamp(2rem,5vw,3rem); font-weight: 600; margin: 0; }
.profile-head__focus { margin-top: 0.5rem; }
.profile-head__bio { color: var(--ash); max-width: 56ch; margin: 0.8rem 0 0; }
.profile-head__by { margin-top: 1rem; }
.section--tight { padding-top: 1rem; }
.profile-stats { display: flex; gap: 2.2rem; margin-left: auto; }
.stat__n { font-family: var(--display); font-size: 1.9rem; font-weight: 600; }
.stat__l { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); }

/* ============================================================
   PIECE DETAIL
   ============================================================ */
.piece { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-block: clamp(2rem, 4vw, 3rem); }
.piece__plate .plate { aspect-ratio: 4 / 3; }
.piece__thumbs { display: flex; gap: 0.7rem; margin-top: 0.8rem; }
.piece__thumbs .plate { aspect-ratio: 1; flex: 1; }
.piece__maker { font-family: var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--brass); font-size: 0.74rem; }
.piece__name { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; line-height: 1.02; margin: 0.6rem 0 0.4rem; }
.piece__from { color: var(--ash); margin-bottom: 1.4rem; }
.piece__from a { color: var(--sheen); }

/* stamped spec ledger */
.ledger { border-top: 1px solid var(--line); margin: 1.4rem 0; }
.ledger__row { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.ledger__k { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); padding-top: 0.15rem; }
.ledger__v { font-size: 0.98rem; color: var(--bone); }
.ledger__v .mono { font-family: var(--mono); font-size: 0.9rem; }

.fieldnotes { margin: 1.6rem 0; }
.fieldnotes h3 { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--brass); margin: 0 0 0.6rem; }
.fieldnotes p { color: #d7d2c6; line-height: 1.75; margin: 0 0 0.9rem; }
.fieldnotes p:first-letter { } /* reserved */

.notforsale {
  position: relative;
  display: flex; gap: 0.8rem; align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--void-2); border-radius: var(--radius);
  padding: 1.05rem 1.1rem; margin-top: 1.6rem;
  overflow: hidden;
}
.notforsale::before { /* case-hardened top hairline — the brand's repeated signature, not a side tab */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--casehardened); background-size: 220% 100%; opacity: 0.8;
}
.notforsale span { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-hi); white-space: nowrap; padding-top: 0.15rem; }
.notforsale p { margin: 0; color: var(--ash); font-size: 0.88rem; }

.backlink { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--ash); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.5rem; transition: color .2s; }
.backlink:hover { color: var(--sheen); }

/* ============================================================
   ABOUT / THE CODE
   ============================================================ */
.prose { max-width: 64ch; }
.prose h1 { font-family: var(--display); font-size: clamp(2.2rem,5vw,3.2rem); font-weight: 600; line-height: 1.04; }
.prose h2 { font-family: var(--display); font-size: 1.5rem; font-weight: 600; margin-top: 2.4rem; }
.prose p { color: #cdc8bc; }
.prose strong { color: var(--bone); }
.code-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.code-list li { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.code-list .n { font-family: var(--mono); color: var(--brass); font-size: 0.8rem; padding-top: 0.2rem; }
.code-list b { font-family: var(--display); font-size: 1.15rem; font-weight: 600; display: block; }
.code-list p { margin: 0.3rem 0 0; color: var(--ash); font-size: 0.92rem; }

/* ---------- filter bar (explore) ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.chip {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.5em 0.95em; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ash); cursor: pointer; transition: all .2s;
}
.chip:hover { color: var(--bone); border-color: var(--ash-dim); }
.chip[aria-pressed="true"] { color: #120d05; background: linear-gradient(180deg,var(--brass-hi),var(--brass)); border-color: transparent; }
.chip:focus-visible { outline: 2px solid var(--sheen); outline-offset: 2px; }
.result-count { font-family: var(--mono); font-size: 0.72rem; color: var(--ash-dim); letter-spacing: 0.1em; margin-left: auto; align-self: center; }

/* ============================================================
   GATE (entry acknowledgement)
   ============================================================ */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: var(--pad);
  background: rgba(6,7,10,0.86);
  backdrop-filter: blur(8px);
}
.gate[hidden] { display: none; }  /* class display would otherwise beat UA [hidden] */
.gate__card {
  max-width: 480px; width: 100%;
  background: linear-gradient(180deg, var(--steel), var(--void-2));
  border: 1px solid var(--line);
  border-top: 2px solid transparent;
  border-image: var(--casehardened) 1;
  border-radius: var(--radius);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  text-align: left;
}
.gate__title { font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1.1; margin: 1rem 0 0.8rem; }
.gate__body { color: var(--ash); font-size: 0.96rem; }
.gate__body em { color: var(--bone); font-style: italic; }
.gate__card .btn { width: 100%; justify-content: center; margin-top: 1.2rem; }
.gate__fine { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; color: var(--ash-dim); text-align: center; margin: 1rem 0 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot { margin-top: 2rem; padding: 0 var(--pad) 3rem; }
.foot__rule { height: 2px; background: var(--casehardened); background-size: 200% 100%; opacity: 0.7; margin-bottom: 2.5rem; max-width: var(--maxw); margin-inline: auto; }
.foot__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1.6fr 0.8fr; gap: 2rem; align-items: start; }
.foot__tag { color: var(--ash); font-size: 0.9rem; max-width: 28ch; margin-top: 0.4rem; }
.foot__col p { color: var(--ash); font-size: 0.84rem; margin: 0.7rem 0 0; }
.foot__meta { display: flex; flex-direction: column; gap: 0.5rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; color: var(--ash-dim); text-transform: uppercase; }

/* ---------- loading / error states ---------- */
.status { min-height: 52vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 0.4rem; }
.status__msg { color: var(--ash); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; }
.status .btn { margin-top: 1.4rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__feature { max-width: 420px; }
  .piece { grid-template-columns: 1fr; }
  .tenets { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; }
  .profile-stats { margin-left: 0; width: 100%; }
  .nav__links { gap: 1.1rem; font-size: 0.85rem; }
}
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; gap: 0.6rem; }
  .nav__links a:last-child { display: none; }
  .ledger__row { grid-template-columns: 110px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .sheen { animation: none; background-position: 30% 0; }
  .plate::before { transition: none; }
  * { scroll-behavior: auto !important; }
}
