/* =========================================================================
   CodeAnubis global theme — single source of truth for design tokens.
   Loaded via <link rel="stylesheet" href="/assets/theme.css"> on every page.
   Page-specific styles stay inline in each HTML file's <style> block.
   ========================================================================= */

/* ===== Design tokens — gold + black + dark navy =========================== */
:root {
  --bg: #06070b;              /* deep near-black with slight blue tint */
  --bg-elev: #0d0f17;          /* cards, elevated surfaces */
  --bg-deeper: #03040a;        /* footer, deepest layer */
  --navy: #0a1830;             /* dark navy accent */
  --navy-soft: #14264a;        /* lighter navy for hover/section bg */

  --gold: #EBBF1F;             /* primary accent (matches logo fill) */
  --gold-bright: #f4cd47;      /* hover/lighter gold */
  --gold-dim: rgba(235, 191, 31, 0.14); /* subtle gold tint */
  --gold-line: rgba(235, 191, 31, 0.30);/* gold hairline */

  --text: #f5f1e6;             /* warm ivory */
  --text-dim: #8c8576;         /* muted warm gray */
  --text-muted: #56514a;       /* very muted */

  --border: rgba(235, 191, 31, 0.14); /* gold-tinted hairlines */
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(235, 191, 31, 0.28);

  --error: #ff5a6a;
  --success: #4ade80;
  --warning: #fbbf24;

  --radius: 12px;
  --radius-sm: 6px;
  --max-w: 1140px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --mono: "JetBrains Mono", "SF Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;

  /* Aliases so inline JS template strings referencing var(--accent) keep
     working without per-page overrides. HARMLESS on pages that don't use it. */
  --accent: var(--gold);
  --accent-dim: var(--gold-dim);
}

/* ===== Reset =============================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }

/* ===== Body base =========================================================== */
/* Page-specific padding/display (e.g. trial.html's flex centering) is added
   in each page's inline <style>. */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== Signature layered backdrop (deep navy glow + faint gold) ============ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% -5%, var(--navy) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 90%, rgba(20, 38, 74, 0.45), transparent 70%),
    radial-gradient(ellipse 40% 30% at 12% 75%, rgba(235, 191, 31, 0.035), transparent 70%);
}

/* ===== Selection + links =================================================== */
::selection { background: var(--gold-dim); color: var(--gold-bright); }
a { color: var(--gold); text-decoration: none; transition: color 200ms var(--ease); }
a:hover { color: var(--gold-bright); }

/* ===== Brand wordmark ====================================================== */
/* "Code Anubis<TM>" — used in nav, footer, body inline. Brand name is NOT
   translated; wrap in <span translate="no"> when nested in translated text. */
.brand-name { white-space: nowrap; color: var(--text); }
.brand-name:hover { color: var(--text); }
.brand-tm {
  font-size: 9px;
  color: var(--text-muted);
  /* Position via relative top instead of vertical-align so the superscript
     stays correct even when an ancestor is `display: flex; align-items: center`
     (which would otherwise flatten vertical-align on inline children). */
  position: relative;
  top: -0.55em;
  margin-left: 2px;
  letter-spacing: 0.04em;
  font-weight: 500;
  line-height: 0;
  /* Keep UA defaults of <sup> from fighting the relative position. */
  vertical-align: baseline;
}

/* ===== Nav-top bar (shared by legal/static pages) ========================== */
/* Used by privacy.html, terms.html, impressum.html. Index/account have their
   own nav markup and don't use this class. */
.nav-top {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  z-index: 1;
  background: rgba(6, 7, 11, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}
.nav-top a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: color 200ms var(--ease);
}
.nav-top a:hover { color: var(--gold); }
.nav-top .brand-mark { width: 20px; height: 20px; display: block; flex-shrink: 0; }

/* ===== Accessibility ======================================================= */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
