/* ════════════════════════════════════════════════════════════════════
   RSS PROJECT — design system  ·  monochrome ops surface
   White / gray / black only. Palette named from the Unturned world.
   Cube-edge geometry, visible grid rebar. Archivo display + DM Sans body, self-hosted.
   ════════════════════════════════════════════════════════════════════ */

/* self-hosted pair: Archivo (editorial grotesque display) + DM Sans (readable body) */
@font-face { font-family: 'Archivo'; src: url('/img/brand/fonts/Archivo-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/img/brand/fonts/Archivo-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/img/brand/fonts/Archivo-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/img/brand/fonts/Archivo-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/img/brand/fonts/DMSans-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/img/brand/fonts/DMSans-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/img/brand/fonts/DMSans-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/img/brand/fonts/DMSans-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* concrete = night civilian building · asphalt/steel = surfaces · rebar = grid lines */
  --blackout:  #08090a;
  --concrete:  #0c0d0e;   --bg: var(--concrete);
  --asphalt:   #131517;   --bg-2: var(--asphalt);
  --steel:     #181b1e;   --surface: var(--steel);
  --plate:     #20242a;   --surface-2: var(--plate);

  --rebar:   rgba(238,240,242,.09);   --line: var(--rebar);
  --rebar-2: rgba(238,240,242,.18);   --line-2: var(--rebar-2);

  --bone:  #eef0f2;   --text: var(--bone);     /* bleached primary */
  --fog:   #9aa0a8;   --text-2: var(--fog);    /* PEI dawn fog */
  --ash:   #61676f;   --text-3: var(--ash);

  --signal:    #ffffff;   --accent: var(--signal);   /* pure white = action / online */
  --signal-ink:#0c0d0e;   --accent-ink: var(--signal-ink);

  /* tactical pairing: squared display + condensed UI, terminal mono */
  --display: 'Archivo', system-ui, sans-serif;                           /* headings, brand, buttons, labels */
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;   /* body + UI text (readable) */
  --mono: 'DM Sans', system-ui, sans-serif;
  --tech: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;    /* RCON / IP / code */

  /* cube-edge geometry */
  --radius: 3px;
  --radius-sm: 2px;

  --maxw: 1220px;
  --pad: clamp(16px, 3.4vw, 40px);
  --gap: clamp(14px, 1.8vw, 22px);
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; font-weight: 400; min-height: 100vh; overflow-x: hidden; text-rendering: optimizeLegibility; position: relative; }
/* topographic contour backdrop — two layers drift at different speeds for depth.
   Oversized so the slow transform never reveals an edge; GPU-composited so it's
   free during scroll/read. Global reduced-motion rule freezes it to frame 0. */
body::before, body::after {
  content: ""; position: fixed; z-index: 0; pointer-events: none;
  top: -20%; left: -20%; width: 140%; height: 140%;
  background: url('/img/topo-bg.svg') center / cover no-repeat;
  will-change: transform;
}
body::before { opacity: .42; filter: blur(2.5px); animation: topo-drift 52s ease-in-out infinite alternate; }
body::after  { opacity: .16; filter: blur(6px); animation: topo-drift-2 78s ease-in-out infinite alternate; }
@keyframes topo-drift {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1.03); }
  50%  { transform: translate3d(2.5%, 2%, 0) scale(1.07); }
  100% { transform: translate3d(3%, -2.5%, 0) scale(1.04); }
}
@keyframes topo-drift-2 {
  0%   { transform: translate3d(3%, 2%, 0) scale(1.08); }
  100% { transform: translate3d(-3%, -2%, 0) scale(1.03); }
}
body > * { position: relative; z-index: 1; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, dl { list-style: none; padding: 0; }
::selection { background: var(--signal); color: var(--signal-ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }

code, kbd, samp { font-family: var(--sans); }
pre.code, pre.code code, .term, .term__out, .term__in input { font-family: var(--tech) !important; }

/* type */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.04; letter-spacing: -.01em; color: var(--text); text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.3rem); }
p  { color: var(--text-2); }
.display { letter-spacing: -.02em; line-height: 1; }
.kicker, .eyebrow, .label { font-family: var(--display); font-weight: 500; font-size: .8rem; letter-spacing: 0; color: var(--text-3); }
.mono { font-family: var(--sans); }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.lead { font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--text-2); }
.muted { color: var(--text-3); }
.on { color: var(--text); }

/* layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(40px, 6vh, 84px); }
.hr { border: 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(18px,2.4vw,28px); padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.section-head h2 { font-size: clamp(1.4rem,2.8vw,2rem); text-transform: none; }
.section-head .kicker { display: block; margin-bottom: 8px; }

/* controls — inverted white primary, hairline secondary (no glow) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 42px; padding: .62em 1.3em;
  font-family: var(--display); font-weight: 600; font-size: .82rem; letter-spacing: .08em; text-transform: none;
  cursor: pointer; border: 1px solid var(--line-2); border-radius: var(--radius); background: transparent; color: var(--text);
  transition-property: background-color, color, border-color, transform; transition-duration: 130ms; transition-timing-function: var(--ease);
}
.btn:hover { border-color: var(--text-2); background: var(--surface); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
.btn--primary:hover { background: var(--bone); border-color: var(--bone); }
.btn--block { width: 100%; }
.btn--sm { min-height: 34px; padding: .42em .95em; font-size: .74rem; }
.btn[disabled] { opacity: .4; pointer-events: none; }

.link { color: var(--text); display: inline-flex; align-items: center; gap: .4em; font-family: var(--display); font-weight: 600; text-transform: none; font-size: .76rem; letter-spacing: .08em; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.link:hover { border-color: var(--text); }

/* live "signal" indicator — vector, replaces the square dot */
.dot { width: 15px; height: 15px; color: var(--signal); display: inline-block; flex: none; vertical-align: middle; }
.dot.off { color: var(--text-3); }
.dot.off path:last-of-type { opacity: .22; }
.dot:not(.off) path { animation: sig 2.4s ease-in-out infinite; }
.dot:not(.off) path:last-of-type { animation-delay: .35s; }
@keyframes sig { 0%,100% { opacity: 1; } 55% { opacity: .35; } }

/* radar-sweep loader (uiverse-style, pure CSS) — for polling/awaiting states */
.scan { width: 16px; height: 16px; flex: none; border: 1px solid var(--line-2); border-radius: 50%; position: relative; }
.scan::before { content: ""; position: absolute; inset: -1px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 264deg, var(--signal) 360deg);
  -webkit-mask: radial-gradient(circle, transparent 38%, #000 41%); mask: radial-gradient(circle, transparent 38%, #000 41%);
  animation: scan-rot 1.05s linear infinite; }
.scan::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--signal); opacity: .5; animation: scan-pulse 1.05s ease-in-out infinite; }
@keyframes scan-rot { to { transform: rotate(1turn); } }
@keyframes scan-pulse { 0%,100% { opacity: .25; } 50% { opacity: .7; } }


/* liquid-glass surface — opt-in via .glass (bevelled edge over the dark canvas) */
:root { --glass-shadow:
    inset 0 0 0 1px rgba(255,255,255,.03),
    inset 1.8px 3px 0 -2px rgba(255,255,255,.27),
    inset -2px -2px 0 -2px rgba(255,255,255,.24),
    inset -3px -8px 1px -6px rgba(255,255,255,.18),
    inset -.3px -1px 4px 0 rgba(0,0,0,.24),
    inset -1.5px 2.5px 0 -2px rgba(0,0,0,.4),
    inset 0 3px 4px -2px rgba(0,0,0,.4),
    inset 2px -6.5px 1px -4px rgba(0,0,0,.2),
    0 1px 5px 0 rgba(0,0,0,.2),
    0 6px 16px 0 rgba(0,0,0,.16); }
.glass { box-shadow: var(--glass-shadow); }

/* fields */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-family: var(--display); font-weight: 600; font-size: .68rem; letter-spacing: .1em; text-transform: none; color: var(--text-3); }
.input, .textarea, .select { background: var(--blackout); border: 1px solid var(--line-2); border-radius: var(--radius); padding: .66em .8em; color: var(--text); font-family: var(--sans); font-size: .92rem; width: 100%; transition: border-color .14s; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--signal); }
.textarea { resize: vertical; min-height: 120px; line-height: 1.5; font-family: var(--tech); font-size: .86rem; }
.help { font-size: .8rem; color: var(--text-3); }

/* toast */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 10001; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 15px; font-size: .88rem; }
.toast--err { border-color: var(--text-2); }

/* utility */
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.center { display: flex; align-items: center; gap: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 10002; background: var(--signal); color: var(--signal-ink); padding: 10px 16px; }
.skip-link:focus { left: 8px; top: 8px; }
.reveal { opacity: 0; animation: fade .6s var(--ease) forwards; }
@keyframes fade { to { opacity: 1; } }

/* legacy aliases (admin + inner inline refs) */
:root { --amber: var(--signal); --amber-2: var(--signal); --amber-deep: var(--text-2); --pine: var(--signal); --danger: var(--text-2); --blue: var(--text-2); --ink: var(--text); --ink-2: var(--text-2); --ink-3: var(--text-3); --ink-4: var(--text-3); --paper: var(--bg); --paper-2: var(--surface); --paper-3: var(--surface-2); --red: var(--signal); --grass: var(--signal); --gold: var(--signal); --accent-2: var(--signal); --accent-dim: var(--rebar-2); --glow: transparent; --glow-soft: var(--rebar); --radius-lg: var(--radius); --bg-soft: var(--bg-2); --elev: var(--surface-2); --shadow: 0 18px 50px rgba(0,0,0,.5); }
