/* The Shadow Realm — shared theme */
@font-face { font-family: "Space Grotesk"; src: url("fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@property --spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: #050507; --panel: #0c0c13; --panel2: #08080d; --line: #1e1b2e;
  --text: #f3f1fa; --dim: #918ba8; --accent: #ff4fa3; --deep: #7c4dff; --hot: #ffc27a; --green: #3dffa2; --bad: #ff6b81;
  --sans: "Space Grotesk", -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg); color: var(--text); font: 17px/1.6 var(--sans);
  background-image:
    radial-gradient(900px 500px at 85% -5%, rgba(109, 60, 255, .16), transparent 70%),
    linear-gradient(rgba(61, 255, 162, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 255, 162, .028) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
::selection { background: var(--accent); color: #000; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 22px; background: rgba(5, 5, 7, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: 14px; }
.nav nav { display: flex; align-items: center; gap: 16px; }
.link { color: var(--dim); text-decoration: none; font-size: 15px; }
.link:hover { color: var(--text); }

/* buttons */
.btn { display: inline-block; cursor: pointer; border: 0; text-decoration: none; font: 700 16px var(--sans); letter-spacing: .02em;
  padding: 15px 28px; border-radius: 12px; color: #08040f; background: linear-gradient(135deg, var(--hot), var(--accent) 45%, var(--deep));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 10px 40px -8px rgba(255, 61, 154, .75); transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 16px 56px -6px rgba(255, 61, 154, .95); }
.btn.sm { padding: 10px 18px; font-size: 14px; border-radius: 10px; }
.btn.ghost { background: none; color: var(--text); box-shadow: 0 0 0 1px var(--line) inset; }
.btn.ghost:hover { box-shadow: 0 0 0 1px var(--accent) inset; }

/* text bits */
.eyebrow { font: 500 13px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
h1, h2, h3 { font-family: var(--sans); letter-spacing: -.035em; line-height: 1.02; }
.grad { background: linear-gradient(100deg, #fff 10%, var(--accent) 55%, var(--deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* cards */
.card { position: relative; display: block; overflow: hidden; text-decoration: none; color: inherit; border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel2)); transition: transform .25s, border-color .25s, box-shadow .25s; }
a.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: 0 24px 70px -28px rgba(255, 61, 154, .9); }
.cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 100%, rgba(255, 61, 154, .5), transparent 60%), #07070b; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s; }
a.card:hover .cover img { transform: scale(1.07); }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, var(--panel)); }
.cover .tag { position: absolute; z-index: 1; top: 14px; left: 14px; font: 500 12px var(--mono); letter-spacing: .12em; padding: 5px 9px; border-radius: 6px;
  background: rgba(5, 5, 7, .7); border: 1px solid var(--line); color: var(--hot); }
.card .body { padding: 6px 22px 24px; }
.card h3 { font-size: 23px; margin-bottom: 8px; }
.card p { color: var(--dim); font-size: 15px; line-height: 1.55; }
.locked { opacity: .55; border-style: dashed; }

/* spinning border */
.ring { position: relative; border: 0; }
.ring::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--spin), transparent 0 62%, var(--accent) 82%, #fff 92%, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 5s linear infinite; pointer-events: none; }
@keyframes spin { to { --spin: 360deg; } }

/* scroll reveal (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s, transform .7s; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* help chat (support.js) */
.sup-bubble { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 58px; height: 58px; border-radius: 20px; border: 0; cursor: pointer;
  font: 700 26px var(--sans); color: #08040f; background: linear-gradient(135deg, var(--hot), var(--accent) 50%, var(--deep)); box-shadow: 0 12px 40px -8px rgba(255, 61, 154, .85); }
.sup-dot { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--green); border: 3px solid var(--bg); }
.sup-dot[hidden] { display: none; }
.sup-panel { position: fixed; right: 20px; bottom: 92px; z-index: 41; width: min(380px, calc(100vw - 24px)); height: min(540px, calc(100dvh - 116px)); display: flex; flex-direction: column;
  border-radius: 20px; border: 1px solid var(--line); background: #0b0912; overflow: hidden; box-shadow: 0 30px 90px -20px #000, 0 0 0 1px rgba(255, 61, 154, .25); }
.sup-panel[hidden] { display: none; }
body[data-support="button"] .sup-bubble { display: none; }
body[data-support="button"] .sup-panel { bottom: 20px; height: min(540px, calc(100dvh - 40px)); }
.sup-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(255, 61, 154, .25), rgba(124, 77, 255, .12)); }
.sup-head small { display: block; color: var(--dim); font-size: 13px; line-height: 1.35; margin-top: 2px; }
.sup-x { background: none; border: 0; color: var(--dim); font-size: 26px; line-height: 1; cursor: pointer; }
.sup-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.sup-m { max-width: 84%; padding: 9px 13px; border-radius: 14px; border-bottom-left-radius: 4px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere;
  background: #17131f; color: var(--text); align-self: flex-start; }
.sup-m.me { align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--deep)); color: #fff; border-radius: 14px; border-bottom-right-radius: 4px; }
.sup-m small { display: block; font: 500 10px var(--mono); letter-spacing: .08em; opacity: .7; margin-bottom: 3px; }
.sup-form { padding: 12px; border-top: 1px solid var(--line); }
.sup-form input { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: #06060a; color: var(--text); font: 15px var(--sans); }
.sup-form input:focus { outline: none; border-color: var(--accent); }
.sup-guest { display: grid; gap: 8px; margin-bottom: 8px; }
.sup-guest[hidden] { display: none; }
.sup-row { display: flex; gap: 8px; }
.sup-row input { flex: 1; min-width: 0; }
.sup-err { color: var(--bad); font-size: 13px; min-height: 16px; margin-top: 6px; }
