/* =========================================================
   voidline.cc — design tokens
   One accent. One family. An 8pt rhythm. Nothing decorative.
   ========================================================= */

:root {
  /* Surfaces — near-black, never #000 (pure black kills depth) */
  --bg:            #08070b;
  --surface:       #0e0d13;
  --surface-hi:    #14121b;

  /* Hairlines */
  --line:          rgba(255, 255, 255, 0.07);
  --line-hi:       rgba(255, 255, 255, 0.13);

  /* Text — three levels, no more */
  --text:          #edebf2;
  --muted:         #9c98aa;
  --faint:         #6c6879;

  /* The single accent */
  --accent:        #a78bfa;
  --accent-deep:   #7c5cf0;

  --ok:            #6ee7a8;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Spacing — 8pt scale */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --s9: 112px; --s10: 160px;

  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* Wider shell + roomier gutters so the page fills the screen */
  --shell:  1280px;
  --gutter: clamp(24px, 5vw, 64px);
}

/* ============================ reset ============================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #2a2635 transparent;   /* Firefox */
  scrollbar-width: thin;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;                         /* was 16 — reads far less cramped */
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
ul  { list-style: none; }

::selection { background: var(--accent); color: #0b0910; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ========================== scrollbar ==========================
   Slim, dark, no arrows. Brightens on hover so it stays findable. */

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb {
  background: #26222f;
  border-radius: 100px;
  border: 3px solid var(--bg);   /* inset look */
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #3a3348; background-clip: padding-box; }
::-webkit-scrollbar-thumb:active { background: var(--accent-deep); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ===================== smooth-scroll shell =====================
   JS transforms #scroll and sets body height. Falls back to plain
   document flow if JS is off or motion is reduced.                */

#scroll { width: 100%; }

body.smooth #scroll {
  position: fixed;
  top: 0; left: 0;
  will-change: transform;
}

/* ====================== ambient background ====================== */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient__grid {
  position: absolute;
  inset: -80px;
  background-image:
    linear-gradient(rgba(180, 200, 255, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 200, 255, 0.085) 1px, transparent 1px);
  background-size: 68px 68px;

  /* brightest under the pointer, fading out well before the edges */
  -webkit-mask-image: radial-gradient(520px circle at var(--mx, 50%) var(--my, 40%),
    #000 0%, rgba(0,0,0,.5) 48%, transparent 78%);
  mask-image: radial-gradient(520px circle at var(--mx, 50%) var(--my, 40%),
    #000 0%, rgba(0,0,0,.5) 48%, transparent 78%);

  /* one cell of drift, so it breathes even when the mouse is still */
  animation: drift 28s linear infinite;
  will-change: transform;
}

@keyframes drift {
  from { background-position: 0 0; }
  to   { background-position: 68px 68px; }
}

/* violet wash tinting the grid under the cursor */
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 40%),
    rgba(167, 139, 250, 0.10), transparent 68%);
}

/* the cursor light itself — soft, small, low opacity */
.ambient__glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 260px;
  height: 260px;
  margin: -130px 0 0 -130px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(167, 139, 250, 0.16), rgba(167, 139, 250, 0.05) 45%, transparent 70%);
  filter: blur(24px);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  will-change: transform;
}
.ambient__glow.on { opacity: 1; }

.header, main, .footer { position: relative; z-index: 1; }

/* ============================ header ============================ */

.header {
  max-width: var(--shell);
  margin-inline: auto;
  padding: var(--s5) var(--gutter);
}

.header__left {
  display: flex;
  align-items: center;
  gap: var(--s4);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.02em;
  transition: opacity 0.15s var(--ease);
}
.wordmark:hover { opacity: 0.72; }

/* screen drops the logo's black backdrop so it isn't a visible box */
.wordmark img {
  width: 32px; height: 32px;
  object-fit: contain;
  mix-blend-mode: screen;
}

.wordmark__tld { color: var(--faint); }

.header__rule {
  width: 1px;
  height: 20px;
  background: var(--line-hi);
}

/* ------------------------- language ------------------------- */

.lang {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
}

.lang__btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--faint);
  background: none;
  border: 0;
  border-radius: 100px;
  padding: 5px 11px;
  cursor: pointer;
  transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.lang__btn:hover { color: var(--text); }

.lang__btn.is-active {
  color: var(--text);
  background: var(--surface-hi);
  box-shadow: inset 0 0 0 1px var(--line-hi);
}

/* ============================= hero ============================= */

.hero {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(var(--s8), 10vw, var(--s10)) var(--gutter) var(--s9);
}

.hero__copy { max-width: 40ch; }

/* S43 badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: var(--s5);
  padding: 5px 12px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
}

.badge__tag {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #0b0910;
  background: var(--accent);
  border-radius: 100px;
  padding: 3px 9px;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 4.75rem);   /* noticeably larger */
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.042em;
  text-wrap: balance;
}

.lede {
  margin-top: var(--s5);
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  color: var(--muted);
  max-width: 48ch;
  line-height: 1.62;
}

/* ============================= snippet =============================
   No card. The loadstring is just text on the page — the thing you
   came for, not a widget wrapped around it. */

.snippet { margin-top: var(--s8); }

/* step 1 — unlock. Sits above the script because it comes first. */
.snippet__gate {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--line);   /* a rule, not a box */
}

/* step 2 — the script itself */
.snippet__row {
  display: flex;
  align-items: center;
  gap: var(--s5);
  flex-wrap: wrap;
  margin-top: var(--s5);
}

.snippet__code {
  flex: 1 1 420px;
  min-width: 0;
  font-family: var(--mono);
  font-size: clamp(13px, 1.5vw, 15.5px);
  line-height: 1.6;
  color: var(--text);
  overflow-x: auto;
  transition: filter 0.5s var(--ease), opacity 0.5s var(--ease);
}

.snippet[data-locked="true"] .snippet__code {
  filter: blur(6px);
  opacity: 0.45;
  user-select: none;
  pointer-events: none;
}

/* copy — quiet until it can actually be used */
.copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;

  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  color: var(--muted);

  padding: 10px 16px;
  border: 1px solid var(--line-hi);
  border-radius: var(--r-sm);
  background: transparent;
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background-color 0.18s var(--ease), opacity 0.18s var(--ease);
}

.copy:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-wash, rgba(167, 139, 250, 0.08));
}

.copy:disabled { opacity: 0.3; cursor: not-allowed; }

/* ---------------------------- join ----------------------------
   Uses the site accent, not Discord blurple — two near-identical
   purples side by side read as a mistake. The Discord glyph does
   the brand work on its own.
   The button doubles as the progress bar: a fill sweeps across it
   during the wait, so feedback lands where the click happened. */

.join {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;

  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #0b0910;

  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.008em;
  line-height: 1;
  text-decoration: none;

  transition: background-color 0.18s var(--ease),
              border-color 0.18s var(--ease),
              color 0.18s var(--ease);
}

.join:hover  { background: #bda6ff; }
.join:active { background: var(--accent-deep); color: #fff; }

.join__inner {
  position: relative;          /* above the sweep */
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
}

.join__icon { width: 16px; height: 16px; flex-shrink: 0; }

/* waiting — steps back, goes inert, lets the sweep do the talking */
.join[data-state="waiting"] {
  background: var(--surface-hi);
  border-color: var(--line-hi);
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}
.join[data-state="waiting"] .join__icon { opacity: 0.45; }

.join__fill {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left;
  background: rgba(167, 139, 250, 0.18);
  border-right: 1px solid var(--accent);
}

/* linear so the sweep tracks the countdown digits exactly */
.join[data-state="waiting"] .join__fill {
  transform: scaleX(1);
  transition: transform 10s linear;
}

.tnum {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}
.tnum[hidden] { display: none; }

/* once unlocked the CTA has done its job — the rule goes with it,
   leaving just the script and Copy */
.snippet[data-locked="false"] .join { display: none; }

.snippet[data-locked="false"] .snippet__gate {
  padding-bottom: 0;
  border-bottom: 0;
}

.snippet[data-locked="false"] .snippet__row { margin-top: var(--s3); }

/* ============================= buttons ============================= */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-line: var(--line-hi);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  font-family: inherit;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.006em;
  line-height: 1;

  padding: 12px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--btn-line);
  background: var(--btn-bg);
  color: var(--btn-fg);

  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.18s var(--ease),
              border-color 0.18s var(--ease),
              color 0.18s var(--ease),
              opacity 0.18s var(--ease);
}

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: #0b0910;
  --btn-line: transparent;
  font-weight: 600;
  padding: 14px 24px;
}
.btn--primary:hover  { --btn-bg: #b9a3fb; }
.btn--primary:active { --btn-bg: var(--accent-deep); --btn-fg: #fff; }

.btn--ghost:hover:not(:disabled) {
  --btn-bg: var(--surface-hi);
  --btn-line: var(--line-hi);
}

.btn:disabled { opacity: 0.38; cursor: not-allowed; }

.i {
  width: 15px; height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ============================== why ============================== */

.why {
  max-width: var(--shell);
  margin-inline: auto;
  padding: var(--s9) var(--gutter);
  border-top: 1px solid var(--line);
}

.why h2 {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -0.032em;
  margin-bottom: var(--s7);
}

.why__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s5);
}

.tile {
  padding: var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.tile:hover { border-color: var(--line-hi); background: var(--surface-hi); }

.tile h3 {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--s2);
}

.tile p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.62;
}

/* ============================== legal ==============================
   Narrow measure (~68ch) because legal copy is read, not skimmed. */

.legal {
  max-width: 780px;
  margin-inline: auto;
  padding: var(--s7) var(--gutter) var(--s9);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: var(--s7);
  transition: color 0.18s var(--ease);
}
.back:hover { color: var(--text); }
.back .i { width: 15px; height: 15px; }

.legal__meta {
  font-size: 12.5px;
  color: var(--faint);
  letter-spacing: 0.01em;
  margin-bottom: var(--s3);
}

.legal h1 {
  font-size: clamp(2rem, 4.6vw, 2.875rem);
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.legal__lede {
  margin-top: var(--s4);
  font-size: 17px;
  line-height: 1.66;
  color: var(--muted);
  max-width: 62ch;
}

/* the ban clause — the one thing nobody should be able to miss */
.callout {
  margin-top: var(--s6);
  padding: var(--s5);
  border: 1px solid rgba(167, 139, 250, 0.28);
  border-left: 2px solid var(--accent);
  border-radius: var(--r);
  background: rgba(167, 139, 250, 0.05);
}

.callout h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: var(--s2);
}

.callout p {
  font-size: 15px;
  line-height: 1.68;
  color: var(--text);
}

.legal__body {
  margin-top: var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s7);
}

.legal__body section { scroll-margin-top: var(--s5); }

.legal__body h2 {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--s3);
}

.legal__body .num {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.legal__body p {
  font-size: 15px;
  line-height: 1.72;
  color: var(--muted);
}

.legal__body ul {
  margin-top: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.legal__body li {
  position: relative;
  padding-left: var(--s4);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.legal__body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 1px;
  background: var(--faint);
}

/* ============================= footer ============================= */

.footer {
  max-width: var(--shell);
  margin-inline: auto;
  padding: var(--s6) var(--gutter) var(--s8);
  border-top: 1px solid var(--line);

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s4);

  font-size: 13.5px;
  color: var(--faint);
}

.footer__col { display: flex; flex-direction: column; gap: 3px; }

/* secondary to the copyright line above it */
.footer__note { font-size: 12.5px; opacity: 0.75; }

.footer__links {
  display: flex;
  align-items: center;
  gap: var(--s5);
}

.footer__links > a:not(.footer__discord) {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s var(--ease);
}
.footer__links > a:not(.footer__discord):hover { color: var(--text); }

.footer__discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background-color 0.18s var(--ease);
}

.footer__discord svg { width: 16px; height: 16px; flex-shrink: 0; }

.footer__discord:hover {
  color: var(--text);
  border-color: var(--line-hi);
  background: var(--surface-hi);
}

/* ============================ responsive ============================ */

@media (max-width: 640px) {
  body { font-size: 16px; }

  .hero   { padding-top: var(--s7); padding-bottom: var(--s8); }
  .why    { padding-block: var(--s8); }
  .script { margin-top: var(--s7); }

  .script__bar,
  .script__foot { padding-inline: var(--s4); }
  .script__code { padding: var(--s8) var(--s4); font-size: 13px; }

  .script__foot { flex-direction: column; align-items: stretch; }
  .script__foot .btn { width: 100%; padding-block: 13px; }
  .hint { text-align: center; }
}

/* ============================ motion ============================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .ambient { display: none; }
  body.smooth #scroll { position: static; }
}

/* Pointer effects are meaningless without a pointer */
@media (hover: none) {
  .ambient__grid {
    -webkit-mask-image: radial-gradient(620px circle at 50% 22%, #000, transparent 75%);
    mask-image: radial-gradient(620px circle at 50% 22%, #000, transparent 75%);
  }
  .ambient::after { display: none; }
}
