/* Grade 8 Modding: storefront look (loads after site.css, store pages only).
   Motion is kept to three things on purpose: the bolt torquing in, page transitions, and rows easing in on scroll. */

:root {
  --bg: #0b0b0c;
  --surface: #131315;
  --surface-2: #1a1a1d;
  --border: #242428;
  --border-2: #35353b;
  --cream: #ece4d4;
  --text: #dcdcdf;
  --muted: #9a9aa2;
  --dim: #66666e;
  --orange: #f2621c;
  --orange-hover: #ff7531;
  --wide: 'Archivo', system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --grain: url('/img/grain-light.png?v=3');
  --wear: url('/img/grain-dark.png?v=3');
}

/* ---------- Page transitions ---------- */

@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: vt-out 0.2s ease both;
}
::view-transition-new(root) {
  animation: vt-in 0.32s var(--ease) both;
}
::view-transition-group(*) {
  animation-duration: 0.42s;
  animation-timing-function: var(--ease);
}
@keyframes vt-out {
  to {
    opacity: 0;
  }
}
@keyframes vt-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- Base ---------- */

body {
  background: var(--bg);
}
::selection {
  background: var(--orange);
  color: #fff;
}
h1,
h2 {
  color: var(--cream);
  font-weight: 800;
  letter-spacing: -0.015em;
}
h3 {
  color: #fff;
}

/* ---------- Header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar {
  background: #060607;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.site-head.scrolled .topbar {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.topnav a {
  color: #e6e6e9;
}
.topnav a:hover,
.topnav a[aria-current] {
  color: var(--orange);
}
.cart-link {
  background: #121214;
  border-color: var(--border-2);
}
.cart-link:hover {
  border-color: #55555c;
}
.cart-count.bump {
  animation: bump 0.6s var(--spring);
}
@keyframes bump {
  35% {
    transform: scale(1.45);
  }
}
.subbar {
  background: #111113;
  border-bottom: 1px solid var(--border);
}
.dropdown-menu {
  background: #141416;
  border-color: var(--border-2);
}
.searchbox input,
.searchbox button {
  background: #0c0c0d;
  border-color: var(--border-2);
}
.searchbox:focus-within input,
.searchbox:focus-within button {
  border-color: var(--orange);
}
.announce {
  background-color: var(--orange);
  background-image: var(--wear);
  background-size: 320px;
}

/* ---------- Buttons: flat orange with a little print wear ---------- */

.btn {
  border-radius: 6px;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background-color: var(--orange);
  background-image: var(--wear);
  background-size: 320px;
  border-color: var(--orange);
}
.btn-primary:hover {
  background-color: var(--orange-hover);
  border-color: var(--orange-hover);
}
.btn:not(.btn-primary) {
  background-color: #141416;
  border-color: var(--border-2);
}
.btn:not(.btn-primary):hover {
  background-color: #1c1c1f;
  border-color: #55555c;
}
.btn-lg {
  padding: 15px 30px;
  font-size: 17px;
}

/* ---------- Hero: your logo over a real screenshot or clip ---------- */

.hero2 {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #0e0e10;
  background-image: radial-gradient(70% 60% at 50% 45%, #1c1612 0%, transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero2-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  /* Old press-photo look: black and white, a touch warm, crushed blacks, so the orange logo owns the colour. */
  filter: grayscale(1) sepia(0.14) contrast(1.28) brightness(0.62);
}
.hero2-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--grain) 0 0 / 320px;
}
.hero2.has-bg .hero2-shade {
  opacity: 1;
  background:
    var(--film) 0 0 / 220px,
    var(--grain) 0 0 / 320px,
    radial-gradient(42% 48% at 50% 50%, rgba(8, 8, 8, 0.62), rgba(8, 8, 8, 0) 100%),
    radial-gradient(120% 95% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.75) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.25), transparent 35%, rgba(11, 11, 12, 0.92) 100%);
}
.hero2 {
  /* Fine film grain, drawn once as SVG noise. */
  --film: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero2-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 64px;
}
/* Bolt and wordmark are cut from the real logo at the same scale so they stack flush. */
.hero2-logo {
  width: clamp(290px, 38vw, 480px);
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
}
.hero2-bolt {
  width: 55.44%;
  height: auto;
  transform-origin: 50% 55%;
  animation: torque 1.3s var(--spring) both;
}
.hero2-word {
  position: relative;
  width: 100%;
  height: auto;
  margin-top: -0.75%;
  animation: settle 0.8s var(--ease) 0.35s both;
}
@keyframes torque {
  0% {
    transform: rotate(-120deg) scale(0.85);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  100% {
    transform: none;
  }
}
@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
.hero2-line {
  margin: 22px 0 26px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: #ececee;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 14px rgba(0, 0, 0, 0.8);
  animation: settle 0.8s var(--ease) 0.55s both;
}
.hero2-inner .btn {
  animation: settle 0.8s var(--ease) 0.7s both;
}
.hero2-credit {
  position: absolute;
  right: 20px;
  bottom: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}
.hero2-credit:hover {
  color: #fff;
}

/* ---------- Category links ---------- */

.cat-links a {
  background: var(--surface);
  border-color: var(--border);
}
.cat-links a:hover {
  border-color: var(--orange);
  background: var(--surface);
}

/* ---------- What I'm working on ---------- */

.wip {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.wip.no-img {
  grid-template-columns: 1fr;
}
.wip-img {
  display: block;
  min-height: 260px;
  background: #0e0e10;
}
.wip-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wip-body {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}
.wip-tag {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  border: 1px dashed rgba(242, 98, 28, 0.6);
  padding: 3px 9px;
  border-radius: 4px;
}
.wip-body h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  margin: 4px 0 0;
}
.wip-body p {
  color: #c9c9ce;
  margin: 0;
}
.wip-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}
.wip-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #222226;
  overflow: hidden;
}
.wip-bar i {
  display: block;
  height: 100%;
  background-color: var(--orange);
  background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.18) 0 6px, transparent 6px 12px);
}
.wip-link {
  font-weight: 600;
  margin-top: 4px;
}

/* ---------- Inner page banner ---------- */

.crumbbar {
  background: #0e0e10;
  border-bottom-color: var(--border);
}
.banner {
  background-color: #111113;
  background-image: var(--grain);
  background-size: 320px;
  border-bottom: 1px solid var(--border);
}
.banner::before {
  display: none;
}
.banner::after {
  display: none;
  content: '';
  position: absolute;
  right: 6%;
  top: 50%;
  width: 96px;
  height: 96px;
  margin-top: -48px;
  background: url('/img/bolt.png') center / contain no-repeat;
  opacity: 0.12;
}
.banner .wrap {
  height: 104px;
}
.banner h1 {
  font-size: clamp(26px, 3.4vw, 38px);
}
.banner h1 .ico {
  color: var(--orange);
}

/* ---------- Mod rows and cards ---------- */

.list-wrap {
  max-width: 980px;
}
.rows {
  gap: 16px;
}
.row {
  grid-template-columns: 380px minmax(0, 1fr);
  padding: 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.row:hover {
  border-color: #3a3a40;
}
.row-img {
  border-radius: 8px;
}
.row-title {
  font-size: 21px;
}
.card {
  border-radius: 12px;
  background: var(--surface);
  border-color: var(--border);
  transition: border-color 0.2s;
}
.card:hover {
  border-color: #3a3a40;
}
.card-img .cover,
.row-img .cover {
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.card:hover .card-img .cover,
.row:hover .row-img .cover {
  transform: scale(1.04);
}
.noimg {
  background: #161618 var(--grain) 0 0 / 320px;
}
.noimg img {
  opacity: 0.18;
  filter: grayscale(1);
}

/* Images fade in once loaded */
html.js img.cover:not(.loaded) {
  opacity: 0;
}

/* ---------- Scroll reveal ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
html.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

/* ---------- About ---------- */

.about {
  border-radius: 12px;
  background-color: var(--surface);
  background-image: var(--grain);
  background-size: 320px;
  border-color: var(--border);
}
.about p {
  font-size: 17px;
  max-width: 640px;
}

/* ---------- Product page ---------- */

.gallery-main {
  border-radius: 10px;
  cursor: zoom-in;
}
.buybox {
  border-radius: 12px;
  background: var(--surface);
  border-color: var(--border);
}
.buy-price {
  font-size: 32px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  background: rgba(5, 5, 6, 0.94);
  animation: lb-in 0.25s ease;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 6px;
}
.lightbox button {
  position: fixed;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -23px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: rgba(20, 20, 22, 0.85);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}
.lightbox .prev {
  left: 20px;
}
.lightbox .next {
  right: 20px;
}
@keyframes lb-in {
  from {
    opacity: 0;
  }
}

/* ---------- Misc ---------- */

.summary {
  border-radius: 12px;
  background: var(--surface);
}
.empty {
  border-radius: 12px;
  border: 1px dashed var(--border-2);
  background: #0f0f11;
}
.controls .ctl select,
.viewtoggle,
.viewtoggle a,
.pager a,
.pager span {
  background-color: #111113;
  border-color: var(--border-2);
}
.pager .on {
  background: var(--orange);
  border-color: var(--orange);
}
.site-foot {
  background: #070708;
  border-top: 1px solid var(--border);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .row {
    grid-template-columns: 280px minmax(0, 1fr);
  }
  .wip {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .hero2 {
    min-height: 0;
  }
  .hero2-inner {
    padding-top: 40px;
    padding-bottom: 48px;
  }
  .row {
    grid-template-columns: 1fr;
    padding: 10px;
  }
  .wip-body {
    padding: 22px;
  }
  .banner .wrap {
    height: 84px;
  }
  .banner::after {
    width: 60px;
    height: 60px;
    margin-top: -30px;
  }
  .lightbox button {
    display: none;
  }
  .hero2-credit {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js [data-reveal],
  html.js img.cover:not(.loaded) {
    opacity: 1;
    transform: none;
  }
  @view-transition {
    navigation: none;
  }
}

/* ---------- Discord contact card ---------- */

.dc-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 8px 0 18px;
  padding: 20px 22px;
  border-radius: 12px;
  background-color: #15151a;
  background-image: var(--grain);
  background-size: 320px;
  border: 1px solid #2c2d3a;
}
.dc-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #5865f2;
  color: #fff;
}
.dc-body {
  min-width: 0;
}
.dc-title {
  display: block;
  color: #fff;
  font-size: 18px;
  margin-bottom: 4px;
}
.dc-body p {
  margin: 0 0 14px;
  color: #c4c4cb;
  font-size: 15px;
}
.dc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.dc-handle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 8px 0 14px;
  border-radius: 6px;
  border: 1px solid var(--border-2);
  background: #0e0e10;
  color: #fff;
  font: 600 15px var(--font);
  cursor: pointer;
}
.dc-handle:hover {
  border-color: #5865f2;
}
.dc-handle small {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #1d1d22;
  padding: 3px 8px;
  border-radius: 4px;
}
.dc-handle.copied small {
  color: #fff;
  background: #2f6b33;
}
.btn.dc-join {
  height: 42px;
  background-color: #5865f2;
  border-color: #5865f2;
  color: #fff;
}
.btn.dc-join:hover {
  background-color: #6d78f5;
  border-color: #6d78f5;
}
.prose .dc-card p {
  margin-bottom: 14px;
}
.order-help {
  max-width: 560px;
  margin: 0 0 24px;
}

/* ---------- Accounts ---------- */

.acct-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.acct-login {
  color: #e6e6e9;
  font-weight: 600;
  padding: 8px 10px;
}
.acct-login:hover {
  color: var(--orange);
  text-decoration: none;
}
.acct-signup {
  height: 40px;
}
.acct-menu summary {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 10px 0 6px;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  background: #121214;
  color: #fff;
  font-weight: 600;
}
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background-color: var(--orange);
  background-image: var(--wear);
  background-size: 320px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}
.dropdown-menu.right {
  left: auto;
  right: 0;
  min-width: 190px;
}
.dropdown-menu form {
  margin: 0;
}
.menu-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
}
.menu-btn:hover {
  background: #2c2d30;
}
.auth-card {
  max-width: 440px;
  margin: 8px auto 0;
  padding: 30px;
  border-radius: 14px;
  background-color: var(--surface);
  background-image: var(--grain);
  background-size: 320px;
  border: 1px solid var(--border);
}
.auth-card.wide {
  max-width: 560px;
}
.auth-card h2 {
  font-size: 20px;
  margin: 28px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.auth-card h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.auth-card h2.danger {
  color: #f08a80;
}
.auth-lead {
  color: #c4c4cb;
  margin: 0 0 18px;
}
.auth-alt {
  text-align: center;
  color: var(--muted);
  margin: 20px 0 0;
  font-size: 15px;
}
.auth-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
  font-size: 14px;
}
.pw {
  position: relative;
}
.pw input {
  padding-right: 64px;
}
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: #1d1d22;
  border: 0;
  color: var(--muted);
  font: 600 12px var(--font);
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
}
.pw-toggle:hover {
  color: #fff;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.lib-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.lib-head p {
  margin: 0;
}
.lib-orders-title {
  font-size: 22px;
  margin: 36px 0 12px;
}
.claim {
  margin: 0 0 22px;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px dashed rgba(242, 98, 28, 0.55);
  background: #17120f;
}
.claim form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.claim p {
  margin: 0;
}
.signed-as {
  margin: 0;
  font-size: 15px;
  color: #c9c9ce;
}
.signed-hint {
  margin: -8px 0 0;
}
@media (max-width: 700px) {
  .acct-login {
    padding: 8px 4px;
  }
  .acct-signup {
    padding: 8px 10px;
  }
  .auth-card {
    padding: 22px;
  }
}

/* ---------- Video, coming soon, wishlist ---------- */

.yt {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #000 center / cover no-repeat;
  cursor: pointer;
}
.gallery-main > .yt {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: 0;
}
.yt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.05) 60%);
}
.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 50px;
  margin: -25px 0 0 -36px;
  border-radius: 12px;
  background: rgba(20, 20, 22, 0.85);
  z-index: 1;
  transition: background 0.15s;
}
.yt-play::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 15px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}
.yt:hover .yt-play {
  background: #e62117;
}
.yt-label {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 1;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.yt-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 10px;
}
.gallery-main > .yt-frame {
  position: absolute;
  inset: 0;
  height: 100%;
  border-radius: 0;
}
.video-slot {
  margin-top: 10px;
}
.price.soon,
.row-price.soon {
  color: #fff;
  background: #3b3b42;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.price.soon {
  align-self: center;
}
.wish-form {
  margin-top: 10px;
}
.btn.btn-quiet {
  background-color: transparent;
  border-color: var(--border-2);
  color: var(--muted);
  font-weight: 500;
}
.btn.btn-quiet:hover,
.btn.btn-quiet.saved {
  color: #fff;
  border-color: #55555c;
}
.btn.saved:not(.btn-quiet) {
  border-color: rgba(109, 187, 111, 0.6);
}
.wish-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.wish-item form {
  text-align: right;
}
.upd {
  display: inline-block;
  margin-left: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--orange);
  padding: 2px 7px;
  border-radius: 4px;
  vertical-align: middle;
}
.ts-wrap {
  min-height: 65px;
}

/* Gameplay clips under the screenshots */
.clips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.clips.one {
  grid-template-columns: 1fr;
}
.clip {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface);
  border-radius: 10px;
}
@media (max-width: 560px) {
  .clips {
    grid-template-columns: 1fr;
  }
}
