/* Texture packs page. Same dark theme as the rest of the site, one pack at a time. */

.h3-packhero {
  position: relative;
  min-height: 78vh;
  display: grid;
  grid-template-rows: 1fr auto;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 8px;
  padding: 104px 24px 40px;
  perspective: 1500px;
}

.h3-packhero .h3-display { font-size: clamp(40px, 6.4vw, 86px); }

/* the swap that plays in the hero */
.h3-swapstage {
  position: relative;
  width: 100%;
  min-height: 26vh;
  display: grid;
  place-items: center;
  perspective: 1300px;
}

.h3-swap {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(18px, 5vw, 54px);
  transform-style: preserve-3d;
}

.h3-swap-arrow {
  font-size: 22px;
  color: rgba(232, 236, 245, .35);
  transform: translateZ(30px);
}

/* ---------- the controls ---------- */

.h3-controls {
  position: sticky;
  top: 58px;
  z-index: 40;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  background: rgba(5, 5, 6, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.h3-search {
  flex: 1;
  min-width: 200px;
  padding: 13px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
}

.h3-search:focus { outline: none; border-color: rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .08); }
.h3-search::placeholder { color: rgba(232, 236, 245, .38); }

.h3-seg {
  display: flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
}

.h3-seg button {
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(232, 236, 245, .6);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.h3-seg button:hover { color: var(--ink); }
.h3-seg button.on { background: #f6f7fa; color: #06070a; }

.h3-count { font-size: 13px; color: var(--dim); margin-left: auto; }

/* ---------- the grid ---------- */

.h3-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 10px;
  perspective: 1400px;
}

.h3-card {
  content-visibility: auto;
  contain-intrinsic-size: 410px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 24px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  transform-style: preserve-3d;
  transform: rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform .25s cubic-bezier(.2, .8, .3, 1), border-color .25s ease, opacity .5s ease;
}

.h3-card:hover { border-color: rgba(255, 255, 255, .28); }
.h3-card.hidden { display: none; }

.h3-card-stage {
  position: relative;
  height: 150px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 14px;
  background: radial-gradient(60% 55% at 50% 40%, rgba(255, 255, 255, .07), transparent 72%);
  perspective: 700px;
  transform: translateZ(30px);
}

.h3-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: -.02em;
  transform: translateZ(44px);
}

.h3-card p {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--dim);
  transform: translateZ(24px);
}

.h3-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  transform: translateZ(40px);
}

.h3-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
}

.h3-get {
  margin-left: auto;
  padding: 11px 20px;
  border-radius: 999px;
  background: #f6f7fa;
  color: #06070a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease;
}

.h3-get:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255, 255, 255, .16); }

.h3-empty {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: var(--dim);
  font-size: 16px;
}

/* the shot of the pack in game, behind the blocks */
.h3-shot {
  position: absolute;
  inset: 10px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .h3-card:hover .h3-shot { opacity: .2; }
}

/* ---------- the creator strip ---------- */

.h3-make {
  max-width: 1200px;
  margin: 0 auto 10px;
  padding: 38px 34px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 30px;
  align-items: center;
}

.h3-make h2 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -.03em; margin: 0 0 12px; font-weight: 800; }
.h3-make p { color: var(--dim); font-size: 16px; line-height: 1.55; margin: 0 0 24px; max-width: 52ch; }
.h3-make-art { position: relative; height: 170px; perspective: 800px; }

@media (max-width: 1000px) {
  .h3-make { grid-template-columns: 1fr; }
  .h3-make-art { order: -1; height: 130px; }
}

@media (max-width: 620px) {
  .h3-packhero { padding-top: 92px; min-height: 68vh; }
  .h3-swapstage { min-height: 20vh; }
  .h3-controls { top: 56px; padding: 12px 16px; gap: 8px; }
  .h3-search { min-width: 0; font-size: 14px; padding: 11px 14px; }
  .h3-seg button { padding: 8px 13px; font-size: 13px; }
  .h3-count { width: 100%; margin-left: 0; }
  .h3-grid { grid-template-columns: 1fr; padding: 26px 16px 10px; gap: 16px; }
  .h3-card-stage { height: 128px; }
  .h3-make { margin-top: 60px; padding: 26px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .h3-card { transition: none; }
}


/* an item is a thin slab in game, so it is stacked in depth rather than drawn flat */
.h3-item {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  cursor: grab;
}

.h3-item:active { cursor: grabbing; }

.h3-item i {
  position: absolute;
  inset: 0;
  display: block;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}


/* the full list of swaps, folded away until someone wants it */
.h3-more { margin: -6px 0 18px; transform: translateZ(20px); }

.h3-more summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 700;
  color: rgba(232, 236, 245, .72);
}

.h3-more summary::-webkit-details-marker { display: none; }

.h3-more summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform .18s ease;
}

.h3-more[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.h3-more summary:hover { color: var(--ink); }

.h3-more ul {
  margin: 12px 0 0;
  padding: 0 0 0 16px;
  list-style: none;
}

.h3-more li {
  position: relative;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--dim);
  padding: 3px 0;
}

.h3-more li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(232, 236, 245, .3);
}


@keyframes h3-frames { to { background-position: 0 100%; } }

@media (prefers-reduced-motion: reduce) {
  .h3-cube i, .h3-item i { animation: none !important; background-position: 0 0 !important; }
}
