/* ==========================================================================
   ATARAXIA HQ // SHARED THEME (v3)
   The same look as the Raxi deck and the OBS overlay: Orbitron headings,
   Share Tech Mono text, void/steel panels, cyan + purple, chamfered corners.
   Used by veil.html and bridge.html (and every restyled page after them).
   ========================================================================== */

@font-face { font-family: 'Orbitron'; src: url('fonts/Orbitron-wght.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Share Tech Mono'; src: url('fonts/ShareTechMono-Regular.ttf') format('truetype'); font-display: swap; }

:root {
  --void: #050608;
  --hull: #0b0d12;
  --hull-glass: rgba(11, 13, 18, 0.74);
  --steel: #2a3140;
  --steel-2: #1a2130;
  --ink: #e2e8f0;
  --text: #b8c2d3;
  --dim: #94a3b8;
  --muted: #526077;          /* decoration only: too dark for small text */
  --cyan: #00f0ff;
  --cyan-glow: rgba(0, 240, 255, 0.35);
  --purple: #9d4edd;
  --purple-hi: #c77dff;
  --amber: #f59e0b;
  --pink: #ff3b8d;
  --red: #ef4444;
  --display: 'Orbitron', 'Segoe UI', sans-serif;
  --mono: 'Share Tech Mono', Consolas, monospace;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --chamfer: polygon(var(--c, 14px) 0, 100% 0, 100% calc(100% - var(--c, 14px)), calc(100% - var(--c, 14px)) 100%, 0 100%, 0 var(--c, 14px));
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--void); color: var(--ink); font-family: var(--mono); line-height: 1.5; }
a { color: var(--cyan); }
a:hover { color: var(--purple-hi); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.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; }

/* ---------- top bar ---------- */
.hq-top { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 12px 24px; background: rgba(11, 13, 18, 0.88); border-bottom: 1px solid var(--steel-2); backdrop-filter: blur(8px); }
.hq-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.hq-brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.7)); }
.hq-brand span { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.22em; color: var(--cyan); }
.hq-nav { display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--display); font-size: 11.5px; letter-spacing: 0.14em; }
.hq-nav a { display: flex; align-items: center; min-height: 40px; padding: 0 13px; text-decoration: none; color: var(--text); border: 1px solid var(--steel); transition: color .2s, border-color .2s, background .2s; }
.hq-nav a:hover { color: var(--cyan); border-color: var(--cyan); }
.hq-nav a[aria-current="page"] { color: var(--void); background: var(--cyan); border-color: var(--cyan); }

/* ---------- buttons ---------- */
.btn { --c: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; font-family: var(--display); font-weight: 700; font-size: 12.5px; letter-spacing: 0.16em; text-decoration: none; text-transform: uppercase; color: var(--ink); background: transparent; border: 1px solid var(--steel); clip-path: var(--chamfer); cursor: pointer; transition: background .2s, color .2s, border-color .2s, filter .2s; }
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { color: var(--void); background: var(--cyan); border-color: var(--cyan); }
.btn-primary:hover { color: var(--void); filter: brightness(1.12); }
.btn-signal { background: rgba(157, 78, 221, 0.16); border-color: var(--purple); }
.btn-signal:hover { color: var(--ink); background: rgba(157, 78, 221, 0.3); border-color: var(--purple-hi); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 11px; }

/* ---------- panels ---------- */
.panel { --c: 16px; position: relative; background: var(--hull-glass); border: 1px solid var(--steel); border-top: 2px solid var(--cyan); clip-path: var(--chamfer); backdrop-filter: blur(6px); }
.panel.purple { border-top-color: var(--purple); }
.panel.amber { border-top-color: var(--amber); }
.eyebrow { font-size: 12px; letter-spacing: 0.18em; color: var(--dim); text-transform: uppercase; }
.h-display { font-family: var(--display); font-weight: 700; letter-spacing: 0.08em; margin: 0; }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; letter-spacing: 0.06em; color: var(--dim); }
.field input, .field textarea { width: 100%; padding: 11px 12px; font: inherit; font-size: 15px; color: var(--ink); background: rgba(5, 6, 8, 0.9); border: 1px solid var(--steel); border-radius: 0; }
.field input:focus, .field textarea:focus { border-color: var(--cyan); outline: none; box-shadow: 0 0 0 1px var(--cyan); }
.field textarea { resize: vertical; min-height: 76px; }

/* ---------- CRT overlays ---------- */
.crt-lines { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,0.3) 3px); z-index: 1; }
.crt-sweep { position: absolute; left: 0; right: 0; top: 0; height: 140px; pointer-events: none; z-index: 1; background: linear-gradient(to bottom, rgba(0,240,255,0) 0%, rgba(0,240,255,0.05) 50%, rgba(0,240,255,0) 100%); animation: crtSweep 7s linear infinite; }
@keyframes crtSweep { 0% { transform: translateY(-140px); } 100% { transform: translateY(100vh); } }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: pulseDot 1.6s ease-in-out infinite; }

/* ---------- docked mini radio (radio-lite.js) ---------- */
.mini-radio { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding: 8px 24px; font-size: 12px; letter-spacing: 0.1em; color: var(--dim); background: rgba(11, 13, 18, 0.95); border-top: 1px solid var(--steel-2); backdrop-filter: blur(8px); }
.mini-radio .mr-ctl { display: flex; align-items: center; gap: 6px; }
.mini-radio button { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; color: var(--ink); background: transparent; border: 1px solid var(--steel); cursor: pointer; }
.mini-radio button:hover { border-color: var(--cyan); color: var(--cyan); }
.mini-radio button.mr-play { width: 44px; height: 44px; color: var(--void); background: var(--cyan); border-color: var(--cyan); }
.mini-radio button.mr-play:hover { color: var(--void); filter: brightness(1.12); }
.mini-radio .mr-now { min-width: 0; max-width: 560px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); text-decoration: none; }
.mini-radio .mr-now b { color: var(--purple-hi); font-weight: 400; }
.mini-radio .mr-now i { color: var(--dim); font-style: normal; }
.mini-radio .mr-vol { display: flex; align-items: center; gap: 8px; }
.mini-radio input[type=range] { width: 110px; accent-color: var(--cyan); }
.mini-radio .mr-msg { color: var(--amber); }

@media (max-width: 720px) {
  .hq-top { padding: 10px 14px; }
  .hq-nav { width: 100%; }
  .hq-nav a { flex: 1 1 auto; justify-content: center; padding: 0 8px; font-size: 10.5px; }
  .mini-radio { padding: 8px 14px; }
  .mini-radio .mr-vol { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .crt-sweep, .dot { animation: none; }
}
