/* ==========================================================================
   COMPUBYTE MARKETING — Base / Reset / Ambient Background
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

img,
picture,
svg,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--color-blue);
  color: var(--color-bg);
}

/* ---- Scrollbar (WebKit + Firefox) ---- */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-blue-40) transparent;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-blue-40);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-blue-40);
}

/* ---- Focus states — never sacrificed for aesthetics ---- */
:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* ---- Typography ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  margin: 0;
  color: var(--color-white);
  text-wrap: balance;
}

p {
  margin: 0;
  color: var(--color-muted);
  max-width: 68ch;
}

.text-white p,
p.text-white {
  color: var(--color-white);
}

strong {
  color: var(--color-white);
  font-weight: 600;
}

/* ---- Visually hidden (accessible-only) content ---- */
.visually-hidden {
  position: absolute !important;
  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;
  top: -100px;
  left: var(--space-md);
  z-index: 1000;
  background: var(--color-blue);
  color: var(--color-bg);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-md);
}

/* ==========================================================================
   Ambient background system — fixed, behind all content, GPU-cheap.
   Deep navy field + faint grid + two soft blue light sources + grain.
   ========================================================================== */

.site-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  overflow: hidden;
  background: var(--color-bg);
}

.site-bg__grid {
  position: absolute;
  inset: -1px;
  background-image:
    linear-gradient(to right, var(--color-white-04) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-white-04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, black 40%, transparent 90%);
  opacity: 0.6;
}

.site-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  will-change: transform;
}

.site-bg__glow--a {
  width: 60vw;
  height: 60vw;
  max-width: 900px;
  max-height: 900px;
  top: -20vw;
  right: -15vw;
  background: radial-gradient(circle, rgba(var(--color-blue-rgb), 0.35) 0%, rgba(var(--color-blue-rgb), 0) 70%);
}

.site-bg__glow--b {
  width: 45vw;
  height: 45vw;
  max-width: 700px;
  max-height: 700px;
  bottom: -10vw;
  left: -10vw;
  background: radial-gradient(circle, rgba(var(--color-blue-rgb), 0.22) 0%, rgba(var(--color-blue-rgb), 0) 70%);
}

.site-bg__noise {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (max-width: 782px) {
  .site-bg__grid {
    background-size: 44px 44px;
  }
}
