/* Layout: single centered column (max 1160px), logo-led hero beside a server-console mock; deliberate dark-only look taken from the Pulse logo (black, violet glow, brushed silver). */
:root {
  color-scheme: dark;
  --ink: #07060c;        /* page ground */
  --panel: #0f0c1b;      /* raised surfaces */
  --panel-2: #171329;
  --line: #29224a;
  --fg: #ece9f6;
  --muted: #918aab;
  --pulse: #9d4dff;      /* brand accent: logo violet */
  --pulse-soft: rgba(157, 77, 255, 0.18);
  --silver: linear-gradient(180deg, #ffffff 0%, #d9d3ee 55%, #a89fc9 100%);
  --violet-grad: linear-gradient(135deg, #b46bff 0%, #7a3dff 100%);
  --signal: #c4b5ff;     /* secondary, links and framework tags */
  --ok: #3fd39a;
  --warn: #ffb547;
  --bad: #ff6b6b;

  --font-display: "Chakra Petch", "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step-0: 0.95rem;
  --step-1: 1.15rem;
  --step-2: 1.5rem;
  --step-3: 2.1rem;
  --step-4: clamp(2.4rem, 6vw, 4.1rem);
  --radius: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--ink);
}
a { color: var(--signal); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--pulse); outline-offset: 2px; border-radius: 4px; }

.wrap {
  max-width: 1160px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.mono { font-family: var(--font-mono); }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pulse);
}
.muted { color: var(--muted); }

/* ---------- nav */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(7, 6, 12, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.brand img { flex: none; height: 34px; width: auto; }
.brand b { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: 1.25rem; letter-spacing: 0.06em; text-transform: uppercase; }
.brand span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.12em; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fg); }
@media (max-width: 720px) { .nav-links a.hide-sm { display: none; } }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 0.95rem/1 var(--font-body); padding: 12px 18px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--fg);
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { border-color: #4a3c80; }
.btn:active { transform: translateY(1px); }
.btn-pulse { background: var(--violet-grad); border-color: #8f45ff; color: #fff; box-shadow: 0 0 24px rgba(157, 77, 255, .35); }
.btn-pulse:hover { border-color: #c48bff; box-shadow: 0 0 32px rgba(157, 77, 255, .55); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 8px 12px; font-size: 0.85rem; }
.cart-btn .count {
  font-family: var(--font-mono); font-size: 0.75rem; background: var(--pulse); color: #fff;
  border-radius: 999px; padding: 2px 7px; min-width: 22px; text-align: center;
}

/* ---------- forms */
label { display: grid; gap: 6px; font-size: 0.85rem; color: var(--muted); }
input {
  font: 500 1rem var(--font-body); color: var(--fg); background: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; width: 100%;
}
input.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }
input:focus { outline: none; border-color: var(--pulse); box-shadow: 0 0 0 3px var(--pulse-soft); }

.notice { border-radius: 8px; padding: 12px 14px; font-size: 0.92rem; border: 1px solid var(--line); background: var(--panel); }
.notice.bad { border-color: rgba(255, 107, 107, .5); color: #ffc2c2; }
.notice.ok { border-color: rgba(63, 211, 154, .5); color: #b9f3dc; }

/* ---------- status pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px; font: 600 0.72rem/1 var(--font-mono);
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px;
  border: 1px solid currentColor;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--bad); }

/* ---------- license key block */
.keyline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--ink); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px;
}
.keyline code { font-family: var(--font-mono); font-size: 1rem; letter-spacing: .06em; color: var(--fg); word-break: break-all; flex: 1 1 220px; min-width: 0; }

textarea {
  font: 500 .95rem/1.5 var(--font-body); color: var(--fg); background: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; resize: none;
}
textarea:focus { outline: none; border-color: var(--pulse); box-shadow: 0 0 0 3px var(--pulse-soft); }

/* ---------- Discord account in nav */
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { border-color: #8891ff; }
.btn-discord svg { width: 18px; height: 18px; flex: none; }
.acct { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.acct img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.acct span { font-size: .9rem; font-weight: 600; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .acct span { display: none; } }

/* ---------- support widget (self-contained so page styles can't leak in) */
.sup-launch {
  position: fixed; z-index: 62;
  right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 54px; height: 54px; display: grid; place-items: center; padding: 0; margin: 0; border-radius: 50%;
  background: #0b0915; border: 1.5px solid #8f45ff; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(157, 77, 255, .12), 0 8px 24px rgba(122, 61, 255, .45);
  transition: transform .15s, box-shadow .15s;
}
.sup-launch:hover { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(157, 77, 255, .18), 0 10px 30px rgba(122, 61, 255, .6); }
.sup-launch img { width: 32px; height: auto; display: block; max-width: none; filter: drop-shadow(0 0 6px rgba(157, 77, 255, .7)); transition: opacity .15s, transform .15s; }
.sup-launch .close-x { position: absolute; inset: 0; display: grid; place-items: center; font: 400 1.7rem/1 var(--font-body); color: #fff; opacity: 0; transform: rotate(-90deg); transition: opacity .15s, transform .15s; }
.sup-launch[aria-expanded="true"] img { opacity: 0; transform: scale(.6); }
.sup-launch[aria-expanded="true"] .close-x { opacity: 1; transform: none; }

.sup-panel {
  position: fixed; z-index: 61;
  right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  width: min(340px, calc(100vw - 24px)); height: min(460px, calc(100dvh - 120px));
  display: flex; flex-direction: column; overflow: hidden; margin: 0; padding: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .75), 0 0 0 1px rgba(157, 77, 255, .14);
  font: 400 14px/1.45 var(--font-body); color: var(--fg); text-align: left;
  transform-origin: bottom right; animation: supIn .16s ease-out;
}
@media (max-width: 480px) { .sup-panel { right: 12px; left: 12px; width: auto; } }
@keyframes supIn { from { opacity: 0; transform: scale(.94) translateY(6px); } }
.sup-panel *, .sup-panel *::before, .sup-panel *::after { box-sizing: border-box; }
.sup-panel button { font: inherit; margin: 0; }

.sup-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 9px 6px 9px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.sup-head .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.sup-title { flex: 1; min-width: 0; line-height: 1.2; }
.sup-title b { display: block; font: 700 .88rem var(--font-display); font-style: italic; text-transform: uppercase; letter-spacing: .04em; }
.sup-title small { display: block; color: var(--muted); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-iconbtn { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.15rem; line-height: 1; cursor: pointer; padding: 0; }
.sup-iconbtn:hover { background: var(--panel); color: var(--fg); }

.sup-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.sup-log .msg { max-width: 88%; padding: 8px 11px; border-radius: 12px; font-size: .86rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.sup-log .msg.ai { background: var(--panel-2); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.sup-log .msg.me { background: var(--pulse-soft); border: 1px solid rgba(157, 77, 255, .4); align-self: flex-end; border-bottom-right-radius: 4px; }
.sup-log .msg code { font-family: var(--font-mono); font-size: .8em; background: var(--ink); padding: 1px 5px; border-radius: 4px; white-space: pre-wrap; }
.sup-log .typing { display: flex; gap: 4px; align-items: center; padding: 11px 12px; }
.sup-log .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: supDot 1s infinite ease-in-out; }
.sup-log .typing i:nth-child(2) { animation-delay: .15s; }
.sup-log .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes supDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.sup-note { align-self: center; text-align: center; font-size: .78rem; color: #b9f3dc; background: rgba(63, 211, 154, .08); border: 1px solid rgba(63, 211, 154, .35); border-radius: 8px; padding: 6px 10px; }
.sup-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sup-chips button { font-size: .75rem; color: var(--signal); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; cursor: pointer; }
.sup-chips button:hover { border-color: var(--pulse); }

.sup-handoff { flex: none; align-self: stretch; display: grid; gap: 7px; padding: 10px; border: 1px dashed rgba(157, 77, 255, .55); border-radius: 10px; font-size: .82rem; background: rgba(157, 77, 255, .05); }
.sup-handoff b { font-weight: 600; }
.sup-in { width: 100%; font: 400 .84rem/1.4 var(--font-body); color: var(--fg); background: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; resize: none; }
.sup-in:focus { outline: none; border-color: var(--pulse); box-shadow: 0 0 0 3px var(--pulse-soft); }
.sup-row { display: flex; gap: 10px; align-items: center; }
.sup-cta { border: 1px solid #8f45ff; background: var(--violet-grad); color: #fff; border-radius: 8px; padding: 7px 12px; font-size: .8rem; font-weight: 600; cursor: pointer; }
.sup-cta[disabled] { opacity: .6; cursor: wait; }
.sup-link { border: 0; background: none; color: var(--muted); font-size: .8rem; cursor: pointer; text-decoration: underline; padding: 0; }
.sup-muted { color: var(--muted); }

.sup-form { flex: none; display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); align-items: flex-end; margin: 0; }
.sup-form textarea { flex: 1; min-width: 0; width: auto; max-height: 96px; font: 400 .86rem/1.4 var(--font-body); color: var(--fg); background: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; resize: none; }
.sup-form textarea:focus { outline: none; border-color: var(--pulse); box-shadow: 0 0 0 3px var(--pulse-soft); }
.sup-send { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #8f45ff; border-radius: 10px; background: var(--violet-grad); color: #fff; font-size: .9rem; cursor: pointer; padding: 0; }
.sup-send[disabled] { opacity: .5; cursor: wait; }
.sup-foot { flex: none; display: flex; justify-content: flex-end; padding: 0 10px 8px; }
.sup-foot button { background: none; border: 0; color: var(--signal); cursor: pointer; font-size: .72rem; padding: 0; text-decoration: underline; }

.footer { border-top: 1px solid var(--line); margin-top: 80px; }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding-block: 28px; color: var(--muted); font-size: .88rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
