/* Mace Zonewars — storm violet on near-black. */
:root {
  --bg: #0c0a12;
  --panel: #15111f;
  --panel-2: #1c1629;
  --line: #2c2340;
  --text: #ece8f5;
  --muted: #9a91b4;
  --violet: #7b2cbf;
  --violet-light: #c77dff;
  --violet-deep: #4a00b0;
  --gold: #ffb300;
  --pink: #ff2d55;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
a { color: var(--violet-light); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem clamp(1rem, 4vw, 3rem);
  background: rgba(12, 10, 18, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; letter-spacing: .08em; color: var(--text); }
.brand span { color: var(--violet-light); margin-left: .35em; }
.nav nav { display: flex; gap: clamp(.75rem, 2vw, 1.75rem); align-items: center; }
.nav nav a { color: var(--muted); font-size: .95rem; }
.nav nav a:hover { color: var(--text); text-decoration: none; }
.nav .discord {
  color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  padding: .45rem .9rem; border-radius: 999px; font-weight: 600;
}

/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: clamp(3rem, 10vw, 7rem) 0 clamp(3rem, 8vw, 5rem); }
.hero-inner { position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem); }
.hero h1 { font-size: clamp(2.2rem, 7vw, 4.4rem); font-weight: 800; letter-spacing: -.02em; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--violet-light), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 46ch; font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted); }

/* The storm, as a backdrop: violet shafts drifting behind the text. */
.storm { position: absolute; inset: 0; opacity: .55; }
.storm::before, .storm::after {
  content: ""; position: absolute; inset: -20% -10%;
  background:
    repeating-linear-gradient(100deg,
      transparent 0 38px,
      rgba(199, 125, 255, .10) 38px 41px,
      transparent 41px 96px),
    radial-gradient(120% 80% at 70% 0%, rgba(123, 44, 191, .55), transparent 60%);
  animation: drift 26s linear infinite;
}
.storm::after { animation-duration: 41s; animation-direction: reverse; opacity: .6; }
@keyframes drift { to { transform: translate3d(-96px, 40px, 0); } }
@media (prefers-reduced-motion: reduce) { .storm::before, .storm::after { animation: none; } }

.ip { margin-top: 2.2rem; }
.copy {
  display: inline-flex; align-items: baseline; gap: .9rem;
  padding: .85rem 1.4rem; cursor: pointer;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-weight: 700; letter-spacing: .02em;
  transition: border-color .15s, transform .15s;
}
.copy:hover { border-color: var(--violet); transform: translateY(-1px); }
.copy .ip-text { font-size: 1.15rem; }
.copy .copy-hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
.copy.copied .copy-hint { color: #4ade80; }

/* ---- how ---- */
.how, .store { max-width: 1100px; margin: 0 auto; padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1rem, 4vw, 3rem); }
.how h2, .store h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.store .sub { color: var(--muted); max-width: 60ch; margin-top: -.25rem; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 1.5rem; }
.cards article { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; }
.cards h3 { color: var(--violet-light); font-size: 1.15rem; }
.cards p { color: var(--muted); margin: 0; }

/* ---- store ---- */
.who {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.2rem; margin: 1.5rem 0 2rem;
}
.who label { display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; color: var(--muted); }
.who input, .who select {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 9px;
  padding: .6rem .8rem; font: inherit; min-width: 190px;
}
.who input:focus, .who select:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.who .hint { flex: 1 1 100%; margin: 0; font-size: .85rem; color: var(--muted); }
.who .hint.bad { color: var(--pink); }
.who .hint.good { color: #4ade80; }

.products { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.product {
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 1.4rem; position: relative; overflow: hidden;
}
.product.featured { border-color: var(--violet); }
.product.featured::before {
  content: "Most popular"; position: absolute; top: 0; right: 0;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  padding: .3rem .7rem; border-bottom-left-radius: 10px; text-transform: uppercase;
}
.product h3 { font-size: 1.3rem; margin-bottom: .15rem; }
.product .price { font-size: 1.9rem; font-weight: 800; }
.product .price small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.product p { color: var(--muted); font-size: .92rem; flex: 1; }
.product button {
  margin-top: 1rem; padding: .75rem 1rem; cursor: pointer;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #fff; border: 0; border-radius: 10px; font: inherit; font-weight: 700;
  transition: filter .15s, transform .15s;
}
.product button:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-1px); }
.product button:disabled { opacity: .55; cursor: not-allowed; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  padding: .2rem .5rem; border-radius: 5px; text-transform: uppercase; }
.badge.mzw { background: linear-gradient(90deg, #e0aaff, #6a00f4); color: #fff; }
.badge.mzwplus { background: linear-gradient(90deg, var(--gold), var(--pink)); color: #fff; }
.loading { color: var(--muted); }

/* ---- footer ---- */
footer { border-top: 1px solid var(--line); margin-top: 2rem; }
.foot-inner { max-width: 1100px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 3rem); }
.foot-inner p { margin: .3rem 0; font-size: .9rem; }

/* ---- embedded checkout ---- */
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(1rem, 5vh, 3rem) 1rem;
  background: rgba(6, 4, 12, .82); backdrop-filter: blur(6px);
  overflow: auto;
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative; width: min(560px, 100%);
  background: #fff; border-radius: 16px; padding: 1rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.modal-close {
  position: absolute; top: -14px; right: -14px;
  width: 36px; height: 36px; border-radius: 999px; cursor: pointer;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); font-size: 1.3rem; line-height: 1;
}
.modal-close:hover { border-color: var(--violet); }

/* Terms page. Narrower than the grid sections above it: this is the one
   page on the site meant to be read as prose, and a 1100px measure is
   unreadable for body text. */
.terms { max-width: 68ch; margin-top: 1.5rem; }
.terms h3 { color: var(--violet-light); font-size: 1.1rem; margin: 2rem 0 .5rem; }
.terms h3:first-child { margin-top: 1rem; }
.terms p { color: var(--muted); margin: 0 0 .9rem; line-height: 1.65; }
.terms strong { color: var(--text, #fff); }
.terms a { color: var(--violet-light); }
