/* NEXUS site — base layer: tokens, reset, layout, header, footer, buttons. */

:root {
  --bg: #0A0F1A;
  --surface: #101827;
  --card: #16202F;
  --card-alt: #1C2839;
  --border: #263449;
  --border-subtle: #1E2A3C;
  --blue: #2E7DFF;
  --blue-light: #5AA0FF;
  --blue-press: #1B4FB0;
  --cyan: #38E0D8;
  --text-strong: #EAF1FB;
  --text: #B8C6DB;
  --muted: #6F8199;
  --ok: #2ED573;
  --warn: #FFB020;
  --crit: #FF4D5E;

  --radius-card: 12px;
  --radius: 8px;
  --radius-sm: 4px;

  --step: 4px;
  --gutter: 24px;
  --container: 1140px;

  --font-ui: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Inter, Roboto, Arial, sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", "JetBrains Mono", ui-monospace, Consolas, "Courier New", monospace;

  --ease: 140ms cubic-bezier(.4, 0, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Faint technical grid, faded out below the fold. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(38, 52, 73, .45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(38, 52, 73, .45) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse 90% 55% at 50% 0%, #000, transparent 70%);
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text-strong);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.015em;
}

h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.125rem; }

p { margin: 0; }

img, svg { max-width: 100%; }
img { height: auto; }

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

a {
  color: var(--blue-light);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { color: var(--text-strong); }

.mono {
  font-family: var(--font-mono);
  font-size: .875em;
  letter-spacing: .01em;
}

:focus-visible {
  outline: 2px solid var(--blue-light);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--blue);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
  color: #fff;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}
.btn--primary:hover { background: var(--blue-light); color: #fff; }
.btn--primary:active { background: var(--blue-press); }

.btn--ghost {
  border-color: var(--border);
  color: var(--text-strong);
  background: transparent;
}
.btn--ghost:hover {
  border-color: #34496A;
  background: rgba(90, 160, 255, .07);
  color: var(--text-strong);
}

.btn--lg {
  height: 54px;
  padding: 0 28px;
  font-size: 1.1875rem;
  font-weight: 700;
  border-radius: 10px;
}

.btn--sm {
  height: 36px;
  padding: 0 14px;
  font-size: .9375rem;
}

.btn__icon { flex: none; }

/* ---- Header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 15, 26, .88);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
  transition: border-color var(--ease), background-color var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border-subtle);
  background: rgba(10, 15, 26, .96);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
}
.brand:hover { color: var(--text-strong); }
.brand__mark { flex: none; }
.brand__name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: .13em;
  color: var(--text-strong);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav__list a:not(.btn) {
  color: var(--text);
  font-size: .9375rem;
  padding: 6px 0;
}
.site-nav__list a:not(.btn):hover { color: var(--text-strong); }
.site-nav__list a[aria-current="page"]:not(.btn) { color: var(--text-strong); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-strong);
  font: inherit;
  font-size: .875rem;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bars::before { top: -5px; }
.nav-toggle__bars::after { top: 5px; }

/* ---- Sections ---- */

.section { padding: clamp(56px, 7vw, 96px) 0; }

.section__head {
  max-width: 60ch;
  margin-bottom: 40px;
}
.section__head p { margin-top: 12px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  padding: clamp(64px, 9vw, 128px) 0 clamp(56px, 7vw, 96px);
  overflow: hidden;
}
/* Very soft blue wash behind the hero only. */
.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  width: min(900px, 120%);
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(46, 125, 255, .16), transparent 72%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 900px;
}

.hero__title { margin-top: 16px; }

.hero__lead {
  max-width: 62ch;
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  color: var(--text);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 28px;
  font-size: .875rem;
  color: var(--muted);
}
.hero__meta li {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.hero__meta li + li::before {
  content: "";
  width: 1px;
  height: 14px;
  background: var(--border);
}
.hero__meta .badge { color: var(--text-strong); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--text-strong);
}

/* ---- Specification lists ---- */

.section-heading {
  margin-top: 56px;
  margin-bottom: 20px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-strong);
}

.spec {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.spec > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  padding: 14px 18px;
  background: var(--card);
}
.spec__wide { grid-column: 1 / -1; }
.spec dt {
  min-width: 140px;
  color: var(--muted);
  font-size: .8125rem;
}
.spec dd {
  margin: 0;
  color: var(--text-strong);
  font-size: .9375rem;
}
.spec__hash {
  font-size: .8125rem;
  line-height: 1.6;
  word-break: break-all;
}

/* ---- Changelog ---- */

.releases {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}

.release {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
}

.release__version {
  margin: 0;
  color: var(--text-strong);
  font-size: 1.125rem;
  letter-spacing: 0;
}
.release__date {
  margin-top: 4px;
  color: var(--muted);
  font-size: .875rem;
}
.release__summary {
  margin-bottom: 16px;
  color: var(--text);
}

.changes { display: grid; gap: 10px; }
.changes li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  color: var(--text);
  font-size: .9375rem;
}

.change {
  flex: none;
  min-width: 88px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: .6875rem;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}
.change--added { border-color: rgba(46, 213, 115, .45); color: var(--ok); }
.change--changed { border-color: rgba(90, 160, 255, .45); color: var(--blue-light); }
.change--fixed { border-color: rgba(56, 224, 216, .45); color: var(--cyan); }
.change--removed { border-color: rgba(255, 77, 94, .45); color: var(--crit); }

@media (max-width: 720px) {
  .release { grid-template-columns: 1fr; gap: 12px; }
}

.notice {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: .9375rem;
}

.btn[aria-disabled="true"] {
  opacity: .55;
  cursor: default;
}

/* ---- Account forms ---- */

.container--narrow { max-width: 560px; }
.container--narrow h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem); }
.container--narrow .hero__lead { margin-top: 14px; font-size: 1rem; color: var(--muted); }
.container--narrow h2 { margin-top: 48px; font-size: 1.25rem; }

.notice--ok { border-left-color: var(--ok); }

.form-card {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.form-card label {
  display: block;
  margin-bottom: 6px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
}
.form-card label + input { margin-bottom: 18px; }

.form-card input[type="email"],
.form-card input[type="text"],
.form-card input[type="password"] {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: .9375rem;
}

.form-card input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.form-card .btn { width: 100%; height: 44px; margin-top: 6px; }

.form-hint {
  margin: -12px 0 18px;
  color: var(--muted);
  font-size: .8125rem;
}

.form-optional { color: var(--muted); font-weight: 400; }

.form-errors {
  margin-top: 24px;
  padding: 14px 16px 14px 34px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--crit);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: .9375rem;
  list-style: disc;
}
.form-errors li + li { margin-top: 6px; }

.form-aside {
  margin-top: 20px;
  color: var(--muted);
  font-size: .9375rem;
}

.btn--danger {
  border: 1px solid rgba(255, 77, 94, .5);
  background: transparent;
  color: var(--crit);
}
.btn--danger:hover { background: rgba(255, 77, 94, .12); }

.btn[disabled] { opacity: .5; cursor: default; }

.form-provider { margin-top: 28px; }
.form-provider .btn { width: 100%; height: 46px; }

.form-separator {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  color: var(--muted);
  font-size: .8125rem;
}
.form-separator::before,
.form-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.form-separator + .form-card { margin-top: 22px; }

.form-inline { display: inline-block; margin-top: 24px; }
.form-inline + .form-card { margin-top: 20px; }
.hero__actions .form-inline { margin-top: 0; }

.data-list {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px 20px;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-size: .9375rem;
}
.data-list dt { color: var(--muted); }
.data-list dd { margin: 0; color: var(--text); }

@media (max-width: 720px) {
  .hero__actions .form-inline { width: 100%; }
}

@media (max-width: 560px) {
  .data-list { grid-template-columns: 1fr; gap: 2px 0; }
  .data-list dd + dt { margin-top: 12px; }
}

/* ---- Footer ---- */

.site-footer {
  margin-top: 24px;
  border-top: 1px solid var(--border-subtle);
  background: var(--surface);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-block: 48px 32px;
}
.site-footer__brand { max-width: 44ch; }
.site-footer__brand p { margin-top: 8px; font-size: .9375rem; }
.site-footer__version { color: var(--muted); }

.site-footer__nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.site-footer__nav a {
  color: var(--text);
  font-size: .9375rem;
}
.site-footer__nav a:hover { color: var(--text-strong); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: .8125rem;
  color: var(--muted);
}

/* ---- Responsive ---- */

@media (max-width: 720px) {
  :root { --gutter: 20px; }

  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    padding: 12px var(--gutter) 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.is-open { display: block; }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .site-nav__list a:not(.btn) {
    display: block;
    padding: 12px 4px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .site-nav__cta { margin-top: 14px; }
  .site-nav__cta .btn { width: 100%; height: 44px; }

  .site-header__inner { position: relative; }

  .hero__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
