/* DamnedX Store. Builds on the tokens and components in ../styles.css. */

.pixel { image-rendering: pixelated; }
.nowrap { white-space: nowrap; }
.store main { padding-top: 76px; }

/* ---------- Hero ---------- */
.st-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 6vw, 72px);
  background:
    linear-gradient(90deg, rgba(9, 12, 17, 0.96) 28%, rgba(9, 12, 17, 0.62) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(9, 12, 17, 0) 45%),
    url("../media/screenshots/home-throne.webp") center / cover no-repeat;
}
.st-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.st-hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.8rem); }
.st-hero h1 em { font-style: normal; color: var(--gold); }
.st-hero-lead { color: var(--ink-soft); font-size: 1.1rem; margin: 18px 0 26px; max-width: 34em; }
.st-hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 24px; color: var(--muted); font-size: 0.92rem; }
.st-hero-points li::before { content: "\2726"; color: var(--teal); margin-right: 8px; }
.st-hero-art { position: relative; justify-self: center; width: min(100%, 400px); }
.st-hero-art .art-main { width: 100%; border-radius: var(--radius); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.art-burst {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 52%, rgba(9, 12, 17, 0) 30%, rgba(9, 12, 17, 0.82) 100%),
    repeating-conic-gradient(from 6deg at 50% 52%, rgba(230, 196, 119, 0.5) 0 12deg, #2a2216 12deg 30deg);
}
.art-burst img { position: absolute; top: 50%; left: 50%; width: 215%; max-width: none; transform: translate(-50%, -50%); filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.55)); }
.st-hero-art .art-card {
  position: absolute;
  width: 34%;
  left: -6%;
  bottom: -8%;
  transform: rotate(-5deg);
  box-shadow: var(--shadow);
}

/* ---------- Buy panel ---------- */
.st-buy { padding: clamp(36px, 6vw, 72px) 0; scroll-margin-top: 84px; }
.st-buy-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.st-step { margin-bottom: 30px; }
.st-step h2 { font-size: 1.3rem; margin-bottom: 14px; display: flex; align-items: center; gap: 12px; }
.st-num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #17120a;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
}
.st-notice {
  margin-bottom: 22px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--ink-soft);
}

.st-field { display: block; max-width: 340px; }
.st-field input {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
}
.st-field input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.st-error { margin: 8px 0 0; color: #ff9a8a; font-size: 0.92rem; }

.st-history { display: inline-flex; margin-bottom: 16px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--panel); }
.st-history label { cursor: pointer; }
.st-history input { position: absolute; opacity: 0; }
.st-history span { display: block; padding: 7px 16px; border-radius: 999px; font-size: 0.88rem; color: var(--muted); }
.st-history input:checked + span { background: var(--panel-2); color: var(--gold); }
.st-history input:focus-visible + span { outline: 2px solid var(--teal); }

.bundles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.bundle {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 20px 14px 16px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease);
}
.bundle:hover { transform: translateY(-3px); border-color: var(--gold-2); }
.bundle.is-selected { border-color: var(--gold); background: var(--panel-2); box-shadow: 0 0 0 1px var(--gold), var(--shadow-sm); }
.bundle input { position: absolute; opacity: 0; }
.bundle:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.bundle-flag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 11px;
  border-radius: 999px;
  background: var(--teal-deep);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.bundle-flag--best { background: var(--gold); color: #17120a; }
.bundle-price { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; }
.bundle-bonds { color: var(--gold); font-weight: 700; font-size: 1.08rem; }
.bundle-rate { color: var(--muted); font-size: 0.8rem; }
.bundle-rank { color: var(--teal-bright); font-size: 0.82rem; font-weight: 600; min-height: 1.4em; }
.bundle-buys { color: var(--ink-soft); font-size: 0.8rem; line-height: 1.4; margin-top: 7px; padding-top: 9px; border-top: 1px solid var(--line); }

.bump {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 2px dashed var(--gold-2);
  border-radius: var(--radius);
  background: rgba(230, 196, 119, 0.07);
  cursor: pointer;
}
.bump[hidden] { display: none; }
.bump input { flex: none; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--gold); }
.bump strong { display: block; color: var(--gold); font-size: 1.05rem; }
.bump span { color: var(--ink-soft); }

.summary {
  position: sticky;
  top: 92px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.summary h2 { font-size: 1.2rem; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; color: var(--ink-soft); font-size: 0.95rem; }
.sum-row--gain span:last-child { color: var(--teal-bright); font-weight: 600; }
.sum-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-weight: 600;
}
.sum-total img { width: 26px; display: inline-block; vertical-align: -7px; margin-right: 6px; }
#sum-total { font-family: var(--font-display); font-size: 1.5rem; color: var(--gold); }
.sum-buys { color: var(--muted); font-size: 0.87rem; margin: 10px 0 0; }
.sum-note { color: var(--muted); font-size: 0.87rem; margin: 6px 0 0; }
.sum-note:empty, .sum-buys:empty { display: none; }
.pay { width: 100%; justify-content: center; margin-top: 12px; }
.pay[hidden] { display: none; }
.sum-trust { margin-top: 14px; color: var(--muted); font-size: 0.82rem; }
.sum-trust li { padding: 2px 0; }

.st-bar { display: none; }

/* ---------- What you get ---------- */
.loot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.loot {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.loot-art { position: relative; height: 210px; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, var(--panel-2), #0a0d13); }
.loot-art img { max-height: 100%; }
.loot-art--contain img { max-height: 176px; width: auto; }
.loot-art--cover img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; }
.loot-body { padding: 16px 18px 18px; }
.loot-body h3 { font-size: 1.15rem; }
.loot-cost { color: var(--gold); font-weight: 700; font-size: 0.92rem; margin: 3px 0 7px; }
.loot-body p:last-child { color: var(--muted); font-size: 0.9rem; margin: 0; line-height: 1.5; }

.pack-art { position: relative; width: 127px; }
.pack-art img { width: 100%; }
.pack-art span {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 12%;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
}

.pets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.pets li { padding: 14px 8px 12px; text-align: center; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9rem; }
.pets img { height: 96px; width: 100%; object-fit: contain; margin-bottom: 8px; }
.pets b { color: var(--gold); margin-left: 6px; }

/* ---------- Ranks ---------- */
.st-ranks-top { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 30px; align-items: center; margin-bottom: 26px; }
.st-ranks-top img { border-radius: var(--radius); border: 1px solid var(--line-2); }
.ladder { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.rank { padding: 16px 10px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--metal); border-radius: var(--radius-sm); }
.rank svg { width: 54px; height: 66px; margin: 0 auto 6px; display: block; color: var(--metal); }
.rank-name { display: block; font-family: var(--font-display); font-weight: 700; color: var(--metal); }
.rank-usd { display: block; color: var(--muted); font-size: 0.78rem; }
.rank-title { display: inline-block; margin: 9px 0; padding: 2px 7px; border-radius: 4px; background: #000; color: var(--metal); font-size: 0.72rem; }
.rank-perks { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.4; }
.rank-perks li { padding: 3px 0; }

/* ---------- Fine print ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 8px 0 0; }
.st-final { text-align: center; margin-top: 34px; }

/* ---------- Thanks ---------- */
.st-thanks { padding: clamp(50px, 8vw, 100px) 0; text-align: center; }
.st-thanks img.bond { width: 96px; margin: 0 auto 18px; }
.st-thanks h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.st-thanks .lead { color: var(--ink-soft); font-size: 1.1rem; margin: 14px auto 0; max-width: 34em; }
.next-steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 900px; margin: 36px auto; text-align: left; }
.next-steps li { padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.next-steps strong { display: block; color: var(--gold); margin-bottom: 4px; }
.next-steps code { color: var(--teal-bright); }

/* ---------- Narrow screens ---------- */
@media (max-width: 1020px) {
  .st-buy-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .loot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .st-hero-grid, .st-ranks-top, .next-steps { grid-template-columns: minmax(0, 1fr); }
  .st-hero-art { width: min(82%, 320px); }
  .bundles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; }
  .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store { padding-bottom: 76px; }
  .st-bar {
    position: fixed;
    z-index: 40;
    inset: auto 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--panel-2);
    border-top: 1px solid var(--line-2);
  }
  .st-bar span { font-weight: 700; color: var(--gold); font-size: 0.95rem; }
}
@media (max-width: 420px) {
  .loot-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .bundle { transition: none; }
  .bundle:hover { transform: none; }
}
