/* Neonyx Idle public site - shared styles for every page.

   Constraints (see README.md):
   - No build step, no JavaScript. vercel.json's CSP is `script-src 'none'`.
   - No third-party requests at all. Fonts are self-hosted in /fonts (SIL OFL,
     licence files alongside) rather than pulled from Google Fonts, because a
     browser fetch to fonts.googleapis.com hands the visitor's IP address to
     Google - a disclosed-processor problem for a site whose job includes
     hosting the privacy policy.
   - Deliberately single-theme (dark). The game itself only has a dark UI, and
     the neon palette is the brand; every colour is painted explicitly so the
     page holds regardless of the visitor's OS theme. */

@font-face { font-family: 'Orbitron'; src: url('fonts/orbitron-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Orbitron'; src: url('fonts/orbitron-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url('fonts/chakra-petch-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url('fonts/chakra-petch-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url('fonts/chakra-petch-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Share Tech Mono'; src: url('fonts/share-tech-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;
  /* ground and surfaces: blue-biased blacks, taken from the key art's night sky */
  --night: #06070d;
  --deck: #0b0e1b;
  --deck-2: #10142a;
  --wire: #1c2242;
  --wire-hot: #2c3566;
  /* text */
  --ink: #e4e8f6;
  --haze: #939bbd;
  --faint: #5f6789;
  /* brand neon (the game's own T.cyan / T.mag, plus the violet of the logo's X) */
  --cyan: #22d3ee;
  --mag: #ff2d95;
  --violet: #a855f7;
  /* rarity ladder, verbatim from src/data/constants.js RARITIES */
  --r-common: #94a3b8;
  --r-uncommon: #4ade80;
  --r-rare: #3b82f6;
  --r-epic: #a78bfa;
  --r-legendary: #fbbf24;

  --display: 'Orbitron', 'Eurostile', 'Bank Gothic', ui-sans-serif, system-ui, sans-serif;
  --body: 'Chakra Petch', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* type scale (1.25) */
  --t-xs: 0.78rem;
  --t-sm: 0.9rem;
  --t-md: 1.05rem;
  --t-lg: 1.3rem;
  --t-xl: 1.65rem;
  --t-2xl: 2.1rem;
  --t-3xl: clamp(2.1rem, 5vw, 3.3rem);

  --gutter: 16px;
  --radius: 4px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
/* overscroll-behavior stops the browser's rubber-band bounce past the top/
   bottom edge, which otherwise reveals a flash of the OS/browser's own
   white canvas above the sticky header on an overscrolling trackpad or
   mobile swipe - reported live as "a white bar appears at the top". */
html { background: var(--night); overscroll-behavior-y: none; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  /* TEMPORARY TRIAL (queue #135) - owner asked to see the site with this
     photo as the page backdrop instead of the plain --night flat colour,
     "not necessarily a final decision." A dark linear-gradient wash keeps
     body text/cards readable over the busy photo, same readability idiom
     the in-game background picker (src/components/layout/GameShell.jsx)
     uses for the same problem. `fixed` pins the image to the viewport so
     every one of this site's long-scrolling legal pages stays covered by
     one image rather than it scrolling away after the first screenful.
     Longhand properties, not a single `background:` shorthand line - a
     shorthand combining a leading colour with multiple comma-separated
     layers is invalid CSS and gets silently dropped in full by the
     browser (no console error), which is what happened on the first pass
     here. Revert by deleting the 5 `background-*` declarations below and
     restoring a single `background: var(--night);` line in their place. */
  background-color: var(--night);
  background-image: linear-gradient(rgba(6,7,13,0.55), rgba(6,7,13,0.55)), url('/img/body-bg-global-city.webp');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #7ee8f7; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(34, 211, 238, 0.3); color: #fff; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--cyan); color: var(--night); padding: 8px 14px; font-family: var(--mono); text-decoration: none;
}
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }

/* ------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 7, 13, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--wire);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
/* Image logo, not text: swapped for the real logo lockup art. The anchor
   keeps zero added padding/margin of its own, so .site-head's existing
   height/spacing rules are untouched - only the logo's own intrinsic
   height (set below) determines how tall it renders. */
.wordmark { display: inline-flex; line-height: 0; }
.wordmark img { display: block; height: 34px; width: auto; }
.wordmark:hover { opacity: 0.85; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a {
  font-family: var(--mono); font-size: var(--t-sm); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--haze); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--cyan); border-bottom-color: var(--cyan); }
/* Icon-only link, not a text nav item - overrides the generic .site-nav a
   rule above rather than editing it, so every existing text link is
   untouched. Discord's own brand blurple, same as the in-game mark. */
.discord-icon { padding: 0; border-bottom: none; color: var(--haze); display: inline-flex; align-items: center; }
.discord-icon svg { width: 20px; height: 20px; display: block; }
.discord-icon:hover { color: #5865f2; }

/* ------------------------------------------------------------ shared type */
.eyebrow {
  font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--mag); margin: 0 0 10px;
}
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1 { font-family: var(--display); font-weight: 700; font-size: var(--t-3xl); line-height: 1.1; letter-spacing: 0.04em; }
h2 { font-family: var(--display); font-weight: 700; font-size: var(--t-2xl); line-height: 1.15; letter-spacing: 0.03em; }
h3 { font-family: var(--body); font-weight: 600; font-size: var(--t-lg); line-height: 1.3; }
p { margin: 0 0 1em; }
.lede { font-size: var(--t-lg); color: var(--haze); max-width: 60ch; line-height: 1.55; }
.mono { font-family: var(--mono); }

/* ------------------------------------------------------------ buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: var(--t-sm); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 13px 22px; border: 1px solid var(--cyan); color: var(--cyan); background: rgba(34, 211, 238, 0.06);
  text-decoration: none; border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--cyan); color: var(--night); }
.btn.mag { border-color: var(--mag); color: var(--mag); background: rgba(255, 45, 149, 0.07); }
.btn.mag:hover { background: var(--mag); color: #fff; }
.status-chip {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--r-legendary); border: 1px dashed rgba(251, 191, 36, 0.5); padding: 10px 16px; border-radius: var(--radius);
}
.status-chip::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--r-legendary);
  box-shadow: 0 0 10px var(--r-legendary);
  animation: blink 1.6s steps(2, jump-none) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }
/* platform-availability chips (Steam/iOS/Android) - same shape as .status-chip,
   but muted since "not available yet" isn't the same urgency as "launching soon". */
.status-chip.muted { color: var(--faint); border-color: var(--wire-hot); }
.status-chip.muted::before { background: var(--faint); box-shadow: none; animation: none; }
/* Google Play badge: the official artwork, sized to sit level with .btn. Google's
   rules: no recolouring, no effects, keep the artwork's own corners. */
.play-badge { display: inline-flex; line-height: 0; border-radius: 8px; }
.play-badge img { height: 52px; width: auto; }
.play-badge:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ------------------------------------------------------------ landing: hero */
.hero { position: relative; padding: 28px 0 56px; border-bottom: 1px solid var(--wire); overflow: hidden; }
.hero::before {
  /* faint scanline field behind the frame, from the game's CRT-ish HUD language */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(34, 211, 238, 0.035) 0 1px, transparent 1px 4px);
}
.hero-copy { position: relative; display: grid; gap: 24px; }
@media (min-width: 900px) {
  .hero-copy { grid-template-columns: 1.3fr 1fr; align-items: end; }
  .hero-copy .actions { justify-content: flex-end; }
}
.hero-copy h1 { max-width: 18ch; }
.hero-copy h1 em { font-style: normal; color: var(--cyan); }

@media (prefers-reduced-motion: reduce) { .status-chip::before { animation: none; } }

/* ------------------------------------------------------------ landing: sections */
.section { padding: 72px 0; border-bottom: 1px solid var(--wire); }
.section-head { display: grid; gap: 12px; margin-bottom: 36px; max-width: 70ch; }
.section-head p { color: var(--haze); margin: 0; }

/* the loop: gather -> build -> fight -> rule */
.loop { display: grid; gap: 1px; background: var(--wire); border: 1px solid var(--wire); }
@media (min-width: 640px) { .loop { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .loop { grid-template-columns: repeat(4, 1fr); } }
.loop article { background: var(--deck); padding: 26px 22px 24px; display: grid; gap: 10px; align-content: start; }
.loop .stat { font-family: var(--display); font-weight: 700; font-size: var(--t-2xl); color: var(--cyan); line-height: 1; font-variant-numeric: tabular-nums; }
.loop .stat small { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.14em; color: var(--haze); text-transform: uppercase; margin-left: 6px; font-weight: 400; }
.loop h3 { font-size: var(--t-lg); }
.loop p { color: var(--haze); font-size: var(--t-sm); margin: 0; }

/* skill board */
.skill-board { display: grid; gap: 18px; }
@media (min-width: 900px) { .skill-board { grid-template-columns: repeat(5, auto); justify-content: space-between; } }
.skill-group h3 { font-family: var(--mono); font-weight: 400; font-size: var(--t-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mag); margin-bottom: 12px; }
.skill-group ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (min-width: 900px) { .skill-group ul { grid-template-columns: 1fr; } }
.skill-group li {
  display: flex; align-items: center; gap: 10px; font-size: var(--t-sm);
  background: var(--deck); border: 1px solid var(--wire); padding: 6px 12px 6px 6px; border-radius: var(--radius);
}
.skill-group img { width: 36px; height: 36px; }

/* rarity ladder */
.ladder { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .ladder { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .ladder { grid-template-columns: repeat(6, 1fr); } }
.ladder figure {
  --r: var(--r-common);
  margin: 0; position: relative; background: var(--deck);
  border: 1px solid color-mix(in srgb, var(--r) 55%, transparent);
  border-top: 3px solid var(--r);
  padding: 12px 12px 14px; display: grid; gap: 8px; justify-items: center; text-align: center;
}
.ladder img { width: 100%; max-width: 150px; aspect-ratio: 1; object-fit: contain; }
.ladder figcaption { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--r); }
.ladder .uncommon { --r: var(--r-uncommon); }
.ladder .rare { --r: var(--r-rare); }
.ladder .epic { --r: var(--r-epic); }
.ladder .legendary { --r: var(--r-legendary); }
.ladder .masterwork { --r: var(--r-legendary); box-shadow: 0 0 22px -4px rgba(251, 191, 36, 0.55); }
.ladder-note { color: var(--haze); font-size: var(--t-sm); margin-top: 18px; max-width: 70ch; }

/* bosses */
/* Mobile-first like every other multi-item grid on this page (.loop,
   .ladder) - this one was hardcoded to 2 columns even on a narrow phone,
   which is why a longer dungeon name ("The Void Protocol") wrapped to two
   lines while its shorter neighbors didn't: reported live. */
.bosses { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .bosses { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 720px) { .bosses { grid-template-columns: repeat(3, 1fr); } }
.bosses figure {
  margin: 0; background: radial-gradient(120% 90% at 50% 20%, var(--deck-2), var(--deck) 70%);
  border: 1px solid var(--wire); display: grid; overflow: hidden;
}
.bosses img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 10px 10px 0; }
.bosses figcaption { padding: 12px 14px 14px; border-top: 1px solid var(--wire); display: grid; gap: 2px; }
.bosses figcaption b { font-weight: 600; }
.bosses figcaption span { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--haze); }

/* split feature rows */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: center; }
.split > * { min-width: 0; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--wire); border: 1px solid var(--wire); }
.facts li { background: var(--deck); padding: 16px 18px; display: grid; gap: 4px; }
.facts b { font-weight: 600; }
.facts span { color: var(--haze); font-size: var(--t-sm); }
.perk-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 20px; }
.perk-row img { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.35)); }
.jacket { width: min(100%, 380px); margin: 0 auto; filter: drop-shadow(0 20px 50px rgba(34, 211, 238, 0.18)); }

/* community band */
.community {
  padding: 72px 0; border-bottom: 1px solid var(--wire);
  /* no key art here: its baked-in wordmark/tagline text shows through at any
     crop wide enough to fill the band, so this is a light-only echo of it */
  background:
    radial-gradient(60% 120% at 85% 50%, rgba(168, 85, 247, 0.22), transparent 70%),
    radial-gradient(40% 90% at 10% 100%, rgba(34, 211, 238, 0.14), transparent 70%),
    var(--night);
}
.community .panel {
  max-width: 640px; background: rgba(11, 14, 27, 0.9); border: 1px solid var(--wire-hot); padding: 32px 28px;
  display: grid; gap: 16px;
}

/* ------------------------------------------------------------ document pages */
.doc-layout { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 80px; }
@media (min-width: 980px) { .doc-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 64px; } }
.doc-side { font-size: var(--t-sm); }
@media (min-width: 980px) { .doc-side { position: sticky; top: 96px; align-self: start; } }
.doc-side h2 { font-family: var(--mono); font-weight: 400; font-size: var(--t-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.doc-side ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--wire); }
.doc-side a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--haze); text-decoration: none; }
.doc-side a:hover { color: var(--ink); }
.doc-side a[aria-current="page"] { color: var(--cyan); border-left-color: var(--cyan); }

.doc { max-width: 72ch; min-width: 0; }
.doc header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--wire); display: grid; gap: 12px; }
.doc h1 { font-size: var(--t-2xl); }
.doc .meta { font-family: var(--mono); font-size: var(--t-xs); letter-spacing: 0.12em; text-transform: uppercase; color: var(--haze); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.doc h2 { font-size: var(--t-lg); margin: 44px 0 14px; padding-top: 8px; color: var(--ink); }
.doc h2 .num { color: var(--mag); font-family: var(--mono); font-weight: 400; margin-right: 10px; }
.doc h3 { font-size: var(--t-md); margin: 26px 0 8px; color: var(--ink); }
.doc p, .doc li { color: #cfd4e6; }
.doc .eyebrow { color: var(--mag); }
.doc .lede { color: var(--haze); }
.doc ul, .doc ol { padding-left: 1.3em; margin: 0 0 1em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--faint); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc .summary { background: var(--deck); border: 1px solid var(--wire); padding: 20px 22px; margin: 0 0 8px; }
.doc .summary h2 { margin: 0 0 10px; padding: 0; font-family: var(--mono); font-weight: 400; font-size: var(--t-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan); }
.doc .summary ul { margin: 0; }
.doc .toc { font-size: var(--t-sm); columns: 2 220px; column-gap: 32px; padding-left: 1.3em; margin-top: 18px; }
.doc .toc li { break-inside: avoid; margin-bottom: 4px; }

.table-scroll { overflow-x: auto; margin: 14px 0 22px; border: 1px solid var(--wire); }
table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 560px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--wire); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { font-family: var(--mono); font-weight: 400; font-size: var(--t-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); background: var(--deck); }
td { color: #cfd4e6; }
td:first-child { color: var(--ink); font-weight: 600; }

.notice { border: 1px solid rgba(255, 45, 149, 0.4); border-left: 3px solid var(--mag); background: rgba(255, 45, 149, 0.06); padding: 14px 18px; margin: 20px 0; font-size: var(--t-sm); }
.notice p:last-child { margin-bottom: 0; }
.quote { margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--cyan); background: var(--deck); font-size: var(--t-sm); }
.quote p:last-child { margin-bottom: 0; }
code { font-family: var(--mono); background: var(--deck); border: 1px solid var(--wire); padding: 1px 6px; border-radius: 2px; font-size: 0.92em; }

/* steps (deletion page) - a real ordered procedure */
.steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; background: var(--deck); border: 1px solid var(--wire); padding: 16px 18px 16px 62px; margin: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 18px; top: 15px;
  font-family: var(--mono); color: var(--mag); font-size: var(--t-md);
}

/* legal index cards */
.doc-list { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.doc-list li { margin: 0; }
.doc-list a { display: grid; gap: 4px; background: var(--deck); border: 1px solid var(--wire); padding: 18px 20px; text-decoration: none; color: var(--ink); transition: border-color 0.15s; }
.doc-list a:hover { border-color: var(--cyan); }
.doc-list b { font-weight: 600; color: var(--cyan); }
.doc-list span { color: var(--haze); font-size: var(--t-sm); }
.doc-list small { font-family: var(--mono); color: var(--faint); font-size: var(--t-xs); letter-spacing: 0.1em; text-transform: uppercase; }

/* ------------------------------------------------------------ footer */
.site-foot { background: var(--deck); border-top: 1px solid var(--wire); padding: 48px 0 32px; font-size: var(--t-sm); color: var(--haze); }
.foot-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.site-foot h2 { font-family: var(--mono); font-weight: 400; font-size: var(--t-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-foot a { color: var(--haze); text-decoration: none; }
.site-foot a:hover { color: var(--cyan); text-decoration: underline; }
.site-foot .legal-line { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--wire); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: var(--t-xs); color: var(--faint); }
.site-foot address { font-style: normal; }
/* Company/support line, sitting directly above the copyright row rather
   than as its own labeled grid column - no heading, just the sentence. */
.foot-about { margin-top: 32px; line-height: 1.7; }
.foot-about strong { color: var(--ink); }

/* ------------------------------------------------------------ 404 */
.lost { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 16px; padding: 64px var(--gutter); }
.lost .code { font-family: var(--display); font-weight: 700; font-size: clamp(4rem, 16vw, 8rem); color: var(--mag); line-height: 1; text-shadow: 0 0 30px rgba(255, 45, 149, 0.45); }
.lost .actions { justify-content: center; }
