/* ============================================================
   The Gift Shop — merch page for chrisilic.com

   Same museum-at-night as the rest of the site: the serif, the
   brass, the hairlines. A shop, not a spectacle. Every class is
   prefixed `mx-`, so nothing here can collide with anything the
   site already has.

   Load this AFTER styles.css.
   ============================================================ */

.merch-page {
  --mx-line: rgba(236, 230, 218, .12);
  --mx-panel: rgba(20, 18, 15, .5);
  --mx-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
             "Liberation Mono", monospace;
}

/* ---------- the head of the page ---------- */
.mx {
  padding: clamp(7rem, 14vw, 11rem) clamp(1.2rem, 5vw, 4rem) 0;
  max-width: 84rem;
  margin: 0 auto;
}
.mx-head { max-width: 46rem; margin: 0 auto clamp(3rem, 7vw, 5rem); text-align: center }
.mx-title {
  font-family: var(--display, Georgia, serif);
  font-weight: 300; font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: .95; letter-spacing: .01em; margin: .5rem 0 1.4rem;
}
.mx-title em { font-style: italic; color: var(--accent-soft, #c9ad78) }
.mx-lede {
  color: var(--dim, #9c9384); font-style: italic;
  font-size: clamp(1.02rem, 2vw, 1.22rem); line-height: 1.75;
}

/* ---------- the shelves ---------- */
.mx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1rem, 2.4vw, 1.8rem);
  list-style: none; padding: 0; margin: 0;
}
.mx-item { display: flex }

.mx-card {
  position: relative;
  display: flex; flex-direction: column; width: 100%;
  background: var(--mx-panel);
  border: 1px solid var(--line-soft, rgba(236,230,218,.08));
  transition: border-color .45s var(--ease, cubic-bezier(.16,1,.3,1)),
              transform .45s var(--ease, cubic-bezier(.16,1,.3,1)),
              box-shadow .45s var(--ease, cubic-bezier(.16,1,.3,1));
}
.mx-card:hover {
  border-color: var(--line, rgba(236,230,218,.14));
  transform: translateY(-3px);
  box-shadow: 0 40px 70px -50px #000;
}

/* the picture. A button, because it opens the case. */
.mx-shot {
  position: relative; display: block; width: 100%;
  aspect-ratio: 4 / 5; overflow: hidden;
  background:
    radial-gradient(70% 60% at 50% 34%, rgba(236,230,218,.05), transparent 70%),
    #100e0c;
  border: 0; padding: 0; cursor: pointer;
  border-bottom: 1px solid var(--line-soft, rgba(236,230,218,.08));
}
.mx-shot img {
  width: 100%; height: 100%; object-fit: contain; object-position: 50% 46%;
  padding: clamp(.6rem, 2vw, 1.2rem);
  filter: drop-shadow(0 24px 26px rgba(0,0,0,.55));
  transition: transform .7s var(--ease, cubic-bezier(.16,1,.3,1));
}
.mx-card:hover .mx-shot img { transform: scale(1.045) }

/* The apparel renders are cut-outs and float on the dark card. The rest are
   photographs with their own backgrounds, so they fill the frame instead of
   sitting in it as a pale rectangle. */
.mx-shot.is-photo img {
  object-fit: cover; object-position: 50% 50%;
  padding: 0; filter: none;
}
.mx-shot.is-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(11,10,9,.34) 0%, transparent 26%,
                              transparent 62%, rgba(11,10,9,.5) 100%);
}

/* the plate for anything with no photograph — the same line the
   personnel archive uses when a file has no picture in it */
.mx-void {
  /* one column of centred lines — a grid would give each line a row of
     its own and stretch them to the full height of the frame */
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
  font-family: var(--mx-mono);
  font-size: .62rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--dimmer, #6c6456); line-height: 2;
}
.mx-void b { color: var(--accent, #b8985c); font-weight: 400 }

/* a corner tag for the ones you cannot simply buy */
.mx-tag {
  position: absolute; top: .85rem; left: .85rem;
  font-family: var(--mx-mono);
  font-size: .54rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent, #b8985c);
  background: rgba(8,7,6,.72);
  border: 1px solid rgba(184,152,92,.35);
  padding: .32rem .55rem;
  backdrop-filter: blur(3px);
}

/* ---------- the label under it ---------- */
.mx-body { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.3rem 1.4rem }
.mx-kind {
  font-family: var(--mx-mono);
  font-size: .56rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--dimmer, #6c6456); margin-bottom: .7rem;
}
.mx-name {
  font-family: var(--display, Georgia, serif);
  font-weight: 500; font-size: 1.32rem; line-height: 1.15; letter-spacing: .01em;
  margin-bottom: .55rem;
}
.mx-blurb { color: var(--dim, #9c9384); font-size: .96rem; line-height: 1.65; flex: 1 }
.mx-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1.3rem; padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft, rgba(236,230,218,.08));
}
.mx-price {
  font-family: var(--mx-mono);
  font-size: .58rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dimmer, #6c6456);
}

/* ---------- buttons ---------- */
.mx-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--serif, Georgia, serif);
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  padding: .72rem 1.1rem; white-space: nowrap;
  border: 1px solid var(--line, rgba(236,230,218,.14));
  background: transparent; color: var(--ink, #ece6da); cursor: pointer;
  transition: background .4s var(--ease, cubic-bezier(.16,1,.3,1)),
              color .4s, border-color .4s, transform .4s;
}
.mx-btn:hover { background: var(--ink, #ece6da); color: #140f07; border-color: var(--ink, #ece6da) }
.mx-btn-quiet { color: var(--dim, #9c9384) }
.mx-btn-quiet:hover {
  background: transparent; color: var(--accent-soft, #c9ad78);
  border-color: var(--accent, #b8985c);
}
.mx-btn i { font-style: normal; font-size: .9em; opacity: .7 }

/* ---------- the note at the foot of the shop ---------- */
.mx-notice {
  max-width: 46rem; margin: clamp(3rem, 7vw, 5rem) auto 0;
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--line-soft, rgba(236,230,218,.08));
  text-align: center;
  color: var(--dimmer, #6c6456); font-size: .9rem; font-style: italic; line-height: 1.8;
}

/* ============================================================
   THE CASE — the modal
   ============================================================ */
.mx-case {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  opacity: 0; visibility: hidden;
  transition: opacity .4s ease, visibility .4s;
}
.mx-case.is-open { opacity: 1; visibility: visible }
.mx-case-veil {
  position: absolute; inset: 0;
  background: rgba(5, 4, 4, .82);
  backdrop-filter: blur(7px);
  border: 0; padding: 0; cursor: pointer;
}
.mx-case-inner {
  position: relative;
  display: grid; grid-template-columns: 1.05fr 1fr;
  width: min(64rem, 100%); max-height: min(88vh, 46rem);
  background: #100e0c;
  border: 1px solid var(--line, rgba(236,230,218,.14));
  box-shadow: 0 60px 120px -60px #000;
  transform: translateY(14px) scale(.99);
  transition: transform .5s var(--ease, cubic-bezier(.16,1,.3,1));
  overflow: hidden;
}
.mx-case.is-open .mx-case-inner { transform: none }
@media (max-width: 780px) {
  .mx-case-inner { grid-template-columns: 1fr; max-height: 90vh; overflow-y: auto }
}

.mx-case-shot {
  position: relative;
  background:
    radial-gradient(70% 60% at 50% 36%, rgba(236,230,218,.06), transparent 70%),
    #0b0a09;
  border-right: 1px solid var(--line-soft, rgba(236,230,218,.08));
  min-height: 18rem;
}
@media (max-width: 780px) {
  .mx-case-shot { border-right: 0; border-bottom: 1px solid var(--line-soft, rgba(236,230,218,.08)); min-height: 15rem }
}
.mx-case-shot img {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%; object-fit: contain;
  padding: clamp(1rem, 3vw, 2rem);
  filter: drop-shadow(0 30px 34px rgba(0,0,0,.6));
}

.mx-case-body {
  display: flex; flex-direction: column;
  padding: clamp(1.5rem, 3.5vw, 2.6rem);
  overflow-y: auto;
}
.mx-case-kind {
  font-family: var(--mx-mono);
  font-size: .58rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent, #b8985c); margin-bottom: .9rem;
}
.mx-case-name {
  font-family: var(--display, Georgia, serif);
  font-weight: 400; font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  line-height: 1.05; margin-bottom: 1rem;
}
.mx-case-text { color: var(--dim, #9c9384); font-size: 1.02rem; line-height: 1.75 }
.mx-spec { margin: 1.6rem 0 0; border-top: 1px solid var(--line-soft, rgba(236,230,218,.08)) }
.mx-spec > div {
  display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0;
  border-bottom: 1px solid var(--line-soft, rgba(236,230,218,.08));
}
.mx-spec dt {
  font-family: var(--mx-mono);
  font-size: .58rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--dimmer, #6c6456);
}
.mx-spec dd { margin: 0; font-size: .9rem; color: var(--ink, #ece6da); text-align: right }
.mx-case-act { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: auto; padding-top: 1.8rem }
.mx-btn-go {
  background: var(--ink, #ece6da); color: #140f07; border-color: var(--ink, #ece6da);
}
.mx-btn-go:hover { background: transparent; color: var(--ink, #ece6da); transform: translateY(-2px) }

.mx-close {
  position: absolute; top: .6rem; right: .6rem; z-index: 3;
  width: 2.1rem; height: 2.1rem; display: grid; place-items: center;
  background: rgba(8,7,6,.6); color: var(--dim, #9c9384);
  border: 1px solid var(--line-soft, rgba(236,230,218,.08));
  font-size: .9rem; cursor: pointer; line-height: 1;
  transition: color .3s, border-color .3s, background .3s;
}
.mx-close:hover { color: var(--ink, #ece6da); border-color: var(--accent, #b8985c) }

/* ============================================================
   THE ASSESSMENT — what happens when somebody enquires
   ============================================================ */
.mx-assess { margin-top: 1.8rem; display: none }
.mx-assess.is-on { display: block }
.mx-assess-head {
  font-family: var(--mx-mono);
  font-size: .58rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--dim, #9c9384); margin-bottom: .9rem;
}
.mx-bar { height: 1px; background: var(--line, rgba(236,230,218,.14)); overflow: hidden }
.mx-bar i { display: block; height: 100%; width: 0; background: var(--accent, #b8985c) }
.mx-steps {
  list-style: none; margin: 1rem 0 0; padding: 0;
  font-family: var(--mx-mono);
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dimmer, #6c6456); line-height: 2.1;
}
.mx-steps li { opacity: 0; transition: opacity .35s ease }
.mx-steps li.is-on { opacity: 1 }
.mx-steps li.is-on b { color: var(--accent-soft, #c9ad78); font-weight: 400 }

/* the verdict */
.mx-verdict { display: none; margin-top: 1.6rem; border: 1px solid rgba(224,69,58,.34) }
.mx-verdict.is-on { display: block; animation: mx-stamp .5s var(--ease, cubic-bezier(.16,1,.3,1)) }
@keyframes mx-stamp {
  0% { opacity: 0; transform: scale(1.04) }
  100% { opacity: 1; transform: none }
}
.mx-verdict-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(224,69,58,.11);
  border-bottom: 1px solid rgba(224,69,58,.28);
  padding: .6rem .9rem;
  font-family: var(--mx-mono);
  font-size: .58rem; letter-spacing: .22em; text-transform: uppercase;
  color: #e0453a;
}
.mx-verdict-bar span:last-child { color: var(--dimmer, #6c6456); letter-spacing: .14em }
.mx-verdict p {
  padding: 1.1rem .9rem; margin: 0;
  color: var(--dim, #9c9384); font-size: .98rem; line-height: 1.75;
}
.mx-verdict-act {
  display: flex; gap: .7rem; padding: 0 .9rem 1.1rem; flex-wrap: wrap;
}
.mx-appeal {
  font-family: var(--mx-mono);
  font-size: .58rem; letter-spacing: .2em; text-transform: uppercase;
  background: transparent; color: var(--dimmer, #6c6456);
  border: 1px solid var(--line-soft, rgba(236,230,218,.08));
  padding: .55rem .9rem; cursor: pointer;
  transition: color .3s, border-color .3s;
}
.mx-appeal:hover { color: var(--accent-soft, #c9ad78); border-color: var(--accent, #b8985c) }
.mx-appeal[disabled] { opacity: .35; cursor: default }

@media (prefers-reduced-motion: reduce) {
  .mx-card:hover { transform: none }
  .mx-card:hover .mx-shot img { transform: none }
  .mx-verdict.is-on { animation: none }
}
