.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.brand-logo {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.site-nav { display: flex; gap: 32px; }

.site-nav a,
.footer-links a {
  position: relative;
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 100%;
  height: 1px;
  background: var(--brand-green);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .2s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  padding: 10px;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 100%;
  height: 1px;
  margin: 6px 0;
  background: currentColor;
}

.hero {
  min-height: calc(100svh - 76px);
  display: grid;
  align-items: stretch;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr);
  gap: clamp(40px, 8vw, 120px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 0;
}

.hero h1,
.page-title {
  margin: 18px 0 26px;
  font-family: var(--display);
  font-size: clamp(5rem, 12vw, 11rem);
  font-weight: 900;
  line-height: .76;
  letter-spacing: -.065em;
}

.hero h1::after {
  content: "";
  display: block;
  width: 86px;
  height: 7px;
  margin-top: 38px;
  background: linear-gradient(90deg, var(--brand-deep) 0 50%, var(--brand-green) 50% 100%);
}

.hero-intro {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.35;
}

.brand-field {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--brand-black);
  color: var(--brand-green);
}

.brand-field-grid {
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(31, 255, 147, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 255, 147, .09) 1px, transparent 1px);
  background-size: 52px 52px;
}

.brand-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 48%, rgba(31, 255, 147, .12), transparent 34%);
}

.brand-field-logo {
  position: relative;
  z-index: 2;
  width: min(60%, 430px);
  height: auto;
  filter: drop-shadow(0 0 32px rgba(31, 255, 147, .08));
}

.brand-field-meta {
  position: absolute;
  inset: auto 28px 24px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(31, 255, 147, .58);
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .12em;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-index {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
}

/* NODE ZERO is always presented through the real NEXUS visual language. */
.nexus-project-card {
  --nx-bg: rgb(4, 8, 6);
  --nx-chrome: rgb(7, 14, 10);
  --nx-panel: rgb(8, 17, 12);
  --nx-button: rgb(12, 29, 19);
  --nx-border: rgb(25, 53, 35);
  --nx-border-bright: rgb(34, 66, 46);
  --nx-green: rgb(105, 255, 166);
  --nx-title: rgb(183, 230, 199);
  --nx-panel-title: rgb(141, 195, 160);
  --nx-value: rgb(171, 226, 190);
  --nx-copy: rgb(118, 167, 136);
  --nx-muted: rgb(66, 115, 84);

  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, .75fr);
  min-height: 590px;
  overflow: hidden;
  background: var(--nx-bg);
  border: 1px solid var(--nx-border);
  color: var(--nx-copy);
  font-family: var(--mono);
  transition: transform .22s ease, border-color .22s ease;
}

.nexus-project-card:hover {
  transform: translateY(-5px);
  border-color: var(--nx-border-bright);
}

.nexus-project-main {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(105, 255, 166, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 255, 166, .025) 1px, transparent 1px),
    var(--nx-bg);
  background-size: 30px 30px;
}

.nexus-project-main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 68% 36%, rgba(105, 255, 166, .09), transparent 27%);
}

.nexus-card-header {
  position: relative;
  z-index: 2;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  background: var(--nx-chrome);
  border-bottom: 1px solid var(--nx-border-bright);
  color: var(--nx-muted);
  font-size: .62rem;
  letter-spacing: .1em;
}

.nexus-card-copy {
  position: relative;
  z-index: 2;
  width: min(650px, 100%);
  margin: auto;
  padding: clamp(42px, 6vw, 74px);
}

.nexus-card-copy p {
  margin: 0 0 24px;
  color: var(--nx-muted);
  font-size: .68rem;
  font-weight: 700;
}

.nexus-card-copy h2 {
  margin: 0 0 12px;
  color: var(--nx-title);
  font-family: var(--mono);
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 700;
  line-height: .95;
  letter-spacing: 0;
}

.nexus-card-copy > strong {
  display: block;
  color: var(--nx-green);
  font-size: .78rem;
  letter-spacing: .04em;
}

.nexus-card-rule {
  width: min(420px, 100%);
  height: 1px;
  margin: 30px 0 22px;
  background: var(--nx-border-bright);
}

.nexus-card-copy > span {
  color: var(--nx-copy);
  font-size: .68rem;
  font-weight: 700;
}

.nexus-project-record {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 32px 30px;
  background: var(--nx-panel);
  border-left: 1px solid var(--nx-border);
}

.nexus-project-record h3 {
  margin: 0 0 20px;
  color: var(--nx-panel-title);
  font-size: .72rem;
}

.nexus-project-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(18, 39, 26, 1);
}

.nexus-project-row span {
  color: var(--nx-muted);
  font-size: .58rem;
}

.nexus-project-row strong {
  color: var(--nx-value);
  font-size: .66rem;
  text-align: right;
}

.nexus-project-button {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  color: var(--nx-green);
  background: var(--nx-button);
  border: 1px solid var(--nx-border-bright);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: color .12s, background-color .12s, border-color .12s;
}

.nexus-project-card:hover .nexus-project-button,
.nexus-project-button:hover {
  color: rgb(145, 255, 190);
  background: rgb(17, 39, 25);
  border-color: rgb(58, 104, 73);
}

.studio-note {
  background: var(--brand-black);
  color: var(--light);
}

.studio-note-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: clamp(34px, 6vw, 90px);
  align-items: center;
}

.studio-note-mark {
  width: 150px;
  height: auto;
}

.about-statement h2,
.press-copy h2,
.studio-note h2 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-size: clamp(2.7rem, 5vw, 5.8rem);
  line-height: .92;
  letter-spacing: -.045em;
}

.studio-note h2 { margin-top: 18px; }

.page-main { min-height: 70svh; }

.page-hero {
  padding: clamp(90px, 12vw, 180px) 0 clamp(50px, 8vw, 100px);
  border-bottom: 1px solid var(--line);
}

.page-title { margin-bottom: 0; }

.about-grid,
.press-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(60px, 10vw, 160px);
}

.about-copy,
.press-copy {
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  color: var(--muted);
}

.about-copy p:first-child,
.press-copy p:first-of-type { margin-top: 0; }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fact {
  padding: 34px 28px;
  border-right: 1px solid var(--line);
}

.fact:last-child { border-right: 0; }

.fact span,
.press-details dt {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fact strong {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 3rem);
}

.nexus-inline-name,
.nexus-inline-link {
  color: rgb(10, 113, 78);
  font-family: var(--mono);
  font-weight: 800;
}

.nexus-inline-name {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  color: rgb(105, 255, 166);
  background: rgb(8, 17, 12);
  border-left: 2px solid rgb(105, 255, 166);
  font-size: clamp(1rem, 2vw, 1.4rem);
}

.nexus-inline-link:hover {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.press-details { margin: 0; }

.press-details div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.press-details dt,
.press-details dd { margin: 0; }

.nexus-press-project {
  background: rgb(4, 8, 6);
  color: rgb(118, 167, 136);
  border-top: 1px solid rgb(25, 53, 35);
}

.nexus-press-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  background: rgb(7, 14, 10);
  border: 1px solid rgb(34, 66, 46);
  color: rgb(66, 115, 84);
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .1em;
}

.nexus-press-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: clamp(40px, 8vw, 110px);
  padding: clamp(42px, 7vw, 84px);
  border: 1px solid rgb(25, 53, 35);
  border-top: 0;
}

.nexus-press-body p {
  margin: 0 0 18px;
  color: rgb(66, 115, 84);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
}

.nexus-press-body h2 {
  margin: 0 0 12px;
  color: rgb(183, 230, 199);
  font-family: var(--mono);
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  line-height: .95;
}

.nexus-press-body strong {
  color: rgb(105, 255, 166);
  font-family: var(--mono);
  font-size: .76rem;
}

.nexus-press-copy > span {
  display: block;
  margin-bottom: 18px;
  color: rgb(141, 195, 160);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
}

.nexus-press-copy p {
  color: rgb(118, 167, 136);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.7;
}

.nexus-press-button {
  width: fit-content;
  padding: 0 18px;
}

.legal-page { padding: 120px 0; }

.legal-page h1,
.error-page h1 {
  margin: 18px 0 30px;
  font-family: var(--display);
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: .85;
  letter-spacing: -.05em;
}

.legal-page h2 { margin-top: 46px; }

.legal-note {
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.error-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--pad);
}

.error-page > div { max-width: 900px; }

.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-grid p {
  margin: 0;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.footer-links { display: flex; gap: 24px; }

@media (max-width: 780px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: fixed;
    inset: 77px 0 0;
    z-index: 90;
    display: none;
    flex-direction: column;
    padding: 40px var(--pad);
    background: var(--bg);
  }

  body.nav-open .site-nav { display: flex; }

  .site-nav a {
    padding: 12px 0;
    font-family: var(--display);
    font-size: 2.8rem;
    letter-spacing: -.04em;
  }

  .hero-grid,
  .nexus-project-card,
  .about-grid,
  .press-grid,
  .nexus-press-body {
    grid-template-columns: 1fr;
  }

  .hero { min-height: auto; }
  .hero-copy { min-height: 70svh; }
  .brand-field { min-height: 58svh; }

  .nexus-project-card { min-height: 0; }

  .nexus-project-record {
    border-left: 0;
    border-top: 1px solid rgb(25, 53, 35);
  }

  .studio-note-grid {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .studio-note-mark {
    width: 90px;
  }

  .fact-grid { grid-template-columns: 1fr; }

  .fact {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .fact:last-child { border-bottom: 0; }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .hero h1 { font-size: clamp(4.2rem, 25vw, 7rem); }

  .brand-field-meta {
    flex-direction: column;
    gap: 6px;
  }

  .nexus-card-header span:last-child {
    display: none;
  }

  .nexus-card-copy {
    padding: 40px 26px;
  }

  .nexus-project-record {
    padding: 28px 24px;
  }

  .studio-note-grid {
    grid-template-columns: 1fr;
  }

  .press-details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 14px 22px;
  }
}


/* ============================================================
   DARK STATIC STATE PASS
   ============================================================ */

body {
  background:
    radial-gradient(circle at 80% 0%, rgba(31, 255, 147, .035), transparent 24%),
    var(--bg);
  color: var(--ink);
}

.site-header {
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  border-bottom-color: var(--line);
}

.brand-logo {
  filter: drop-shadow(0 0 14px rgba(31, 255, 147, .08));
}

.site-nav a,
.footer-links a {
  color: var(--ink);
}

.hero-intro,
.about-copy,
.press-copy,
.project-info p,
.press-project p {
  color: var(--muted);
}

.page-hero {
  background:
    linear-gradient(rgba(31, 255, 147, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 255, 147, .018) 1px, transparent 1px);
  background-size: 42px 42px;
}

.page-title,
.about-statement h2,
.press-copy h2,
.legal-page h1,
.error-page h1 {
  color: var(--ink);
}

.fact-grid,
.fact,
.press-details div,
.site-footer,
.page-hero {
  border-color: var(--line);
}

.fact strong {
  color: var(--ink);
}

.legal-note {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}

.button-dark {
  color: var(--brand-black);
  background: var(--brand-green);
  border-color: var(--brand-green);
}

.button-dark:hover {
  color: var(--brand-green);
  background: transparent;
}

.site-footer {
  background: #050705;
}

.nexus-card-wordmark {
  display: block;
  width: min(100%, 760px);
  max-height: 118px;
  margin: 0 0 10px;
  object-fit: contain;
  object-position: left center;
}

.nexus-record-title {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.nexus-record-title img {
  width: 31px;
  height: 31px;
  object-fit: contain;
}

.nexus-record-title h3 {
  margin: 0;
}

.nexus-inline-name {
  gap: 10px;
}

.nexus-inline-name img,
.nexus-inline-link img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nexus-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.nexus-press-wordmark {
  width: min(100%, 650px);
  max-height: 102px;
  margin-bottom: 12px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 780px) {
  .site-nav {
    background: var(--bg);
  }

  .nexus-card-wordmark {
    max-height: 92px;
  }
}

@media (max-width: 520px) {
  .nexus-card-wordmark {
    max-height: 68px;
  }
}


/* ============================================================
   DISCORD ACCOUNT UI
   ============================================================ */

.auth-shell {
  position: relative;
  margin-left: 8px;
  font-family: var(--sans);
  text-transform: none;
}

.site-nav .auth-shell a::after {
  display: none;
}

.discord-login-button,
.auth-profile-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: .83rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.discord-login-button {
  color: #fff !important;
  background: #5865f2;
  box-shadow: 0 8px 24px rgba(88, 101, 242, .16);
}

.discord-login-button:hover {
  background: #4752c4;
  transform: translateY(-1px);
}

.discord-login-button img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.auth-profile-button {
  cursor: pointer;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.auth-profile-button:hover,
.auth-profile-button[aria-expanded="true"] {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.auth-profile-button img,
.auth-menu-avatar {
  border-radius: 50%;
  object-fit: cover;
  background: #161a17;
}

.auth-profile-button img {
  width: 25px;
  height: 25px;
}

.auth-profile-button-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-chevron {
  color: var(--muted);
  font-size: .7rem;
}

.auth-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 400;
  width: min(330px, calc(100vw - 32px));
  padding: 16px;
  color: var(--ink);
  background: #0a0e0b;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

.auth-menu[hidden] {
  display: none;
}

.auth-menu-user {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}

.auth-menu-avatar {
  width: 46px;
  height: 46px;
}

.auth-menu-user strong,
.auth-menu-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-menu-user strong {
  font-size: .98rem;
}

.auth-menu-user span {
  margin-top: 2px;
  color: var(--muted);
  font-size: .76rem;
}

.auth-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin: 15px 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.auth-status-item {
  min-width: 0;
  padding: 12px;
  background: var(--surface);
}

.auth-status-item span,
.auth-menu-section > span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.auth-status-item strong {
  display: block;
  margin-top: 7px;
  color: var(--brand-green);
  font-family: var(--mono);
  font-size: .7rem;
}

.auth-menu-section {
  padding: 2px 0 14px;
}

.auth-menu-section strong {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: .78rem;
}

.auth-community-link,
.auth-logout-button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.auth-community-link {
  gap: 9px;
  margin-top: 12px;
  color: #fff !important;
  background: #5865f2;
}

.auth-community-link:hover {
  background: #4752c4;
}

.auth-community-link img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.auth-logout-button {
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.auth-logout-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.auth-loading {
  min-height: 40px;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
}

@media (max-width: 780px) {
  .auth-shell {
    width: 100%;
    margin: 22px 0 0;
  }

  .discord-login-button,
  .auth-profile-button {
    width: 100%;
    min-height: 48px;
  }

  .auth-menu {
    position: static;
    width: 100%;
    margin-top: 10px;
  }
}


/* ============================================================
   HEADER NAV ALIGNMENT FIX
   Keeps the standard links aligned with the Discord auth button.
   ============================================================ */

.site-nav {
  align-items: center;
  gap: 28px;
}

.site-nav > a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.site-nav > a::after {
  bottom: 0;
}

.auth-shell {
  display: flex;
  align-items: center;
  margin-left: 4px;
}
