/* ══════════════════════════════════════════════════════════════════
   ADINKRA CODEX — SPECIMEN VAULT
   Breezy ArtDrop Studios · Template 06

   The symbols ship as white silhouettes on transparency, so the whole
   design is built around that fact: a near-black ground lets every mark
   sit in it without a single edit to the source art.
   ═════════════════════════════════════════════════════════════════ */

:root {
  --ink: #0a0a0b;
  --ink-2: #121214;
  --ink-3: #1a1a1d;
  --line: rgba(240, 232, 216, 0.13);
  --line-2: rgba(240, 232, 216, 0.28);
  --paper: #f2ece0;
  --paper-2: rgba(242, 236, 224, 0.62);
  --paper-3: rgba(242, 236, 224, 0.38);
  --gold: #d9a441;
  --gold-2: #f0c169;
  --gold-dim: rgba(217, 164, 65, 0.13);
  --clay: #b8553a;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --gut: clamp(20px, 4vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* The bag panel and scrim are laid out with display:flex/block, which by
   specificity beats the [hidden] attribute's default display:none — so
   without this they ship open. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* the stamped grid of the adinkra cloth itself, very quiet */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(240, 232, 216, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 232, 216, 0.022) 1px, transparent 1px);
  background-size: 46px 46px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.cx-skip {
  position: fixed; top: -60px; left: 16px; z-index: 300;
  background: var(--gold); color: var(--ink);
  padding: 10px 18px; font-weight: 700; font-size: 12px;
  transition: top 0.2s var(--ease);
}
.cx-skip:focus { top: 14px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; }
em { font-style: italic; }

.cx-h2 { font-size: clamp(28px, 3.6vw, 46px); }
.cx-h2-center { text-align: center; }
.cx-sub {
  margin-top: 12px; max-width: 52ch;
  color: var(--paper-2); font-size: 13.5px; line-height: 1.7;
}

/* ══════════ TOP BAR ══════════ */
.cx-top {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 66px; padding: 0 var(--gut);
  background: rgba(10, 10, 11, 0.82);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.cx-mark { display: flex; align-items: center; gap: 10px; }
.cx-mark-glyph {
  width: 22px; height: 22px; flex: none;
  background: var(--paper);
  -webkit-mask: url("assets/symbols/adinkrahene.svg") center/contain no-repeat;
  mask: url("assets/symbols/adinkrahene.svg") center/contain no-repeat;
}
.cx-mark-text {
  font-family: var(--serif); font-size: 16px; font-weight: 600;
  letter-spacing: 0.02em;
}
.cx-mark-text em { color: var(--gold); font-style: italic; margin-left: 2px; }

.cx-top-nav { display: flex; gap: 26px; font-size: 12px; letter-spacing: 0.06em; }
.cx-top-nav a { color: var(--paper-2); transition: color 0.18s var(--ease); }
.cx-top-nav a:hover { color: var(--paper); }

.cx-bag-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px; background: transparent;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  cursor: pointer; transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.cx-bag-btn:hover { border-color: var(--gold); background: var(--gold-dim); }
.cx-bag-count {
  min-width: 19px; height: 19px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--gold); color: var(--ink);
  border-radius: 999px; font-size: 10px; font-weight: 700;
}

/* ══════════ HERO ══════════ */
.cx-hero {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding: clamp(50px, 7vw, 96px) var(--gut) clamp(56px, 7vw, 104px);
  border-bottom: 1px solid var(--line);
}

.cx-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--paper-3);
}
.cx-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 9px var(--gold);
  animation: cxPulse 2.4s ease-in-out infinite;
}
@keyframes cxPulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.35 } }

.cx-hero h1 {
  margin: 20px 0 18px;
  font-size: clamp(38px, 6vw, 78px);
  font-weight: 400;
}
.cx-hero h1 em { color: var(--gold); }

.cx-lede { max-width: 48ch; color: var(--paper-2); font-size: 14px; line-height: 1.75; }

.cx-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.cx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border: 1px solid transparent; border-radius: 2px;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease),
              border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.cx-btn-solid { background: var(--gold); color: var(--ink); }
.cx-btn-solid:hover { background: var(--gold-2); transform: translateY(-1px); }
.cx-btn-ghost { border-color: var(--line-2); color: var(--paper); }
.cx-btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

.cx-hero-stats {
  display: flex; flex-wrap: wrap; gap: 34px;
  margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line);
}
.cx-hero-stats dt {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--paper-3);
}
.cx-hero-stats dd { font-family: var(--serif); font-size: 22px; margin-top: 5px; }

/* the drifting wall of real marks */
.cx-hero-wall {
  position: relative; height: clamp(340px, 46vw, 520px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
}
.cx-wall-col { display: grid; gap: 12px; padding: 12px; align-content: start; }
/* Generous padding keeps each glyph well under the 192px source, so the
   marks stay crisp at hero size rather than showing the upscale. */
.cx-wall-col img {
  width: 100%; aspect-ratio: 1; object-fit: contain;
  opacity: 0.5; padding: 26px;
  background: rgba(240, 232, 216, 0.025);
  border: 1px solid var(--line);
}
#wallA { animation: cxDriftUp 46s linear infinite; }
#wallB { animation: cxDriftDown 52s linear infinite; }
#wallC { animation: cxDriftUp 58s linear infinite; }
@keyframes cxDriftUp { from { transform: translateY(0) } to { transform: translateY(-50%) } }
@keyframes cxDriftDown { from { transform: translateY(-50%) } to { transform: translateY(0) } }

.cx-wall-fade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, var(--ink) 0%, transparent 22%, transparent 78%, var(--ink) 100%);
}

/* ══════════ VAULT ══════════ */
.cx-vault { position: relative; z-index: 1; padding: clamp(48px, 6vw, 82px) var(--gut); }

.cx-vault-head {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: 22px;
}

.cx-search {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; min-width: 280px;
  border: 1px solid var(--line); border-radius: 2px;
  background: var(--ink-2); color: var(--paper-3);
  transition: border-color 0.18s var(--ease);
}
.cx-search:focus-within { border-color: var(--gold); }
.cx-search input {
  flex: 1; background: none; border: 0; outline: none;
  font-size: 12.5px; color: var(--paper);
}
.cx-search input::placeholder { color: var(--paper-3); }

.cx-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 26px 0 22px;
}
.cx-chip {
  padding: 7px 15px; background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: 11px; letter-spacing: 0.06em; color: var(--paper-2);
  cursor: pointer; transition: all 0.18s var(--ease);
}
.cx-chip:hover { border-color: var(--line-2); color: var(--paper); }
.cx-chip.on { background: var(--paper); border-color: var(--paper); color: var(--ink); font-weight: 600; }
.cx-chip-n { opacity: 0.5; margin-left: 6px; }

.cx-vault-body {
  display: grid; grid-template-columns: minmax(0, 1fr) 350px;
  gap: clamp(20px, 3vw, 40px); align-items: start;
}

.cx-grid-wrap { min-width: 0; }
.cx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 10px; outline: none;
}

.cx-cell {
  position: relative; aspect-ratio: 1;
  display: grid; place-items: center;
  padding: 16px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease),
              transform 0.16s var(--ease);
}
.cx-cell img {
  width: 100%; height: 100%; object-fit: contain;
  opacity: 0.82; transition: opacity 0.16s var(--ease);
}
.cx-cell:hover { background: var(--ink-3); border-color: var(--line-2); transform: translateY(-2px); }
.cx-cell:hover img { opacity: 1; }
.cx-cell[aria-selected="true"] {
  border-color: var(--gold); background: var(--gold-dim);
}
.cx-cell[aria-selected="true"] img { opacity: 1; }
.cx-cell[aria-selected="true"]::after {
  content: ""; position: absolute; inset: -1px;
  border: 1px solid var(--gold); pointer-events: none;
}
.cx-cell-name {
  position: absolute; left: 0; right: 0; bottom: 5px;
  font-size: 8.5px; letter-spacing: 0.04em; text-align: center;
  color: var(--paper-3); padding: 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transition: opacity 0.16s var(--ease);
}
.cx-cell:hover .cx-cell-name,
.cx-cell[aria-selected="true"] .cx-cell-name { opacity: 1; }

.cx-empty { padding: 48px 8px; color: var(--paper-3); font-size: 13px; }
.cx-empty b { color: var(--gold); font-weight: 600; }

/* detail plate */
.cx-detail {
  position: sticky; top: 88px;
  padding: 26px 24px 24px;
  background: var(--ink-2);
  border: 1px solid var(--line);
}
.cx-detail-plate {
  position: relative;
  display: grid; place-items: center;
  padding: 26px; margin-bottom: 22px;
  background:
    radial-gradient(circle at 50% 42%, rgba(217, 164, 65, 0.09), transparent 68%),
    var(--ink);
  border: 1px solid var(--line);
}
/* The plate renders the SVG master through a mask, so the mark stays sharp
   at any size and takes its colour from the design tokens. */
.cx-plate-glyph {
  width: 132px; height: 132px;
  background: var(--paper);
  -webkit-mask: center / contain no-repeat; mask: center / contain no-repeat;
}
.cx-plate-ref {
  position: absolute; top: 10px; right: 12px;
  font-size: 9.5px; letter-spacing: 0.14em; color: var(--paper-3);
}

.cx-detail-theme {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
}
.cx-detail-name { font-size: 27px; margin: 7px 0 4px; }
.cx-detail-lit { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--paper-2); }
.cx-detail-meaning {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.72; color: var(--paper-2);
}

.cx-formats { border: 0; margin: 22px 0 16px; }
.cx-formats legend {
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--paper-3); margin-bottom: 10px;
}
.cx-fmt { display: block; margin-bottom: 7px; cursor: pointer; }
.cx-fmt input { position: absolute; opacity: 0; pointer-events: none; }
.cx-fmt span {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--line);
  transition: border-color 0.16s var(--ease), background 0.16s var(--ease);
}
.cx-fmt b { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; }
.cx-fmt i { font-style: normal; font-size: 11px; color: var(--paper-3); }
.cx-fmt:hover span { border-color: var(--line-2); }
.cx-fmt input:checked + span { border-color: var(--gold); background: var(--gold-dim); }
.cx-fmt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.cx-add { width: 100%; }
.cx-detail-note { margin-top: 12px; font-size: 10.5px; line-height: 1.6; color: var(--paper-3); }

/* ══════════ LICENCE ══════════ */
.cx-license {
  position: relative; z-index: 1;
  padding: clamp(48px, 6vw, 86px) var(--gut);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--ink-2);
}
.cx-license-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(28px, 4vw, 60px); align-items: center;
}
.cx-license-list { list-style: none; margin-top: 24px; display: grid; gap: 11px; }
.cx-license-list li {
  position: relative; padding-left: 24px;
  font-size: 12.5px; color: var(--paper-2);
}
.cx-license-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 11px; height: 11px; background: var(--gold);
  -webkit-mask: url("assets/symbols/adinkrahene.svg") center/contain no-repeat;
  mask: url("assets/symbols/adinkrahene.svg") center/contain no-repeat;
}

.cx-license-card {
  padding: 30px 26px; text-align: center;
  background: var(--ink); border: 1px solid var(--line-2);
}
.cx-lc-label {
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--paper-3);
}
.cx-lc-price { margin: 14px 0 6px; font-family: var(--serif); }
.cx-lc-price b { font-size: 48px; font-weight: 500; }
.cx-lc-price s { font-size: 17px; color: var(--paper-3); margin-left: 10px; }
.cx-lc-sub { font-size: 11.5px; color: var(--paper-2); }
.cx-lc-btn { width: 100%; margin-top: 20px; }
.cx-lc-fine { margin-top: 12px; font-size: 10.5px; color: var(--paper-3); }

/* ══════════ FULL CODEX ══════════ */
.cx-codex { position: relative; z-index: 1; padding: clamp(48px, 6vw, 86px) var(--gut); }
.cx-codex-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 7px; margin-top: 34px;
}
.cx-codex-grid img {
  width: 100%; aspect-ratio: 1; object-fit: contain;
  padding: 9px; opacity: 0.36;
  background: var(--ink-2); border: 1px solid var(--line);
  transition: opacity 0.18s var(--ease), background 0.18s var(--ease);
}
.cx-codex-grid img:hover { opacity: 1; background: var(--ink-3); }

/* ══════════ FOOTER ══════════ */
.cx-foot {
  position: relative; z-index: 1;
  padding: clamp(40px, 5vw, 64px) var(--gut);
  border-top: 1px solid var(--line); background: var(--ink-2);
}
.cx-foot-in { display: grid; gap: 14px; max-width: 62ch; }
.cx-foot-brand { font-family: var(--serif); font-size: 19px; }
.cx-foot-brand em { color: var(--gold); font-style: italic; margin-left: 2px; }
.cx-foot-note { font-size: 12px; line-height: 1.75; color: var(--paper-2); }
.cx-foot-legal { font-size: 10.5px; color: var(--paper-3); }

/* ══════════ BAG ══════════ */
.cx-bag-scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: cxFade 0.2s var(--ease);
}
@keyframes cxFade { from { opacity: 0 } to { opacity: 1 } }

.cx-bag {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(400px, 92vw);
  display: flex; flex-direction: column;
  background: var(--ink-2); border-left: 1px solid var(--line-2);
  animation: cxSlide 0.28s var(--ease);
}
@keyframes cxSlide { from { transform: translateX(100%) } to { transform: translateX(0) } }

.cx-bag-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--line);
}
.cx-bag-head h2 { font-size: 20px; }
.cx-bag-close {
  width: 32px; height: 32px; background: none;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 19px; line-height: 1; cursor: pointer; color: var(--paper-2);
  transition: all 0.18s var(--ease);
}
.cx-bag-close:hover { border-color: var(--gold); color: var(--gold); }

.cx-bag-items { flex: 1; overflow-y: auto; padding: 16px 22px; }
.cx-bag-empty { padding: 44px 0; text-align: center; font-size: 12.5px; color: var(--paper-3); }

.cx-bag-row {
  display: grid; grid-template-columns: 44px 1fr auto;
  gap: 13px; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.cx-bag-row img {
  width: 44px; height: 44px; object-fit: contain; padding: 7px;
  background: var(--ink); border: 1px solid var(--line);
}
.cx-bag-name { font-size: 12.5px; font-weight: 600; }
.cx-bag-fmt { font-size: 10.5px; color: var(--paper-3); letter-spacing: 0.06em; }
.cx-bag-price { font-size: 12.5px; font-weight: 600; }
.cx-bag-del {
  display: block; margin-top: 3px; margin-left: auto;
  background: none; border: 0; padding: 0;
  font-size: 10px; color: var(--paper-3); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.cx-bag-del:hover { color: var(--clay); }

.cx-bag-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); }
.cx-bag-total {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.cx-bag-total span { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--paper-3); }
.cx-bag-total b { font-family: var(--serif); font-size: 29px; font-weight: 500; }
.cx-bag-checkout { width: 100%; }
.cx-bag-fine { margin-top: 11px; text-align: center; font-size: 10.5px; color: var(--paper-3); }

/* ══════════ TOAST ══════════ */
.cx-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 200;
  transform: translate(-50%, 20px);
  padding: 12px 22px;
  background: var(--paper); color: var(--ink);
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.cx-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ══════════ RESPONSIVE ══════════ */
@media (max-width: 1040px) {
  .cx-hero { grid-template-columns: 1fr; }
  .cx-hero-wall { height: 300px; order: -1; }
  .cx-vault-body { grid-template-columns: 1fr; }
  .cx-detail { position: static; }
  .cx-license-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .cx-top { height: 58px; gap: 12px; }
  .cx-top-nav { display: none; }
  .cx-mark-text { font-size: 14px; }
  .cx-hero h1 { font-size: clamp(32px, 9vw, 48px); }
  .cx-hero-stats { gap: 22px; }
  .cx-vault-head { flex-direction: column; align-items: stretch; }
  .cx-search { min-width: 0; }
  .cx-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .cx-hero-cta .cx-btn { flex: 1 1 auto; }
}

/* ══════════ BAS STANDALONE BADGE ══════════ */
.bas-standalone-badge {
  position: fixed; top: 14px; left: 20px; z-index: 1000; display: flex;
}
.bas-badge-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px;
  background: rgba(10, 10, 11, 0.94);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid rgba(217, 164, 65, 0.4);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: #fff;
}
.bas-pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px var(--gold);
  animation: pulseGoldDot 2s infinite ease-in-out;
}
@keyframes pulseGoldDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.bas-badge-brand { font-weight: 700; color: var(--gold); }
.bas-badge-sep { opacity: 0.4; }
.bas-badge-title { color: #a0a0a0; }
.bas-badge-btn {
  display: inline-block; padding: 3px 9px;
  background: rgba(217, 164, 65, 0.15); color: var(--gold);
  border-radius: 999px; font-weight: 700;
  transition: all 0.2s ease;
}
.bas-badge-btn:hover { background: var(--gold); color: var(--ink); }

@media (max-width: 880px) {
  .bas-standalone-badge { left: 10px; right: 10px; }
  .bas-badge-inner { width: 100%; font-size: 9.5px; gap: 6px; padding: 5px 10px; }
  .bas-badge-title { display: none; }
}
