/* RS Labs website shell: shared by the site pages (home, tools, projects, profile, sign-in). The tools themselves
   (chain.html) keep their own editor look. Brand: purple chrome RS monogram, neon violet on near-black. */
:root {
  --bg: #04050E; --bg2: #0A0B1A; --card: #0E0F22; --card2: #141532; --line: rgba(201, 172, 254, .12); --line2: rgba(201, 172, 254, .24);
  --ink: #EFEAFF; --dim: #A79FC4; --faint: #6D6690;
  --neon: #B584EB; --lav: #C9ACFE; --violet: #5C4594; --glow: rgba(181, 132, 235, .45);
  --ok: #7FF0C4; --warn: #FFB36B; --bad: #FF6B81; --discord: #5865F2;
  --display: "Unbounded", "Segoe UI", sans-serif; --body: "Sora", "Segoe UI", system-ui, sans-serif; --mono: "JetBrains Mono", Consolas, monospace;
  --r: 16px; --wrap: 1200px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { /* hex lattice + violet haze behind every page */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 15% -5%, rgba(92, 69, 148, .45), transparent 70%),
    radial-gradient(ellipse 50% 45% at 100% 30%, rgba(181, 132, 235, .12), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64' viewBox='0 0 56 64'%3E%3Cpath d='M28 2 L54 17 L54 47 L28 62 L2 47 L2 17 Z' fill='none' stroke='rgba(201,172,254,0.05)'/%3E%3C/svg%3E"),
    var(--bg);
}
a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--neon); color: #12081f; }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
main { flex: 1; }

/* header */
.site-head { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); background: rgba(4, 5, 14, .72); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand img { width: 42px; height: 42px; filter: drop-shadow(0 0 10px var(--glow)); }
.brand span { font: 700 18px var(--display); letter-spacing: .12em; }
.brand small { display: block; font: 500 10px var(--mono); letter-spacing: .18em; color: var(--faint); margin-top: -2px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--dim); font: 500 14px var(--body); transition: color .15s, background .15s; }
.nav a:hover { color: var(--ink); background: rgba(201, 172, 254, .08); }
.nav a[aria-current="page"] { color: #12081f; background: linear-gradient(120deg, var(--lav), var(--neon)); font-weight: 600; }
.site-head [data-account] { margin-left: auto; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 22px; border-radius: 12px; border: 0; cursor: pointer; text-decoration: none;
  font: 600 15px var(--body); color: #12081f; background: linear-gradient(120deg, var(--lav), var(--neon)); box-shadow: 0 8px 26px rgba(181, 132, 235, .35); transition: transform .15s, box-shadow .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 32px rgba(181, 132, 235, .5); filter: brightness(1.05); }
.btn.ghost { color: var(--ink); background: rgba(201, 172, 254, .06); box-shadow: inset 0 0 0 1px var(--line2); }
.btn.ghost:hover { background: rgba(201, 172, 254, .12); }
.btn.discord { color: #fff; background: var(--discord); box-shadow: 0 8px 26px rgba(88, 101, 242, .4); }
.btn.danger { color: var(--bad); background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 107, 129, .4); }
.btn.danger:hover { background: rgba(255, 107, 129, .12); }
.btn.sm { padding: 9px 14px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled], .btn.off { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* text bits */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 12px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--lav); }
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--neon); }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; margin: 0; }
.page-head { padding: 56px 0 28px; }
.page-head h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.05; margin-top: 12px; }
.page-head p { color: var(--dim); max-width: 640px; margin: 14px 0 0; }
.muted { color: var(--dim); }

/* status chips */
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.beta { color: #12081f; background: var(--warn); }
.chip.beta i { background: #12081f; animation: pulse 1.6s ease-in-out infinite; }
.chip.offline { color: var(--faint); background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.chip.live { color: #062b1f; background: var(--ok); }
@keyframes pulse { 50% { opacity: .35; } }

/* tool cards (home + tools pages) */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.tool { position: relative; display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--card); border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s; }
.tool:hover { transform: translateY(-3px); border-color: var(--line2); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.tool .pic { position: relative; aspect-ratio: 16 / 10; background: #000; overflow: hidden; }
.tool .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tool:hover .pic img { transform: scale(1.04); }
.tool.is-offline .pic img { filter: grayscale(1) brightness(.5); }
.tool .pic .chip { position: absolute; top: 12px; left: 12px; }
.tool .body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.tool .cat { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.tool h3 { font-size: 17px; }
.tool p { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.5; flex: 1; }
.tool .act { margin-top: 12px; }
.tool .act .btn { width: 100%; }

/* panels + empty states */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.empty { padding: 48px 24px; text-align: center; color: var(--dim); }
.empty h2 { font-size: 22px; color: var(--ink); margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }

/* footer */
.site-foot { margin-top: 80px; border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--faint); font-size: 13px; }
.site-foot .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.site-foot img { width: 26px; height: 26px; }
.site-foot nav { margin-left: auto; display: flex; gap: 18px; }
.site-foot a { text-decoration: none; color: var(--dim); } .site-foot a:hover { color: var(--ink); }

/* beta notice (site.js) */
.beta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px; background: rgba(14, 15, 34, .97); border-top: 1px solid var(--warn); box-shadow: 0 -10px 30px rgba(0, 0, 0, .5); font-size: 14.5px; }
.beta-bar b { font: 600 12px var(--mono); letter-spacing: .14em; color: var(--warn); margin-right: 8px; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  /* no backdrop-filter here: it would trap the fixed bottom nav inside the header */
  .site-head { backdrop-filter: none; background: rgba(4, 5, 14, .96); }
  .site-head .wrap { gap: 12px; height: 64px; }
  .brand span small, .brand small { display: none; }
  .brand span { font-size: 15px; }
  .nav { order: 3; position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(4, 5, 14, .94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  body { padding-bottom: 64px; }
  .beta-bar { bottom: 58px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
