/* ============================================================
   BORG 360 — Base / reset / element defaults
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px; /* sticky header offset for anchors */
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient cosmic background — fixed nebula glows behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 18% 8%, rgba(46,125,246,.18), transparent 60%),
    radial-gradient(50% 45% at 88% 12%, rgba(224,53,158,.16), transparent 60%),
    radial-gradient(60% 55% at 70% 95%, rgba(123,63,228,.16), transparent 62%),
    var(--ink);
}
/* Subtle star/grain layer */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: screen;
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  text-wrap: balance;
}

p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; transition: color var(--dur-1) var(--ease); }

ul, ol { list-style: none; padding: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

strong, b { font-weight: 700; color: inherit; }

hr { border: none; height: 1px; background: var(--hairline); margin: var(--space-6) 0; }

::selection { background: var(--brand-3); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-1);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--ink-4) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--ink-4); border-radius: 999px; border: 3px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--brand-2); }

/* Accessible visually-hidden helper */
.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 */
.skip-link {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(-130%);
  top: 10px; z-index: var(--z-toast);
  background: var(--ink-3); color: var(--text);
  padding: .7rem 1.2rem; border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  transition: transform var(--dur-2) var(--ease);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }
