@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --bg: #131310;
  --surface: #1b1b16;
  --surface-raised: #211f18;
  --border: #38362a;
  --border-strong: #4d4a37;
  --text: #ece7d6;
  --text-dim: #9c977f;
  --accent: #c13fd9;
  --accent-dim: #7a2a8c;
  --danger: #b5432f;
  --ok: #6b8f4e;
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
}

h1, h2, h3, .brand, .price-tag, button {
  font-family: 'Oswald', sans-serif;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

a { color: inherit; }

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Layout shell ---------- */

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .dot {
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.account-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discord-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px 6px 6px;
  font-size: 0.85rem;
}

.discord-chip img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn:hover { border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1c0721;
}

.btn-primary:hover {
  background: #d873e8;
  border-color: #d873e8;
}

.btn-primary:disabled {
  background: var(--border-strong);
  border-color: var(--border-strong);
  color: var(--text-dim);
  cursor: not-allowed;
}

.btn-quiet {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}

.btn-quiet:hover { color: var(--text); border-color: transparent; }

/* ---------- Hero ---------- */

.hero {
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero .wrap {
  padding: 72px 24px 56px;
  position: relative;
  z-index: 1;
}

.hero .kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 18px;
  max-width: 14ch;
}

.hero p {
  color: var(--text-dim);
  max-width: 46ch;
  margin: 0 0 28px;
  font-size: 1.05rem;
}

.hazard-bar {
  height: 6px;
  width: 100%;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent),
    var(--accent) 14px,
    #17091c 14px,
    #17091c 28px
  );
}

/* ---------- Store hero (smaller variant) ---------- */

.store-hero {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.store-hero .wrap { padding: 44px 24px 36px; }

.store-hero .kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0 0 10px;
}

.store-hero h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); margin: 0 0 10px; }
.store-hero p { color: var(--text-dim); margin: 0; max-width: 56ch; }

.preview-note {
  margin: -6px 0 4px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.preview-note a { color: var(--accent); text-decoration: none; }
.preview-note a:hover { text-decoration: underline; }

/* ---------- Category nav (store page) ---------- */

.category-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(19, 19, 16, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.category-nav-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 24px;
  scrollbar-width: thin;
}

.category-pill {
  flex-shrink: 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 7px 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.category-pill:hover,
.category-pill.active {
  color: var(--accent);
  border-color: var(--accent);
}

.category-section {
  scroll-margin-top: 64px;
  padding-top: 40px;
}

.category-section:first-of-type { padding-top: 32px; }

/* ---------- Product grid ---------- */

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 56px 0 20px;
}

.section-heading h2 {
  font-size: 1.5rem;
  margin: 0;
}

.section-heading span {
  color: var(--text-dim);
  font-size: 0.85rem;
  font-family: 'IBM Plex Mono', monospace;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding-bottom: 72px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-dim);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-left-color 0.15s ease;
}

.card:hover { border-left-color: var(--accent); }

.card .thumb {
  aspect-ratio: 16 / 10;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.stamp {
  position: absolute;
  top: 10px;
  right: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 2px;
  transform: rotate(3deg);
}

.stamp.in { background: rgba(107, 143, 78, 0.16); color: var(--ok); border: 1px solid var(--ok); }
.stamp.out { background: rgba(181, 67, 47, 0.16); color: var(--danger); border: 1px solid var(--danger); }

.card .body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card .category {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.88rem;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.price-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 6, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 420px;
}

.modal h3 { margin: 0 0 6px; font-size: 1.3rem; }
.modal p.lead { color: var(--text-dim); margin: 0 0 20px; font-size: 0.9rem; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-family: 'IBM Plex Mono', monospace;
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}

.field input:focus { border-color: var(--accent); outline: none; }

.field .error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.modal-actions .btn { flex: 1; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Success / static pages ---------- */

.center-page {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.receipt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 460px;
  width: 100%;
  text-align: center;
}

.receipt-card .check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(107, 143, 78, 0.16);
  border: 1px solid var(--ok);
  color: var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.4rem;
}

.receipt-card h1 { font-size: 1.5rem; margin: 0 0 8px; }
.receipt-card p.lead { color: var(--text-dim); margin: 0 0 24px; font-size: 0.92rem; }

.order-id-box {
  background: var(--bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 22px;
}

.order-id-box .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.order-id-box .id {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.steps {
  text-align: left;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.steps li {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.steps li .n {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--accent);
  flex-shrink: 0;
}
